From: Bruno Haible Date: Mon, 5 Feb 2001 18:41:05 +0000 (+0000) Subject: Portability to platforms without existing . X-Git-Tag: v0.10.36~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fdb3de89f6349cdb5bc6de495d7b7d25e72d335;p=thirdparty%2Fgettext.git Portability to platforms without existing . --- diff --git a/ChangeLog b/ChangeLog index 78aec4b52..3bb0f5f37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-04 Bruno Haible + + * Makefile.am (SUBDIRS): Move intl before lib, because lib needs + libintl.h if the included libintl is used. + 2001-01-21 Bruno Haible Use libtool. diff --git a/Makefile.am b/Makefile.am index 51c8ee5b5..eed456bd1 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 2fd6f1df2..fe4fb1196 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,14 @@ +2001-02-04 Bruno Haible + + * 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 + + * error.c: Include only if ENABLE_NLS || _LIBC. + * getopt.c: Test ENABLE_NLS instead of 'defined HAVE_LIBINTL_H'. + * obstack.c: Likewise. + 2001-01-07 Bruno Haible * system.h: Assume , exist. diff --git a/lib/error.c b/lib/error.c index 43c0df2cd..c6e8c6c0b 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 -#include #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 +# 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 bdcc8f3ba..02420e833 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 # ifndef _ # define _(msgid) gettext (msgid) diff --git a/lib/obstack.c b/lib/obstack.c index 68303b3c3..e8de1f9df 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 # ifndef _ # define _(Str) gettext (Str)