summaryrefslogtreecommitdiff
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
parente6c9a67a0bdb970f3b7f7ced6581b98cfe35797c (diff)
downloadglibc-842907c6f8e6022f443175072e65bc516eb0973b.tar.gz
* inet/getnetent_r.c: Define NEED_H_ERRNO.cvs/libc-960713cvs/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'.
-rw-r--r--ChangeLog12
-rw-r--r--inet/getnetbyad.c1
-rw-r--r--inet/getnetbyad_r.c1
-rw-r--r--inet/getnetbynm.c1
-rw-r--r--inet/getnetbynm_r.c1
-rw-r--r--inet/getnetent.c1
-rw-r--r--inet/getnetent_r.c1
-rw-r--r--intl/dcgettext.c5
-rw-r--r--intl/explodename.c25
-rw-r--r--intl/l10nflist.c45
-rw-r--r--intl/localealias.c7
-rw-r--r--misc/sys/select.h6
-rw-r--r--sysdeps/generic/pselect.c1
13 files changed, 86 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 198860adf9..294d9b0735 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
Thu Jul 11 20:09:55 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
+ * 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 <sys/time.h>.
+
+ * misc/sys/select.h: Include <time.h> instead of <sys/time.h> for
+ `struct timespec'.
+
* math/Makefile (calls): Add s_frexp, s_ldexp.
(routines): Remove them and &f from here.
diff --git a/inet/getnetbyad.c b/inet/getnetbyad.c
index e355ca792b..88a4b66077 100644
--- a/inet/getnetbyad.c
+++ b/inet/getnetbyad.c
@@ -26,5 +26,6 @@ Boston, MA 02111-1307, USA. */
#define ADD_PARAMS unsigned long int net, int type
#define ADD_VARIABLES net, type
#define BUFLEN 1024
+#define NEED_H_ERRNO 1
#include "../nss/getXXbyYY.c"
diff --git a/inet/getnetbyad_r.c b/inet/getnetbyad_r.c
index 6a2b41b132..8487152459 100644
--- a/inet/getnetbyad_r.c
+++ b/inet/getnetbyad_r.c
@@ -26,5 +26,6 @@ Boston, MA 02111-1307, USA. */
#define ADD_PARAMS unsigned long int net, int type
#define ADD_VARIABLES net, type
#define NEED__RES 1
+#define NEED_H_ERRNO 1
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getnetbynm.c b/inet/getnetbynm.c
index db1c7b0cf6..febd807979 100644
--- a/inet/getnetbynm.c
+++ b/inet/getnetbynm.c
@@ -26,5 +26,6 @@ Boston, MA 02111-1307, USA. */
#define ADD_PARAMS const char *name
#define ADD_VARIABLES name
#define BUFLEN 1024
+#define NEED_H_ERRNO 1
#include "../nss/getXXbyYY.c"
diff --git a/inet/getnetbynm_r.c b/inet/getnetbynm_r.c
index ba395d63ac..6b87118838 100644
--- a/inet/getnetbynm_r.c
+++ b/inet/getnetbynm_r.c
@@ -26,5 +26,6 @@ Boston, MA 02111-1307, USA. */
#define ADD_PARAMS const char *name
#define ADD_VARIABLES name
#define NEED__RES 1
+#define NEED_H_ERRNO 1
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getnetent.c b/inet/getnetent.c
index 207a70ea5e..cc9f691cb7 100644
--- a/inet/getnetent.c
+++ b/inet/getnetent.c
@@ -22,5 +22,6 @@ Boston, MA 02111-1307, USA. */
#define LOOKUP_TYPE struct netent
#define GETFUNC_NAME getnetent
#define BUFLEN 1024
+#define NEED_H_ERRNO 1
#include "../nss/getXXent.c"
diff --git a/inet/getnetent_r.c b/inet/getnetent_r.c
index 333bb4b529..b6ac85ce84 100644
--- a/inet/getnetent_r.c
+++ b/inet/getnetent_r.c
@@ -27,5 +27,6 @@ Boston, MA 02111-1307, USA. */
#define STAYOPEN int stayopen
#define STAYOPEN_VAR stayopen
#define NEED__RES 1
+#define NEED_H_ERRNO 1
#include "../nss/getXXent_r.c"
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;
diff --git a/misc/sys/select.h b/misc/sys/select.h
index 320df02e02..dcb2012cff 100644
--- a/misc/sys/select.h
+++ b/misc/sys/select.h
@@ -19,9 +19,9 @@ Boston, MA 02111-1307, USA. */
/* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */
-#ifndef __SYS_SELECT_H
+#ifndef _SYS_SELECT_H
-#define __SYS_SELECT_H 1
+#define _SYS_SELECT_H 1
#include <features.h>
/* Get definition of needed basic types. */
@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */
/* Get definition of timer specification structures. */
#define __need_timespec
-#include <sys/time.h>
+#include <time.h>
__BEGIN_DECLS
diff --git a/sysdeps/generic/pselect.c b/sysdeps/generic/pselect.c
index 165fd32148..a6b08c10b0 100644
--- a/sysdeps/generic/pselect.c
+++ b/sysdeps/generic/pselect.c
@@ -18,6 +18,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <errno.h>
+#include <sys/time.h>
#include <sys/select.h>
/* Check the first NFDS descriptors each in READFDS (if not NULL) for read