summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-09-20 12:00:49 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:15:51 +0200
commit9bc711ecce2c25f201e1b5704a74f47eddd938ba (patch)
tree585e9fd0365069a99fb448a39798afbf657f0f20
parent5d20f1ddd92718d5d2832e800afec8ceacdc2093 (diff)
downloadexternal_gettext-9bc711ecce2c25f201e1b5704a74f47eddd938ba.zip
external_gettext-9bc711ecce2c25f201e1b5704a74f47eddd938ba.tar.gz
external_gettext-9bc711ecce2c25f201e1b5704a74f47eddd938ba.tar.bz2
Pacify users of the gcc option -Wundef.
-rw-r--r--gettext-runtime/intl/ChangeLog8
-rw-r--r--gettext-runtime/intl/libgnuintl.h.in8
2 files changed, 12 insertions, 4 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog
index 263515e..f9c6ab0 100644
--- a/gettext-runtime/intl/ChangeLog
+++ b/gettext-runtime/intl/ChangeLog
@@ -1,3 +1,11 @@
+2008-09-20 Bruno Haible <bruno@clisp.org>
+
+ * libgnuintl.h.in: Use (defined X && X) idiom to test whether a
+ possibly undefined macro has a certain value. Pacifies users of the
+ gcc option -Wundef.
+ Reported by Christian Weisgerber <naddy@mips.inka.de> and
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
+
2008-08-18 Bruno Haible <bruno@clisp.org>
* threadlib.c: Include <pthread.h>.
diff --git a/gettext-runtime/intl/libgnuintl.h.in b/gettext-runtime/intl/libgnuintl.h.in
index 851fb06..2ecff88 100644
--- a/gettext-runtime/intl/libgnuintl.h.in
+++ b/gettext-runtime/intl/libgnuintl.h.in
@@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
- Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 2000-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
@@ -88,7 +88,7 @@ extern int libintl_version;
If he doesn't, we choose the method. A third possible method is
_INTL_REDIRECT_ASM, supported only by GCC. */
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
-# if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
+# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
# define _INTL_REDIRECT_ASM
# else
# ifdef __cplusplus
@@ -110,7 +110,7 @@ extern int libintl_version;
/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
its n-th argument literally. This enables GCC to warn for example about
printf (gettext ("foo %y")). */
-#if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus)
+#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus)
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
#else
# define _INTL_MAY_RETURN_STRING_ARG(n)
@@ -316,7 +316,7 @@ extern char *bind_textdomain_codeset (const char *__domainname,
#include <stddef.h>
/* Get va_list. */
-#if __STDC__ || defined __cplusplus || defined _MSC_VER
+#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
# include <stdarg.h>
#else
# include <varargs.h>