From a6ab0a96b3518d38285a7f92d6a22b0434cb30e9 Mon Sep 17 00:00:00 2001 From: jasonmoxham Date: Thu, 12 Feb 2009 11:23:26 +0000 Subject: [PATCH] changed gmp.h to mpir.h for a few odd cases left --- Makefile.am | 10 +++++----- acinclude.m4 | 18 ++++++++--------- configure.in | 10 +++++----- demos/calc/calc.y | 2 +- demos/expr/expr-impl.h | 2 +- demos/perl/GMP.xs | 2 +- doc/devel/FILES.txt | 2 +- doc/devel/configuration | 2 +- doc/devel/gmp-h.txt | 4 ++-- doc/devel/tasks.html | 14 ++++++------- doc/gmp.texi | 38 ++++++++++++++++++------------------ dumbmp.c | 2 +- gen-bases.c | 2 +- gen-fib.c | 2 +- gen-psqr.c | 2 +- gmp-h.in | 2 +- gmp-impl.h | 8 ++++---- gmpxx.h | 2 +- mp-h.in | 2 +- mpn/asm-defs.m4 | 2 +- mpn/m68k/README | 2 +- mpn/x86_64/core2/asm-defs.m4 | 2 +- printf/doprnt.c | 2 +- tests/rand/gmpstat.h | 2 +- tests/t-constants.c | 2 +- tests/t-gmpmax.c | 2 +- tune/many.pl | 2 +- tune/speed.h | 2 +- 28 files changed, 72 insertions(+), 72 deletions(-) diff --git a/Makefile.am b/Makefile.am index e4e558a6..b95f173a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -101,25 +101,25 @@ GMPXX_HEADERS_OPTION = gmpxx.h endif EXTRA_DIST += gmpxx.h -# gmp.h and mp.h are architecture dependent, mainly since they encode the +# mpir.h and mp.h are architecture dependent, mainly since they encode the # limb size used in libgmp. For that reason they belong under $exec_prefix # not $prefix, strictly speaking. # # $exec_prefix/include is not in the default include path for gcc built to -# the same $prefix and $exec_prefix, which might mean gmp.h is not found, +# the same $prefix and $exec_prefix, which might mean mpir.h is not found, # but anyone knowledgable enough to be playing with exec_prefix will be able # to address that. # includeexecdir = $(exec_prefix)/include include_HEADERS = $(GMPXX_HEADERS_OPTION) -nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION) +nodist_includeexec_HEADERS = mpir.h $(MPBSD_HEADERS_OPTION) lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION) -BUILT_SOURCES = gmp.h +BUILT_SOURCES = mpir.h DISTCLEANFILES = $(BUILT_SOURCES) config.m4 @gmp_srclinks@ -# Tell gmp.h it's building gmp, not an application, used by windows DLL stuff. +# Tell mpir.h it's building gmp, not an application, used by windows DLL stuff. INCLUDES=-D__GMP_WITHIN_GMP diff --git a/acinclude.m4 b/acinclude.m4 index 93bb6bd1..d4624855 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -111,11 +111,11 @@ done dnl GMP_INCLUDE_GMP_H dnl ----------------- dnl Expand to the right way to #include gmp-h.in. This must be used -dnl instead of gmp.h, since that file isn't generated until the end of the +dnl instead of mpir.h, since that file isn't generated until the end of the dnl configure. dnl dnl Dummy values for __GMP_BITS_PER_MP_LIMB and GMP_LIMB_BITS are enough -dnl for all current configure-time uses of gmp.h. +dnl for all current configure-time uses of mpir.h. define(GMP_INCLUDE_GMP_H, [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ @@ -3311,7 +3311,7 @@ dnl HAVE_STDARG_H which could arise from AC_CHECK_HEADERS. dnl dnl This test might be slight overkill, after all there's really only going dnl to be ANSI or K&R and the two can be differentiated by AC_PROG_CC_STDC -dnl or very likely by the setups for _PROTO in gmp.h. On the other hand +dnl or very likely by the setups for _PROTO in mpir.h. On the other hand dnl this test is nice and direct, being what we're going to actually use. AC_DEFUN([GMP_C_STDARG], @@ -3565,7 +3565,7 @@ fi dnl GMP_H_ANSI dnl ---------- -dnl Check whether gmp.h recognises the compiler as ANSI capable. +dnl Check whether mpir.h recognises the compiler as ANSI capable. AC_DEFUN([GMP_H_ANSI], [AC_REQUIRE([AC_PROG_CC_STDC]) @@ -3579,7 +3579,7 @@ GMP_INCLUDE_GMP_H die die die #endif ],,, - [AC_MSG_WARN([gmp.h doesnt recognise compiler as ANSI, prototypes and "const" will be unavailable])]) + [AC_MSG_WARN([mpir.h doesnt recognise compiler as ANSI, prototypes and "const" will be unavailable])]) ;; esac ]) @@ -3588,7 +3588,7 @@ esac dnl GMP_H_EXTERN_INLINE dnl ------------------- dnl If the compiler has an "inline" of some sort, check whether the -dnl #ifdef's in gmp.h recognise it. +dnl #ifdef's in mpir.h recognise it. AC_DEFUN([GMP_H_EXTERN_INLINE], [AC_REQUIRE([AC_C_INLINE]) @@ -3606,7 +3606,7 @@ die die die yes) tmp_inline=inline ;; *) tmp_inline=$ac_cv_c_inline ;; esac - AC_MSG_WARN([gmp.h doesnt recognise compiler "$tmp_inline", inlines will be unavailable])]) + AC_MSG_WARN([mpir.h doesnt recognise compiler "$tmp_inline", inlines will be unavailable])]) ;; esac ]) @@ -3614,7 +3614,7 @@ esac dnl GMP_H_HAVE_FILE dnl --------------- -dnl Check whether the #ifdef's in gmp.h recognise when stdio.h has been +dnl Check whether the #ifdef's in mpir.h recognise when stdio.h has been dnl included to get FILE. AC_DEFUN([GMP_H_HAVE_FILE], @@ -3625,7 +3625,7 @@ GMP_INCLUDE_GMP_H die die die #endif ],,, - [AC_MSG_WARN([gmp.h doesnt recognise , FILE prototypes will be unavailable])]) + [AC_MSG_WARN([mpir.h doesnt recognise , FILE prototypes will be unavailable])]) ]) diff --git a/configure.in b/configure.in index 739d523a..b7eb7cd0 100644 --- a/configure.in +++ b/configure.in @@ -56,7 +56,7 @@ GMP_INIT(config.m4) AC_CANONICAL_HOST dnl Automake "no-dependencies" is used because include file dependencies -dnl are not useful to us. Pretty much everything depends just on gmp.h, +dnl are not useful to us. Pretty much everything depends just on mpir.h, dnl gmp-impl.h and longlong.h, and yet only rarely does everything need to dnl be rebuilt for changes to those files. dnl @@ -342,7 +342,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1], # # limb=longlong (or limb_aa=longlong) applies to all compilers within that # ABI. It won't work to have some needing long long and some not, since a -# single instantiated gmp.h will be used by both. +# single instantiated mpir.h will be used by both. # # SPEED_CYCLECOUNTER, cyclecounter_size and CALLING_CONVENTIONS_OBJS are # also set here, with an ABI suffix. @@ -1925,7 +1925,7 @@ else fi -# Long long limb setup for gmp.h. +# Long long limb setup for mpir.h. case $limb_chosen in longlong) DEFN_LONG_LONG_LIMB="#define _LONG_LONG_LIMB 1" ;; *) DEFN_LONG_LONG_LIMB="/* #undef _LONG_LONG_LIMB */" ;; @@ -2130,7 +2130,7 @@ case $host in fi # Don't allow both static and DLL. if test "$enable_shared" != no && test "$enable_static" != no; then - AC_MSG_ERROR([cannot build both static and DLL, since gmp.h is different for each. + AC_MSG_ERROR([cannot build both static and DLL, since mpir.h is different for each. Use "--disable-static --enable-shared" to build just a DLL.]) fi @@ -3281,4 +3281,4 @@ GMP_FINISH # FIXME: Upcoming version of autoconf/automake don't like broken lines. # Right now automake isn't accepting the new AC_CONFIG_FILES scheme. -AC_OUTPUT(Makefile mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in mp.h:mp-h.in) +AC_OUTPUT(Makefile mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile mpir.h:gmp-h.in mp.h:mp-h.in) diff --git a/demos/calc/calc.y b/demos/calc/calc.y index daf832f3..427487d9 100644 --- a/demos/calc/calc.y +++ b/demos/calc/calc.y @@ -47,7 +47,7 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include -#include "gmp.h" +#include "mpir.h" #define NO_CALC_H /* because it conflicts with normal calc.c stuff */ #include "calc-common.h" diff --git a/demos/expr/expr-impl.h b/demos/expr/expr-impl.h index 9082578d..997cb7fd 100644 --- a/demos/expr/expr-impl.h +++ b/demos/expr/expr-impl.h @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Same tests as gmp.h. */ +/* Same tests as mpir.h. */ #if defined (__STDC__) \ || defined (__cplusplus) \ || defined (_AIX) \ diff --git a/demos/perl/GMP.xs b/demos/perl/GMP.xs index 4aa4b34a..509e7cb0 100644 --- a/demos/perl/GMP.xs +++ b/demos/perl/GMP.xs @@ -76,7 +76,7 @@ MA 02110-1301, USA. */ #include "XSUB.h" #include "patchlevel.h" -#include "gmp.h" +#include "mpir.h" /* Perl 5.005 doesn't have SvIsUV, only 5.6 and up. diff --git a/doc/devel/FILES.txt b/doc/devel/FILES.txt index 9dfe40d5..364ad926 100644 --- a/doc/devel/FILES.txt +++ b/doc/devel/FILES.txt @@ -42,7 +42,7 @@ gen-bases.c - auto generates some hard coded macros for base conversion gen-facui.c - generates data tables for factorials, e.g. all factorials which fit in a limb gen-fib.c - generate data for Fibonnacci number tables gen-psqr.c - generates data for perfect square testing -gmp-h.in - gmp.h with some platform dependent stuff not yet inserted (gmp.h is included by +gmp-h.in - mpir.h with some platform dependent stuff not yet inserted (mpir.h is included by programs using MPIR and by code within MPIR) gmp-impl.h - internal include file containing all the macros used MPIR wide gmpxx.h - C++ class wrapper for MPIR types diff --git a/doc/devel/configuration b/doc/devel/configuration index dcf9b7b0..e58b1f5f 100644 --- a/doc/devel/configuration +++ b/doc/devel/configuration @@ -301,7 +301,7 @@ At build time: */Makefile.in \ configure / */Makefile config.in | -------------> | config.h gmp-h.in | | config.m4 - mp-h.in / | gmp.h + mp-h.in / | mpir.h | mp.h \ fat.h (fat binary build only) diff --git a/doc/devel/gmp-h.txt b/doc/devel/gmp-h.txt index 254f3ba2..bb3a68ae 100644 --- a/doc/devel/gmp-h.txt +++ b/doc/devel/gmp-h.txt @@ -24,7 +24,7 @@ Some compilers with hacks: - SCO OpenUNIX 8 cc - __cplusplus -Useful/undocumented macros in gmp.h: +Useful/undocumented macros in mpir.h: ==================================== __GMPN_ABS(x) - absolute value __GMPN_MAX(h, i) - max of h and i @@ -49,7 +49,7 @@ gmp_errno - integer corresponding to a GMP error condition: 4 sqrt of negative 8 invalid argument -Undocumented mpn functions prototyped in gmp.h: +Undocumented mpn functions prototyped in mpir.h: =============================================== mp_limb_t mpn_preinv_mod_1(mp_srcptr sp, mp_size_t sn, mp_limb_t x, mp_limb_t xinv) - compute {sp, sn} mod x given a precomputed inverse xinv of x diff --git a/doc/devel/tasks.html b/doc/devel/tasks.html index 20cad9b6..ee3d9feb 100644 --- a/doc/devel/tasks.html +++ b/doc/devel/tasks.html @@ -44,7 +44,7 @@ MA 02110-1301, USA.

Correctness and Completeness

    -
  • _LONG_LONG_LIMB in gmp.h is not namespace clean. Reported +
  • _LONG_LONG_LIMB in mpir.h is not namespace clean. Reported by Patrick Pelissier.
    We sort of mentioned _LONG_LONG_LIMB in past releases, so @@ -161,7 +161,7 @@ MA 02110-1301, USA. mpn_mod_1 (not sure currently whether all the risc chips provoke the right exception there if using mul-by-inverse).
  • Consider inlining: mpz_fits_s*_p. The setups for - LONG_MAX etc would need to go into gmp.h, and on Cray it + LONG_MAX etc would need to go into mpir.h, and on Cray it might, unfortunately, be necessary to forcibly include <limits.h> since there's no apparent way to get SHRT_MAX with an expression (since short and unsigned short can @@ -230,7 +230,7 @@ MA 02110-1301, USA.
  • mpn_add_1, mpn_sub_1, mpn_add, mpn_sub: Internally use __GMPN_ADD_1 etc instead of the functions, so they get inlined on all compilers, not just - gcc and others with inline recognised in gmp.h. + gcc and others with inline recognised in mpir.h. __GMPN_ADD_1 etc are meant mostly to support application inline mpn_add_1 etc and if they don't come out good for internal uses then special forms can be introduced, for instance many @@ -521,9 +521,9 @@ MA 02110-1301, USA. little-endian and big-endian machines. A format which MPFR can use too would be good.
  • mpn_and_n ... mpn_copyd: Perhaps make the mpn - logops and copys available in gmp.h, either as library functions or + logops and copys available in mpir.h, either as library functions or inlines, with the availability of library functions instantiated in the - generated gmp.h at build time. + generated mpir.h at build time.
  • mpz_set_str etc variants taking string lengths rather than null-terminators.
  • mpz_andn, mpz_iorn, mpz_nand, @@ -538,7 +538,7 @@ MA 02110-1301, USA. Eg. 0xFFAA@0x5A. A leading "0" for octal would match the integers, but probably something like "0.123" ought not mean octal.
  • GMP_LONG_LONG_LIMB or some such could become a documented - feature of gmp.h, so applications could know whether to + feature of mpir.h, so applications could know whether to printf a limb using %lu or %Lu.
  • GMP_PRIdMP_LIMB and similar defines following C99 <inttypes.h> might be of use to applications printing limbs. But @@ -599,7 +599,7 @@ MA 02110-1301, USA. libgmp.a would be
    • Library contents vary according to the build compiler. -
    • gmp.h would need an ugly #ifdef block to decide if the +
    • mpir.h would need an ugly #ifdef block to decide if the application compiler could take the long long prototypes.
    • Some sort of LIBGMP_HAS_LONGLONG might be wanted to diff --git a/doc/gmp.texi b/doc/gmp.texi index 19d515e3..e21e9d57 100644 --- a/doc/gmp.texi +++ b/doc/gmp.texi @@ -618,7 +618,7 @@ install under a particular tree. The default is @samp{/usr/local}. @option{--exec-prefix} can be used to direct architecture-dependent files like @file{libgmp.a}/@file{libmpir.a} to a different location. This can be used to share architecture-independent parts like the documentation, but separate the -dependent parts. Note however that @file{gmp.h}/@file{mpir.h} and @file{mp.h} are +dependent parts. Note however that @file{mpir.h} and @file{mp.h} are architecture-dependent since they encode certain aspects of @file{libgmp}/@file{libmpir}, so it will be necessary to ensure both @file{$prefix/include} and @file{$exec_prefix/include} are available to the compiler. @@ -1121,9 +1121,9 @@ In all cases it's vital that all object code used in a given program is compiled for the same ABI. Usually a limb is implemented as a @code{long}. When a @code{long long} limb -is used this is encoded in the generated @file{gmp.h}/@file{mpir.h}. This is convenient for -applications, but it does mean that @file{gmp.h}/@file{mpir.h} will vary, and can't be just -copied around. @file{gmp.h}/@file{mpir.h} remains compiler independent though, since all +is used this is encoded in the generated @file{mpir.h}. This is convenient for +applications, but it does mean that @file{mpir.h} will vary, and can't be just +copied around. @file{mpir.h} remains compiler independent though, since all compilers for a particular ABI will be expected to use the same limb type. Currently no attempt is made to follow whatever conventions a system has for @@ -1441,12 +1441,12 @@ conventions for install locations that vary with ABI, such as @samp{ABI=32}. A package build can override @samp{libdir} and other standard variables as necessary. -Note that @file{gmp.h}/@file{mpir.h} is a generated file, and will be architecture and ABI +Note that @file{mpir.h} is a generated file, and will be architecture and ABI dependent. When attempting to install two ABIs simultaneously it will be -important that an application compile gets the correct @file{gmp.h}/@file{mpir.h} for its +important that an application compile gets the correct @file{mpir.h} for its desired ABI@. If compiler include paths don't vary with ABI options then it -might be necessary to create a @file{/usr/include/gmp.h} or @file{/usr/include/mpir.h} which tests -preprocessor symbols and chooses the correct actual @file{gmp.h}/@file{mpir.h}. +might be necessary to create a @file{/usr/include/mpir.h} which tests +preprocessor symbols and chooses the correct actual @file{mpir.h}. @need 2000 @@ -1545,7 +1545,7 @@ default MPIR builds only a static library, but a DLL can be built instead using @end example Static and DLL libraries can't both be built, since certain export directives -in @file{gmp.h}/@file{mpir.h} must be different. +in @file{mpir.h} must be different. A MINGW DLL build of MPIR can be used with Microsoft C@. Libtool doesn't install a @file{.lib} format import library, but it can be created with MS @@ -1811,11 +1811,11 @@ to be incompatible with future versions of MPIR.} @section Headers and Libraries @cindex Headers -@cindex @file{gmp.h}/@file{mpir.h} +@cindex @file{mpir.h} @cindex Include files @cindex @code{#include} All declarations needed to use MPIR are collected in the include file -@file{gmp.h}/@file{mpir.h}. It is designed to work with both C and C++ compilers. +@file{mpir.h}. It is designed to work with both C and C++ compilers. @example #include @@ -2803,7 +2803,7 @@ AC_CHECK_LIB(mpir, __gmpz_mul_si, , [GMP/MPIR not found, or not GMP 3.1 or up or MPIR 1.0 or up, see http://www.mpir.org/])]) @end example -An alternative would be to test the version number in @file{gmp.h}/@file{mpir.h} using say +An alternative would be to test the version number in @file{mpir.h} using say @code{AC_EGREP_CPP}. That would make it possible to test the exact version, if some particular sub-minor release is known to be necessary. @@ -3770,7 +3770,7 @@ these functions will make them read from @code{stdin} and write to @code{stdout}, respectively. When using any of these functions, it is a good idea to include @file{stdio.h} -before @file{gmp.h}/@file{mpir.h}, since that will allow @file{gmp.h}/@file{mpir.h} to define prototypes +before @file{mpir.h}, since that will allow @file{mpir.h} to define prototypes for these functions. @deftypefun size_t mpz_out_str (FILE *@var{stream}, int @var{base}, mpz_t @var{op}) @@ -4374,7 +4374,7 @@ recommended instead of these functions. @cindex I/O functions When using any of these functions, it's a good idea to include @file{stdio.h} -before @file{gmp.h}/@file{mpir.h}, since that will allow @file{gmp.h}/@file{mpir.h} to define prototypes +before @file{mpir.h}, since that will allow @file{mpir.h} to define prototypes for these functions. Passing a @code{NULL} pointer for a @var{stream} argument to any of these @@ -4860,7 +4860,7 @@ any of these functions will make them read from @code{stdin} and write to @code{stdout}, respectively. When using any of these functions, it is a good idea to include @file{stdio.h} -before @file{gmp.h}/@file{mpir.h}, since that will allow @file{gmp.h}/@file{mpir.h} to define prototypes +before @file{mpir.h}, since that will allow @file{mpir.h} to define prototypes for these functions. @deftypefun size_t mpf_out_str (FILE *@var{stream}, int @var{base}, size_t @var{n_digits}, mpf_t @var{op}) @@ -5889,7 +5889,7 @@ Obstacks, libc, The GNU C Library Reference Manual}. The following functions are provided in @file{libgmpxx}/@file{libmpirxx} (@pxref{Headers and Libraries}), which is built if C++ support is enabled (@pxref{Build Options}). -Prototypes are available from @code{} or @code{}. +Prototypes are available from @code{}. @deftypefun ostream& operator<< (ostream& @var{stream}, mpz_t @var{op}) Print @var{op} to @var{stream}, using its @code{ios} formatting settings. @@ -6178,7 +6178,7 @@ way C99 @code{sscanf} is the same as @code{fscanf}. The following functions are provided in @file{libgmpxx}/@file{libmpirxx} (@pxref{Headers and Libraries}), which is built only if C++ support is enabled (@pxref{Build -Options}). Prototypes are available from @code{} or @code{}. +Options}). Prototypes are available from @code{}. @deftypefun istream& operator>> (istream& @var{stream}, mpz_t @var{rop}) Read @var{rop} from @var{stream}, using its @code{ios} formatting settings. @@ -6230,7 +6230,7 @@ results. For classes with overloading, see @ref{C++ Class Interface}. This chapter describes the C++ class based interface to MPIR. All MPIR C language types and functions can be used in C++ programs, since -@file{gmp.h}/@file{mpir.h} has @code{extern "C"} qualifiers, but the class interface offers +@file{mpir.h} has @code{extern "C"} qualifiers, but the class interface offers overloaded functions and operators which may be more convenient. Due to the implementation of this interface, a reasonably recent C++ compiler @@ -6349,7 +6349,7 @@ y = mpz_class (z); @end example There are no namespace setups in @file{gmpxx.h}, all types and functions are -simply put into the global namespace. This is what @file{gmp.h}/@file{mpir.h} has done in +simply put into the global namespace. This is what @file{mpir.h} has done in the past, and continues to do for compatibility. The extras provided by @file{gmpxx.h} follow MPIR naming conventions and are unlikely to clash with anything. diff --git a/dumbmp.c b/dumbmp.c index 49924418..0ced0401 100644 --- a/dumbmp.c +++ b/dumbmp.c @@ -25,7 +25,7 @@ MA 02110-1301, USA. */ will be slow, but highly portable. None of the normal GMP configure things are used, nor any of the normal - gmp.h or gmp-impl.h. To use this file in a program just #include + mpir.h or gmp-impl.h. To use this file in a program just #include "dumbmp.c". ANSI function definitions can be used here, since ansi2knr is run if diff --git a/gen-bases.c b/gen-bases.c index fd5cd4de..dae7e096 100644 --- a/gen-bases.c +++ b/gen-bases.c @@ -107,7 +107,7 @@ table (int limb_bits, int nail_bits) printf ("/* This file generated by gen-bases.c - DO NOT EDIT. */\n"); printf ("\n"); - printf ("#include \"gmp.h\"\n"); + printf ("#include \"mpir.h\"\n"); printf ("#include \"gmp-impl.h\"\n"); printf ("\n"); printf ("#if GMP_NUMB_BITS != %d\n", numb_bits); diff --git a/gen-fib.c b/gen-fib.c index 306941b1..8a5f1411 100644 --- a/gen-fib.c +++ b/gen-fib.c @@ -88,7 +88,7 @@ table (int numb_bits) printf ("/* This file generated by gen-fib.c - DO NOT EDIT. */\n"); printf ("\n"); - printf ("#include \"gmp.h\"\n"); + printf ("#include \"mpir.h\"\n"); printf ("#include \"gmp-impl.h\"\n"); printf ("\n"); printf ("#if GMP_NUMB_BITS != %d\n", numb_bits); diff --git a/gen-psqr.c b/gen-psqr.c index 07a883c0..f92905b2 100644 --- a/gen-psqr.c +++ b/gen-psqr.c @@ -70,7 +70,7 @@ MA 02110-1301, USA. */ bother figuring out if it works, but using it with f_cmp_divisor and f_cmp_fraction avoids warnings from the qsort calls. */ -/* Same tests as gmp.h. */ +/* Same tests as mpir.h. */ #if defined (__STDC__) \ || defined (__cplusplus) \ || defined (_AIX) \ diff --git a/gmp-h.in b/gmp-h.in index c7df01df..c3eb2de1 100644 --- a/gmp-h.in +++ b/gmp-h.in @@ -45,7 +45,7 @@ MA 02110-1301, USA. */ /* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during + mpir.h and mp.h to allow both to be included in an application or during the library build. */ #ifndef __GNU_MP__ #define __GNU_MP__ 4 diff --git a/gmp-impl.h b/gmp-impl.h index 7c1167b1..34901cc8 100644 --- a/gmp-impl.h +++ b/gmp-impl.h @@ -151,7 +151,7 @@ MA 02110-1301, USA. */ The autoconf manual says this pragma needs to be at the start of a C file, apart from comments and preprocessor directives. Is that true? xlc on aix 4.xxx doesn't seem to mind it being after prototypes etc - from gmp.h. + from mpir.h. */ #ifndef alloca @@ -208,7 +208,7 @@ typedef unsigned long gmp_uint_least32_t; /* const and signed must match __gmp_const and __gmp_signed, so follow the - decision made for those in gmp.h. */ + decision made for those in mpir.h. */ #if ! __GMP_HAVE_CONST #define const /* empty */ #define signed /* empty */ @@ -466,7 +466,7 @@ void __gmp_tmp_debug_free _PROTO ((const char *, int, int, } while (0) -/* From gmp.h, nicer names for internal use. */ +/* From mpir.h, nicer names for internal use. */ #define CRAY_Pragma(str) __GMP_CRAY_Pragma(str) #define MPN_CMP(result, xp, yp, size) __GMPN_CMP(result, xp, yp, size) #define LIKELY(cond) __GMP_LIKELY(cond) @@ -1204,7 +1204,7 @@ __GMP_DECLSPEC void mpn_copyd _PROTO ((mp_ptr, mp_srcptr, mp_size_t)); gcc 2.95.x (for powerpc64 -maix64, or powerpc32) doesn't recognise the "for" loop in the generic code below can become stu/bdnz. The do/while here helps it get to that. The same caveat about plain -mpowerpc64 mode - applies here as to __GMPN_COPY_INCR in gmp.h. + applies here as to __GMPN_COPY_INCR in mpir.h. xlc 3.1 already generates stu/bdnz from the generic C, and does so from this loop too. diff --git a/gmpxx.h b/gmpxx.h index 22133523..0b7aa45e 100644 --- a/gmpxx.h +++ b/gmpxx.h @@ -41,7 +41,7 @@ MA 02110-1301, USA. */ #include /* for strlen */ #include #include -#include +#include /**************** Function objects ****************/ /* Any evaluation of a __gmp_expr ends up calling one of these functions diff --git a/mp-h.in b/mp-h.in index 84dae382..9c5c40f8 100644 --- a/mp-h.in +++ b/mp-h.in @@ -25,7 +25,7 @@ MA 02110-1301, USA. */ /* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during + mpir.h and mp.h to allow both to be included in an application or during the library build. Use the t-gmp-mp-h.pl script to check. */ #ifndef __GNU_MP__ #define __GNU_MP__ 4 diff --git a/mpn/asm-defs.m4 b/mpn/asm-defs.m4 index 0083e0af..abe3e250 100644 --- a/mpn/asm-defs.m4 +++ b/mpn/asm-defs.m4 @@ -1293,7 +1293,7 @@ m4_assert_numargs(1) dnl Usage: mpn_add_n, etc dnl -dnl Convenience definitions using MPN(), like the #defines in gmp.h. Each +dnl Convenience definitions using MPN(), like the #defines in mpir.h. Each dnl function that might be implemented in assembler is here. define(define_mpn, diff --git a/mpn/m68k/README b/mpn/m68k/README index af71e11d..ae864d98 100644 --- a/mpn/m68k/README +++ b/mpn/m68k/README @@ -70,7 +70,7 @@ could be optimized substantially. For example, One novel idea for 68000 would be to use a 16-bit limb instead of 32-bits. This would suit the native 16x16 multiply, but might make it difficult to get full value from the native 32x32 add/sub/etc. This would be an ABI -option, and would select "__GMP_SHORT_LIMB" in gmp.h. +option, and would select "__GMP_SHORT_LIMB" in mpir.h. Naturally an entirely new set of asm subroutines would be needed for a 16-bit limb. Also there's various places in the C code assuming limb>=long, diff --git a/mpn/x86_64/core2/asm-defs.m4 b/mpn/x86_64/core2/asm-defs.m4 index 0083e0af..abe3e250 100644 --- a/mpn/x86_64/core2/asm-defs.m4 +++ b/mpn/x86_64/core2/asm-defs.m4 @@ -1293,7 +1293,7 @@ m4_assert_numargs(1) dnl Usage: mpn_add_n, etc dnl -dnl Convenience definitions using MPN(), like the #defines in gmp.h. Each +dnl Convenience definitions using MPN(), like the #defines in mpir.h. Each dnl function that might be implemented in assembler is here. define(define_mpn, diff --git a/printf/doprnt.c b/printf/doprnt.c index 65a4a70a..67a4c1fb 100644 --- a/printf/doprnt.c +++ b/printf/doprnt.c @@ -118,7 +118,7 @@ MA 02110-1301, USA. */ Right now there's no way for an application to know whether types like intmax_t are supported here. If configure is doing its job and the same compiler is used for gmp as for the application then there shouldn't be - any problem, but perhaps gmp.h should have some preprocessor symbols to + any problem, but perhaps mpir.h should have some preprocessor symbols to say what libgmp can do. */ diff --git a/tests/rand/gmpstat.h b/tests/rand/gmpstat.h index e51a7fd1..adf3da34 100644 --- a/tests/rand/gmpstat.h +++ b/tests/rand/gmpstat.h @@ -21,7 +21,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This file requires the following header files: gmp.h */ +/* This file requires the following header files: mpir.h */ #ifndef __GMPSTAT_H__ #define __GMPSTAT_H__ diff --git a/tests/t-constants.c b/tests/t-constants.c index 1a1cdd3c..848f8f73 100644 --- a/tests/t-constants.c +++ b/tests/t-constants.c @@ -309,7 +309,7 @@ main (int argc, char *argv[]) int bits; printf ("\n"); - printf ("After gmp.h,\n"); + printf ("After mpir.h,\n"); printf (" ULONG_MAX %s\n", ulong_max_def); printf (" LONG_MAX %s\n", long_max_def); printf (" UINT_MAX %s\n", uint_max_def); diff --git a/tests/t-gmpmax.c b/tests/t-gmpmax.c index cfe4c5b6..359cf1db 100644 --- a/tests/t-gmpmax.c +++ b/tests/t-gmpmax.c @@ -25,7 +25,7 @@ MA 02110-1301, USA. */ #include "mpir.h" -/* __GMP_UINT_MAX etc are generated with expressions in gmp.h since we don't +/* __GMP_UINT_MAX etc are generated with expressions in mpir.h since we don't want to demand or forcibly include it. Check the expressions come out the same as . */ diff --git a/tune/many.pl b/tune/many.pl index 5cfb76d1..36d4c1ae 100644 --- a/tune/many.pl +++ b/tune/many.pl @@ -1090,7 +1090,7 @@ foreach my $file_full (@files) { print TMP_C "/* tmp-$objbase.c generated by many.pl - DO NOT EDIT, CHANGES WILL BE LOST */ -#include \"gmp.h\" +#include \"mpir.h\" #include \"gmp-impl.h\" #include \"longlong.h\" #include \"speed.h\" diff --git a/tune/speed.h b/tune/speed.h index 896bf660..6a5975e9 100644 --- a/tune/speed.h +++ b/tune/speed.h @@ -523,7 +523,7 @@ int speed_routine_count_zeros_setup _PROTO ((struct speed_params *s, function pointer variable works, but stands a real risk of a non-optimizing compiler generating unnecessary overheads in the call. Currently the best idea is not to use those attributes for a timing - program build. __GMP_NO_ATTRIBUTE_CONST_PURE will tell gmp.h and + program build. __GMP_NO_ATTRIBUTE_CONST_PURE will tell mpir.h and gmp-impl.h to omit them from routines there. */ #define SPEED_RESTRICT_COND(cond) if (!(cond)) return -1.0;