Commit 77c06844 by Zack Weinberg

aclocal.m4 (AM_WITH_NLS): Also create and substitute INTLDEPS variable, which…

aclocal.m4 (AM_WITH_NLS): Also create and substitute INTLDEPS variable, which does not include $LIBICONV.

	* aclocal.m4 (AM_WITH_NLS): Also create and substitute
	INTLDEPS variable, which does not include $LIBICONV.
	* Makefile.in: Use INTLDEPS in LIBDEPS.
	* configure: Regenerate.

intl:
	* dcigettext.c: Don't use #elif.
	* gettextP.h: Prototype nls_uint32 and locale_charset here.
	Always define ZERO to 1 to avoid warnings (ZERO is used in
	flexible-array-member declarations).
	* loadmsgcat.c: Apply __extension__ to structure definitions
	using C99 designated initializer syntax.
	Do not prototype locale_charset here.
	* localcharset.c: Prototype get_charset_aliases before use.
	Get rid of STATIC nonsense.

From-SVN: r46394
parent 95756949
2001-10-21 Zack Weinberg <zack@codesourcery.com>
* aclocal.m4 (AM_WITH_NLS): Also create and substitute
INTLDEPS variable, which does not include $LIBICONV.
* Makefile.in: Use INTLDEPS in LIBDEPS.
* configure: Regenerate.
2001-10-21 Neil Booth <neil@daikokuya.demon.co.uk> 2001-10-21 Neil Booth <neil@daikokuya.demon.co.uk>
* cpphash.h (struct cpp_buffer): Delete read_ahead and extra_char. * cpphash.h (struct cpp_buffer): Delete read_ahead and extra_char.
......
...@@ -335,6 +335,7 @@ USE_NLS = @USE_NLS@ ...@@ -335,6 +335,7 @@ USE_NLS = @USE_NLS@
# Internationalization library. # Internationalization library.
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLDEPS = @INTLDEPS@
# Character encoding conversion library. # Character encoding conversion library.
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
...@@ -615,7 +616,7 @@ USE_HOST_STRSTR= ` case "${HOST_STRSTR}" in ?*) echo ${HOST_PREFIX}${HOST_STRSTR ...@@ -615,7 +616,7 @@ USE_HOST_STRSTR= ` case "${HOST_STRSTR}" in ?*) echo ${HOST_PREFIX}${HOST_STRSTR
# Dependency on obstack or whatever library facilities # Dependency on obstack or whatever library facilities
# are not installed in the system libraries. # are not installed in the system libraries.
# We don't use USE_* because backquote expansion doesn't work in deps. # We don't use USE_* because backquote expansion doesn't work in deps.
LIBDEPS= $(INTLLIBS) $(OBSTACK) $(VFPRINTF) $(DOPRINT) $(STRSTR) LIBDEPS= $(INTLDEPS) $(OBSTACK) $(VFPRINTF) $(DOPRINT) $(STRSTR)
# Likewise, for use in the tools that must run on this machine # Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC. # even if we are cross-building GCC.
......
...@@ -1381,7 +1381,9 @@ AC_DEFUN([AM_WITH_NLS], ...@@ -1381,7 +1381,9 @@ AC_DEFUN([AM_WITH_NLS],
BUILD_INCLUDED_LIBINTL=no BUILD_INCLUDED_LIBINTL=no
USE_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no
dnl GCC LOCAL: Separate concept of link command line from dependencies.
INTLLIBS= INTLLIBS=
INTLDEPS=
dnl If we use NLS figure out what method dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then if test "$USE_NLS" = "yes"; then
...@@ -1487,6 +1489,7 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "" ...@@ -1487,6 +1489,7 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
USE_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo CATOBJEXT=.gmo
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV" INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
INTLDEPS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a"
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
fi fi
...@@ -1605,6 +1608,7 @@ changequote([,])dnl ...@@ -1605,6 +1608,7 @@ changequote([,])dnl
AC_SUBST(CATOBJEXT) AC_SUBST(CATOBJEXT)
AC_SUBST(GMOFILES) AC_SUBST(GMOFILES)
AC_SUBST(INTLLIBS) AC_SUBST(INTLLIBS)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLOBJS) AC_SUBST(INTLOBJS)
AC_SUBST(POFILES) AC_SUBST(POFILES)
AC_SUBST(POSUB) AC_SUBST(POSUB)
......
2001-10-21 Zack Weinberg <zack@codesourcery.com>
* dcigettext.c: Don't use #elif.
* gettextP.h: Prototype nls_uint32 and locale_charset here.
Always define ZERO to 1 to avoid warnings (ZERO is used in
flexible-array-member declarations).
* loadmsgcat.c: Apply __extension__ to structure definitions
using C99 designated initializer syntax.
Do not prototype locale_charset here.
* localcharset.c: Prototype get_charset_aliases before use.
Get rid of STATIC nonsense.
2001-10-19 Zack Weinberg <zack@codesourcery.com> 2001-10-19 Zack Weinberg <zack@codesourcery.com>
* Makefile.in: Don't copy libgnuintl.h anywhere. * Makefile.in: Don't copy libgnuintl.h anywhere.
......
...@@ -123,7 +123,8 @@ extern int errno; ...@@ -123,7 +123,8 @@ extern int errno;
#ifdef _LIBC #ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard /* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */ file and the name space must not be polluted.
GCC LOCAL: Don't use #elif. */
# define getcwd __getcwd # define getcwd __getcwd
# ifndef stpcpy # ifndef stpcpy
# define stpcpy __stpcpy # define stpcpy __stpcpy
...@@ -133,9 +134,11 @@ extern int errno; ...@@ -133,9 +134,11 @@ extern int errno;
# if !defined HAVE_GETCWD # if !defined HAVE_GETCWD
char *getwd (); char *getwd ();
# define getcwd(buf, max) getwd (buf) # define getcwd(buf, max) getwd (buf)
# elif !defined HAVE_DECL_GETCWD # else
# if !defined HAVE_DECL_GETCWD
char *getcwd (); char *getcwd ();
# endif # endif
# endif
# ifndef HAVE_STPCPY # ifndef HAVE_STPCPY
static char *stpcpy PARAMS ((char *dest, const char *src)); static char *stpcpy PARAMS ((char *dest, const char *src));
# endif # endif
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
# include <byteswap.h> # include <byteswap.h>
# define SWAP(i) bswap_32 (i) # define SWAP(i) bswap_32 (i)
#else #else
/* GCC LOCAL: Prototype first to avoid warnings. */
static inline nls_uint32 SWAP PARAMS ((nls_uint32));
static inline nls_uint32 static inline nls_uint32
SWAP (i) SWAP (i)
nls_uint32 i; nls_uint32 i;
...@@ -144,12 +146,13 @@ struct loaded_domain ...@@ -144,12 +146,13 @@ struct loaded_domain
}; };
/* We want to allocate a string at the end of the struct. But ISO C /* We want to allocate a string at the end of the struct. But ISO C
doesn't allow zero sized arrays. */ doesn't allow zero sized arrays.
#ifdef __GNUC__ GCC LOCAL: Always use 1, to avoid warnings. */
# define ZERO 0 /*#ifdef __GNUC__*/
#else /*# define ZERO 0*/
/*#else*/
# define ZERO 1 # define ZERO 1
#endif /*#endif*/
/* A set of settings bound to a message domain. Used to store settings /* A set of settings bound to a message domain. Used to store settings
from bindtextdomain() and bind_textdomain_codeset(). */ from bindtextdomain() and bind_textdomain_codeset(). */
...@@ -189,6 +192,10 @@ char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file, ...@@ -189,6 +192,10 @@ char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
const char *msgid, size_t *lengthp)) const char *msgid, size_t *lengthp))
internal_function; internal_function;
/* GCC LOCAL: This prototype moved here from next to its
use in loadmsgcat.c. */
extern const char *locale_charset PARAMS ((void)) internal_function;
#ifdef _LIBC #ifdef _LIBC
extern char *__gettext PARAMS ((const char *__msgid)); extern char *__gettext PARAMS ((const char *__msgid));
extern char *__dgettext PARAMS ((const char *__domainname, extern char *__dgettext PARAMS ((const char *__domainname,
......
...@@ -136,13 +136,14 @@ int _nl_msg_cat_cntr; ...@@ -136,13 +136,14 @@ int _nl_msg_cat_cntr;
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
/* These structs are the constant expression for the germanic plural /* These structs are the constant expression for the germanic plural
form determination. It represents the expression "n != 1". */ form determination. It represents the expression "n != 1".
static const struct expression plvar = GCC LOCAL: Use __extension__ to suppress -Wtraditional warnings. */
__extension__ static const struct expression plvar =
{ {
.nargs = 0, .nargs = 0,
.operation = var, .operation = var,
}; };
static const struct expression plone = __extension__ static const struct expression plone =
{ {
.nargs = 0, .nargs = 0,
.operation = num, .operation = num,
...@@ -151,7 +152,7 @@ static const struct expression plone = ...@@ -151,7 +152,7 @@ static const struct expression plone =
.num = 1 .num = 1
} }
}; };
static struct expression germanic_plural = __extension__ static struct expression germanic_plural =
{ {
.nargs = 2, .nargs = 2,
.operation = not_equal, .operation = not_equal,
...@@ -271,7 +272,6 @@ _nl_init_domain_conv (domain_file, domain, domainbinding) ...@@ -271,7 +272,6 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string; outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
# else # else
# if HAVE_ICONV # if HAVE_ICONV
extern const char *locale_charset (void);
outcharset = locale_charset (); outcharset = locale_charset ();
# endif # endif
# endif # endif
......
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
static const char * volatile charset_aliases; static const char * volatile charset_aliases;
/* GCC LOCAL: Static function prototypes. */
static const char *get_charset_aliases PARAMS ((void));
/* Return a pointer to the contents of the charset.alias file. */ /* Return a pointer to the contents of the charset.alias file. */
static const char * static const char *
get_charset_aliases () get_charset_aliases ()
...@@ -194,11 +197,9 @@ get_charset_aliases () ...@@ -194,11 +197,9 @@ get_charset_aliases ()
into one of the canonical names listed in config.charset. into one of the canonical names listed in config.charset.
The result must not be freed; it is statically allocated. The result must not be freed; it is statically allocated.
If the canonical name cannot be determined, the result is a non-canonical If the canonical name cannot be determined, the result is a non-canonical
name. */ name.
GCC LOCAL: Get rid of STATIC nonsense. */
#ifdef STATIC
STATIC
#endif
const char * const char *
locale_charset () locale_charset ()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment