From 842907c6f8e6022f443175072e65bc516eb0973b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 12 Jul 1996 02:01:17 +0000 Subject: * inet/getnetent_r.c: Define NEED_H_ERRNO. * inet/getnetbynm_r.c: Likewise. * inet/getnetent.c: Likewise. * inet/getnetbyad_r.c: Likewise. * inet/getnetbyad.c: Likewise. * inet/getnetbynm.c: Likewise. * sysdeps/generic/pselect.c: Include . * misc/sys/select.h: Include instead of for `struct timespec'. --- intl/l10nflist.c | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) (limited to 'intl/l10nflist.c') diff --git a/intl/l10nflist.c b/intl/l10nflist.c index 8add175601..cfead52561 100644 --- a/intl/l10nflist.c +++ b/intl/l10nflist.c @@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */ # include #endif -#if defined _LIBC && (defined __ARGZ_COUNT || defined __ARGZ_STRINGIFY) +#if defined _LIBC || defined HAVE_ARGZ_H # include #endif #include @@ -33,6 +33,9 @@ Cambridge, MA 02139, USA. */ #endif #if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif # include #else # include @@ -45,6 +48,15 @@ Cambridge, MA 02139, USA. */ #include "loadinfo.h" +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + /* @@ end of prolog @@ */ #ifdef _LIBC @@ -60,12 +72,12 @@ static char *stpcpy PARAMS ((char *dest, const char *src)); /* Define function which are usually not available. */ -#if !defined _LIBC && !defined __ARGZ_COUNT +#if !defined _LIBC && !defined HAVE___ARGZ_COUNT /* Returns the number of strings in ARGZ. */ -static size_t __argz_count PARAMS ((const char *argz, size_t len)); +static size_t argz_count__ PARAMS ((const char *argz, size_t len)); static size_t -__argz_count (argz, len) +argz_count__ (argz, len) const char *argz; size_t len; { @@ -79,15 +91,17 @@ __argz_count (argz, len) } return count; } -#endif /* !_LIBC && !__ARGZ_COUNT */ +# undef __argz_count +# define __argz_count(argz, len) argz_count__ (argz, len) +#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ -#if !defined _LIBC && !defined __ARGZ_STRINGIFY +#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ -static void __argz_stringify PARAMS ((char *argz, size_t len, int sep)); +static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); static void -__argz_stringify (argz, len, sep) +argz_stringify__ (argz, len, sep) char *argz; size_t len; int sep; @@ -101,11 +115,16 @@ __argz_stringify (argz, len, sep) *argz++ = sep; } } -#endif /* !_LIBC && !__ARGZ_COUNT */ +# undef __argz_stringify +# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) +#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ + +#if !defined _LIBC && !defined HAVE___ARGZ_NEXT +static char *argz_next__ PARAMS ((char *argz, size_t argz_len, + const char *entry)); -#if !defined _LIBC && !defined __ARGZ_NEXT static char * -__argz_next (argz, argz_len, entry) +argz_next__ (argz, argz_len, entry) char *argz; size_t argz_len; const char *entry; @@ -123,7 +142,9 @@ __argz_next (argz, argz_len, entry) else return 0; } -#endif +# undef __argz_next +# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) +#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ /* Return number of bits set in X. */ -- cgit 1.4.1