obstack.c (_): Honor the setting of ENABLE_NLS.
authorJim Meyering <meyering@lucent.com>
Tue, 13 Nov 2001 03:46:00 +0000 (03:46 +0000)
committerDJ Delorie <dj@gcc.gnu.org>
Tue, 13 Nov 2001 03:46:00 +0000 (22:46 -0500)
2001-11-12  Jim Meyering  <meyering@lucent.com>

* obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
this code would end up calling gettext even in packages built
with --disable-nls.
* getopt.c (_): Likewise.
* regex.c (_): Likewise.

From-SVN: r46975

libiberty/ChangeLog
libiberty/getopt.c
libiberty/obstack.c
libiberty/regex.c

index cd68c5b3921cb3e29232d025807cd9f94413443e..3b72a0cf460ed9fe96735ec345ea6f195946973e 100644 (file)
@@ -1,3 +1,11 @@
+2001-11-12  Jim Meyering  <meyering@lucent.com>
+
+       * obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
+       this code would end up calling gettext even in packages built
+       with --disable-nls.
+       * getopt.c (_): Likewise.
+       * regex.c (_): Likewise.
+
 2001-11-03  Alan Modra  <amodra@bigpond.net.au>
 
        * configure.in: Cope with missing makeinfo.
index fd302b6e636edf1b4424c0ca6d2c10e4dd49909c..2402a39e2f85687cf7a73f36d2a4f3a10940cfa7 100644 (file)
@@ -82,7 +82,7 @@
 #ifndef _
 /* This is for other GNU distributions with internationalized messages.
    When compiling libc, the _ macro is predefined.  */
-# ifdef HAVE_LIBINTL_H
+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
 #  include <libintl.h>
 #  define _(msgid)     gettext (msgid)
 # else
index 0d4a4c88949cb5fc4cae9ac8f93d17c05d7f73ed..02560c9e032e398aeeb726435e9104336d2b1514 100644 (file)
@@ -451,7 +451,7 @@ _obstack_memory_used (h)
 \f
 /* Define the error handler.  */
 #ifndef _
-# ifdef HAVE_LIBINTL_H
+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
 #  include <libintl.h>
 #  ifndef _
 #   define _(Str) gettext (Str)
index e68df05818c5ea40940f2d6ac5e8d699e4127417..2852e849fa8cbfa41f2dde2b410939027ad503fd 100644 (file)
@@ -95,7 +95,7 @@
 # endif
 
 /* This is for other GNU distributions with internationalized messages.  */
-# if HAVE_LIBINTL_H || defined _LIBC
+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
 #  include <libintl.h>
 #  ifdef _LIBC
 #   undef gettext