about summary refs log tree commit diff
path: root/intl
diff options
context:
space:
mode:
Diffstat (limited to 'intl')
-rw-r--r--intl/dcgettext.c5
-rw-r--r--intl/explodename.c25
-rw-r--r--intl/l10nflist.c45
-rw-r--r--intl/localealias.c7
4 files changed, 64 insertions, 18 deletions
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
index 958b0d4cc4..7bbe170b76 100644
--- a/intl/dcgettext.c
+++ b/intl/dcgettext.c
@@ -59,6 +59,9 @@ void free ();
 #endif
 
 #if defined HAVE_STRING_H || defined _LIBC
+# ifndef _GNU_SOURCE
+#  define _GNU_SOURCE	1
+# endif
 # include <string.h>
 #else
 # include <strings.h>
@@ -221,7 +224,7 @@ DCGETTEXT (domainname, msgid, category)
      int category;
 {
 #ifndef HAVE_ALLOCA
-  struct block_list *alloca_list = NULL;
+  struct block_list *block_list = NULL;
 #endif
   struct loaded_l10nfile *domain;
   struct binding *binding;
diff --git a/intl/explodename.c b/intl/explodename.c
index 2fd8be014d..7a0d015f3e 100644
--- a/intl/explodename.c
+++ b/intl/explodename.c
@@ -1,7 +1,9 @@
 /* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
+This file is part of the GNU C Library.  Its master source is NOT part of
+the C library, however.  The master source lives in /gd/gnu/lib.
+
 The GNU C Library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Library General Public License as
 published by the Free Software Foundation; either version 2 of the
@@ -14,14 +16,29 @@ Library General Public License for more details.
 
 You should have received a copy of the GNU Library General Public
 License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <string.h>
 
 #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 @@ */
+
 int
 _nl_explode_name (name, language, modifier, territory, codeset,
 		  normalized_codeset, special, sponsor, revision)
@@ -38,7 +55,7 @@ _nl_explode_name (name, language, modifier, territory, codeset,
   enum { undecided, xpg, cen } syntax;
   char *cp;
   int mask;
-  
+
   *modifier = NULL;
   *territory = NULL;
   *codeset = NULL;
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.  */
diff --git a/intl/localealias.c b/intl/localealias.c
index b30a9e5bf5..6e2b27d51b 100644
--- a/intl/localealias.c
+++ b/intl/localealias.c
@@ -56,6 +56,9 @@ void free ();
 #endif
 
 #if defined HAVE_STRING_H || defined _LIBC
+# ifndef _GNU_SOURCE
+#  define _GNU_SOURCE	1
+# endif
 # include <string.h>
 #else
 # include <strings.h>
@@ -110,6 +113,8 @@ struct block_list
       free (old);							      \
     }									      \
   } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
 #endif	/* have alloca */
 
 
@@ -188,7 +193,7 @@ read_alias_file (fname, fname_len)
      int fname_len;
 {
 #ifndef HAVE_ALLOCA
-  struct block_list *alloca_list = NULL;
+  struct block_list *block_list = NULL;
 #endif
   FILE *fp;
   char *full_fname;