]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Portability to platforms without existing <libintl.h>.
authorBruno Haible <bruno@clisp.org>
Mon, 5 Feb 2001 18:41:05 +0000 (18:41 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 5 Feb 2001 18:41:05 +0000 (18:41 +0000)
ChangeLog
Makefile.am
lib/ChangeLog
lib/error.c
lib/getopt.c
lib/obstack.c

index 78aec4b52df54fa6c0e097989d76d504f5befa65..3bb0f5f37486b3cad74c2093610a272aa2e02839 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-04  Bruno Haible  <haible@clisp.cons.org>
+
+       * Makefile.am (SUBDIRS): Move intl before lib, because lib needs
+       libintl.h if the included libintl is used.
+
 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
 
        Use libtool.
index 51c8ee5b5553834af0b6cec5df7db8f8d9292276..eed456bd177a2e4ca392044a8de9df6e5a598c90 100644 (file)
@@ -26,7 +26,7 @@ gettextsrcdir = $(datadir)/gettext
 gettextsrc_DATA = ABOUT-NLS
 
 EXTRA_DIST = BUGS DISCLAIM README.gemtext aclocal.sh
-SUBDIRS = doc lib intl src po m4 misc tests
+SUBDIRS = doc intl lib src po m4 misc tests
 
 ABOUT-NLS: $(srcdir)/doc/nls.texi $(srcdir)/doc/matrix.texi
        rm -f $(srcdir)/ABOUT-NLS \
index 2fd6f1df2154c6a22be85b386f0dd1adc2b4c29d..fe4fb1196f5a8d9927ab479851f978ad1815d420 100644 (file)
@@ -1,3 +1,14 @@
+2001-02-04  Bruno Haible  <haible@clisp.cons.org>
+
+       * system.h (O_BINARY, O_TEXT, setmode, fileno): New macros for systems
+       that distinguish between text and binary I/O.
+
+2001-02-04  Bruno Haible  <haible@clisp.cons.org>
+
+       * error.c: Include <libintl.h> only if ENABLE_NLS || _LIBC.
+       * getopt.c: Test ENABLE_NLS instead of 'defined HAVE_LIBINTL_H'.
+       * obstack.c: Likewise.
+
 2001-01-07  Bruno Haible  <haible@clisp.cons.org>
 
        * system.h: Assume <stdlib.h>, <string.h> exist.
index 43c0df2cd64e076b679c719e6268c606042955ab..c6e8c6c0b37106b304a8705cd6844829cc0f5c4c 100644 (file)
@@ -1,5 +1,5 @@
 /* Error handler for noninteractive utilities
-   Copyright (C) 1990-1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1990-1998, 2000, 2001 Free Software Foundation, Inc.
 
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
@@ -27,7 +27,6 @@
 #endif
 
 #include <stdio.h>
-#include <libintl.h>
 
 #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
 # if __STDC__
@@ -52,7 +51,14 @@ void exit ();
 #include "error.h"
 
 #ifndef _
-# define _(String) String
+# if ENABLE_NLS || defined _LIBC
+#  include <libintl.h>
+#  ifndef _
+#   define _(Str) gettext (Str)
+#  endif
+# else
+#  define _(Str) (Str)
+# endif
 #endif
 
 /* If NULL, error will flush stdout, then print on stderr the program
index bdcc8f3ba61556bef9c2a0b03a6b8aec3b122bab..02420e8336f72bf5afbee70b4cfed97e8372cf88 100644 (file)
@@ -81,7 +81,7 @@
 
 #ifndef _
 /* This is for other GNU distributions with internationalized messages.  */
-# if defined HAVE_LIBINTL_H || defined _LIBC
+# if ENABLE_NLS || defined _LIBC
 #  include <libintl.h>
 #  ifndef _
 #   define _(msgid)    gettext (msgid)
index 68303b3c33842e530140668a9dcbf06a674f007f..e8de1f9df26730cfae506dc0d116ee0d870be84a 100644 (file)
@@ -458,7 +458,7 @@ _obstack_memory_used (h)
 \f
 /* Define the error handler.  */
 #ifndef _
-# if defined HAVE_LIBINTL_H || defined _LIBC
+# if ENABLE_NLS || defined _LIBC
 #  include <libintl.h>
 #  ifndef _
 #   define _(Str) gettext (Str)