[Gmp-commit] /var/hg/gmp-proj/mini-gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Wed Jan 11 23:29:20 CET 2012
details: /var/hg/gmp-proj/mini-gmp/rev/28bfee8d54c5
changeset: 63:28bfee8d54c5
user: Niels M?ller <nisse at lysator.liu.se>
date: Wed Jan 11 23:27:37 2012 +0100
description:
Added missing static declarations on some internal functions.
details: /var/hg/gmp-proj/mini-gmp/rev/88847f9b41b6
changeset: 64:88847f9b41b6
user: Niels M?ller <nisse at lysator.liu.se>
date: Wed Jan 11 23:29:06 2012 +0100
description:
More complex tests for if stdio.h has been included (for using FILE * in
prototypes).
diffstat:
mini-gmp.c | 6 +++---
mini-gmp.h | 18 +++++++++++++++++-
2 files changed, 20 insertions(+), 4 deletions(-)
diffs (58 lines):
diff -r eb7a3053e12a -r 88847f9b41b6 mini-gmp.c
--- a/mini-gmp.c Wed Jan 11 22:49:33 2012 +0100
+++ b/mini-gmp.c Wed Jan 11 23:29:06 2012 +0100
@@ -1037,7 +1037,7 @@
info->bb = p;
}
-mp_bitcnt_t
+static mp_bitcnt_t
mpn_limb_size_in_base_2 (mp_limb_t u)
{
unsigned shift;
@@ -1099,7 +1099,7 @@
return i;
}
-size_t
+static size_t
mpn_get_str_other (unsigned char *sp,
int base, const struct mpn_base_info *info,
mp_ptr up, mp_size_t un)
@@ -2209,7 +2209,7 @@
mpz_div_qr (q, NULL, n, d, DIV_EXACT);
}
-unsigned long
+static unsigned long
mpz_div_qr_ui (mpz_t q, mpz_t r,
const mpz_t n, unsigned long d, enum mpz_div_round_mode mode)
{
diff -r eb7a3053e12a -r 88847f9b41b6 mini-gmp.h
--- a/mini-gmp.h Wed Jan 11 22:49:33 2012 +0100
+++ b/mini-gmp.h Wed Jan 11 23:29:06 2012 +0100
@@ -185,7 +185,23 @@
char *mpz_get_str (char *, int, const mpz_t);
int mpz_set_str (mpz_t, const char *, int);
-#if defined (FILE)
+/* This long list taken from gmp.h. */
+/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4,
+ <iostream> defines EOF but not FILE. */
+#if defined (FILE) \
+ || defined (H_STDIO) \
+ || defined (_H_STDIO) /* AIX */ \
+ || defined (_STDIO_H) /* glibc, Sun, SCO */ \
+ || defined (_STDIO_H_) /* BSD, OSF */ \
+ || defined (__STDIO_H) /* Borland */ \
+ || defined (__STDIO_H__) /* IRIX */ \
+ || defined (_STDIO_INCLUDED) /* HPUX */ \
+ || defined (__dj_include_stdio_h_) /* DJGPP */ \
+ || defined (_FILE_DEFINED) /* Microsoft */ \
+ || defined (__STDIO__) /* Apple MPW MrC */ \
+ || defined (_MSL_STDIO_H) /* Metrowerks */ \
+ || defined (_STDIO_H_INCLUDED) /* QNX4 */ \
+ || defined (_ISO_STDIO_ISO_H) /* Sun C++ */
size_t mpz_out_str (FILE *, int, const mpz_t);
#endif
More information about the gmp-commit
mailing list