diff options
author | Bruno Haible <bruno@clisp.org> | 2001-02-05 18:41:05 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-02-05 18:41:05 +0000 |
commit | 1fdb3de89f6349cdb5bc6de495d7b7d25e72d335 (patch) | |
tree | 4b1d673fd985a42f3aa3062051594e5c0b2dcbd9 | |
parent | 01d3bb04c9cfb4b685cf2879ee7360f3c1b9908d (diff) | |
download | external_gettext-1fdb3de89f6349cdb5bc6de495d7b7d25e72d335.zip external_gettext-1fdb3de89f6349cdb5bc6de495d7b7d25e72d335.tar.gz external_gettext-1fdb3de89f6349cdb5bc6de495d7b7d25e72d335.tar.bz2 |
Portability to platforms without existing <libintl.h>.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | lib/ChangeLog | 11 | ||||
-rw-r--r-- | lib/error.c | 12 | ||||
-rw-r--r-- | lib/getopt.c | 2 | ||||
-rw-r--r-- | lib/obstack.c | 2 |
6 files changed, 28 insertions, 6 deletions
@@ -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. diff --git a/Makefile.am b/Makefile.am index 51c8ee5..eed456b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/lib/ChangeLog b/lib/ChangeLog index 2fd6f1d..fe4fb11 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -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. diff --git a/lib/error.c b/lib/error.c index 43c0df2..c6e8c6c 100644 --- a/lib/error.c +++ b/lib/error.c @@ -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 diff --git a/lib/getopt.c b/lib/getopt.c index bdcc8f3..02420e8 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -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) diff --git a/lib/obstack.c b/lib/obstack.c index 68303b3..e8de1f9 100644 --- a/lib/obstack.c +++ b/lib/obstack.c @@ -458,7 +458,7 @@ _obstack_memory_used (h) /* 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) |