From: Bruno Haible Date: Fri, 23 Jun 2006 16:29:25 +0000 (+0000) Subject: Use argz_stringify instead of __argz_stringify when available. X-Git-Tag: v0.15~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e19513e5c04bdd85c488ea26794b6b6aed946ea;p=thirdparty%2Fgettext.git Use argz_stringify instead of __argz_stringify when available. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 64d6e40b5..a620c53f6 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,10 @@ +2006-06-23 Bruno Haible + + * l10nflist.c (__argz_count, __argz_stringify, __argz_next): Define + using the non-underscored functions when available. Avoids warnings + on Cygwin. + Reported by Eric Blake. + 2006-06-19 Bruno Haible * libgnuintl.h.in (libintl_printf): Define to __printf__ on NetBSD, diff --git a/gettext-runtime/intl/l10nflist.c b/gettext-runtime/intl/l10nflist.c index adcaa7f84..365aeb708 100644 --- a/gettext-runtime/intl/l10nflist.c +++ b/gettext-runtime/intl/l10nflist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it @@ -82,7 +82,12 @@ static char *stpcpy (char *dest, const char *src); /* Define function which are usually not available. */ -#if !defined _LIBC && !defined HAVE___ARGZ_COUNT +#ifdef _LIBC +# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) +#elif defined HAVE_ARGZ_COUNT +# undef __argz_count +# define __argz_count argz_count +#else /* Returns the number of strings in ARGZ. */ static size_t argz_count__ (const char *argz, size_t len) @@ -99,13 +104,15 @@ argz_count__ (const char *argz, size_t len) } # undef __argz_count # define __argz_count(argz, len) argz_count__ (argz, len) -#else -# ifdef _LIBC -# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) -# endif -#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ +#endif /* !_LIBC && !HAVE_ARGZ_COUNT */ -#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY +#ifdef _LIBC +# define __argz_stringify(argz, len, sep) \ + INTUSE(__argz_stringify) (argz, len, sep) +#elif defined HAVE_ARGZ_STRINGIFY +# undef __argz_stringify +# define __argz_stringify argz_stringify +#else /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ static void @@ -122,14 +129,13 @@ argz_stringify__ (char *argz, size_t len, int sep) } # undef __argz_stringify # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) -#else -# ifdef _LIBC -# define __argz_stringify(argz, len, sep) \ - INTUSE(__argz_stringify) (argz, len, sep) -# endif -#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ +#endif /* !_LIBC && !HAVE_ARGZ_STRINGIFY */ -#if !defined _LIBC && !defined HAVE___ARGZ_NEXT +#ifdef _LIBC +#elif defined HAVE_ARGZ_NEXT +# undef __argz_next +# define __argz_next argz_next +#else static char * argz_next__ (char *argz, size_t argz_len, const char *entry) { @@ -148,7 +154,7 @@ argz_next__ (char *argz, size_t argz_len, const char *entry) } # undef __argz_next # define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) -#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ +#endif /* !_LIBC && !HAVE_ARGZ_NEXT */ /* Return number of bits set in X. */ diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog index d9335684a..58e761407 100644 --- a/gettext-runtime/m4/ChangeLog +++ b/gettext-runtime/m4/ChangeLog @@ -1,3 +1,9 @@ +2006-06-23 Bruno Haible + + * gettext.m4 (gt_INTL_SUBDIR_CORE): Check for argz_* functions, + not __argz*. Avoids warnings on Cygwin. + Reported by Eric Blake. + 2006-06-17 Bruno Haible * gettext.m4 (AM_INTL_SUBDIR): Don't redefine __libc_rwlock_* symbols. diff --git a/gettext-runtime/m4/gettext.m4 b/gettext-runtime/m4/gettext.m4 index 5f834100e..0aca24a40 100644 --- a/gettext-runtime/m4/gettext.m4 +++ b/gettext-runtime/m4/gettext.m4 @@ -1,4 +1,4 @@ -# gettext.m4 serial 51 (gettext-0.15) +# gettext.m4 serial 52 (gettext-0.15) dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -511,8 +511,8 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE], AC_CHECK_HEADERS([argz.h limits.h unistd.h sys/param.h]) AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ - stpcpy strcasecmp strdup strtoul tsearch __argz_count __argz_stringify \ - __argz_next __fsetlocking]) + stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ + argz_next __fsetlocking]) dnl Use the *_unlocked functions only if they are declared. dnl (because some of them were defined without being declared in Solaris