aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog30
-rw-r--r--FAQ12
-rw-r--r--MakeTAGS15
-rw-r--r--Makeconfig1
-rw-r--r--Makerules4
-rw-r--r--assert/assert-perr.c31
-rw-r--r--assert/assert.c39
-rw-r--r--dirent/dirent.h2
-rw-r--r--dirent/scandir.c30
-rw-r--r--elf/dl-lookup.c1
-rw-r--r--elf/rtld.c6
-rw-r--r--inet/rcmd.c15
-rw-r--r--intl/l10nflist.c4
-rw-r--r--io/fts.c5
-rw-r--r--io/ftw.c54
-rw-r--r--io/getwd.c30
-rw-r--r--locale/Makefile2
-rw-r--r--misc/err.c30
-rw-r--r--misc/error.c32
-rw-r--r--misc/ttyslot.c14
-rw-r--r--nss/nss_files/files-XXX.c3
-rw-r--r--po/libc.pot356
-rw-r--r--posix/glob.c46
-rw-r--r--stdio-common/vfprintf.c5
-rw-r--r--stdlib/getsubopt.c34
-rw-r--r--stdlib/rand.c33
-rw-r--r--stdlib/random_r.c1
-rw-r--r--stdlib/stdlib.h6
-rw-r--r--string/strerror_r.c31
-rw-r--r--string/strfry.c45
-rw-r--r--string/string.h1
-rw-r--r--sysdeps/alpha/dl-machine.h42
-rw-r--r--sysdeps/generic/a.out.h339
-rw-r--r--sysdeps/i386/dl-machine.h39
-rw-r--r--sysdeps/m68k/dl-machine.h39
-rw-r--r--sysdeps/mach/hurd/libc-ldscript3
-rw-r--r--sysdeps/mach/hurd/libc_p-ldscript3
-rw-r--r--sysdeps/mips/dl-machine.h49
-rw-r--r--sysdeps/posix/getcwd.c41
-rw-r--r--sysdeps/posix/ttyname.c30
-rw-r--r--sysdeps/posix/ttyname_r.c30
-rw-r--r--sysdeps/sparc/dl-machine.h39
-rw-r--r--sysdeps/stub/dl-machine.h36
-rw-r--r--sysdeps/unix/alpha/sysdep.S40
-rw-r--r--sysdeps/unix/readdir_r.c32
-rw-r--r--sysdeps/unix/sysv/linux/a.out.h1
-rw-r--r--time/ctime.c37
-rw-r--r--time/ctime_r.c30
48 files changed, 1140 insertions, 608 deletions
diff --git a/ChangeLog b/ChangeLog
index dd7a670f49..d50d12074c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+Tue Dec 3 08:38:15 1996 Richard Henderson <rth@tamu.edu>
+
+ * sysdeps/unix/alpha/sysdep.S: Remove definition of __errno_location.
+ Reformat copyright.
+
+ * elf/rtld.c (_dl_start): Don't dereference the value returned by
+ elf_machine_got to get _DYNAMIC, instead call new function
+ elf_machine_dynamic.
+ * sysdeps/alpha/dl-machine.h: Permute elf_machine_got to
+ elf_machine_dynamic. Reformat copyright.
+ * sysdeps/i386/dl-machine.h: Likewise.
+ * sysdeps/m68k/dl-machine.h: Likewise.
+ * sysdeps/mips/dl-machine.h: Likewise.
+ * sysdeps/sparc/dl-machine.h: Likewise.
+ * sysdeps/stub/dl-machine.h: Likewise.
+
+Tue Oct 15 23:46:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * MakeTAGS (sysdep_dirs): Include add-on sysdep directories.
+
+Tue Dec 3 02:06:18 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makerules ($(libdir)/libc.so): Make first line of generated
+ link script contain `/* GNU ld script'. This will be used in
+ ldconfig to check for linker scripts.
+ * sysdeps/mach/hurd/libc-ldscript: Likewise.
+ * sysdeps/mach/hurd/libc_p-ldscript: Likewise.
+
+ * stdlib/getsubopt.c: Update copyright. Correct typo in comment.
+
Mon Dec 2 15:32:15 1996 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-lookup.c (_dl_lookup_symbol_skip): Remove unused variable
diff --git a/FAQ b/FAQ
index f2e41f54b6..fbbae1044c 100644
--- a/FAQ
+++ b/FAQ
@@ -68,6 +68,9 @@ please let me know.
`setsockopt', `getsockname', `getpeername', `send',
`sendto', and `recvfrom' are different in GNU libc than
on any other system I saw. This is a bug, isn't it?''
+
+[Q19] ``My XXX kernel emulates a floating-point coprocessor for me.
+ Should I enable --with-fp?''
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
[Q1] ``What systems does the GNU C Library run on?''
@@ -571,6 +574,15 @@ like the Alpha.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
+[Q19] ``My XXX kernel emulates a floating-point coprocessor for me.
+ Should I enable --with-fp?''
+
+[A19] {UD} As `configure --help' shows the default value is `yes' and
+this should not be changed unless the FPU instructions would be
+invalid. I.e., an emulated FPU is for the libc as good as a real one.
+
+
+~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Answers were given by:
{UD} Ulrich Drepper, <drepper@cygnus.com>
diff --git a/MakeTAGS b/MakeTAGS
index bca72b3e85..8401258541 100644
--- a/MakeTAGS
+++ b/MakeTAGS
@@ -14,9 +14,9 @@
# 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., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# 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.
# Make this the default goal.
TAGS:
@@ -43,8 +43,10 @@ sysdep-dirs := $(full-config-sysdirs)
ifndef sysdep_dirs
# Find all sysdep directories.
-sysdep_dirs := $(shell find $(..)sysdeps -type d \
- ! -name RCS ! -name CVS -print)
+sysdep_dirs := $(shell find $(..)sysdeps \
+ $(wildcard \
+ $(patsubst %,$(..)%/sysdeps,$(add-ons))) \
+ -type d ! -name RCS ! -name CVS -print)
endif
# Find all sysdep dirs there are, but putting the ones
@@ -145,7 +147,8 @@ else
$(extract)
endif
-$P/siglist.pot: $(common-objpfx)stdio-common/siglist.c; $(extract)
+#$P/siglist.pot: $(common-objpfx)stdio-common/siglist.c; $(extract)
+$P/siglist.pot: siglist.c; $(extract)
# Extract all strings from this file; its strings are not marked.
# Their surroundings are also not interesting.
diff --git a/Makeconfig b/Makeconfig
index 1c25ace156..2a287a47a5 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -330,6 +330,7 @@ default-rpath = $(libdir)
endif
# This is how to find at build-time things that will be installed there.
rpath-link = $(common-objdir):$(elfobjdir):$(nssobjdir)
+elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf)
nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
else
link-libc = $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a
diff --git a/Makerules b/Makerules
index 19ec2410d8..1cb6855ffa 100644
--- a/Makerules
+++ b/Makerules
@@ -347,7 +347,6 @@ LDFLAGS-c.so = -nostdlib -nostartfiles
# Give libc.so an entry point and make it directly runnable itself.
LDFLAGS-c.so += -e __libc_main
# Use our own special initializer and finalizer files for libc.so.
-elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf)
$(common-objpfx)libc.so: $(elfobjdir)/soinit.so \
$(common-objpfx)libc_pic.a \
$(elfobjdir)/sofini.so $(elfobjdir)/ld.so
@@ -638,7 +637,8 @@ install: $(libdir)/libc.so
$(libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
$(elfobjdir)/$(rtld-installed-name) \
$(libdir)/lib$(libc-name).a
- (echo '/* Use the shared library, but some functions are only in';\
+ (echo '/* GNU ld script';\
+ echo ' Use the shared library, but some functions are only in';\
echo ' the static library, so try that secondarily.'; \
echo ' The dynamic linker defines some functions used by $(<F),';\
echo ' but ld uses definitions from libc.a before examining the';\
diff --git a/assert/assert-perr.c b/assert/assert-perr.c
index f9aeb895c4..c62ae467ac 100644
--- a/assert/assert-perr.c
+++ b/assert/assert-perr.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <assert.h>
#include <stdio.h>
@@ -38,6 +38,7 @@ __assert_perror_fail (int errnum,
const char *file, unsigned int line,
const char *function)
{
+ char errbuf[1024];
#ifdef FATAL_PREPARE
FATAL_PREPARE;
#endif
@@ -48,7 +49,7 @@ __assert_perror_fail (int errnum,
__assert_program_name ? ": " : "",
file, line,
function ? function : "", function ? ": " : "",
- strerror (errnum));
+ __strerror_r (errnum, errbuf, sizeof errbuf));
(void) fflush (stderr);
abort ();
diff --git a/assert/assert.c b/assert/assert.c
index 0160b40bbc..33c6845cb4 100644
--- a/assert/assert.c
+++ b/assert/assert.c
@@ -1,29 +1,28 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
-#include <ansidecl.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <sysdep.h>
-CONST char *__assert_program_name;
+const char *__assert_program_name;
/* This function, when passed a string containing an asserted
expression, a filename, and a line number, prints a message
@@ -36,9 +35,8 @@ CONST char *__assert_program_name;
#endif
void
-DEFUN(__assert_fail, (assertion, file, line, function),
- CONST char *assertion AND
- CONST char *file AND unsigned int line AND CONST char *function)
+__assert_fail (const char *assertion, const char *file, unsigned int line,
+ const char *function)
{
#ifdef FATAL_PREPARE
FATAL_PREPARE;
@@ -61,8 +59,7 @@ DEFUN(__assert_fail, (assertion, file, line, function),
#include <string.h>
static void
-DEFUN(set_progname, (argc, argv, envp),
- int argc AND char **argv AND char **envp)
+set_progname (int argc, char **argv, char **envp)
{
char *p;
diff --git a/dirent/dirent.h b/dirent/dirent.h
index 22ddcbbf6d..c357be2bcf 100644
--- a/dirent/dirent.h
+++ b/dirent/dirent.h
@@ -119,6 +119,8 @@ extern struct dirent *readdir __P ((DIR *__dirp));
#ifdef __USE_REENTRANT
/* Reentrant versio of `readdir'. Return in RESULT a pointer to the
next entry. */
+extern int __readdir_r __P ((DIR *__dirp, struct dirent *entry,
+ struct dirent **result));
extern int readdir_r __P ((DIR *__dirp, struct dirent *entry,
struct dirent **result));
#endif
diff --git a/dirent/scandir.c b/dirent/scandir.c
index cffe5056ac..b1fc55fbb2 100644
--- a/dirent/scandir.c
+++ b/dirent/scandir.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <dirent.h>
#include <stdlib.h>
@@ -31,7 +31,7 @@ scandir (dir, namelist, select, cmp)
DIR *dp = opendir (dir);
struct dirent **v = NULL;
size_t vsize = 0, i;
- struct dirent *d;
+ struct dirent dirbuf, *d;
int save;
if (dp == NULL)
@@ -41,7 +41,7 @@ scandir (dir, namelist, select, cmp)
__set_errno (0);
i = 0;
- while ((d = readdir (dp)) != NULL)
+ while (__readdir_r (dp, &dirbuf, &d) >= 0)
if (select == NULL || (*select) (d))
{
size_t dsize;
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 717ac83f7a..1000a52e0d 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -187,7 +187,6 @@ _dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
struct link_map *skip_map,
int flags)
{
- int found_entry = 0;
const unsigned long int hash = _dl_elf_hash (undef_name);
struct sym_val current_value = { 0, NULL };
struct link_map **scope;
diff --git a/elf/rtld.c b/elf/rtld.c
index 0ce903a036..f65bd80954 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -83,10 +83,8 @@ _dl_start (void *arg)
/* Figure out the run-time load address of the dynamic linker itself. */
bootstrap_map.l_addr = elf_machine_load_address ();
- /* Read our own dynamic section and fill in the info array.
- Conveniently, the first element of the GOT contains the
- offset of _DYNAMIC relative to the run-time load address. */
- bootstrap_map.l_ld = (void *) bootstrap_map.l_addr + *elf_machine_got ();
+ /* Read our own dynamic section and fill in the info array. */
+ bootstrap_map.l_ld = (void *) bootstrap_map.l_addr + elf_machine_dynamic ();
elf_get_dynamic_info (bootstrap_map.l_ld, bootstrap_map.l_info);
#ifdef ELF_MACHINE_BEFORE_RTLD_RELOC
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 2631523a22..c9c3a2fabd 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -102,8 +102,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
(void)fprintf(stderr,
_("rcmd: socket: All ports in use\n"));
else
- (void)fprintf(stderr, "rcmd: socket: %s\n",
- strerror(errno));
+ (void)fprintf(stderr, "rcmd: socket: %m\n");
sigsetmask(oldmask);
return (-1);
}
@@ -138,7 +137,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
inet_ntoa(sin.sin_addr));
continue;
}
- (void)fprintf(stderr, "%s: %s\n", hp->h_name, strerror(errno));
+ (void)fprintf(stderr, "%s: %m\n", hp->h_name);
sigsetmask(oldmask);
return (-1);
}
@@ -157,8 +156,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
(void)snprintf(num, sizeof(num), "%d", lport);
if (write(s, num, strlen(num)+1) != strlen(num)+1) {
(void)fprintf(stderr,
- _("rcmd: write (setting up stderr): %s\n"),
- strerror(errno));
+ _("rcmd: write (setting up stderr): %m\n"));
(void)close(s2);
goto bad;
}
@@ -170,8 +168,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
!FD_ISSET(s2, &reads)) {
if (errno != 0)
(void)fprintf(stderr,
- _("rcmd: select (setting up stderr): %s\n"),
- strerror(errno));
+ _("rcmd: select (setting up stderr): %m\n"));
else
(void)fprintf(stderr,
_("select: protocol failure in circuit setup\n"));
@@ -182,7 +179,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
(void)close(s2);
if (s3 < 0) {
(void)fprintf(stderr,
- "rcmd: accept: %s\n", strerror(errno));
+ "rcmd: accept: %m\n");
lport = 0;
goto bad;
}
@@ -201,7 +198,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
(void)write(s, cmd, strlen(cmd)+1);
if (read(s, &c, 1) != 1) {
(void)fprintf(stderr,
- "rcmd: %s: %s\n", *ahost, strerror(errno));
+ "rcmd: %s: %m\n", *ahost);
goto bad2;
}
if (c != 0) {
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
index 9a586ec521..b50eff465f 100644
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -201,8 +201,8 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
+ ((mask & XPG_NORM_CODESET) != 0
? strlen (normalized_codeset) + 1 : 0)
+ (((mask & XPG_MODIFIER) != 0
- || (mask & CEN_AUDIENCE) != 0) ?
- strlen (modifier) + 1 : 0)
+ || (mask & CEN_AUDIENCE) != 0)
+ ? strlen (modifier) + 1 : 0)
+ ((mask & CEN_SPECIAL) != 0
? strlen (special) + 1 : 0)
+ ((mask & (CEN_SPONSOR | CEN_REVISION) != 0)
diff --git a/io/fts.c b/io/fts.c
index 5e57eaf1b6..cfc8fa656d 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -570,7 +570,7 @@ fts_build(sp, type)
register FTS *sp;
int type;
{
- register struct dirent *dp;
+ register struct dirent dirbuf, *dp;
register FTSENT *p, *head;
register int nitems;
FTSENT *cur, *tail;
@@ -660,7 +660,8 @@ fts_build(sp, type)
/* Read the directory, attaching each entry to the `link' pointer. */
adjaddr = NULL;
- for (head = tail = NULL, nitems = 0; dp = readdir(dirp);) {
+ for (head = tail = NULL, nitems = 0;
+ __readdir_r (dirp, &dirbuf, &dp) >= 0;) {
int namlen;
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
diff --git a/io/ftw.c b/io/ftw.c
index b8d745b8d3..b7983d4525 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -1,23 +1,22 @@
/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ian Lance Taylor (ian@airs.com).
+ This file is part of the GNU C Library.
+ Contributed by Ian Lance Taylor (ian@airs.com).
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
-#include <ansidecl.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
@@ -36,20 +35,17 @@ Cambridge, MA 02139, USA. */
/* Traverse one level of a directory tree. */
static int
-DEFUN (ftw_dir, (dirs, level, descriptors, dir, len, func),
- DIR **dirs AND int level AND int descriptors AND
- char *dir AND size_t len AND
- int EXFUN((*func), (CONST char *file, struct stat *status,
- int flag)))
+ftw_dir (DIR **dirs, int level, int descriptors, char *dir, size_t len,
+ int (*func) (const char *file, struct stat *status, int flag))
{
int got;
- struct dirent *entry;
+ struct dirent dirbuf, *entry;
got = 0;
__set_errno (0);
- while ((entry = readdir (dirs[level])) != NULL)
+ while (__readdir_r (dirs[level], &dirbuf, &entry) >= 0)
{
struct stat s;
int flag, retval, newlev;
@@ -78,7 +74,7 @@ DEFUN (ftw_dir, (dirs, level, descriptors, dir, len, func),
}
dir[len] = '/';
- memcpy ((PTR) (dir + len + 1), (PTR) entry->d_name,
+ memcpy ((void *) (dir + len + 1), (void *) entry->d_name,
namlen + 1);
if (stat (dir, &s) < 0)
@@ -140,7 +136,7 @@ DEFUN (ftw_dir, (dirs, level, descriptors, dir, len, func),
while (skip-- != 0)
{
__set_errno (0);
- if (readdir (dirs[level]) == NULL)
+ if (__readdir_r (dirs[level], &dirbuf, &entry) < 0)
return errno == 0 ? 0 : -1;
}
}
@@ -154,11 +150,9 @@ DEFUN (ftw_dir, (dirs, level, descriptors, dir, len, func),
/* Call a function on every element in a directory tree. */
int
-DEFUN(ftw, (dir, func, descriptors),
- CONST char *dir AND
- int EXFUN((*func), (CONST char *file, struct stat *status,
- int flag)) AND
- int descriptors)
+ftw (const char *dir,
+ int (*func) (const char *file, struct stat *status, int flag),
+ int descriptors)
{
DIR **dirs;
size_t len;
@@ -197,7 +191,7 @@ DEFUN(ftw, (dir, func, descriptors),
flag = FTW_F;
len = strlen (dir);
- memcpy ((PTR) buf, (PTR) dir, len + 1);
+ memcpy ((void *) buf, (void *) dir, len + 1);
retval = (*func) (buf, &s, flag);
diff --git a/io/getwd.c b/io/getwd.c
index 00825ee0b0..4488cef00e 100644
--- a/io/getwd.c
+++ b/io/getwd.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <errno.h>
#include <limits.h>
@@ -43,7 +43,11 @@ getwd (buf)
if (getcwd (fetchbuf, PATH_MAX) == NULL)
{
+#if defined HAVE_STRERROR_R || defined _LIBC
+ __strerror_r (errno, buf, PATH_MAX);
+#else
strncpy (buf, strerror (errno), PATH_MAX);
+#endif
return NULL;
}
diff --git a/locale/Makefile b/locale/Makefile
index dd29c35019..ef6c2dd744 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -64,7 +64,7 @@ $(objpfx)localedef: $(localedef-modules:%=$(objpfx)%.o)
$(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
$(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
-localepath = "$(localeddir)"
+localepath = "$(localedir):$(i18ndir)"
CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
-DLOCALEDIR='"$(localedir)"' \
diff --git a/misc/err.c b/misc/err.c
index 3ad7bf360f..d527573c89 100644
--- a/misc/err.c
+++ b/misc/err.c
@@ -1,21 +1,21 @@
/* err.c --- 4.4BSD utility functions for error messages.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <stdarg.h>
#include <err.h>
@@ -56,7 +56,7 @@ vwarn (const char *format, __gnuc_va_list ap)
vfprintf (stderr, format, ap);
fputs (": ", stderr);
}
- fprintf (stderr, "%s\n", strerror (error));
+ fprintf (stderr, "%m\n");
}
diff --git a/misc/error.c b/misc/error.c
index 3d2777bc2c..308c601f22 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -77,11 +77,12 @@ unsigned int error_message_count;
name of the executing program. */
extern char *program_name;
-#if HAVE_STRERROR
-# ifndef strerror /* On some systems, strerror is a macro */
+#ifndef HAVE_STRERROR_R
+# if HAVE_STRERROR
+# ifndef strerror /* On some systems, strerror is a macro */
char *strerror ();
-# endif
-#else
+# endif
+# else
static char *
private_strerror (errnum)
int errnum;
@@ -93,8 +94,9 @@ private_strerror (errnum)
return _(sys_errlist[errnum]);
return _("Unknown system error");
}
-#define strerror private_strerror
-#endif /* HAVE_STRERROR */
+# define strerror private_strerror
+# endif /* HAVE_STRERROR */
+#endif /* HAVE_STRERROR_R */
#endif /* _LIBC */
/* Print the program name and error message MESSAGE, which is a printf-style
@@ -140,7 +142,14 @@ error (status, errnum, message, va_alist)
++error_message_count;
if (errnum)
- fprintf (stderr, ": %s", strerror (errnum));
+ {
+#if defined HAVE_STRERROR_R || defined _LIBC
+ char errbuf[1024];
+ fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
+#else
+ fprintf (stderr, ": %s", strerror (errnum));
+#endif
+ }
putc ('\n', stderr);
fflush (stderr);
if (status)
@@ -208,7 +217,14 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
++error_message_count;
if (errnum)
- fprintf (stderr, ": %s", strerror (errnum));
+ {
+#if defined HAVE_STRERROR_R || defined _LIBC
+ char errbuf[1024];
+ fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
+#else
+ fprintf (stderr, ": %s", strerror (errnum));
+#endif
+ }
putc ('\n', stderr);
fflush (stderr);
if (status)
diff --git a/misc/ttyslot.c b/misc/ttyslot.c
index 3d9fee62fc..794cada0af 100644
--- a/misc/ttyslot.c
+++ b/misc/ttyslot.c
@@ -36,6 +36,7 @@ static char sccsid[] = "@(#)ttyslot.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <ttyent.h>
+#include <alloca.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@@ -47,12 +48,19 @@ ttyslot()
register int slot;
register char *p;
int cnt;
+ size_t buflen = __sysconf (_SC_TTY_NAME_MAX) + 1;
char *name;
+ if (buflen == 0)
+ /* This should be enough if no fixed value is given. */
+ buflen = 32;
+
+ name = __alloca (buflen);
+
setttyent();
- for (cnt = 0; cnt < 3; ++cnt)
- if (name = ttyname(cnt)) {
- if (p = rindex(name, '/'))
+ for (cnt = 0; cnt < 3; ++cnt)
+ if (__ttyname_r (cnt, name, buflen) >= 0) {
+ if (p = rindex(name, '/'))
++p;
else
p = name;
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
index 2f99420f30..d3ff520227 100644
--- a/nss/nss_files/files-XXX.c
+++ b/nss/nss_files/files-XXX.c
@@ -40,6 +40,7 @@
#define DATAFILE "/etc/" DATABASE
#ifdef NEED_H_ERRNO
+# include <netdb.h>
# define H_ERRNO_PROTO , int *herrnop
# define H_ERRNO_ARG , herrnop
# define H_ERRNO_SET(val) (*herrnop = (val))
@@ -149,7 +150,7 @@ internal_getent (struct STRUCTURE *result,
if (buflen < (int) sizeof *data + 1)
{
__set_errno (ERANGE);
- HERRNO_SET (NETDB_INTERNAL);
+ H_ERRNO_SET (NETDB_INTERNAL);
return NSS_STATUS_TRYAGAIN;
}
diff --git a/po/libc.pot b/po/libc.pot
index cd873a1cba..9beb28b620 100644
--- a/po/libc.pot
+++ b/po/libc.pot
@@ -5,8 +5,8 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: libc 1.96\n"
-"POT-Creation-Date: 1996-10-17 03:22+0200\n"
+"Project-Id-Version: libc 1.98\n"
+"POT-Creation-Date: 1996-12-03 13:50+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+DIST\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -63,17 +63,17 @@ msgstr ""
msgid "%s in ruleless zone"
msgstr ""
-#: assert/assert.c:48
+#: assert/assert.c:46
#, c-format
msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
msgstr ""
-#: assert/assert-perr.c:46
+#: assert/assert-perr.c:47
#, c-format
msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
msgstr ""
-#: stdio-common/psignal.c:48
+#: stdio-common/psignal.c:47
#, c-format
msgid "%s%sUnknown signal %d\n"
msgstr ""
@@ -268,19 +268,19 @@ msgstr ""
msgid ".lib section in a.out corrupted"
msgstr ""
-#: inet/rcmd.c:328
+#: inet/rcmd.c:358
msgid ".rhosts fstat failed"
msgstr ""
-#: inet/rcmd.c:324
+#: inet/rcmd.c:354
msgid ".rhosts lstat failed"
msgstr ""
-#: inet/rcmd.c:326
+#: inet/rcmd.c:356
msgid ".rhosts not regular file"
msgstr ""
-#: inet/rcmd.c:332
+#: inet/rcmd.c:362
msgid ".rhosts writeable by other than owner"
msgstr ""
@@ -325,7 +325,7 @@ msgstr ""
msgid "Address family not supported by protocol"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:714
+#: stdio-common/../sysdeps/gnu/errlist.c:730
msgid "Advertise error"
msgstr ""
@@ -366,10 +366,14 @@ msgstr ""
msgid "Bad file descriptor"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:682
+#: stdio-common/../sysdeps/gnu/errlist.c:718
msgid "Bad font file format"
msgstr ""
+#: stdio-common/../sysdeps/gnu/errlist.c:610
+msgid "Bad message"
+msgstr ""
+
#. TRANS A file that isn't a block special file was given in a situation that
#. TRANS requires one. For example, trying to mount an ordinary file as a file
#. TRANS system in Unix gives this error.
@@ -400,6 +404,22 @@ msgstr ""
msgid "Can not access a needed shared library"
msgstr ""
+#: nis/ypclnt.c:637
+msgid "Can't bind to server which serves this domain"
+msgstr ""
+
+#: nis/ypclnt.c:649
+msgid "Can't communicate with portmapper"
+msgstr ""
+
+#: nis/ypclnt.c:651
+msgid "Can't communicate with ypbind"
+msgstr ""
+
+#: nis/ypclnt.c:653
+msgid "Can't communicate with ypserv"
+msgstr ""
+
#. TRANS No memory available. The system cannot allocate more virtual memory
#. TRANS because its capacity is full.
#: stdio-common/../sysdeps/gnu/errlist.c:91
@@ -442,7 +462,7 @@ msgstr ""
msgid "Cannot set socket option SO_BROADCAST"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:622
+#: stdio-common/../sysdeps/gnu/errlist.c:658
msgid "Channel number out of range"
msgstr ""
@@ -453,7 +473,7 @@ msgstr ""
msgid "Client credential too weak"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:722
+#: stdio-common/../sysdeps/gnu/errlist.c:738
msgid "Communication error on send"
msgstr ""
@@ -501,6 +521,10 @@ msgid ""
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
msgstr ""
+#: nis/ypclnt.c:663
+msgid "Database is busy"
+msgstr ""
+
#. TRANS No default destination address was set for the socket. You get this
#. TRANS error when you try to transmit data over a connectionless socket,
#. TRANS without first specifying a destination for the data with @code{connect}.
@@ -508,7 +532,7 @@ msgstr ""
msgid "Destination address required"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:686
+#: stdio-common/../sysdeps/gnu/errlist.c:638
msgid "Device not a stream"
msgstr ""
@@ -539,12 +563,16 @@ msgstr ""
msgid "Disc quota exceeded"
msgstr ""
+#: nis/ypclnt.c:709
+msgid "Domain not bound"
+msgstr ""
+
#: sunrpc/clnt_perr.c:254
#, c-format
msgid "Error %d"
msgstr ""
-#: string/../sysdeps/mach/_strerror.c:43
+#: string/../sysdeps/mach/_strerror.c:52
msgid "Error in unknown error system: "
msgstr ""
@@ -552,7 +580,7 @@ msgstr ""
msgid "Error: .netrc file is readable by others."
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:662
+#: stdio-common/../sysdeps/gnu/errlist.c:698
msgid "Exchange full"
msgstr ""
@@ -580,7 +608,7 @@ msgstr ""
msgid "File exists"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:678
+#: stdio-common/../sysdeps/gnu/errlist.c:714
msgid "File locking deadlock error"
msgstr ""
@@ -632,7 +660,7 @@ msgstr ""
msgid "IOT trap"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:618
+#: stdio-common/../sysdeps/gnu/errlist.c:614
msgid "Identifier removed"
msgstr ""
@@ -674,6 +702,14 @@ msgstr ""
msgid "Input/output error"
msgstr ""
+#: nis/ypclnt.c:643
+msgid "Internal NIS error"
+msgstr ""
+
+#: nis/ypclnt.c:707
+msgid "Internal ypbind error"
+msgstr ""
+
msgid "Interrupt"
msgstr ""
@@ -688,7 +724,7 @@ msgstr ""
msgid "Interrupted system call"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:610
+#: stdio-common/../sysdeps/gnu/errlist.c:654
msgid "Interrupted system call should be restarted"
msgstr ""
@@ -729,7 +765,7 @@ msgstr ""
msgid "Invalid cross-device link"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:654
+#: stdio-common/../sysdeps/gnu/errlist.c:690
msgid "Invalid exchange"
msgstr ""
@@ -751,11 +787,11 @@ msgstr ""
msgid "Invalid regular expression"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:670
+#: stdio-common/../sysdeps/gnu/errlist.c:706
msgid "Invalid request code"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:658
+#: stdio-common/../sysdeps/gnu/errlist.c:694
msgid "Invalid request descriptor"
msgstr ""
@@ -763,7 +799,7 @@ msgstr ""
msgid "Invalid server verifier"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:674
+#: stdio-common/../sysdeps/gnu/errlist.c:710
msgid "Invalid slot"
msgstr ""
@@ -780,31 +816,39 @@ msgstr ""
msgid "Killed"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:650
+#: stdio-common/../sysdeps/gnu/errlist.c:686
msgid "Level 2 halted"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:626
+#: stdio-common/../sysdeps/gnu/errlist.c:662
msgid "Level 2 not synchronized"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:630
+#: stdio-common/../sysdeps/gnu/errlist.c:666
msgid "Level 3 halted"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:634
+#: stdio-common/../sysdeps/gnu/errlist.c:670
msgid "Level 3 reset"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:710
+#: stdio-common/../sysdeps/gnu/errlist.c:626
msgid "Link has been severed"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:638
+#: stdio-common/../sysdeps/gnu/errlist.c:674
msgid "Link number out of range"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:702
+#: nis/ypclnt.c:655
+msgid "Local domain name not set"
+msgstr ""
+
+#: nis/ypclnt.c:645
+msgid "Local resource allocation failure"
+msgstr ""
+
+#: stdio-common/../sysdeps/gnu/errlist.c:722
msgid "Machine is not on the network"
msgstr ""
@@ -818,10 +862,18 @@ msgstr ""
msgid "Message too long"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:730
+#: stdio-common/../sysdeps/gnu/errlist.c:618
msgid "Multihop attempted"
msgstr ""
+#: nis/ypclnt.c:659
+msgid "NIS client/server version mismatch - can't supply service"
+msgstr ""
+
+#: nis/ypclnt.c:657
+msgid "NIS map data base is bad"
+msgstr ""
+
#: stdio-common/../sysdeps/gnu/errlist.c:746
msgid "Name not unique on network"
msgstr ""
@@ -847,7 +899,7 @@ msgstr ""
msgid "Network is unreachable"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:646
+#: stdio-common/../sysdeps/gnu/errlist.c:682
msgid "No CSI structure available"
msgstr ""
@@ -859,7 +911,7 @@ msgstr ""
msgid "No address associated with name"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:666
+#: stdio-common/../sysdeps/gnu/errlist.c:702
msgid "No anode"
msgstr ""
@@ -877,7 +929,7 @@ msgstr ""
msgid "No child processes"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:690
+#: stdio-common/../sysdeps/gnu/errlist.c:622
msgid "No data available"
msgstr ""
@@ -893,10 +945,14 @@ msgstr ""
msgid "No match"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:614
+#: stdio-common/../sysdeps/gnu/errlist.c:630
msgid "No message of desired type"
msgstr ""
+#: nis/ypclnt.c:647
+msgid "No more records in map database"
+msgstr ""
+
#: posix/regex.c:5204
msgid "No previous regular expression"
msgstr ""
@@ -923,6 +979,14 @@ msgstr ""
msgid "No such file or directory"
msgstr ""
+#: nis/ypclnt.c:641
+msgid "No such key in map"
+msgstr ""
+
+#: nis/ypclnt.c:639
+msgid "No such map in server's domain"
+msgstr ""
+
#. TRANS No process matches the specified process ID.
#: stdio-common/../sysdeps/gnu/errlist.c:24
msgid "No such process"
@@ -932,10 +996,6 @@ msgstr ""
msgid "Not a XENIX named type file"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:738
-msgid "Not a data message"
-msgstr ""
-
#. TRANS A file that isn't a directory was specified when a directory is required.
#: stdio-common/../sysdeps/gnu/errlist.c:140
msgid "Not a directory"
@@ -1014,16 +1074,16 @@ msgstr ""
msgid "Operation would block"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:698
+#: stdio-common/../sysdeps/gnu/errlist.c:634
msgid "Out of streams resources"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:706
+#: stdio-common/../sysdeps/gnu/errlist.c:726
msgid "Package not installed"
msgstr ""
#. TRANS Permission denied; the file permissions do not allow the attempted operation.
-#: stdio-common/../sysdeps/gnu/errlist.c:96
+#: nis/ypclnt.c:661 stdio-common/../sysdeps/gnu/errlist.c:96
msgid "Permission denied"
msgstr ""
@@ -1037,11 +1097,11 @@ msgstr ""
msgid "Profiling timer expired"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:642
+#: stdio-common/../sysdeps/gnu/errlist.c:678
msgid "Protocol driver not attached"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:726
+#: stdio-common/../sysdeps/gnu/errlist.c:646
msgid "Protocol error"
msgstr ""
@@ -1071,7 +1131,7 @@ msgstr ""
msgid "Quit"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:734
+#: stdio-common/../sysdeps/gnu/errlist.c:742
msgid "RFS specific error"
msgstr ""
@@ -1080,6 +1140,10 @@ msgstr ""
msgid "RPC bad procedure for program"
msgstr ""
+#: nis/ypclnt.c:635
+msgid "RPC failure on NIS operation"
+msgstr ""
+
#. TRANS ???
#: stdio-common/../sysdeps/gnu/errlist.c:517
msgid "RPC program not available"
@@ -1176,6 +1240,10 @@ msgstr ""
msgid "RPC: Unknown protocol"
msgstr ""
+#: elf/dlsym.c:49
+msgid "RTLD_NEXT used in code not dynamically loaded"
+msgstr ""
+
#. TRANS An attempt was made to modify something on a read-only file system.
#: stdio-common/../sysdeps/gnu/errlist.c:206
msgid "Read-only file system"
@@ -1202,11 +1270,15 @@ msgstr ""
msgid "Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"
msgstr ""
+#: nis/ypclnt.c:633
+msgid "Request arguments bad"
+msgstr ""
+
#: resolv/herror.c:73
msgid "Resolver Error 0 (no error)"
msgstr ""
-#: resolv/herror.c:115
+#: resolv/herror.c:117
msgid "Resolver internal error"
msgstr ""
@@ -1277,7 +1349,7 @@ msgstr ""
msgid "Software caused connection abort"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:718
+#: stdio-common/../sysdeps/gnu/errlist.c:734
msgid "Srmount error"
msgstr ""
@@ -1309,10 +1381,15 @@ msgstr ""
msgid "Structure needs cleaning"
msgstr ""
-#: posix/regex.c:940 stdio-common/../sysdeps/gnu/errlist.c:7
+#: nis/ypclnt.c:631 nis/ypclnt.c:705 posix/regex.c:940
+#: stdio-common/../sysdeps/gnu/errlist.c:7
msgid "Success"
msgstr ""
+#: nis/ypclnt.c:711
+msgid "System resource allocation failure"
+msgstr ""
+
msgid "Terminated"
msgstr ""
@@ -1325,7 +1402,7 @@ msgstr ""
msgid "Text file busy"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:694
+#: stdio-common/../sysdeps/gnu/errlist.c:650
msgid "Timer expired"
msgstr ""
@@ -1412,7 +1489,7 @@ msgstr ""
msgid "Try `%s --help' for more information.\n"
msgstr ""
-#: inet/rcmd.c:121
+#: inet/rcmd.c:136
#, c-format
msgid "Trying %s...\n"
msgstr ""
@@ -1422,8 +1499,12 @@ msgstr ""
msgid "Unknown .netrc keyword %s"
msgstr ""
-#: string/../sysdeps/generic/_strerror.c:36
-#: string/../sysdeps/mach/_strerror.c:58
+#: nis/ypclnt.c:665
+msgid "Unknown NIS error code"
+msgstr ""
+
+#: string/../sysdeps/generic/_strerror.c:44
+#: string/../sysdeps/mach/_strerror.c:67
msgid "Unknown error "
msgstr ""
@@ -1431,7 +1512,7 @@ msgstr ""
msgid "Unknown host"
msgstr ""
-#: resolv/herror.c:118
+#: resolv/herror.c:120
msgid "Unknown resolver error"
msgstr ""
@@ -1439,15 +1520,19 @@ msgstr ""
msgid "Unknown server error"
msgstr ""
-#: string/strsignal.c:40
+#: string/strsignal.c:41
#, c-format
msgid "Unknown signal %d"
msgstr ""
-#: misc/error.c:94
+#: misc/error.c:95
msgid "Unknown system error"
msgstr ""
+#: nis/ypclnt.c:713
+msgid "Unknown ypbind error"
+msgstr ""
+
#: posix/regex.c:948
msgid "Unmatched ( or \\("
msgstr ""
@@ -1464,7 +1549,7 @@ msgstr ""
msgid "Unmatched \\{"
msgstr ""
-#: posix/getconf.c:191
+#: posix/getconf.c:260
#, c-format
msgid "Unrecognized variable `%s'"
msgstr ""
@@ -1537,7 +1622,7 @@ msgid ""
" -k, --keyword-name write names of selected keywords\n"
msgstr ""
-#: posix/getconf.c:138
+#: posix/getconf.c:200
#, c-format
msgid "Usage: %s variable_name [pathname]\n"
msgstr ""
@@ -1552,7 +1637,7 @@ msgstr ""
msgid "User defined signal 2"
msgstr ""
-#: stdio-common/../sysdeps/gnu/errlist.c:742
+#: stdio-common/../sysdeps/gnu/errlist.c:642
msgid "Value too large for defined data type"
msgstr ""
@@ -1572,6 +1657,23 @@ msgstr ""
msgid "Written by %s.\n"
msgstr ""
+#: nis/ypclnt.c:146
+msgid "YPBINDPROC_DOMAIN: Internal error\n"
+msgstr ""
+
+#: nis/ypclnt.c:150
+#, c-format
+msgid "YPBINDPROC_DOMAIN: No server for domain %s\n"
+msgstr ""
+
+#: nis/ypclnt.c:154
+msgid "YPBINDPROC_DOMAIN: Resource allocation failure\n"
+msgstr ""
+
+#: nis/ypclnt.c:158
+msgid "YPBINDPROC_DOMAIN: Unknown error\n"
+msgstr ""
+
#. TRANS You did @strong{what}?
#: stdio-common/../sysdeps/gnu/errlist.c:596
msgid "You really blew it this time"
@@ -1591,7 +1693,7 @@ msgstr ""
msgid "`-1' must be last entry in `%s' field in `%s' category"
msgstr ""
-#: locale/programs/ld-collate.c:1651
+#: locale/programs/ld-collate.c:1652
msgid "`...' must only be used in `...' and `UNDEFINED' entries"
msgstr ""
@@ -1599,7 +1701,7 @@ msgstr ""
msgid "`from' expected after first argument to `collating-element'"
msgstr ""
-#: locale/programs/ld-collate.c:1108
+#: locale/programs/ld-collate.c:1109
msgid ""
"`from' string in collation element declaration contains unknown character"
msgstr ""
@@ -1618,7 +1720,7 @@ msgstr ""
msgid "auth_none.c - Fatal marshalling problem"
msgstr ""
-#: inet/rcmd.c:330
+#: inet/rcmd.c:360
msgid "bad .rhosts owner"
msgstr ""
@@ -1668,16 +1770,16 @@ msgstr ""
msgid "cannot `stat' locale file `%s'"
msgstr ""
-#: locale/programs/ld-collate.c:1313
+#: locale/programs/ld-collate.c:1314
#, c-format
msgid "cannot insert collation element `%.*s'"
msgstr ""
-#: locale/programs/ld-collate.c:1492 locale/programs/ld-collate.c:1497
+#: locale/programs/ld-collate.c:1493 locale/programs/ld-collate.c:1498
msgid "cannot insert into result table"
msgstr ""
-#: locale/programs/ld-collate.c:1165 locale/programs/ld-collate.c:1207
+#: locale/programs/ld-collate.c:1166 locale/programs/ld-collate.c:1208
#, c-format
msgid "cannot insert new collating symbol definition: %s"
msgstr ""
@@ -1707,7 +1809,7 @@ msgstr ""
msgid "cannot open output file `%s' for category `%s'"
msgstr ""
-#: locale/programs/ld-collate.c:1359
+#: locale/programs/ld-collate.c:1360
msgid "cannot process order specification"
msgstr ""
@@ -1749,17 +1851,12 @@ msgstr ""
msgid "character <SP> not defined in character map"
msgstr ""
-#: locale/programs/ld-ctype.c:1141
-#, c-format
-msgid "character `%c' not defined while needed as default value"
-msgstr ""
-
#: locale/programs/ld-ctype.c:939 locale/programs/ld-ctype.c:1002
#: locale/programs/ld-ctype.c:1010 locale/programs/ld-ctype.c:1018
#: locale/programs/ld-ctype.c:1026 locale/programs/ld-ctype.c:1034
#: locale/programs/ld-ctype.c:1042 locale/programs/ld-ctype.c:1068
#: locale/programs/ld-ctype.c:1076 locale/programs/ld-ctype.c:1114
-#: locale/programs/ld-ctype.c:1152
+#: locale/programs/ld-ctype.c:1141 locale/programs/ld-ctype.c:1152
#, c-format
msgid "character `%s' not defined while needed as default value"
msgstr ""
@@ -1783,13 +1880,14 @@ msgstr ""
msgid "clnt_raw.c - Fatal header serialization error."
msgstr ""
-#: locale/programs/ld-collate.c:1328
+#: locale/programs/ld-collate.c:1329
#, c-format
msgid "collation element `%.*s' appears more than once: ignore line"
msgstr ""
-#: locale/programs/ld-collate.c:1346
-msgid "collation symbol `.*s' appears more than once: ignore line"
+#: locale/programs/ld-collate.c:1347
+#, c-format
+msgid "collation symbol `%.*s' appears more than once: ignore line"
msgstr ""
#: locale/programs/locfile.c:522
@@ -1797,7 +1895,7 @@ msgstr ""
msgid "collation symbol expected after `%s'"
msgstr ""
-#: inet/rcmd.c:114
+#: inet/rcmd.c:129
#, c-format
msgid "connect to address %s: "
msgstr ""
@@ -1806,14 +1904,6 @@ msgstr ""
msgid "couldn't create an rpc server\n"
msgstr ""
-#: sunrpc/portmap.c:121
-msgid "couldn't do tcp_create\n"
-msgstr ""
-
-#: sunrpc/portmap.c:99
-msgid "couldn't do udp_create\n"
-msgstr ""
-
#: sunrpc/svc_simple.c:77
#, c-format
msgid "couldn't register prog %d vers %d\n"
@@ -1843,11 +1933,11 @@ msgstr ""
msgid "duplicate character name `%s'"
msgstr ""
-#: locale/programs/ld-collate.c:1140
+#: locale/programs/ld-collate.c:1141
msgid "duplicate collating element definition"
msgstr ""
-#: locale/programs/ld-collate.c:1286
+#: locale/programs/ld-collate.c:1287
#, c-format
msgid "duplicate definition for character `%.*s'"
msgstr ""
@@ -1873,7 +1963,7 @@ msgstr ""
msgid "duplicated message number"
msgstr ""
-#: locale/programs/ld-collate.c:1695
+#: locale/programs/ld-collate.c:1696
msgid "empty weight name: line ignored"
msgstr ""
@@ -1893,15 +1983,15 @@ msgstr ""
msgid "enablecache: could not allocate cache fifo"
msgstr ""
-#: locale/programs/ld-collate.c:1418
+#: locale/programs/ld-collate.c:1419
msgid "end point of ellipsis range is bigger then start"
msgstr ""
-#: locale/programs/ld-collate.c:1148
+#: locale/programs/ld-collate.c:1149
msgid "error while inserting collation element into hash table"
msgstr ""
-#: locale/programs/ld-collate.c:1160
+#: locale/programs/ld-collate.c:1161
msgid "error while inserting to hash table"
msgstr ""
@@ -1970,11 +2060,11 @@ msgstr ""
msgid "illegal Rolling/Stationary field on Leap line"
msgstr ""
-#: locale/programs/ld-collate.c:1766
+#: locale/programs/ld-collate.c:1767
msgid "illegal character constant in string"
msgstr ""
-#: locale/programs/ld-collate.c:1115
+#: locale/programs/ld-collate.c:1116
msgid "illegal collation element"
msgstr ""
@@ -2088,11 +2178,11 @@ msgstr ""
msgid "invalid weekday name"
msgstr ""
-#: locale/programs/ld-collate.c:1411
+#: locale/programs/ld-collate.c:1412
msgid "line after ellipsis must contain character definition"
msgstr ""
-#: locale/programs/ld-collate.c:1390
+#: locale/programs/ld-collate.c:1391
msgid "line before ellipsis does not contain definition for character constant"
msgstr ""
@@ -2118,12 +2208,16 @@ msgid "memory clobbered past end of allocated block"
msgstr ""
#: locale/programs/ld-collate.c:167 locale/programs/ld-collate.c:173
-#: locale/programs/ld-collate.c:177 locale/programs/ld-collate.c:1438
-#: locale/programs/ld-collate.c:1467 locale/programs/locfile.c:940
-#: locale/programs/xmalloc.c:68 posix/getconf.c:181
+#: locale/programs/ld-collate.c:177 locale/programs/ld-collate.c:1439
+#: locale/programs/ld-collate.c:1468 locale/programs/locfile.c:940
+#: locale/programs/xmalloc.c:68 posix/getconf.c:250
msgid "memory exhausted"
msgstr ""
+#: malloc/obstack.c:425
+msgid "memory exhausted\n"
+msgstr ""
+
#: malloc/mcheck.c:180
msgid "memory is consistent, library is buggy"
msgstr ""
@@ -2187,18 +2281,6 @@ msgstr ""
msgid "only WIDTH definitions are allowed to follow the CHARMAP definition"
msgstr ""
-#: sunrpc/portmap.c:451
-msgid "portmap CALLIT: cannot fork.\n"
-msgstr ""
-
-#: sunrpc/portmap.c:94 sunrpc/portmap.c:116
-msgid "portmap cannot bind"
-msgstr ""
-
-#: sunrpc/portmap.c:86 sunrpc/portmap.c:112
-msgid "portmap cannot create socket"
-msgstr ""
-
#: db/makedb.c:326
#, c-format
msgid "problems while reading `%s'"
@@ -2220,18 +2302,18 @@ msgstr ""
msgid "program %lu version %lu ready and waiting\n"
msgstr ""
-#: inet/rcmd.c:157
+#: inet/rcmd.c:171
#, c-format
-msgid "rcmd: select (setting up stderr): %s\n"
+msgid "rcmd: select (setting up stderr): %m\n"
msgstr ""
-#: inet/rcmd.c:87
+#: inet/rcmd.c:103
msgid "rcmd: socket: All ports in use\n"
msgstr ""
-#: inet/rcmd.c:144
+#: inet/rcmd.c:159
#, c-format
-msgid "rcmd: write (setting up stderr): %s\n"
+msgid "rcmd: write (setting up stderr): %m\n"
msgstr ""
#: sunrpc/svc_simple.c:83
@@ -2270,19 +2352,15 @@ msgstr ""
msgid "rpcinfo: can't contact portmapper: "
msgstr ""
-#: sunrpc/portmap.c:137
-msgid "run_svc returned unexpectedly\n"
-msgstr ""
-
#: time/zic.c:708 time/zic.c:710
msgid "same rule name in multiple files"
msgstr ""
-#: inet/rcmd.c:161
+#: inet/rcmd.c:174
msgid "select: protocol failure in circuit setup\n"
msgstr ""
-#: inet/rcmd.c:179
+#: inet/rcmd.c:192
msgid "socket: protocol failure in circuit setup\n"
msgstr ""
@@ -2290,7 +2368,7 @@ msgstr ""
msgid "sorting order `forward' and `backward' are mutually exclusive"
msgstr ""
-#: locale/programs/ld-collate.c:1567 locale/programs/ld-collate.c:1613
+#: locale/programs/ld-collate.c:1568 locale/programs/ld-collate.c:1614
msgid ""
"specification of sorting weight for collation symbol does not make sense"
msgstr ""
@@ -2341,35 +2419,35 @@ msgstr ""
msgid "svcudp_create: socket creation problem"
msgstr ""
-#: locale/programs/ld-collate.c:1190
+#: locale/programs/ld-collate.c:1191
#, c-format
msgid ""
"symbol for multicharacter collating element `%.*s' duplicates element "
"definition"
msgstr ""
-#: locale/programs/ld-collate.c:1063
+#: locale/programs/ld-collate.c:1064
#, c-format
msgid ""
"symbol for multicharacter collating element `%.*s' duplicates other element "
"definition"
msgstr ""
-#: locale/programs/ld-collate.c:1199
+#: locale/programs/ld-collate.c:1200
#, c-format
msgid ""
"symbol for multicharacter collating element `%.*s' duplicates other symbol "
"definition"
msgstr ""
-#: locale/programs/ld-collate.c:1072
+#: locale/programs/ld-collate.c:1073
#, c-format
msgid ""
"symbol for multicharacter collating element `%.*s' duplicates symbol "
"definition"
msgstr ""
-#: locale/programs/ld-collate.c:1054 locale/programs/ld-collate.c:1181
+#: locale/programs/ld-collate.c:1055 locale/programs/ld-collate.c:1182
#, c-format
msgid ""
"symbol for multicharacter collating element `%.*s' duplicates symbolic name "
@@ -2481,7 +2559,7 @@ msgstr ""
msgid "too many transitions?!"
msgstr ""
-#: locale/programs/ld-collate.c:1622
+#: locale/programs/ld-collate.c:1623
msgid "too many weights"
msgstr ""
@@ -2498,7 +2576,7 @@ msgstr ""
msgid "trouble replying to prog %d\n"
msgstr ""
-#: locale/programs/ld-collate.c:1382
+#: locale/programs/ld-collate.c:1383
msgid "two lines in a row containing `...' are not allowed"
msgstr ""
@@ -2506,6 +2584,10 @@ msgstr ""
msgid "typed single year"
msgstr ""
+#: posix/getconf.c:239
+msgid "undefined"
+msgstr ""
+
#: locale/programs/charmap.c:617 locale/programs/charmap.c:628
#, c-format
msgid "unknown character `%s'"
@@ -2535,8 +2617,8 @@ msgstr ""
msgid "unknown signal"
msgstr ""
-#: locale/programs/ld-collate.c:1366 locale/programs/ld-collate.c:1557
-#: locale/programs/ld-collate.c:1731
+#: locale/programs/ld-collate.c:1367 locale/programs/ld-collate.c:1558
+#: locale/programs/ld-collate.c:1732
#, c-format
msgid "unknown symbol `%.*s': line ignored"
msgstr ""
@@ -2557,7 +2639,7 @@ msgstr ""
msgid "unterminated symbolic name"
msgstr ""
-#: locale/programs/ld-collate.c:1684
+#: locale/programs/ld-collate.c:1685
msgid "unterminated weight name"
msgstr ""
@@ -2609,7 +2691,7 @@ msgstr ""
msgid "values for field `%s' in category `%s' must not be zero"
msgstr ""
-#: login/setutent_r.c:47
+#: login/utmp_file.c:84
msgid "while opening UTMP file"
msgstr ""
@@ -2648,3 +2730,15 @@ msgstr ""
#: time/zic.c:939
msgid "wrong number of fields on Zone line"
msgstr ""
+
+#: nis/ypclnt.c:570
+msgid "yp_all: clnttcp_create failed"
+msgstr ""
+
+#: nis/ypclnt.c:772
+msgid "yp_update: cannot convert host to netname\n"
+msgstr ""
+
+#: nis/ypclnt.c:784
+msgid "yp_update: cannot get server address\n"
+msgstr ""
diff --git a/posix/glob.c b/posix/glob.c
index 0fa15611bd..5dab2f2e1e 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -1,19 +1,19 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
-This 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
-License, or (at your option) any later version.
+ This 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
+ License, or (at your option) any later version.
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with this library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with this 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. */
/* AIX requires this to be the first thing in the file. */
#if defined (_AIX) && !defined (__GNUC__)
@@ -843,10 +843,24 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
{
const char *name;
size_t len;
- struct dirent *d = ((flags & GLOB_ALTDIRFUNC) ?
- (*pglob->gl_readdir) (stream) :
- readdir ((DIR *) stream));
- if (d == NULL)
+ struct dirent dirbuf, *d;
+ int success;
+
+ if (flags & GLOB_ALTDIRFUNC)
+ {
+ d = (*pglob->gl_readdir) (stream);
+ success = d != NULL;
+ }
+ else
+ {
+#if defined HAVE_READDIR_R || defined _LIBC
+ success = __readdir_r ((DIR *) stream, &dirbuf, &d) >= 0;
+#else
+ d = readdir ((DIR *) stream);
+ success = d != NULL;
+#endif
+ }
+ if (! success)
break;
if (! REAL_DIR_ENTRY (d))
continue;
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index 2da898817d..f458ce25e4 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -210,6 +210,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
/* Count number of specifiers we already processed. */
int nspecs_done;
+ /* For the %m format we may need the current `errno' value. */
+ int save_errno = errno;
+
/* This table maps a character into a number representing a
class. In each step there is a destination label for each
@@ -849,7 +852,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
extern char *_strerror_internal __P ((int, char *buf, size_t)); \
\
string = (char *) \
- _strerror_internal (errno, work_buffer, sizeof work_buffer); \
+ _strerror_internal (save_errno, work_buffer, sizeof work_buffer); \
} \
is_long = 0; /* This is no wide-char string. */ \
goto LABEL (print_string)
diff --git a/stdlib/getsubopt.c b/stdlib/getsubopt.c
index f5ecea4faa..fa9eb06c3e 100644
--- a/stdlib/getsubopt.c
+++ b/stdlib/getsubopt.c
@@ -1,22 +1,22 @@
-/* getsubopt -- parse comma separate list into words
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+/* Parse comma separate list into words.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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. */
+ 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. */
#include <stdlib.h>
#include <string.h>
@@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
optional value introduced by an equal sign. If the suboption is
not part of TOKENS return in *VALUEP beginning of unknown
suboption. On exit *OPTIONP is set to the beginning of the next
- otken or at the terminating NUL character. */
+ token or at the terminating NUL character. */
int
getsubopt (optionp, tokens, valuep)
char **optionp;
diff --git a/stdlib/rand.c b/stdlib/rand.c
index 1353432850..c80da71d7d 100644
--- a/stdlib/rand.c
+++ b/stdlib/rand.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
-#include <ansidecl.h>
#include <stdlib.h>
#undef rand
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
/* Return a random integer between 0 and RAND_MAX. */
int
-DEFUN_VOID(rand)
+rand ()
{
- return (int) __random();
+ return (int) __random ();
}
diff --git a/stdlib/random_r.c b/stdlib/random_r.c
index 8c516780cd..823075bfc3 100644
--- a/stdlib/random_r.c
+++ b/stdlib/random_r.c
@@ -154,7 +154,6 @@ __srandom_r (x, buf)
}
weak_alias (__srandom_r, srandom_r)
-weak_alias (__srandom_r, srand_r)
/* Initialize the state information in the given array of N bytes for
future random number generation. Based on the number of bytes we
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index e741f492c6..9e08d81c77 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -265,6 +265,12 @@ extern int rand __P ((void));
/* Seed the random number generator with the given number. */
extern void srand __P ((unsigned int __seed));
+#ifdef __USE_REENTRANT
+/* Reentrant interface according to POSIX.1. */
+extern int __rand_r __P ((unsigned int *__seed));
+extern int rand_r __P ((unsigned int *__seed));
+#endif
+
#if defined(__USE_SVID) || defined(__USE_XOPEN)
/* System V style 48-bit random number generator functions. */
diff --git a/string/strerror_r.c b/string/strerror_r.c
index 3b45996204..e03e50c635 100644
--- a/string/strerror_r.c
+++ b/string/strerror_r.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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. */
+ 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. */
#include <stdio.h>
#include <string.h>
@@ -24,7 +24,8 @@ extern char *_strerror_internal __P ((int, char *, size_t));
/* Return a string descibing the errno code in ERRNUM. At most BUFLEN
characters of the result will be placed in STRERRBUF. */
char *
-strerror_r (int errnum, char *buf, size_t buflen)
+__strerror_r (int errnum, char *buf, size_t buflen)
{
return _strerror_internal (errnum, buf, buflen);
}
+weak_alias (__strerror_r, strerror_r)
diff --git a/string/strfry.c b/string/strfry.c
index c885f66c68..98aa71aa3f 100644
--- a/string/strfry.c
+++ b/string/strfry.c
@@ -1,43 +1,50 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
-#include <ansidecl.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
char *
-DEFUN(strfry, (string), char *string)
+strfry (char *string)
{
static int init = 0;
+ static struct random_data rdata;
size_t len, i;
if (!init)
{
- srand (time ((time_t *) NULL));
+ static int state[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+ rdata.state = NULL;
+ __initstate_r (time ((time_t *) NULL), state, 8, &rdata);
init = 1;
}
len = strlen (string);
for (i = 0; i < len; ++i)
{
- size_t j = rand () % len;
- char c = string[i];
+ int32_t j;
+ char c;
+
+ __random_r (&rdata, &j);
+ j %= len;
+
+ c = string[i];
string[i] = string[j];
string[j] = c;
}
diff --git a/string/string.h b/string/string.h
index ff6d3df21e..79a7aaa58d 100644
--- a/string/string.h
+++ b/string/string.h
@@ -174,6 +174,7 @@ extern char *strerror __P ((int __errnum));
#ifdef __USE_REENTRANT
/* Reentrant version of `strerror'. If a temporary buffer is required, at
most BUFLEN bytes of BUF will be used. */
+extern char *__strerror_r __P ((int __errnum, char *__buf, size_t __buflen));
extern char *strerror_r __P ((int __errnum, char *__buf, size_t __buflen));
#endif
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 415549d205..1c71ec8ab2 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,22 +1,22 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Richard Henderson <rth@tamu.edu>.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
/* This was written in the absence of an ABI -- don't expect
it to remain unchanged. */
@@ -37,13 +37,13 @@ elf_machine_matches_host (Elf64_Word e_machine)
return e_machine == EM_ALPHA;
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline Elf64_Addr *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. The multiple-got-capable
+ linker no longer allocates the first .got entry for this. But not to
+ worry, no special tricks are needed. */
+static inline Elf64_Addr
+elf_machine_dynamic (void)
{
- register Elf64_Addr gp __asm__("$29");
- return (Elf64_Addr *)(gp - 0x8000);
+ return (Elf64_Addr) &_DYNAMIC;
}
/* Return the run-time load address of the shared object. */
diff --git a/sysdeps/generic/a.out.h b/sysdeps/generic/a.out.h
new file mode 100644
index 0000000000..2c13762703
--- /dev/null
+++ b/sysdeps/generic/a.out.h
@@ -0,0 +1,339 @@
+#ifndef __A_OUT_GNU_H__
+#define __A_OUT_GNU_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define __GNU_EXEC_MACROS__
+
+#ifndef __STRUCT_EXEC_OVERRIDE__
+
+struct exec
+{
+ unsigned long a_info; /* Use macros N_MAGIC, etc for access */
+ unsigned a_text; /* size of text, in bytes */
+ unsigned a_data; /* size of data, in bytes */
+ unsigned a_bss; /* size of uninitialized data area, in bytes */
+ unsigned a_syms; /* length of symbol table data, in bytes */
+ unsigned a_entry; /* start address */
+ unsigned a_trsize; /* size of reloc info for text, in bytes */
+ unsigned a_drsize; /* size of reloc info for data, in bytes */
+
+#if defined (sequent) && defined (i386)
+ struct gdtbl
+ { /* Global Descriptor Table */
+ unsigned g_code[2];
+ unsigned g_data[2];
+ unsigned g_desc[2];
+ } a_gdtbl;
+ unsigned a_shdata; /* size of initialized shared data */
+ unsigned a_shbss; /* size of uninitialized shared data */
+ unsigned a_shdrsize; /* size of shared data relocation */
+ unsigned a_bootstrap[11]; /* bootstrap for standalone */
+ unsigned a_reserved[3]; /* reserved for future use */
+ unsigned a_version; /* object version */
+#endif /* Sequent Symmetry, Dynix 3.x */
+};
+
+#endif /* __STRUCT_EXEC_OVERRIDE__ */
+
+/* these go in the N_MACHTYPE field */
+enum machine_type {
+#if defined (M_OLDSUN2)
+ M__OLDSUN2 = M_OLDSUN2,
+#else
+ M_OLDSUN2 = 0,
+#endif
+#if defined (M_68010)
+ M__68010 = M_68010,
+#else
+ M_68010 = 1,
+#endif
+#if defined (M_68020)
+ M__68020 = M_68020,
+#else
+ M_68020 = 2,
+#endif
+#if defined (M_SPARC)
+ M__SPARC = M_SPARC,
+#else
+ M_SPARC = 3,
+#endif
+ /* skip a bunch so we don't run into any of sun's numbers */
+ M_386 = 100
+};
+
+#if defined (sequent) && defined (i386)
+
+/* Dynix 3 wants the magic number to be the whole first longword. */
+
+#define N_MAGIC(exec) ((exec).a_info)
+#define N_MACHTYPE(exec) 0
+#define N_FLAGS(exec) 0
+#define N_SET_INFO(exec, magic, type, flags) N_SET_MAGIC ((exec), (magic))
+#define N_SET_MAGIC(exec, magic) ((exec).a_info = (magic))
+#define N_SET_MACHTYPE(exec, machtype) ((void) 0)
+#define N_SET_FLAGS(exec, flags) ((void) 0)
+#define OMAGIC 0x12eb /* impure format - for .o's */
+#define ZMAGIC 0x22eb /* demand load format - zero at zero */
+#define NMAGIC you lose /* syntax error -- no pure format */
+#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != ZMAGIC)
+#define N_ADDRADJ(x) (N_MAGIC(x) == ZMAGIC ? SEGMENT_SIZE : 0)
+#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text - N_ADDRADJ(x))
+#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data + (x).a_shdata)
+#define N_SYMOFF(x) (N_DRELOFF(x) + (x).a_drsize + (x).a_shdrsize)
+#define N_TXTADDR(x) SEGMENT_SIZE
+#define N_COMM 0x0a /** conflicts with N_INDR **/
+#define N_FN 0x0c
+/* Note that the Dynix binutils believe that N_SET[TDB] are
+ N_SH{DATA,BSS,COMM} -- be wary when mixing GNU & Dynix objects. */
+#define PAGE_SIZE 4096
+#define SEGMENT_SIZE PAGE_SIZE
+
+#else /* !(sequent && i386) */
+
+#if !defined (N_MAGIC)
+#define N_MAGIC(exec) ((exec).a_info & 0xffff)
+#endif
+#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
+#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
+#define N_SET_INFO(exec, magic, type, flags) \
+ ((exec).a_info = ((magic) & 0xffff) \
+ | (((int)(type) & 0xff) << 16) \
+ | (((flags) & 0xff) << 24))
+#define N_SET_MAGIC(exec, magic) \
+ ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
+
+#define N_SET_MACHTYPE(exec, machtype) \
+ ((exec).a_info = \
+ ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
+
+#define N_SET_FLAGS(exec, flags) \
+ ((exec).a_info = \
+ ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
+
+#endif /* sequent && i386 */
+
+#ifndef OMAGIC
+/* Code indicating object file or impure executable. */
+#define OMAGIC 0407
+/* Code indicating pure executable. */
+#define NMAGIC 0410
+/* Code indicating demand-paged executable. */
+#define ZMAGIC 0413
+#endif /* not OMAGIC */
+
+#if !defined (N_BADMAG)
+#define N_BADMAG(x) \
+ (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \
+ && N_MAGIC(x) != ZMAGIC)
+#endif
+
+#define _N_BADMAG(x) \
+ (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \
+ && N_MAGIC(x) != ZMAGIC)
+
+#ifndef sparc
+#define _N_HDROFF(x) (SEGMENT_SIZE - sizeof (struct exec))
+#else
+#define _N_HDROFF(x) (- sizeof (struct exec))
+#endif
+
+#if !defined (N_TXTOFF)
+#define N_TXTOFF(x) \
+ (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : sizeof (struct exec))
+#endif
+
+#if !defined (N_DATOFF)
+#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
+#endif
+
+#if !defined (N_TRELOFF)
+#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
+#endif
+
+#if !defined (N_DRELOFF)
+#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
+#endif
+
+#if !defined (N_SYMOFF)
+#define N_SYMOFF(x) (N_DRELOFF(x) + (x).a_drsize)
+#endif
+
+#if !defined (N_STROFF)
+#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
+#endif
+
+/* Address of text segment in memory after it is loaded. */
+#if !defined (N_TXTADDR)
+#define N_TXTADDR(x) 0
+#endif
+
+/* Address of data segment in memory after it is loaded.
+ Note that it is up to you to define SEGMENT_SIZE
+ on machines not listed here. */
+#if defined (hp300) || defined (mips)
+#define PAGE_SIZE 4096
+#endif
+#if defined (sparc) || defined (NeXT)
+#define PAGE_SIZE 0x2000
+#endif
+#if defined (sony) || (defined (sun) && defined (mc68000))
+#define SEGMENT_SIZE 0x2000
+#endif /* Sony or 68k Sun. */
+#ifdef is68k
+#define SEGMENT_SIZE 0x20000
+#endif
+#if defined(m68k) && defined(PORTAR)
+#define PAGE_SIZE 0x400
+#endif
+#if defined(i386) && !defined(sequent)
+/* For COFF encapsulation. */
+#define SEGMENT_SIZE 0x400000
+#endif
+#ifndef SEGMENT_SIZE
+/* This used to be first in this paragraph and under:
+ if (defined(vax) || defined(hp300) || defined(pyr) || defined(sparc) \
+ || (defined(m68k) && defined(PORTAR)) \
+ || defined (NeXT) || defined (mips)) */
+#define SEGMENT_SIZE PAGE_SIZE
+#endif
+#ifndef PAGE_SIZE
+/* This value is for i386-minix, but that has no predefine.
+ Making it default will only cause confusion on machines
+ which have no proper value defined. */
+#define PAGE_SIZE 16
+#endif
+
+#define PAGSIZ PAGE_SIZE
+#define SEGSIZ SEGMENT_SIZE
+
+#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1))
+
+#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
+
+#ifndef N_DATADDR
+#define N_DATADDR(x) \
+ (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) \
+ : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
+#endif
+
+/* Address of bss segment in memory after it is loaded. */
+#if !defined (N_BSSADDR)
+#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
+#endif
+
+#if !defined (N_NLIST_DECLARED)
+struct nlist {
+ union {
+ char *n_name;
+ struct nlist *n_next;
+ long n_strx;
+ } n_un;
+ unsigned char n_type;
+ char n_other;
+ short n_desc;
+ unsigned long n_value;
+};
+#endif /* no N_NLIST_DECLARED. */
+
+#if !defined (N_UNDF)
+#define N_UNDF 0
+#endif
+#if !defined (N_ABS)
+#define N_ABS 2
+#endif
+#if !defined (N_TEXT)
+#define N_TEXT 4
+#endif
+#if !defined (N_DATA)
+#define N_DATA 6
+#endif
+#if !defined (N_BSS)
+#define N_BSS 8
+#endif
+#if !defined (N_COMM)
+#define N_COMM 18
+#endif
+#if !defined (N_FN)
+#define N_FN 15
+#endif
+
+#if !defined (N_EXT)
+#define N_EXT 1
+#endif
+#if !defined (N_TYPE)
+#define N_TYPE 036
+#endif
+#if !defined (N_STAB)
+#define N_STAB 0340
+#endif
+
+/* The following type indicates the definition of a symbol as being
+ an indirect reference to another symbol. The other symbol
+ appears as an undefined reference, immediately following this symbol.
+
+ Indirection is asymmetrical. The other symbol's value will be used
+ to satisfy requests for the indirect symbol, but not vice versa.
+ If the other symbol does not have a definition, libraries will
+ be searched to find a definition. */
+#define N_INDR 0xa
+
+/* The following symbols refer to set elements.
+ All the N_SET[ATDB] symbols with the same name form one set.
+ Space is allocated for the set in the text section, and each set
+ element's value is stored into one word of the space.
+ The first word of the space is the length of the set (number of elements).
+
+ The address of the set is made into an N_SETV symbol
+ whose name is the same as the name of the set.
+ This symbol acts like a N_DATA global symbol
+ in that it can satisfy undefined external references. */
+
+/* These appear as input to LD, in a .o file. */
+#define N_SETA 0x14 /* Absolute set element symbol */
+#define N_SETT 0x16 /* Text set element symbol */
+#define N_SETD 0x18 /* Data set element symbol */
+#define N_SETB 0x1A /* Bss set element symbol */
+
+/* This is output from LD. */
+#define N_SETV 0x1C /* Pointer to set vector in data area. */
+
+#if !defined (N_RELOCATION_INFO_DECLARED)
+/* This structure describes a single relocation to be performed.
+ The text-relocation section of the file is a vector of these structures,
+ all of which apply to the text section.
+ Likewise, the data-relocation section applies to the data section. */
+
+struct relocation_info
+{
+ /* Address (within segment) to be relocated. */
+ int r_address;
+ /* The meaning of r_symbolnum depends on r_extern. */
+ unsigned int r_symbolnum:24;
+ /* Nonzero means value is a pc-relative offset
+ and it should be relocated for changes in its own address
+ as well as for changes in the symbol or section specified. */
+ unsigned int r_pcrel:1;
+ /* Length (as exponent of 2) of the field to be relocated.
+ Thus, a value of 2 indicates 1<<2 bytes. */
+ unsigned int r_length:2;
+ /* 1 => relocate with value of symbol.
+ r_symbolnum is the index of the symbol
+ in file's the symbol table.
+ 0 => relocate with the address of a segment.
+ r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
+ (the N_EXT bit may be set also, but signifies nothing). */
+ unsigned int r_extern:1;
+ /* Four bits that aren't used, but when writing an object file
+ it is desirable to clear them. */
+ unsigned int r_pad:4;
+};
+#endif /* no N_RELOCATION_INFO_DECLARED. */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __A_OUT_GNU_H__ */
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 5bd0f8254b..e1b0f4780f 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -1,21 +1,21 @@
/* Machine-dependent ELF dynamic relocation inline functions. i386 version.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#ifndef dl_machine_h
#define dl_machine_h
@@ -39,13 +39,14 @@ elf_machine_matches_host (Elf32_Half e_machine)
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline Elf32_Addr * __attribute__ ((unused))
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
{
register Elf32_Addr *got asm ("%ebx");
- return got;
+ return *got;
}
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 8b9872c15a..a4b1edcdd9 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,21 +1,21 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#ifndef dl_machine_h
#define dl_machine_h
@@ -38,13 +38,14 @@ elf_machine_matches_host (Elf32_Half e_machine)
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline Elf32_Addr *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
{
register Elf32_Addr *got asm ("%a5");
- return got;
+ return *got;
}
diff --git a/sysdeps/mach/hurd/libc-ldscript b/sysdeps/mach/hurd/libc-ldscript
index 26aca50272..499a2b2b99 100644
--- a/sysdeps/mach/hurd/libc-ldscript
+++ b/sysdeps/mach/hurd/libc-ldscript
@@ -1,4 +1,5 @@
-/* This linker script is installed as /lib/libc.a.
+/* GNU ld script
+ This linker script is installed as /lib/libc.a.
It makes -lc become just like -( -lcrt -lmachuser -lhurduser -).
*/
diff --git a/sysdeps/mach/hurd/libc_p-ldscript b/sysdeps/mach/hurd/libc_p-ldscript
index d809998a1f..7dcd52eec4 100644
--- a/sysdeps/mach/hurd/libc_p-ldscript
+++ b/sysdeps/mach/hurd/libc_p-ldscript
@@ -1,4 +1,5 @@
-/* This linker script is installed as /lib/libc_p.a.
+/* GNU ld script
+ This linker script is installed as /lib/libc_p.a.
It makes -lc_p become just like -( -lcrt_p -lmachuser_p -lhurduser_p -).
*/
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c0ac649144..c00afbe549 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,22 +1,22 @@
-/* Machine-dependent ELF dynamic relocation inline functions. mips version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
-
-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
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
+
+ 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
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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. */
#define ELF_MACHINE_NAME "MIPS"
@@ -67,13 +67,14 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
/* FIXME: the offset of gp from GOT may be system-dependent. */
return (ElfW(Addr) *) (gpreg - 0x7ff0);
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline ElfW(Addr) *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline ElfW(Addr)
+elf_machine_dynamic (void)
{
register ElfW(Addr) gp asm ("$28");
- return (ElfW(Addr) *) (gp - 0x7ff0);
+ return * (ElfW(Addr) *) (gp - 0x7ff0);
}
diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c
index 5f3f628fb5..92196ac50a 100644
--- a/sysdeps/posix/getcwd.c
+++ b/sysdeps/posix/getcwd.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
/* Wants:
AC_STDC_HEADERS
@@ -187,6 +187,10 @@ extern char *alloca ();
#define __getcwd getcwd
#endif
+#if defined HAVE_READDIR_R && !defined _LIBC
+#define __readdir_r readdir_r
+#endif
+
/* Get the pathname of the current working directory, and put it in SIZE
bytes of BUF. Returns NULL if the directory couldn't be determined or
SIZE was too small. If successful, returns BUF. In GNU, if BUF is
@@ -250,6 +254,9 @@ __getcwd (buf, size)
{
register DIR *dirstream;
register struct dirent *d;
+#if defined HAVE_READDIR_R || defined _LIBC
+ struct dirent dirbuf;
+#endif
dev_t dotdev;
ino_t dotino;
char mount_point;
@@ -292,7 +299,13 @@ __getcwd (buf, size)
dirstream = __opendir (dotp);
if (dirstream == NULL)
goto lose;
- while ((d = __readdir (dirstream)) != NULL)
+ while (
+#if defined HAVE_READDIR_R || defined _LIBC
+ __readdir_r (dirstream, &dirbuf, &d) >= 0
+#else
+ (d = __readdir (dirstream)) != NULL
+#endif
+ )
{
if (d->d_name[0] == '.' &&
(d->d_name[1] == '\0' ||
diff --git a/sysdeps/posix/ttyname.c b/sysdeps/posix/ttyname.c
index 9668117b47..043e91b084 100644
--- a/sysdeps/posix/ttyname.c
+++ b/sysdeps/posix/ttyname.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <errno.h>
#include <limits.h>
@@ -41,7 +41,7 @@ ttyname (fd)
dev_t mydev;
ino_t myino;
DIR *dirstream;
- struct dirent *d;
+ struct dirent dirbuf, *d;
int save = errno;
if (!__isatty (fd))
@@ -56,7 +56,7 @@ ttyname (fd)
if (dirstream == NULL)
return NULL;
- while ((d = readdir (dirstream)) != NULL)
+ while (__readdir_r (dirstream, &dirbuf, &d) >= 0)
if ((ino_t) d->d_fileno == myino)
{
size_t dlen = _D_ALLOC_NAMLEN (d);
diff --git a/sysdeps/posix/ttyname_r.c b/sysdeps/posix/ttyname_r.c
index 5b62826a19..c7cf21aeee 100644
--- a/sysdeps/posix/ttyname_r.c
+++ b/sysdeps/posix/ttyname_r.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <errno.h>
#include <limits.h>
@@ -43,7 +43,7 @@ __ttyname_r (fd, buf, buflen)
dev_t mydev;
ino_t myino;
DIR *dirstream;
- struct dirent *d;
+ struct dirent dirbuf, *d;
int save = errno;
/* Test for the absolute minimal size. This makes life easier inside
@@ -74,7 +74,7 @@ __ttyname_r (fd, buf, buflen)
buf[sizeof (dev) - 1] = '/';
buflen -= sizeof (dev);
- while ((d = readdir (dirstream)) != NULL)
+ while (__readdir_r (dirstream, &dirbuf, &d) >= 0)
if ((ino_t) d->d_fileno == myino)
{
char *cp;
diff --git a/sysdeps/sparc/dl-machine.h b/sysdeps/sparc/dl-machine.h
index 695b9d6af3..ad288e15b2 100644
--- a/sysdeps/sparc/dl-machine.h
+++ b/sysdeps/sparc/dl-machine.h
@@ -1,21 +1,21 @@
/* Machine-dependent ELF dynamic relocation inline functions. SPARC version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#define ELF_MACHINE_NAME "sparc"
@@ -46,13 +46,14 @@ elf_machine_matches_host (Elf32_Half e_machine)
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline Elf32_Addr *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
{
register Elf32_Addr *got asm ("%l7");
- return got;
+ return *got;
}
diff --git a/sysdeps/stub/dl-machine.h b/sysdeps/stub/dl-machine.h
index 1fdb461da7..f44266f7b7 100644
--- a/sysdeps/stub/dl-machine.h
+++ b/sysdeps/stub/dl-machine.h
@@ -1,21 +1,21 @@
/* Machine-dependent ELF dynamic relocation inline functions. Stub version.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#define ELF_MACHINE_NAME "stub"
@@ -36,11 +36,11 @@ elf_machine_matches_host (Elf32_Half e_machine)
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_. */
-static inline Elf32_Addr *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
{
-#error "GOT not got"
+#error "Damn, no _DYNAMIC"
}
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 08dc3b4851..9df313422c 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,20 +1,20 @@
/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <sysdep.h>
#include <features.h>
@@ -63,22 +63,6 @@ __syscall_error:
lda sp, 16(sp)
ret
.end __syscall_error
-
-/* A default non-threaded version of __errno_location that just returns
- the address of errno. */
-
- .weak __errno_location
- .ent __errno_location
-__errno_location:
- .frame sp, 0, ra
- ldgp gp, 0(t12)
- .mask 0, 0
- .prologue 1
-
- lda v0, errno
- ret
- .end __errno_location
-
#else
ENTRY(__syscall_error)
diff --git a/sysdeps/unix/readdir_r.c b/sysdeps/unix/readdir_r.c
index ef75c36234..fca3eeeb5f 100644
--- a/sysdeps/unix/readdir_r.c
+++ b/sysdeps/unix/readdir_r.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-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
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ 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
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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. */
#include <errno.h>
#include <limits.h>
diff --git a/sysdeps/unix/sysv/linux/a.out.h b/sysdeps/unix/sysv/linux/a.out.h
new file mode 100644
index 0000000000..027c49ad55
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/a.out.h
@@ -0,0 +1 @@
+#include <linux/a.out.h>
diff --git a/time/ctime.c b/time/ctime.c
index 24f565d006..f13d00e551 100644
--- a/time/ctime.c
+++ b/time/ctime.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
-#include <ansidecl.h>
#undef __OPTIMIZE__ /* Avoid inline `ctime' function. */
#include <time.h>
@@ -26,10 +25,12 @@ Cambridge, MA 02139, USA. */
/* Return a string as returned by asctime which
is the representation of *T in that form. */
char *
-DEFUN(ctime, (t), CONST time_t *t)
+ctime (const time_t *t)
{
- register struct tm *tp = localtime(t);
+ static char buf[64]; /* POSIX.1 suggests at least 26 bytes. */
+ struct tm tm;
+ struct tm *tp = __localtime_r (t, &tm);
if (tp == NULL)
return NULL;
- return asctime(tp);
+ return __asctime_r (tp, buf);
}
diff --git a/time/ctime_r.c b/time/ctime_r.c
index e1981892dd..d695c7c2e2 100644
--- a/time/ctime_r.c
+++ b/time/ctime_r.c
@@ -1,22 +1,22 @@
/* ctime_r - return in BUF representation of time T in form of asctime
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-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
-License, or (at your option) any later version.
+ 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
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 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. */
+ 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. */
#include <time.h>