about summary refs log tree commit diff
path: root/intl/l10nflist.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-07-12 02:01:17 +0000
committerRoland McGrath <roland@gnu.org>1996-07-12 02:01:17 +0000
commit842907c6f8e6022f443175072e65bc516eb0973b (patch)
tree626cc5413c07820d66cbdb1ea841f56af09c7346 /intl/l10nflist.c
parente6c9a67a0bdb970f3b7f7ced6581b98cfe35797c (diff)
downloadglibc-842907c6f8e6022f443175072e65bc516eb0973b.tar.gz
glibc-842907c6f8e6022f443175072e65bc516eb0973b.tar.xz
glibc-842907c6f8e6022f443175072e65bc516eb0973b.zip
* inet/getnetent_r.c: Define NEED_H_ERRNO. cvs/libc-960713 cvs/libc-960712
	* 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 <sys/time.h>.

	* misc/sys/select.h: Include <time.h> instead of <sys/time.h> for
	`struct timespec'.
Diffstat (limited to 'intl/l10nflist.c')
-rw-r--r--intl/l10nflist.c45
1 files changed, 33 insertions, 12 deletions
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 <config.h>
 #endif
 
-#if defined _LIBC && (defined __ARGZ_COUNT || defined __ARGZ_STRINGIFY)
+#if defined _LIBC || defined HAVE_ARGZ_H
 # include <argz.h>
 #endif
 #include <ctype.h>
@@ -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 <string.h>
 #else
 # include <strings.h>
@@ -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.  */