aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cvsignore6
-rw-r--r--ChangeLog167
-rw-r--r--Makeconfig3
-rw-r--r--Makefile6
-rw-r--r--Makerules2
-rw-r--r--elf/Makefile2
-rw-r--r--elf/ldd.bash.in32
-rw-r--r--elf/ldd.sh.in34
-rw-r--r--libio/vsnprintf.c5
-rw-r--r--manual/memory.texi6
-rw-r--r--po/libc.pot26
-rw-r--r--posix/Makefile4
-rw-r--r--posix/getopt.c57
-rwxr-xr-xrellns-sh6
-rw-r--r--stdio-common/vfprintf.c14
-rw-r--r--stdio/vsnprintf.c35
-rw-r--r--stdlib/Makefile4
-rw-r--r--stdlib/a64l.c30
-rw-r--r--stdlib/abs.c33
-rw-r--r--stdlib/atof.c33
-rw-r--r--stdlib/atoi.c33
-rw-r--r--stdlib/atol.c33
-rw-r--r--stdlib/bsearch.c49
-rw-r--r--stdlib/exit.c28
-rw-r--r--stdlib/fpioconst.c28
-rw-r--r--stdlib/fpioconst.h34
-rw-r--r--stdlib/jrand48.c36
-rw-r--r--stdlib/jrand48_r.c36
-rw-r--r--stdlib/labs.c33
-rw-r--r--stdlib/lcong48.c30
-rw-r--r--stdlib/lcong48_r.c30
-rw-r--r--stdlib/llabs.c28
-rw-r--r--stdlib/lrand48.c36
-rw-r--r--stdlib/lrand48_r.c30
-rw-r--r--stdlib/mblen.c33
-rw-r--r--stdlib/mbstowcs.c34
-rw-r--r--stdlib/mbtowc.c34
-rw-r--r--stdlib/mp_clz_tab.c33
-rw-r--r--stdlib/mrand48.c36
-rw-r--r--stdlib/mrand48_r.c30
-rw-r--r--stdlib/msort.c29
-rw-r--r--stdlib/nrand48.c36
-rw-r--r--stdlib/nrand48_r.c30
-rw-r--r--stdlib/qsort.c47
-rw-r--r--stdlib/rpmatch.c39
-rw-r--r--stdlib/seed48.c30
-rw-r--r--stdlib/seed48_r.c30
-rw-r--r--stdlib/srand48.c30
-rw-r--r--stdlib/srand48_r.c30
-rw-r--r--stdlib/stdlib.h12
-rw-r--r--stdlib/strtod.c37
-rw-r--r--stdlib/wcstombs.c34
-rw-r--r--stdlib/wctomb.c34
-rw-r--r--sunrpc/auth_unix.c7
-rw-r--r--sunrpc/authuxprot.c25
-rw-r--r--sunrpc/clnt_tcp.c3
-rw-r--r--sunrpc/clnt_udp.c3
-rw-r--r--sunrpc/pmap_rmt.c5
-rw-r--r--sunrpc/svc_authux.c14
-rw-r--r--sunrpc/svc_tcp.c3
-rw-r--r--sysdeps/generic/crypt-entry.c6
-rw-r--r--sysdeps/generic/dl-sysdep.c4
-rw-r--r--sysdeps/generic/sysd-stdio.c3
-rw-r--r--sysdeps/i386/init-first.c4
-rw-r--r--sysdeps/mach/hurd/i386/init-first.c36
-rw-r--r--sysdeps/posix/getcwd.c7
-rw-r--r--sysdeps/posix/vdprintf.c32
-rw-r--r--sysdeps/stub/init-first.c32
-rw-r--r--sysdeps/unix/sysv/linux/init-first.c10
-rw-r--r--sysdeps/unix/sysv/linux/m68k/brk.c35
-rw-r--r--sysdeps/unix/sysv/linux/socketbits.h11
-rw-r--r--time/Makefile16
-rw-r--r--time/zic.c17
-rw-r--r--version.h2
74 files changed, 1061 insertions, 801 deletions
diff --git a/.cvsignore b/.cvsignore
index e688e76..606e727 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -4,7 +4,7 @@
TODO COPYING* AUTHORS copyr-* copying.*
glibc-*
-configparms
+configparms
sun[43]* i[345]86* hp300*
@@ -13,3 +13,7 @@ ieeetest hppa-sysdeps regex
gpl2lgpl.sed
distinfo
distinfo
+
+crypt
+linuxthreads
+localedata
diff --git a/ChangeLog b/ChangeLog
index caf6ddb..2b2e5d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,170 @@
+1997-02-09 02:59 Ulrich Drepper <drepper@cygnus.com>
+
+ * version.h (VERSION): Bump to 2.0.2.
+
+ * posix/Makefile (routines): Add getopt_init.
+ * posix/getopt.c: Don't get environment variable with nonoption
+ flags here. Depend on __getopt_nonoption_flags variable filled
+ somewhere else. This is necessary since the variable must be
+ removed even when getopt isn't used in case exec(2) gets called.
+ * posix/getopt_init.c: New file. Initialize __getopt_nonoption_flags
+ and remove environment variable.
+ * sysdeps/i386/init-first.c: Call __getopt_clean_environment.
+ * sysdeps/mach/hurd/i386/init-first.c: Likewise.
+ * sysdeps/stub/init-first.c: Likewise.
+ * sysdeps/unix/sysv/linux/init-first.c: Likewise.
+
+ * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Recognize
+ AT_PAGESZ entry in auxiliary vector and store value in _dl_pagesize.
+
+ * sysdeps/generic/crypt-entry.h: Return EOPNOTSUPP when DES
+ encryption is wanted.
+
+ * libio/vsnprintf.c: If MAXLEN is 0 return 0.
+ * stdio/vsnprintf.c: Likewise.
+ Reported by Philip Blundell <pjb27@cam.ac.uk>.
+
+1997-02-07 17:43 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/generic/sysd-stdio.c: Include <errno.h>.
+ Change PTR to void *.
+ * sysdeps/posix/vdprintf.c: Change PTR to void *.
+ Reported by Brian Oxley <boxley%dev.cm.ssb.com@clipper.ssb.com>.
+
+1997-02-07 17:41 Philip Blundell <pjb27@cam.ac.uk>
+
+ * sysdeps/unix/sysv/linux/socketbits.h: Fix typo.
+
+1997-02-06 13:49 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * rellns-sh: No need to check for existance of first parameter.
+
+1997-02-06 14:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/posix/getcwd.c (__getcwd): Fix resource leaks. Reported
+ by David Holland <dholland@eecs.harvard.edu>.
+
+1997-02-06 14:38 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sunrpc/clnt_tcp.c (readtcp): Pass copy of timeout value to
+ select, in case it is modified by the latter.
+ * sunrpc/clnt_udp.c (clntudp_call): Likewise.
+ * sunrpc/pmap_rmt.c (clnt_broadcast): Likewise.
+ * sunrpc/svc_tcp.c (readtcp): Likewise.
+
+ * sunrpc/svc_authux.c (_svcauth_unix): Fix type of area_gids
+ array.
+
+ * sunrpc/authuxprot.c (xdr_authunix_parms): Check size of uid_t
+ and gid_t.
+
+ * sunrpc/auth_unix.c (authunix_validate): Fix type of second
+ argument.
+
+1997-02-06 14:29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elf/Makefile (extra-objs): Don't zap previous value.
+ * Makefile (before-compile): Likewise. Don't add gnu/lib-names.h
+ twice.
+
+1997-02-06 14:19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/unix/sysv/linux/m68k/brk.c: Add workaround for
+ braindamage (sigh!).
+
+1997-02-06 17:10 Jim Meyering <meyering@asic.sc.ti.com>
+
+ * manual/memory.texi: Correct `copystring' example for obstacks.
+
+1997-02-06 14:10 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makeconfig: Don't use [:lower:] and [:upper:] in tr since old
+ GNU tr don't grok it.
+
+1997-02-03 21:13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/unix/sysv/linux/socketbits.h [__GNUC__<2] (struct cmsghdr):
+ Don't use GNU C extensions.
+ (CMSG_DATA): Use portable definition.
+
+1997-02-05 05:58 Ulrich Drepper <drepper@cygnus.com>
+
+ * elf/ldd.bash.in: Add test for read permission and print appropriate
+ message. Change warning and error messages to print "ldd: " at start.
+ * elf/ldd.sh.in: Likewise.
+
+ * stdlib/Makefile (routines): Add atoll.
+ * stdlib/atoll.c: New file.
+ * stdlib/stdlib.h: Add prototype and optimization for atoll.
+
+ * stdlib/a64l.c: Update copyright.
+ * stdlib/abs.c: Likewise.
+ * stdlib/atof.c: Likewise.
+ * stdlib/atoi.c: Likewise.
+ * stdlib/atol.c: Likewise.
+ * stdlib/bsearch.c: Likewise.
+ * stdlib/exit.c: Likewise.
+ * stdlib/fpioconst.c: Likewise.
+ * stdlib/fpioconst.h: Likewise.
+ * stdlib/jrand48.c: Likewise.
+ * stdlib/jrand48_r.c: Likewise.
+ * stdlib/labs.c: Likewise.
+ * stdlib/lcong48.c: Likewise.
+ * stdlib/lcong48_r.c: Likewise.
+ * stdlib/llabs.c: Likewise.
+ * stdlib/lrand48.c: Likewise.
+ * stdlib/lrand48_r.c: Likewise.
+ * stdlib/mblen.c: Likewise.
+ * stdlib/mbstowcs.c: Likewise.
+ * stdlib/mbtowc.c: Likewise.
+ * stdlib/mp_clz_tab.c: Likewise.
+ * stdlib/mrand48.c: Likewise.
+ * stdlib/mrand48_r.c: Likewise.
+ * stdlib/msort.c: Likewise.
+ * stdlib/nrand48.c: Likewise.
+ * stdlib/nrand48_r.c: Likewise.
+ * stdlib/qsort.c: Likewise.
+ * stdlib/rpmatch.c: Likewise.
+ * stdlib/seed48.c: Likewise.
+ * stdlib/seed48_r.c: Likewise.
+ * stdlib/srand48.c: Likewise.
+ * stdlib/srand48_r.c: Likewise.
+ * stdlib/strtod.c: Likewise.
+ * stdlib/wcstombs.c: Likewise.
+ * stdlib/wctomb.c: Likewise.
+
+1997-02-05 05:08 Ulrich Drepper <drepper@cygnus.com>
+
+ * stdlib/mp_clz_tab.c (__clz_tab): Follow change in GMP and define
+ as const.
+
+1997-02-04 23:57 Fila Kolodny <fila@ibi.com>
+
+ * sysdeps/unix/sysv/linux/socketbits.h: Define __need_NULL before
+ including <stddef.h>.
+
+1997-02-03 20:01 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * time/Makefile (tzbases, tzlinks): New.
+ (tzfiles): Changed to $(tzbases) $(tzlinks).
+ ($(tzfiles:%=$(objpfx)z.%): Make $(tzlinks) depend on $(tzbases).
+
+1997-02-02 12:13 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * Makefile (install): Ignore error from ldconfig.
+
+ * time/zic.c (mkdirs): Double check the error return of mkdir ().
+
+1997-02-04 22:01 Ulrich Drepper <drepper@cygnus.com>
+
+ * stdio-common/vfprintf.c: Prepare to use __va_copy for architectures
+ like PPC where va_list is no integral type.
+
+1997-02-04 15:27 Roma Ekzhanov <ekzhanov@paragraph.com>
+
+ * posix/getopt.c (exchange): Don't allocate nonoption_flags array
+ if nonoption_flags_len == -1.
+
1997-02-04 02:08 Ulrich Drepper <drepper@cygnus.com>
* Version 2.0.1 net release.
diff --git a/Makeconfig b/Makeconfig
index 74f8d79..fbe2ab1 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -582,7 +582,8 @@ $(common-objpfx)gnu/lib-names.stmp: $(common-objpfx)soversions.mk
(libs='$(all-sonames)';\
for l in $$libs; do \
upname=`echo $$l | sed 's/[.]so.*//' | \
- tr '[:lower:]-' '[:upper:]_'`; \
+ tr 'abcdefghijklmnopqrstuvwxyz-' \
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
echo "#define $${upname}_SO \"$$l\""; \
done;) | sort; \
echo; \
diff --git a/Makefile b/Makefile
index f2d796f..84d2ff9 100644
--- a/Makefile
+++ b/Makefile
@@ -85,7 +85,7 @@ subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
headers := errno.h sys/errno.h errnos.h limits.h values.h \
features.h gnu-versions.h libc-lock.h xopen_lim.h
aux = sysdep $(libc-init) version
-before-compile = $(objpfx)version-info.h
+before-compile += $(objpfx)version-info.h
echo-headers: subdir_echo-headers
@@ -94,7 +94,6 @@ install-others = $(inst_includedir)/gnu/stubs.h
install-bin = glibcbug
ifeq (yes,$(build-shared))
-before-compile += $(objpfx)gnu/lib-names.h
install-others += $(inst_includedir)/gnu/lib-names.h
endif
@@ -115,10 +114,11 @@ include Makerules
install: subdir_install
# Create linkfs for shared libraries using the `ldconfig' program is possible.
+# Ignore the error if we cannot update /etc/ld.so.cache.
ifeq (no,$(cross-compiling))
ifeq (yes,$(build-shared))
install:
- test ! -x $(common-objpfx)elf/ldconfig || \
+ -test ! -x $(common-objpfx)elf/ldconfig || \
$(common-objpfx)elf/ldconfig -d $(inst_slibdir) $(inst_libdir)
endif
endif
diff --git a/Makerules b/Makerules
index 881d584..23fa219 100644
--- a/Makerules
+++ b/Makerules
@@ -810,7 +810,7 @@ $(BUILD_CC) $(BUILD_CFLAGS) $(<:$(common-objpfx)%=$(..)%) -o $(..)$(@F)
endef
# We always want to use configuration definitions.
-BUILD_CFLAGS = -include $(..)config.h
+BUILD_CFLAGS = -include $(common-objpfx)config.h
# Support the GNU standard name for this target.
.PHONY: check
diff --git a/elf/Makefile b/elf/Makefile
index 55094e3..4666919 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -56,7 +56,7 @@ install-bin = ldd
endif
ifeq (yes,$(has-ldconfig))
-extra-objs = ldconfig.o
+extra-objs += ldconfig.o
install-rootsbin = ldconfig
$(objpfx)ldconfig: $(objpfx)ldconfig.o
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index d174709..d4ea331 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -79,17 +79,20 @@ case $# in
*) file="./$1" ;;
esac
if test ! -f "$file"; then
- echo "${file}:" $"no such file"
+ echo "ldd: ${file}:" $"no such file"
exit 1
- else
+ elif test -r "$file"; then
test -x "$file" ||
- echo $"warning: you do not have execution permission for" "\`$file'"
- if ${RTLD} --verify "$file"; then
- LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} ${RELOCS} "$file" || exit 1
- else
- echo $" not a dynamic executable"
- exit 1
- fi
+ echo $"ldd: warning: you do not have execution permission for" "\`$file'"
+ if ${RTLD} --verify "$file"; then
+ LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} ${RELOCS} "$file" || exit 1
+ else
+ echo $" not a dynamic executable"
+ exit 1
+ fi
+ else
+ echo $"ldd: error: you do not have read permission for" "\`$file'"
+ exit 1
fi
exit ;;
*)
@@ -102,17 +105,20 @@ case $# in
*) file="./$file" ;;
esac
if test ! -f "$file"; then
- echo "${file}:" $"no such file"
+ echo "ldd: ${file}:" $"no such file"
result=1
- else
- test -x "$file" ||
- echo $"warning: you do not have execution permission for" "\`$file'"
+ elif test -r "$file"; then
+ test -x "$file" || echo $"\
+ldd: warning: you do not have execution permission for" "\`$file'"
if ${RTLD} --verify "$file"; then
LD_TRACE_LOADED_OBJECTS=1 ${RTLD} ${RELOCS} "$file" || result=1
else
echo $" not a dynamic executable"
result=1
fi
+ else
+ echo $"ldd: error: you do not have read permission for" "\`$file'"
+ result=1
fi
done
esac
diff --git a/elf/ldd.sh.in b/elf/ldd.sh.in
index 4351578..f7c1163 100644
--- a/elf/ldd.sh.in
+++ b/elf/ldd.sh.in
@@ -77,15 +77,20 @@ Try \`ldd --help' for more information."
*) file="./$1" ;;
esac
if test ! -f "$file"; then
- echo "${file}: no such file"
+ echo "ldd: ${file}: no such file"
exit 1
else
- test -x "$file" ||
- echo "warning: you do not have execution permission for \`$file'"
- if ${RTLD} --verify "$file"; then
- LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} ${RELOCS} "$file" || exit 1
+ if test -r "$file"; then
+ test -x "$file" ||
+ echo "ldd: warning: you do not have execution permission for \`$file'"
+ if ${RTLD} --verify "$file"; then
+ LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} ${RELOCS} "$file" || exit 1
+ else
+ echo ' not a dynamic executable'
+ exit 1
+ fi
else
- echo ' not a dynamic executable'
+ echo "ldd: error: you do not have read permission for \`$file'"
exit 1
fi
fi
@@ -100,15 +105,20 @@ Try \`ldd --help' for more information."
*) file="./$file" ;;
esac
if test ! -f "$file"; then
- echo "${file}: no such file"
+ echo "ldd: ${file}: no such file"
result=1
else
- test -x "$file" ||
- echo "warning: you do not have execution permission for \`$file'"
- if ${RTLD} --verify "$file"; then
- LD_TRACE_LOADED_OBJECTS=1 ${RTLD} ${RELOCS} "$file" || result=1
+ if test -r "$file"; then
+ test -x "$file" || echo "\
+ldd: warning: you do not have execution permission for \`$file'"
+ if ${RTLD} --verify "$file"; then
+ LD_TRACE_LOADED_OBJECTS=1 ${RTLD} ${RELOCS} "$file" || result=1
+ else
+ echo ' not a dynamic executable'
+ result=1
+ fi
else
- echo ' not a dynamic executable'
+ echo "ldd: error: you do not have read permission for \`$file'"
result=1
fi
fi
diff --git a/libio/vsnprintf.c b/libio/vsnprintf.c
index 9ec0691..af901bf 100644
--- a/libio/vsnprintf.c
+++ b/libio/vsnprintf.c
@@ -38,6 +38,11 @@ _IO_vsnprintf (string, maxlen, format, args)
_IO_lock_t lock;
sf._sbf._f._lock = &lock;
#endif
+
+ /* We need to handle the special case where MAXLEN is 0. */
+ if (maxlen == 0)
+ return 0;
+
_IO_init ((_IO_FILE *) &sf, 0);
_IO_JUMPS ((_IO_FILE *) &sf) = &_IO_str_jumps;
_IO_str_init_static ((_IO_FILE *) &sf, string, maxlen - 1, string);
diff --git a/manual/memory.texi b/manual/memory.texi
index bd1a9a5..9ebe31e 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -905,9 +905,9 @@ struct obstack string_obstack;
char *
copystring (char *string)
@{
- char *s = (char *) obstack_alloc (&string_obstack,
- strlen (string) + 1);
- memcpy (s, string, strlen (string));
+ size_t len = strlen (string) + 1;
+ char *s = (char *) obstack_alloc (&string_obstack, len);
+ memcpy (s, string, len);
return s;
@}
@end smallexample
diff --git a/po/libc.pot b/po/libc.pot
index e38500c..dfaea8a 100644
--- a/po/libc.pot
+++ b/po/libc.pot
@@ -5,8 +5,8 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: libc 2.0\n"
-"POT-Creation-Date: 1997-01-26 15:14+0100\n"
+"Project-Id-Version: libc 2.0.1\n"
+"POT-Creation-Date: 1997-02-04 16:58+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"
@@ -178,47 +178,47 @@ msgstr ""
msgid "%s: error in state machine"
msgstr ""
-#: posix/getopt.c:733
+#: posix/getopt.c:788
#, c-format
msgid "%s: illegal option -- %c\n"
msgstr ""
-#: posix/getopt.c:736
+#: posix/getopt.c:791
#, c-format
msgid "%s: invalid option -- %c\n"
msgstr ""
-#: posix/getopt.c:657
+#: posix/getopt.c:712
#, c-format
msgid "%s: option `%c%s' doesn't allow an argument\n"
msgstr ""
-#: posix/getopt.c:628
+#: posix/getopt.c:683
#, c-format
msgid "%s: option `%s' is ambiguous\n"
msgstr ""
-#: posix/getopt.c:674 posix/getopt.c:847
+#: posix/getopt.c:729 posix/getopt.c:902
#, c-format
msgid "%s: option `%s' requires an argument\n"
msgstr ""
-#: posix/getopt.c:652
+#: posix/getopt.c:707
#, c-format
msgid "%s: option `--%s' doesn't allow an argument\n"
msgstr ""
-#: posix/getopt.c:831
+#: posix/getopt.c:886
#, c-format
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr ""
-#: posix/getopt.c:813
+#: posix/getopt.c:868
#, c-format
msgid "%s: option `-W %s' is ambiguous\n"
msgstr ""
-#: posix/getopt.c:766 posix/getopt.c:896
+#: posix/getopt.c:821 posix/getopt.c:951
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr ""
@@ -233,12 +233,12 @@ msgstr ""
msgid "%s: premature end of file"
msgstr ""
-#: posix/getopt.c:707
+#: posix/getopt.c:762
#, c-format
msgid "%s: unrecognized option `%c%s'\n"
msgstr ""
-#: posix/getopt.c:703
+#: posix/getopt.c:758
#, c-format
msgid "%s: unrecognized option `--%s'\n"
msgstr ""
diff --git a/posix/Makefile b/posix/Makefile
index 1a2f6ae..565561c 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
@@ -43,7 +43,7 @@ routines := \
pathconf sysconf fpathconf \
glob fnmatch regex \
confstr \
- getopt getopt1 \
+ getopt getopt1 getopt_init \
sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \
sched_primin sched_rr_gi \
getaddrinfo
diff --git a/posix/getopt.c b/posix/getopt.c
index 78021bb..aa0c01c 100644
--- a/posix/getopt.c
+++ b/posix/getopt.c
@@ -253,37 +253,39 @@ static int last_nonopt;
/* Bash 2.0 gives us an environment variable containing flags
indicating ARGV elements that should not be considered arguments. */
-static char *nonoption_flags;
+char *__getopt_nonoption_flags;
static int nonoption_flags_max_len;
static int nonoption_flags_len;
static int original_argc;
static char *const *original_argv;
+extern pid_t __libc_pid;
+
/* Make sure the environment variable bash 2.0 puts in the environment
is valid for the getopt call we must make sure that the ARGV passed
to getopt is that one passed to the process. */
-static void store_args (int argc, char *const *argv) __attribute__ ((unused));
static void
-store_args (int argc, char *const *argv)
+__attribute__ ((unused))
+store_args_and_env (int argc, char *const *argv)
{
/* XXX This is no good solution. We should rather copy the args so
that we can compare them later. But we must not use malloc(3). */
original_argc = argc;
original_argv = argv;
}
-text_set_element (__libc_subinit, store_args);
+text_set_element (__libc_subinit, store_args_and_env);
# define SWAP_FLAGS(ch1, ch2) \
if (nonoption_flags_len > 0) \
{ \
- char __tmp = nonoption_flags[ch1]; \
- nonoption_flags[ch1] = nonoption_flags[ch2]; \
- nonoption_flags[ch2] = __tmp; \
+ char __tmp = __getopt_nonoption_flags[ch1]; \
+ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
+ __getopt_nonoption_flags[ch2] = __tmp; \
}
-#else
+#else /* !_LIBC */
# define SWAP_FLAGS(ch1, ch2)
-#endif
+#endif /* _LIBC */
/* Exchange two adjacent subsequences of ARGV.
One subsequence is elements [first_nonopt,last_nonopt)
@@ -313,10 +315,10 @@ exchange (argv)
but it consists of two parts that need to be swapped next. */
#ifdef _LIBC
- /* First make sure the handling of the `nonoption_flags' string can
- work normally. Our top argument must be in the range of the
- string. */
- if (nonoption_flags_len != 0 && top >= nonoption_flags_max_len)
+ /* First make sure the handling of the `__getopt_nonoption_flags'
+ string can work normally. Our top argument must be in the range
+ of the string. */
+ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
{
/* We must extend the array. The user plays games with us and
presents new arguments. */
@@ -325,11 +327,11 @@ exchange (argv)
nonoption_flags_len = nonoption_flags_max_len = 0;
else
{
- memcpy (new_str, nonoption_flags, nonoption_flags_max_len);
+ memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len);
memset (&new_str[nonoption_flags_max_len], '\0',
top + 1 - nonoption_flags_max_len);
nonoption_flags_max_len = top + 1;
- nonoption_flags = new_str;
+ __getopt_nonoption_flags = new_str;
}
}
#endif
@@ -420,36 +422,29 @@ _getopt_initialize (argc, argv, optstring)
if (posixly_correct == NULL
&& argc == original_argc && argv == original_argv)
{
- /* Bash 2.0 puts a special variable in the environment for each
- command it runs, specifying which ARGV elements are the results of
- file name wildcard expansion and therefore should not be
- considered as options. */
-
if (nonoption_flags_max_len == 0)
{
- char var[100];
- const char *orig_str;
- sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ());
- orig_str = getenv (var);
- if (orig_str == NULL || orig_str[0] == '\0')
+ if (__getopt_nonoption_flags == NULL
+ || __getopt_nonoption_flags[0] == '\0')
nonoption_flags_max_len = -1;
else
{
+ const char *orig_str = __getopt_nonoption_flags;
int len = nonoption_flags_max_len = strlen (orig_str);
if (nonoption_flags_max_len < argc)
nonoption_flags_max_len = argc;
- nonoption_flags = (char *) malloc (nonoption_flags_max_len);
- if (nonoption_flags == NULL)
+ __getopt_nonoption_flags =
+ (char *) malloc (nonoption_flags_max_len);
+ if (__getopt_nonoption_flags == NULL)
nonoption_flags_max_len = -1;
else
{
- memcpy (nonoption_flags, orig_str, len);
- memset (&nonoption_flags[len], '\0',
+ memcpy (__getopt_nonoption_flags, orig_str, len);
+ memset (&__getopt_nonoption_flags[len], '\0',
nonoption_flags_max_len - len);
}
}
}
-
nonoption_flags_len = nonoption_flags_max_len;
}
else
@@ -540,7 +535,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
#ifdef _LIBC
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|| (optind < nonoption_flags_len \
- && nonoption_flags[optind] == '1'))
+ && __getopt_nonoption_flags[optind] == '1'))
#else
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
#endif
diff --git a/rellns-sh b/rellns-sh
index 61f18c4..5ce265b 100755
--- a/rellns-sh
+++ b/rellns-sh
@@ -22,12 +22,6 @@ if test $# -ne 2; then
exit 1
fi
-# We only handle the case where SOURCE is the name of an existing file
-if test ! -f $1; then
- echo "rellns: $1 must name an existing file" >&2
- exit 1
-fi
-
case $1 in
/*)
# Make both paths absolute.
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index d24c917..eda0d7b 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
@@ -880,7 +880,13 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
/* Initialize local variables. */
done = 0;
grouping = (const char *) -1;
+#ifdef __va_copy
+ /* This macro will be available soon in gcc's <stdarg.h>. Me need it
+ since on some systems `va_list' is not an integral type. */
+ __va_copy (ap_save, ap);
+#else
ap_save = ap;
+#endif
nspecs_done = 0;
/* Find the first format specifier. */
@@ -1203,12 +1209,12 @@ do_positional:
/* Now we know all the types and the order. Fill in the argument
values. */
- for (cnt = 0, ap = ap_save; cnt < nargs; ++cnt)
+ for (cnt = 0; cnt < nargs; ++cnt)
switch (args_type[cnt])
{
#define T(tag, mem, type) \
case tag: \
- args_value[cnt].mem = va_arg (ap, type); \
+ args_value[cnt].mem = va_arg (ap_save, type); \
break
T (PA_CHAR, pa_char, int); /* Promoted. */
@@ -1226,7 +1232,7 @@ do_positional:
#undef T
default:
if ((args_type[cnt] & PA_FLAG_PTR) != 0)
- args_value[cnt].pa_pointer = va_arg (ap, void *);
+ args_value[cnt].pa_pointer = va_arg (ap_save, void *);
else
args_value[cnt].pa_long_double = 0.0;
break;
diff --git a/stdio/vsnprintf.c b/stdio/vsnprintf.c
index 5de157d..ddb1dfc 100644
--- a/stdio/vsnprintf.c
+++ b/stdio/vsnprintf.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1997 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 <stdarg.h>
#include <stdio.h>
#include <string.h>
@@ -33,7 +32,11 @@ __vsnprintf (char *s, size_t maxlen, const char *format, va_list arg)
int done;
FILE f;
- memset((PTR) &f, 0, sizeof(f));
+ /* We have to handle the case of MAXLEN == 0 special. */
+ if (maxlen == 0)
+ return 0;
+
+ memset((void *) &f, 0, sizeof(f));
f.__magic = _IOMAGIC;
f.__mode.__write = 1;
/* The buffer size is one less than MAXLEN
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 6e7b753..35c0f02 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
@@ -24,7 +24,7 @@ subdir := stdlib
headers := stdlib.h alloca.h monetary.h
routines := \
- atof atoi atol \
+ atof atoi atol atoll \
abort \
bsearch qsort msort \
getenv putenv setenv secure-getenv \
diff --git a/stdlib/a64l.c b/stdlib/a64l.c
index 3fdaab5..11ecd6a 100644
--- a/stdlib/a64l.c
+++ b/stdlib/a64l.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/abs.c b/stdlib/abs.c
index 01cb7b3..54de806 100644
--- a/stdlib/abs.c
+++ b/stdlib/abs.c
@@ -1,29 +1,28 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 abs
/* Return the absolute value of I. */
int
-DEFUN(abs, (i), int i)
+abs (int i)
{
- return(i < 0 ? -i : i);
+ return i < 0 ? -i : i;
}
diff --git a/stdlib/atof.c b/stdlib/atof.c
index 7958546..947278b 100644
--- a/stdlib/atof.c
+++ b/stdlib/atof.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 atof
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
/* Convert a string to a double. */
double
-DEFUN(atof, (nptr), CONST char *nptr)
+atof (const char *nptr)
{
- return(strtod(nptr, (char **) NULL));
+ return strtod (nptr, (char **) NULL);
}
diff --git a/stdlib/atoi.c b/stdlib/atoi.c
index 9fe280c..dbf524b 100644
--- a/stdlib/atoi.c
+++ b/stdlib/atoi.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 atoi
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
/* Convert a string to an int. */
int
-DEFUN(atoi, (nptr), CONST char *nptr)
+atoi (const char *nptr)
{
- return((int) strtol(nptr, (char **) NULL, 10));
+ return (int) strtol (nptr, (char **) NULL, 10);
}
diff --git a/stdlib/atol.c b/stdlib/atol.c
index 75f599c..87fbd09 100644
--- a/stdlib/atol.c
+++ b/stdlib/atol.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 atol
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
/* Convert a string to a long int. */
long int
-DEFUN(atol, (nptr), CONST char *nptr)
+atol (const char *nptr)
{
- return(strtol(nptr, (char **) NULL, 10));
+ return strtol (nptr, (char **) NULL, 10);
}
diff --git a/stdlib/bsearch.c b/stdlib/bsearch.c
index d798eab..84af9d6 100644
--- a/stdlib/bsearch.c
+++ b/stdlib/bsearch.c
@@ -1,50 +1,47 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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>
/* Perform a binary search for KEY in BASE which has NMEMB elements
of SIZE bytes each. The comparisons are done by (*COMPAR)(). */
-PTR
-DEFUN(bsearch, (key, base, nmemb, size, compar),
- register CONST PTR key AND register CONST PTR base AND
- size_t nmemb AND register size_t size AND
- register int EXFUN((*compar), (CONST PTR, CONST PTR)))
+void *
+bsearch (const void *key, const void *base, size_t nmemb, size_t size,
+ int (*compar) __P ((const void *, const void *)))
{
- register size_t l, u, idx;
- register CONST PTR p;
- register int comparison;
+ size_t l, u, idx;
+ const void *p;
+ int comparison;
l = 0;
u = nmemb;
while (l < u)
{
idx = (l + u) / 2;
- p = (PTR) (((CONST char *) base) + (idx * size));
- comparison = (*compar)(key, p);
+ p = (void *) (((const char *) base) + (idx * size));
+ comparison = (*compar) (key, p);
if (comparison < 0)
u = idx;
else if (comparison > 0)
l = idx + 1;
else
- return (PTR) p;
+ return (void *) p;
}
return NULL;
diff --git a/stdlib/exit.c b/stdlib/exit.c
index ec7ee6a..b5b85aa 100644
--- a/stdlib/exit.c
+++ b/stdlib/exit.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1995, 1996, 1997 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 <stdio.h>
#include <stdlib.h>
diff --git a/stdlib/fpioconst.c b/stdlib/fpioconst.c
index 92eae7d..d8c5fda 100644
--- a/stdlib/fpioconst.c
+++ b/stdlib/fpioconst.c
@@ -1,21 +1,21 @@
/* Table of MP integer constants 10^(2^i), used for floating point <-> decimal.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996, 1997 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 "fpioconst.h"
#include <gmp-mparam.h> /* This defines BITS_PER_MP_LIMB. */
diff --git a/stdlib/fpioconst.h b/stdlib/fpioconst.h
index 110fc8b..35c7c6f 100644
--- a/stdlib/fpioconst.h
+++ b/stdlib/fpioconst.h
@@ -1,21 +1,21 @@
/* Header file for constants used in floating point <-> decimal conversions.
-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 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. */
+ Copyright (C) 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _FPIOCONST_H
#define _FPIOCONST_H
diff --git a/stdlib/jrand48.c b/stdlib/jrand48.c
index 6a02a86..3da2516 100644
--- a/stdlib/jrand48.c
+++ b/stdlib/jrand48.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-
-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. */
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ 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 <stdlib.h>
diff --git a/stdlib/jrand48_r.c b/stdlib/jrand48_r.c
index 1a89790..648604d 100644
--- a/stdlib/jrand48_r.c
+++ b/stdlib/jrand48_r.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-
-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. */
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ 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 <stdlib.h>
diff --git a/stdlib/labs.c b/stdlib/labs.c
index 3fcef26..8c490c0 100644
--- a/stdlib/labs.c
+++ b/stdlib/labs.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 labs
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
/* Return the absolute value of I. */
long int
-DEFUN(labs, (i), long int i)
+labs (long int i)
{
- return(i < 0 ? -i : i);
+ return i < 0 ? -i : i;
}
diff --git a/stdlib/lcong48.c b/stdlib/lcong48.c
index 779dcc7..a9ef571 100644
--- a/stdlib/lcong48.c
+++ b/stdlib/lcong48.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/lcong48_r.c b/stdlib/lcong48_r.c
index 8584edd..037fd49 100644
--- a/stdlib/lcong48_r.c
+++ b/stdlib/lcong48_r.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/llabs.c b/stdlib/llabs.c
index 465028c..4d3576e 100644
--- a/stdlib/llabs.c
+++ b/stdlib/llabs.c
@@ -1,21 +1,21 @@
/* `long long int' absolute value.
-Copyright (C) 1991, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1991, 1996, 1997 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 <stdlib.h>
diff --git a/stdlib/lrand48.c b/stdlib/lrand48.c
index ff79606..2f5530b 100644
--- a/stdlib/lrand48.c
+++ b/stdlib/lrand48.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-
-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. */
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ 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 <stdlib.h>
diff --git a/stdlib/lrand48_r.c b/stdlib/lrand48_r.c
index 696722a..8c20cf5 100644
--- a/stdlib/lrand48_r.c
+++ b/stdlib/lrand48_r.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/mblen.c b/stdlib/mblen.c
index 5393ce4..120551c 100644
--- a/stdlib/mblen.c
+++ b/stdlib/mblen.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 mblen
@@ -25,7 +24,7 @@ Cambridge, MA 02139, USA. */
/* Return the length of the multibyte character (if there is one)
at S which is no longer than N characters. */
int
-DEFUN(mblen, (s, n), CONST char *s AND size_t n)
+mblen (const char *s, size_t n)
{
- return(mbtowc((wchar_t *) NULL, s, n));
+ return mbtowc ((wchar_t *) NULL, s, n);
}
diff --git a/stdlib/mbstowcs.c b/stdlib/mbstowcs.c
index 1b38030..7b9d84c 100644
--- a/stdlib/mbstowcs.c
+++ b/stdlib/mbstowcs.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 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 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. */
+/* Copyright (C) 1991, 1992, 1996, 1997 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <wchar.h>
diff --git a/stdlib/mbtowc.c b/stdlib/mbtowc.c
index 1f5d45d..61b46f8 100644
--- a/stdlib/mbtowc.c
+++ b/stdlib/mbtowc.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 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 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. */
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <wchar.h>
diff --git a/stdlib/mp_clz_tab.c b/stdlib/mp_clz_tab.c
index ed1b7ee..90f67f2 100644
--- a/stdlib/mp_clz_tab.c
+++ b/stdlib/mp_clz_tab.c
@@ -1,32 +1,31 @@
/* __clz_tab -- support for longlong.h
+ Copyright (C) 1991, 1993, 1994, 1997 Free Software Foundation, Inc.
-Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+ This file is part of the GNU C Library. Its master source is NOT part of
+ the C library, however. The master source lives in the GNU MP Library.
-This file is part of the GNU MP 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 MP 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 MP 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 MP 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. */
#if 0
#include "gmp.h"
#include "gmp-impl.h"
#endif
-#if 0
const
-#endif
- unsigned char __clz_tab[] =
+unsigned char __clz_tab[] =
{
0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
diff --git a/stdlib/mrand48.c b/stdlib/mrand48.c
index eb69891..9a68cbf 100644
--- a/stdlib/mrand48.c
+++ b/stdlib/mrand48.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-
-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. */
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ 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 <stdlib.h>
diff --git a/stdlib/mrand48_r.c b/stdlib/mrand48_r.c
index 92d1b11..0c9819a 100644
--- a/stdlib/mrand48_r.c
+++ b/stdlib/mrand48_r.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/msort.c b/stdlib/msort.c
index 7b36df4..9e2c3e4 100644
--- a/stdlib/msort.c
+++ b/stdlib/msort.c
@@ -1,23 +1,22 @@
/* msort -- an alternative to qsort, with an identical interface.
- Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
Written by Mike Haertel, September 1988.
-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 <stdlib.h>
#include <string.h>
diff --git a/stdlib/nrand48.c b/stdlib/nrand48.c
index 455892e..dc64627 100644
--- a/stdlib/nrand48.c
+++ b/stdlib/nrand48.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-
-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. */
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ 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 <stdlib.h>
diff --git a/stdlib/nrand48_r.c b/stdlib/nrand48_r.c
index d5ebf35..178be0b 100644
--- a/stdlib/nrand48_r.c
+++ b/stdlib/nrand48_r.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/qsort.c b/stdlib/qsort.c
index 0c83c48..7e36ffe 100644
--- a/stdlib/qsort.c
+++ b/stdlib/qsort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Douglas C. Schmidt (schmidt@ics.uci.edu).
@@ -17,7 +17,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <stdlib.h>
#include <string.h>
@@ -77,16 +76,18 @@ typedef struct
stack size is needed (actually O(1) in this case)! */
void
-DEFUN(_quicksort, (pbase, total_elems, size, cmp),
- PTR CONST pbase AND size_t total_elems AND size_t size AND
- int EXFUN((*cmp), (CONST PTR, CONST PTR)))
+_quicksort (pbase, total_elems, size, cmp)
+ void *const pbase;
+ size_t total_elems;
+ size_t size;
+ int (*cmp) __P ((const void *, const void *));
{
register char *base_ptr = (char *) pbase;
/* Allocating SIZE bytes for a pivot buffer facilitates a better
algorithm below since we can do comparisons directly on the pivot. */
char *pivot_buffer = (char *) __alloca (size);
- CONST size_t max_thresh = MAX_THRESH * size;
+ const size_t max_thresh = MAX_THRESH * size;
if (total_elems == 0)
/* Avoid lossage with unsigned arithmetic below. */
@@ -114,16 +115,16 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
char *mid = lo + size * ((hi - lo) / size >> 1);
- if ((*cmp)((PTR) mid, (PTR) lo) < 0)
- SWAP(mid, lo, size);
- if ((*cmp)((PTR) hi, (PTR) mid) < 0)
- SWAP(mid, hi, size);
+ if ((*cmp) ((void *) mid, (void *) lo) < 0)
+ SWAP (mid, lo, size);
+ if ((*cmp) ((void *) hi, (void *) mid) < 0)
+ SWAP (mid, hi, size);
else
goto jump_over;
- if ((*cmp)((PTR) mid, (PTR) lo) < 0)
- SWAP(mid, lo, size);
+ if ((*cmp) ((void *) mid, (void *) lo) < 0)
+ SWAP (mid, lo, size);
jump_over:;
- memcpy(pivot, mid, size);
+ memcpy (pivot, mid, size);
pivot = pivot_buffer;
left_ptr = lo + size;
@@ -134,15 +135,15 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
that this algorithm runs much faster than others. */
do
{
- while ((*cmp)((PTR) left_ptr, (PTR) pivot) < 0)
+ while ((*cmp) ((void *) left_ptr, (void *) pivot) < 0)
left_ptr += size;
- while ((*cmp)((PTR) pivot, (PTR) right_ptr) < 0)
+ while ((*cmp) ((void *) pivot, (void *) right_ptr) < 0)
right_ptr -= size;
if (left_ptr < right_ptr)
{
- SWAP(left_ptr, right_ptr, size);
+ SWAP (left_ptr, right_ptr, size);
left_ptr += size;
right_ptr -= size;
}
@@ -164,7 +165,7 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
{
if ((size_t) (hi - left_ptr) <= max_thresh)
/* Ignore both small partitions. */
- POP(lo, hi);
+ POP (lo, hi);
else
/* Ignore small left partition. */
lo = left_ptr;
@@ -175,13 +176,13 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
else if ((right_ptr - lo) > (hi - left_ptr))
{
/* Push larger left partition indices. */
- PUSH(lo, right_ptr);
+ PUSH (lo, right_ptr);
lo = left_ptr;
}
else
{
/* Push larger right partition indices. */
- PUSH(left_ptr, hi);
+ PUSH (left_ptr, hi);
hi = right_ptr;
}
}
@@ -196,7 +197,7 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
#define min(x, y) ((x) < (y) ? (x) : (y))
{
- char *CONST end_ptr = &base_ptr[size * (total_elems - 1)];
+ char *const end_ptr = &base_ptr[size * (total_elems - 1)];
char *tmp_ptr = base_ptr;
char *thresh = min(end_ptr, base_ptr + max_thresh);
register char *run_ptr;
@@ -206,11 +207,11 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
and the operation speeds up insertion sort's inner loop. */
for (run_ptr = tmp_ptr + size; run_ptr <= thresh; run_ptr += size)
- if ((*cmp)((PTR) run_ptr, (PTR) tmp_ptr) < 0)
+ if ((*cmp) ((void *) run_ptr, (void *) tmp_ptr) < 0)
tmp_ptr = run_ptr;
if (tmp_ptr != base_ptr)
- SWAP(tmp_ptr, base_ptr, size);
+ SWAP (tmp_ptr, base_ptr, size);
/* Insertion sort, running from left-hand-side up to right-hand-side. */
@@ -218,7 +219,7 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
while ((run_ptr += size) <= end_ptr)
{
tmp_ptr = run_ptr - size;
- while ((*cmp)((PTR) run_ptr, (PTR) tmp_ptr) < 0)
+ while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr) < 0)
tmp_ptr -= size;
tmp_ptr += size;
diff --git a/stdlib/rpmatch.c b/stdlib/rpmatch.c
index 4774e2c..7475a77 100644
--- a/stdlib/rpmatch.c
+++ b/stdlib/rpmatch.c
@@ -1,23 +1,22 @@
-/* rpmatch - determine whether string value is affirmation or negative
- response according to current locale's data
-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 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. */
+/* Determine whether string value is affirmation or negative response
+ according to current locale's data.
+ This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+
+ 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 <langinfo.h>
#include <stdlib.h>
diff --git a/stdlib/seed48.c b/stdlib/seed48.c
index c002f82..436cc8b 100644
--- a/stdlib/seed48.c
+++ b/stdlib/seed48.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/seed48_r.c b/stdlib/seed48_r.c
index 2451134..fe4a0a8 100644
--- a/stdlib/seed48_r.c
+++ b/stdlib/seed48_r.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/srand48.c b/stdlib/srand48.c
index b9baad9..9bd248a 100644
--- a/stdlib/srand48.c
+++ b/stdlib/srand48.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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>
diff --git a/stdlib/srand48_r.c b/stdlib/srand48_r.c
index 44cee6d..80cc7eb 100644
--- a/stdlib/srand48_r.c
+++ b/stdlib/srand48_r.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-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 <limits.h>
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 87a1004..758241e 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -79,6 +79,11 @@ extern int atoi __P ((__const char *__nptr));
/* Convert a string to a long integer. */
extern long int atol __P ((__const char *__nptr));
+#if defined (__GNUC__) && defined (__USE_MISC)
+/* These functions will part of the standard C library in ISO C 9X. */
+extern long long int atoll __P ((__const char *__nptr));
+#endif
+
/* Convert a string to a floating-point number. */
extern double strtod __P ((__const char *__nptr, char **__endptr));
@@ -105,6 +110,8 @@ extern unsigned long long int strtouq __P ((__const char *__nptr,
#endif /* GCC and use BSD. */
#if defined (__GNUC__) && defined (__USE_MISC)
+/* These functions will part of the standard C library in ISO C 9X. */
+
/* Convert a string to a quadword integer. */
extern long long int strtoll __P ((__const char *__nptr, char **__endptr,
int __base));
@@ -182,6 +189,11 @@ extern __inline int atoi (__const char *__nptr)
{ return (int) strtol (__nptr, (char **) NULL, 10); }
extern __inline long int atol (__const char *__nptr)
{ return strtol (__nptr, (char **) NULL, 10); }
+
+#ifdef __USE_MISC
+extern __inline long long int atoll (__const char *__nptr)
+{ return strtoll (__nptr, (char **) NULL, 10); }
+#endif
#endif /* Optimizing GCC >=2. */
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 8c305ca..e5951f0 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -1,23 +1,22 @@
/* Read decimal floating point numbers.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
-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. */
+ This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ 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. */
/* Configuration part. These macros are defined by `strtold.c',
`strtof.c', `wcstod.c', `wcstold.c', and `wcstof.c' to produce the
diff --git a/stdlib/wcstombs.c b/stdlib/wcstombs.c
index 65011f7..d9dc294 100644
--- a/stdlib/wcstombs.c
+++ b/stdlib/wcstombs.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 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 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. */
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <wchar.h>
diff --git a/stdlib/wctomb.c b/stdlib/wctomb.c
index 75b6069..acf1393 100644
--- a/stdlib/wctomb.c
+++ b/stdlib/wctomb.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 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 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. */
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <wchar.h>
diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c
index bb631b4..8890a92 100644
--- a/sunrpc/auth_unix.c
+++ b/sunrpc/auth_unix.c
@@ -215,14 +215,15 @@ authunix_marshal(auth, xdrs)
static bool_t
authunix_validate(auth, verf)
register AUTH *auth;
- struct opaque_auth verf;
+ struct opaque_auth *verf;
{
register struct audata *au;
XDR xdrs;
- if (verf.oa_flavor == AUTH_SHORT) {
+ if (verf->oa_flavor == AUTH_SHORT) {
au = AUTH_PRIVATE(auth);
- xdrmem_create(&xdrs, verf.oa_base, verf.oa_length, XDR_DECODE);
+ xdrmem_create(&xdrs, verf->oa_base, verf->oa_length,
+ XDR_DECODE);
if (au->au_shcred.oa_base != NULL) {
mem_free(au->au_shcred.oa_base,
diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c
index a60d99a..9b21ce1 100644
--- a/sunrpc/authuxprot.c
+++ b/sunrpc/authuxprot.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -55,12 +55,17 @@ xdr_authunix_parms(xdrs, p)
if (xdr_u_long(xdrs, &(p->aup_time))
&& xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
- && xdr_int(xdrs, &(p->aup_uid))
- && xdr_int(xdrs, &(p->aup_gid))
- && xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
- &(p->aup_len), NGRPS, sizeof(int), xdr_int) ) {
+ && (sizeof (uid_t) == sizeof (short int)
+ ? xdr_u_short(xdrs, (u_short *) &(p->aup_uid))
+ : xdr_u_int(xdrs, (u_int *) &(p->aup_uid)))
+ && (sizeof (gid_t) == sizeof (short int)
+ ? xdr_u_short(xdrs, (u_short *) &(p->aup_gid))
+ : xdr_u_int(xdrs, (u_int *) &(p->aup_gid)))
+ && xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
+ &(p->aup_len), NGRPS, sizeof(gid_t),
+ (sizeof (gid_t) == sizeof (short int)
+ ? xdr_u_short : xdr_u_int)) ) {
return (TRUE);
}
return (FALSE);
}
-
diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c
index bd40cdd..aeaf558 100644
--- a/sunrpc/clnt_tcp.c
+++ b/sunrpc/clnt_tcp.c
@@ -417,9 +417,10 @@ readtcp(ct, buf, len)
#endif /* def FD_SETSIZE */
while (TRUE) {
+ struct timeval timeout = ct->ct_wait;
readfds = mask;
switch (select(_rpc_dtablesize(), &readfds, (int*)NULL, (int*)NULL,
- &(ct->ct_wait))) {
+ &timeout)) {
case 0:
ct->ct_error.re_status = RPC_TIMEDOUT;
return (-1);
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index 6b12306..e166ded 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -287,9 +287,10 @@ send_again:
mask = 1 << cu->cu_sock;
#endif /* def FD_SETSIZE */
for (;;) {
+ struct timeval timeout = cu->cu_wait;
readfds = mask;
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
- (int *)NULL, &(cu->cu_wait))) {
+ (int *)NULL, &timeout)) {
case 0:
time_waited.tv_sec += cu->cu_wait.tv_sec;
diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
index 40a35f1..8907929 100644
--- a/sunrpc/pmap_rmt.c
+++ b/sunrpc/pmap_rmt.c
@@ -244,7 +244,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
struct rmtcallargs a;
struct rmtcallres r;
struct rpc_msg msg;
- struct timeval t;
+ struct timeval t, t1;
char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE];
/*
@@ -324,8 +324,9 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
msg.acpted_rply.ar_results.where = (caddr_t)&r;
msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
readfds = mask;
+ t1 = t;
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
- (int *)NULL, &t)) {
+ (int *)NULL, &t1)) {
case 0: /* timed out */
stat = RPC_TIMEDOUT;
diff --git a/sunrpc/svc_authux.c b/sunrpc/svc_authux.c
index 1b766d4..59fdde6 100644
--- a/sunrpc/svc_authux.c
+++ b/sunrpc/svc_authux.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -60,7 +60,7 @@ _svcauth_unix(rqst, msg)
struct area {
struct authunix_parms area_aup;
char area_machname[MAX_MACHINE_NAME+1];
- int area_gids[NGRPS];
+ gid_t area_gids[NGRPS];
} *area;
u_int auth_len;
int str_len, gid_len;
@@ -125,7 +125,7 @@ done:
* Looks up longhand in a cache.
*/
/*ARGSUSED*/
-enum auth_stat
+enum auth_stat
_svcauth_short(rqst, msg)
struct svc_req *rqst;
struct rpc_msg *msg;
diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
index 2555e32..278e16f 100644
--- a/sunrpc/svc_tcp.c
+++ b/sunrpc/svc_tcp.c
@@ -305,9 +305,10 @@ readtcp(xprt, buf, len)
int readfds;
#endif /* def FD_SETSIZE */
do {
+ struct timeval timeout = wait_per_try;
readfds = mask;
if (select(_rpc_dtablesize(), &readfds, (int*)NULL, (int*)NULL,
- &wait_per_try) <= 0) {
+ &timeout) <= 0) {
if (errno == EINTR) {
continue;
}
diff --git a/sysdeps/generic/crypt-entry.c b/sysdeps/generic/crypt-entry.c
index 4a11b25..ba23d1f 100644
--- a/sysdeps/generic/crypt-entry.c
+++ b/sysdeps/generic/crypt-entry.c
@@ -1,5 +1,5 @@
/* Wrapper around MD5 sum replacement for crypt function.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -48,7 +48,7 @@ crypt_r (key, salt, data)
return md5_crypt_r (key, salt, (char *) data, sizeof (struct crypt_data));
/* We don't have DES encryption. */
- __set_errno (ENOSYS);
+ __set_errno (EOPNOTSUPP);
return NULL;
}
@@ -63,6 +63,6 @@ crypt (key, salt)
return md5_crypt (key, salt);
/* We don't have DES encryption. */
- __set_errno (ENOSYS);
+ __set_errno (EOPNOTSUPP);
return NULL;
}
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index 32697e7..9408e61 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -31,6 +31,7 @@
extern int _dl_argc;
extern char **_dl_argv;
extern char **_environ;
+extern size_t _dl_pagesize;
extern void _end;
extern void _start (void);
@@ -75,6 +76,9 @@ _dl_sysdep_start (void **start_argptr,
case AT_PHNUM:
phnum = av->a_un.a_val;
break;
+ case AT_PAGESZ:
+ _dl_pagesize = av->a_un.a_val;
+ break;
case AT_ENTRY:
user_entry = av->a_un.a_val;
break;
diff --git a/sysdeps/generic/sysd-stdio.c b/sysdeps/generic/sysd-stdio.c
index 363a763..f5147bb 100644
--- a/sysdeps/generic/sysd-stdio.c
+++ b/sysdeps/generic/sysd-stdio.c
@@ -16,6 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@@ -155,7 +156,7 @@ __stdio_open (filename, m, cookieptr)
if (fd < 0)
return -1;
- *cookieptr = (PTR) fd;
+ *cookieptr = (void *) fd;
return 0;
}
diff --git a/sysdeps/i386/init-first.c b/sysdeps/i386/init-first.c
index 0fa08e9..4b83e19 100644
--- a/sysdeps/i386/init-first.c
+++ b/sysdeps/i386/init-first.c
@@ -20,6 +20,7 @@
#include <unistd.h>
extern void __libc_init (int, char **, char **);
+extern void __getopt_clean_environment (void);
extern void __libc_global_ctors (void);
int __libc_multiple_libcs = 1;
@@ -33,6 +34,9 @@ init (int *data)
__environ = envp;
__libc_init (argc, argv, envp);
+
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment ();
}
#ifdef PIC
diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
index f898e9a..c9249bb 100644
--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -1,21 +1,21 @@
/* Initialization code run first thing by the ELF startup code. For i386/Hurd.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996, 1997 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 <hurd.h>
#include <stdio.h>
@@ -27,6 +27,7 @@ Cambridge, MA 02139, USA. */
extern void __mach_init (void);
extern void __libc_init (int, char **, char **);
+extern void __getopt_clean_environment (void);
extern void __libc_global_ctors (void);
int __libc_multiple_libcs = 1;
@@ -34,6 +35,9 @@ int __libc_multiple_libcs = 1;
int __libc_argc;
char **__libc_argv;
+/* We often need the PID. Cache this value. */
+pid_t __libc_pid;
+
void *(*_cthread_init_routine) (void); /* Returns new SP to use. */
void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__));
@@ -99,6 +103,10 @@ init1 (int argc, char *arg0, ...)
d->intarray, d->intarraysize);
__libc_init (argc, argv, __environ);
+
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment ();
+
#ifdef PIC
__libc_global_ctors ();
#endif
diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c
index a83b286..fa3cf98 100644
--- a/sysdeps/posix/getcwd.c
+++ b/sysdeps/posix/getcwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
@@ -330,8 +330,9 @@ __getcwd (buf, size)
{
if (buf != NULL)
{
+ (void) __closedir (dirstream);
__set_errno (ERANGE);
- return NULL;
+ goto lose;
}
else
{
@@ -342,7 +343,7 @@ __getcwd (buf, size)
(void) __closedir (dirstream);
free (path);
__set_errno (ENOMEM);/* closedir might have changed it.*/
- return NULL;
+ goto lose;
}
pathp = &buf[pathp - path + size / 2];
path = buf;
diff --git a/sysdeps/posix/vdprintf.c b/sysdeps/posix/vdprintf.c
index 2f9441d..85ad530 100644
--- a/sysdeps/posix/vdprintf.c
+++ b/sysdeps/posix/vdprintf.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1992, 1993, 1997 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/stub/init-first.c b/sysdeps/stub/init-first.c
index 32ffa82..5e2cd12 100644
--- a/sysdeps/stub/init-first.c
+++ b/sysdeps/stub/init-first.c
@@ -1,27 +1,28 @@
/* Initialization code run first thing by the ELF startup code. Stub version.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995 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 <unistd.h>
int __libc_multiple_libcs = 1;
extern void __libc_init (int, char **, char **);
+extern void __getopt_clean_environment (void);
#ifdef PIC
void
@@ -45,4 +46,7 @@ void __libc_init_first
__environ = envp;
__libc_init (argc, argv, envp);
+
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment ();
}
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
index 7c5b510..cbb5fa8 100644
--- a/sysdeps/unix/sysv/linux/init-first.c
+++ b/sysdeps/unix/sysv/linux/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. Linux version.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997 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
@@ -22,6 +22,7 @@
#include <fpu_control.h>
#include <linux/personality.h>
#include <init-first.h>
+#include <sys/types.h>
extern void __libc_init (int, char **, char **);
extern void __libc_global_ctors (void);
@@ -41,11 +42,15 @@ int __libc_multiple_libcs = 1;
int __libc_argc;
char **__libc_argv;
+/* We often need the PID. Cache this value. */
+pid_t __libc_pid;
+
static void
init (int argc, char **argv, char **envp)
{
extern int __personality (int);
+ extern void __getopt_clean_environment (void);
/* We must not call `personality' twice. */
if (!__libc_multiple_libcs)
@@ -68,6 +73,9 @@ init (int argc, char **argv, char **envp)
__libc_init (argc, argv, envp);
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment ();
+
#ifdef PIC
__libc_global_ctors ();
#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index 402dfc5..bbbcf84 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -1,27 +1,32 @@
/* brk system call for Linux/m68k.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 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 <errno.h>
#include <unistd.h>
#include <sysdep.h>
-void *__curbrk;
+void *__curbrk = 0;
+
+/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
+ to work around different old braindamage in the old Linux/x86 ELF
+ dynamic linker. Sigh. */
+weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
diff --git a/sysdeps/unix/sysv/linux/socketbits.h b/sysdeps/unix/sysv/linux/socketbits.h
index 91deb6c..915e0f0 100644
--- a/sysdeps/unix/sysv/linux/socketbits.h
+++ b/sysdeps/unix/sysv/linux/socketbits.h
@@ -23,6 +23,7 @@
#include <features.h>
#define __need_size_t
+#define __need_NULL
#include <stddef.h>
@@ -134,13 +135,19 @@ struct cmsghdr
/* XXX Should be type `size_t' according to POSIX.1g. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
unsigned char __cmsg_data[0]; /* Ancillary data. */
+#endif
};
/* Ancillary data object manipulation macros. */
-#define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
+#else
+# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
+#endif
#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
-#define CMSG_FIRSTHDR(mhdr) (mhdr) \
+#define CMSG_FIRSTHDR(mhdr) \
((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
diff --git a/time/Makefile b/time/Makefile
index d90bc87..fb9ef32 100644
--- a/time/Makefile
+++ b/time/Makefile
@@ -37,9 +37,11 @@ routines := offtime asctime clock ctime ctime_r difftime \
others := ap zdump zic
tests := test_time clocktest
-tzfiles := africa antarctica asia australasia europe northamerica \
- southamerica etcetera factory systemv backward \
+tzbases := africa antarctica asia australasia europe northamerica \
+ southamerica etcetera factory systemv \
solar87 solar88 solar89
+tzlinks := backward
+tzfiles := $(tzbases) $(tzlinks)
# pacificnew doesn't compile; if it is to be used, it should be included in
# northamerica.
distribute += $(tzfiles) leapseconds pacificnew simplebackw
@@ -96,11 +98,21 @@ $(tzfiles:%=$(objpfx)z.%): $(objpfx)z.%: % Makefile
# Kludge alert: we use an implicit rule (in what we are generating here)
# because that is the only way to tell Make that the one command builds all
# the files.
+# The extra kludge for the $(tzlinks) files is necessary since running zic
+# this file requires all other files to exist. Blech!
(echo 'define $*-zones' ;\
awk '$$1 == "Zone" { print $$2 } $$1 == "Link" { print $$3 }' $^ ;\
echo 'endef' ;\
echo '$*-zones := $$(subst $$(nl), ,$$($*-zones))' ;\
echo 'ifdef $*-zones' ;\
+ if test x$(findstring $*, $(tzlinks)) != x; then \
+ echo '$$(addprefix $$(inst_datadir)/zone%/right/,$$($*-zones)) \';\
+ echo '$$(addprefix $$(inst_datadir)/zone%/posix/,$$($*-zones)) \';\
+ echo '$$(addprefix $$(inst_datadir)/zone%/,$$($*-zones)): \' ;\
+ echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_datadir)/zone%/right/,$$($$t-zones))) \' ;\
+ echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_datadir)/zone%/posix/,$$($$t-zones))) \' ;\
+ echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_datadir)/zone%/,$$($$t-zones)))' ;\
+ fi ;\
echo '$$(addprefix $$(inst_datadir)/zone%/right/,$$($*-zones)): \' ;\
echo '$< $$(objpfx)zic leapseconds yearistype' ;\
echo ' $$(tzcompile)' ;\
diff --git a/time/zic.c b/time/zic.c
index 9ab3967..2e07d79 100644
--- a/time/zic.c
+++ b/time/zic.c
@@ -2126,15 +2126,20 @@ char * const argname;
if (!itsdir(name)) {
/*
** It doesn't seem to exist, so we try to create it.
+ ** Double check the return. Someone may be one
+ ** step ahead of us.
*/
if (mkdir(name, 0755) != 0) {
- const char *e = strerror(errno);
+ int save_error = errno;
+ if (errno == EEXIST && !itsdir(name)) {
+ const char *e = strerror(save_error);
- (void) fprintf(stderr,
- _("%s: Can't create directory %s: %s\n"),
- progname, name, e);
- ifree(name);
- return -1;
+ (void) fprintf(stderr,
+ _("%s: Can't create directory %s: %s\n"),
+ progname, name, e);
+ ifree(name);
+ return -1;
+ }
}
}
*cp = '/';
diff --git a/version.h b/version.h
index c8868be..e767f13 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
/* This file just defines the current version number of libc. */
#define RELEASE "experimental"
-#define VERSION "2.0.1"
+#define VERSION "2.0.2"