]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid compiler warnings when redefining macros defined by <libintl.h>.
authorBruno Haible <bruno@clisp.org>
Fri, 1 May 2009 14:15:37 +0000 (14:15 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:16:04 +0000 (12:16 +0200)
gnulib-local/ChangeLog
gnulib-local/lib/gettext.h

index 8dd31980adeaf1e807312aafe0edaa3e36687f5d..cf4968dbdd25abfbb85413e4bafe0b5add748aab 100644 (file)
@@ -1,3 +1,10 @@
+2009-05-01  Bruno Haible  <bruno@clisp.org>
+
+       Avoid compiler warnings when redefining macros defined by <libintl.h>.
+       * lib/gettext.h [!ENABLE_NLS] (gettext, dgettext, dcgettext, ngettext,
+       dngettext, dcngettext, textdomain, bindtextdomain,
+       bind_textdomain_codeset): Undefine before redefining.
+
 2009-03-25  Bruno Haible  <bruno@clisp.org>
 
        * m4/quotearg.m4.diff: Update after gnulib changed.
index 94c76d024960e34ff98f73319dec60a757a5e6c3..8a729ce2ad4bd9b5fa6a7a8eb3e94970447d0c5e 100644 (file)
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 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
    for invalid uses of the value returned from these functions.
    On pre-ANSI systems without 'const', the config.h file is supposed to
    contain "#define const".  */
+# undef gettext
 # define gettext(Msgid) ((const char *) (Msgid))
+# undef dgettext
 # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# undef dcgettext
 # define dcgettext(Domainname, Msgid, Category) \
     ((void) (Category), dgettext (Domainname, Msgid))
+# undef ngettext
 # define ngettext(Msgid1, Msgid2, N) \
     ((N) == 1 \
      ? ((void) (Msgid2), (const char *) (Msgid1)) \
      : ((void) (Msgid1), (const char *) (Msgid2)))
+# undef dngettext
 # define dngettext(Domainname, Msgid1, Msgid2, N) \
     ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# undef dcngettext
 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
     ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+# undef textdomain
 # define textdomain(Domainname) ((const char *) (Domainname))
+# undef bindtextdomain
 # define bindtextdomain(Domainname, Dirname) \
     ((void) (Domainname), (const char *) (Dirname))
+# undef bind_textdomain_codeset
 # define bind_textdomain_codeset(Domainname, Codeset) \
     ((void) (Domainname), (const char *) (Codeset))