[Gmp-commit] /var/hg/gmp: Test __GMP_WITHIN_GMP(XX) with #ifdef instead of #i...

mercurial at gmplib.org mercurial at gmplib.org
Fri Feb 17 21:57:33 CET 2012


details:   /var/hg/gmp/rev/4bb45d7afdc4
changeset: 14640:4bb45d7afdc4
user:      Marc Glisse <marc.glisse at inria.fr>
date:      Fri Feb 17 21:57:04 2012 +0100
description:
Test __GMP_WITHIN_GMP(XX) with #ifdef instead of #if, to avoid warnings with gcc -Wundef.

diffstat:

 ChangeLog |  6 ++++++
 gmp-h.in  |  4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 7e4f37685265 -r 4bb45d7afdc4 ChangeLog
--- a/ChangeLog	Thu Feb 16 21:41:39 2012 +0100
+++ b/ChangeLog	Fri Feb 17 21:57:04 2012 +0100
@@ -1,3 +1,9 @@
+2012-02-17  Marc Glisse  <marc.glisse at inria.fr>
+
+	* gmp-h.in (__GMP_WITHIN_GMP): Test with #ifdef instead of #if, for
+	the benefit of applications using gcc -Wundef.
+	(__GMP_WITHIN_GMPXX): Likewise.
+
 2012-02-16  Marc Glisse  <marc.glisse at inria.fr>
 
 	* gmpxx.h (__gmp_binary_expr): Let things happen in place: e=a*b-c*d
diff -r 7e4f37685265 -r 4bb45d7afdc4 gmp-h.in
--- a/gmp-h.in	Thu Feb 16 21:41:39 2012 +0100
+++ b/gmp-h.in	Fri Feb 17 21:57:04 2012 +0100
@@ -166,7 +166,7 @@
 #endif
 
 #if __GMP_LIBGMP_DLL
-#if __GMP_WITHIN_GMP
+#ifdef __GMP_WITHIN_GMP
 /* compiling to go into a DLL libgmp */
 #define __GMP_DECLSPEC  __GMP_DECLSPEC_EXPORT
 #else
@@ -281,7 +281,7 @@
 /* This is not wanted in mp.h, so put it outside the __GNU_MP__ common
    section. */
 #if __GMP_LIBGMP_DLL
-#if __GMP_WITHIN_GMPXX
+#ifdef __GMP_WITHIN_GMPXX
 /* compiling to go into a DLL libgmpxx */
 #define __GMP_DECLSPEC_XX  __GMP_DECLSPEC_EXPORT
 #else


More information about the gmp-commit mailing list