]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
update from main archive 970209 cvs/libc-970210
authorUlrich Drepper <drepper@redhat.com>
Mon, 10 Feb 1997 03:19:57 +0000 (03:19 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 10 Feb 1997 03:19:57 +0000 (03:19 +0000)
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.

74 files changed:
.cvsignore
ChangeLog
Makeconfig
Makefile
Makerules
elf/Makefile
elf/ldd.bash.in
elf/ldd.sh.in
libio/vsnprintf.c
manual/memory.texi
po/libc.pot
posix/Makefile
posix/getopt.c
rellns-sh
stdio-common/vfprintf.c
stdio/vsnprintf.c
stdlib/Makefile
stdlib/a64l.c
stdlib/abs.c
stdlib/atof.c
stdlib/atoi.c
stdlib/atol.c
stdlib/bsearch.c
stdlib/exit.c
stdlib/fpioconst.c
stdlib/fpioconst.h
stdlib/jrand48.c
stdlib/jrand48_r.c
stdlib/labs.c
stdlib/lcong48.c
stdlib/lcong48_r.c
stdlib/llabs.c
stdlib/lrand48.c
stdlib/lrand48_r.c
stdlib/mblen.c
stdlib/mbstowcs.c
stdlib/mbtowc.c
stdlib/mp_clz_tab.c
stdlib/mrand48.c
stdlib/mrand48_r.c
stdlib/msort.c
stdlib/nrand48.c
stdlib/nrand48_r.c
stdlib/qsort.c
stdlib/rpmatch.c
stdlib/seed48.c
stdlib/seed48_r.c
stdlib/srand48.c
stdlib/srand48_r.c
stdlib/stdlib.h
stdlib/strtod.c
stdlib/wcstombs.c
stdlib/wctomb.c
sunrpc/auth_unix.c
sunrpc/authuxprot.c
sunrpc/clnt_tcp.c
sunrpc/clnt_udp.c
sunrpc/pmap_rmt.c
sunrpc/svc_authux.c
sunrpc/svc_tcp.c
sysdeps/generic/crypt-entry.c
sysdeps/generic/dl-sysdep.c
sysdeps/generic/sysd-stdio.c
sysdeps/i386/init-first.c
sysdeps/mach/hurd/i386/init-first.c
sysdeps/posix/getcwd.c
sysdeps/posix/vdprintf.c
sysdeps/stub/init-first.c
sysdeps/unix/sysv/linux/init-first.c
sysdeps/unix/sysv/linux/m68k/brk.c
sysdeps/unix/sysv/linux/socketbits.h
time/Makefile
time/zic.c
version.h

index e688e76a0330512275a4fd0b4277113234aea493..606e7270bd0ad54fd928d306edcc3fb7b34623f1 100644 (file)
@@ -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
index caf6ddbded543780588eab88985cb7b56b94a286..2b2e5d14a93c26666cdc61dd8136417454968d57 100644 (file)
--- 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.
index 74f8d795a4d36d1d2b8c675a01f8b72f97331c64..fbe2ab11fbf7611559ba69e81a3ca9e77e7e5e92 100644 (file)
@@ -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; \
index f2d796f19b6f84e17eae9cfe2da355322fa63ed6..84d2ff999dc47e333e830e63863f34bd637e2932 100644 (file)
--- 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
index 881d58434e5d34416028eb16e467f4776be646ef..23fa2191025a43337e698d0380c89e00ac3b6865 100644 (file)
--- 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
index 55094e3939ebb78cfc44650185b2b55d031b26f2..46669194783390b78409ef899a1603e768249338 100644 (file)
@@ -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
index d1747093802e319d8eb1bf134dfb50ced7ec02d7..d4ea3310fd9cfbaad48f61039233c07eace05de7 100644 (file)
@@ -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
index 4351578b6d7d47ff68a6a8935469852eef93347a..f7c1163890233fd56ac6754e73ccc5860f03dcc3 100644 (file)
@@ -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
index 9ec06914c0e905ae5311428ff2ecb752976921ee..af901bf3e67a2471c6ee02e167346d9709cec147 100644 (file)
@@ -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);
index bd1a9a5401d8205ed3ee7755425742934b9c026c..9ebe31e920369ce8158dd24c20da36caaeec5af6 100644 (file)
@@ -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
index e38500c191397b90a8a903ba3a1140434dd57222..dfaea8a48b94679d46a6c492cb33ad9dd5e2d88e 100644 (file)
@@ -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 ""
index 1a2f6ae798335659f0de7638c18cf3a8cdb0c86e..565561c57a3b0ac5fc697a99652ff7c8dc2229d9 100644 (file)
@@ -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
index 78021bb977911aee61af02ee508c56519f50ce07..aa0c01ce596cbfc3a9d86e3a80a0614540a859bf 100644 (file)
@@ -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
index 61f18c4146e150fa846226a54793073fc7dc6945..5ce265bccf2d572b9714ac395cba3dc2892a99b4 100755 (executable)
--- 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.
index d24c917bc2fcaffa8dd256b736893e9d365600c5..eda0d7bd8e2af262cf312e1028546d21f774a2c8 100644 (file)
@@ -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;
index 5de157dc4409c5665f3f50abbfe54c60bad598da..ddb1dfc9c09cf0589f839c111953a5915bfbda0f 100644 (file)
@@ -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
index 6e7b753180f62229b66a689145d10605a0ae44d3..35c0f0254a47f0b22caf0f4d8e3d8290f52e4b96 100644 (file)
@@ -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                                    \
index 3fdaab513bb1a1901db656a6c907132c857b8a81..11ecd6a0543994fefe7bf976da15e1703d2c6439 100644 (file)
@@ -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>
 
index 01cb7b331c068bb4bbf535f4b7bc79430a093e4e..54de8063de9122f3a6afdbd4e8abba82cf15d251 100644 (file)
@@ -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;
 }
index 79585464d1bb92caf40f0111d78d8c302d6fcf37..947278bf41a1c1fea71589f538b55f1bcbe91442 100644 (file)
@@ -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);
 }
index 9fe280cc3e61837e6a615198064dadf325067c9b..dbf524b22511d33e7b4ab44ef74cd1f2ec669427 100644 (file)
@@ -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);
 }
index 75f599c107800e458d19ea289054a1b2bea29f3d..87fbd0909dbe2364fa2b57eead72b616e7b344d7 100644 (file)
@@ -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);
 }
index d798eabd2be3eb2856fed2b1a407a9d4e174da65..84af9d655cf075ab1d3693ebaecacdf461e8fa88 100644 (file)
@@ -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;
index ec7ee6a2db93dfee32d4d5f298af63f5237209a9..b5b85aa26ede941165bfd789780da1bf89b264df 100644 (file)
@@ -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>
index 92eae7de90139207b2ec3112db5e291a61740c18..d8c5fda9560839688b22668b929e034d9801732e 100644 (file)
@@ -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.  */
index 110fc8b86a2b46a4e76ee37ce59a5ffd14419368..35c7c6f02b0943af8467cbfd0e3a8fec6f5cec1b 100644 (file)
@@ -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
index 6a02a8606f165bf865a6ecc11ff2951aaa455621..3da25166d726b9972a334c166a6e14bf52b805c5 100644 (file)
@@ -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>
 
index 1a897905251fd1124ac7b88d4f7fba38b7cffffc..648604d4f54c924c0d9960d88edc5855dbd2d5db 100644 (file)
@@ -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>
 
index 3fcef26df99a838024a974bfa3287cd6f33890eb..8c490c03129dd058b2f6185b669bc1a7f4a396a9 100644 (file)
@@ -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;
 }
index 779dcc7c40b29a1af11b4cc0f3eb9a805252fec2..a9ef5718677fc189ff5f99a8eeeb20b4eb32fcc2 100644 (file)
@@ -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>
 
index 8584eddf0b087c05ada1c8df0e41f96694733455..037fd4931e61bdc9dc6e861ebed00d7de6926805 100644 (file)
@@ -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>
index 465028c481e4c9adb8cded3b2bd630964062c0ec..4d3576e1a1fdebe1e7f2386c23e9a4e5ce413a7c 100644 (file)
@@ -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>
 
index ff79606bd1e5891a646088d87ddd8968428e109e..2f5530b33c7d355798576925c52d5567f27a4df3 100644 (file)
@@ -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>
 
index 696722a8cce0ec6d65db43531440bcbe2b6a9ae6..8c20cf594b8383792dbbca53e95d4fbd043a591b 100644 (file)
@@ -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>
 
index 5393ce433c4513e440d041368d8f3e858d4da525..120551c9a249d7031207072d3f34b31d628a9918 100644 (file)
@@ -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);
 }
index 1b380308d62334449c1598d49ec9d5c7d8ecb610..7b9d84c259ea47a2b1194e806669d449d5268953 100644 (file)
@@ -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>
index 1f5d45dc624bd3234dec4f86666721d352d085c6..61b46f882e274d634a391e837dd45531a3ac625b 100644 (file)
@@ -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>
index ed1b7eebe8059382a247152feabd3d4a22234fb9..90f67f21b0d6d74aee77551e5c315f13e3c60462 100644 (file)
@@ -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,
index eb698919045a54e190c045234cf73cd3261c12b2..9a68cbf45c465177eb8e0754ae7047c81399eff6 100644 (file)
@@ -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>
 
index 92d1b11121af60ecc1463635ac4c86fac0ee2b04..0c9819a452296bc7dd208fd247d7a092c8add45e 100644 (file)
@@ -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>
 
index 7b36df41f372c9ef4b767b67f21e592f2c3d9b42..9e2c3e4ec5221232f71e29729c3b37b968764bf9 100644 (file)
@@ -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>
index 455892e7abcaa417ddd0b8de90db32e70ba7a7b0..dc646275d410f0c157e2005a318eb61da9d76559 100644 (file)
@@ -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>
 
index d5ebf35dd21474a741e26c2254bb08b429b5d422..178be0bfb025208b73be263925cef482f107fcb1 100644 (file)
@@ -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>
 
index 0c83c48569306b88ac7b1caff7501956c09b23d9..7e36ffea970b77b1fb548b4b0e48fecef2533d65 100644 (file)
@@ -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;
index 4774e2cf45ebf30ece25c8f269875e207f8ab206..7475a7769c4c4593976a87e339b375c16b662694 100644 (file)
@@ -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>
index c002f82b21561d19262be1f2386394c832a5ef03..436cc8bf275ba9900d8d80b50a52efad5df1c256 100644 (file)
@@ -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>
 
index 24511343c7e2a38a24ec93cc398504155f8e275d..fe4a0a8b3cc16e4850054950f4169a2c024b8edb 100644 (file)
@@ -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>
index b9baad99a21d6d263826d0790cf50818667a3030..9bd248a541b2b498058e464afa1cc5d3c4c70055 100644 (file)
@@ -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>
 
index 44cee6ddc102858bfbafd313d9956327522eb665..80cc7eb6c86f6f4145b127d587cc8154471b7f22 100644 (file)
@@ -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>
index 87a10044c0503526672ac2afac4491e4d5eb06fc..758241ee438add719ab0c22a4670e5a4efeb1445 100644 (file)
@@ -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.  */
 
 
index 8c305ca1782a75f3fd1960f17888c4fa2b755fd2..e5951f01a4645946f8d65ac9bd2d82a34c60500a 100644 (file)
@@ -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
index 65011f77c3df03074806c707bfea65e3d0ce9547..d9dc29486e60aa09f26a7be1d58ecaa7db9f3c22 100644 (file)
@@ -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>
index 75b6069af4f85e686a5f3154f4d5a333d618533f..acf139380f0e5422eb1da87cc1b25624d609daae 100644 (file)
@@ -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>
index bb631b4d522b2b65747b99c001414c1b8341ee6c..8890a926ba8646aa482a7be9e6c20f49ab82c7cf 100644 (file)
@@ -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,
index a60d99a57b73fa7ec76addc65ffd4b4fa4f397a3..9b21ce195e043d231e140843e20a0519e6606344 100644 (file)
@@ -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);
 }
-
index bd40cdddf6579c0b22abf1f3ba8a11eeaae3d1f1..aeaf558ad2f4baf0f3eab91afdac031b62788e9e 100644 (file)
@@ -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);
index 6b12306a55c32dfa85c86095eed037b8f699eab0..e166dede81d3a26d356b05202e3f905a220291f0 100644 (file)
@@ -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;
index 40a35f19904e9dcdd76a15df1587cb2499dea34a..8907929973151adfc27bcc03da6b0e58b87778ec 100644 (file)
@@ -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;
index 1b766d49f6840ff7ace2298a73ba02c941bca1dc..59fdde6ad85db187e5f96800ec3eed269aae1d96 100644 (file)
@@ -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;
index 2555e32be552d7aa05f4b81bf16f9f4ba5554f70..278e16fc33aa6d009bc647218aca5150ac1396e3 100644 (file)
@@ -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;
                        }
index 4a11b25752b754be3f54eff103c61dafc2a61639..ba23d1f3d44a825245eca8584ec12b3fce8281c9 100644 (file)
@@ -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;
 }
index 32697e782ab3db6be9723d993293d2c9081dd590..9408e61dbf79ff75cf9f8b4bec2f2a76c8813821 100644 (file)
@@ -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;
index 363a7634493b10b1643d0648383214d813cd6e5e..f5147bb3aabb9546981eaa9490ff13ff799ea495 100644 (file)
@@ -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;
 }
 
index 0fa08e9d170598829a8aebe677ab3f7eb7b9617c..4b83e192851ee4017c2ae934b60c6e7b1012c14c 100644 (file)
@@ -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
index f898e9a66930579fac1824452e288b2c81fb8f4b..c9249bba4ee496b53f1f63d9e80fc5d29eebbd22 100644 (file)
@@ -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
index a83b286380f327ba98fa4a88e9c62c4e0bae9622..fa3cf98c743de365c45e56899d505a3ecd292601 100644 (file)
@@ -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;
index 2f9441df14e3c0eb26229fecf7f9138486d44e73..85ad530060563ae1d6b77dfb9bdb880f986c9c26 100644 (file)
@@ -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>
index 32ffa82c8a6363a64fc36283e257f9c5716a484e..5e2cd121f1d023e0342c53315e6606596ac3015a 100644 (file)
@@ -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 ();
 }
index 7c5b510956ea12eda2d664f7c4b1c8c34671ae7f..cbb5fa8a23eb27454125baff99c94ff70c00b90e 100644 (file)
@@ -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
index 402dfc56f7b5cf198937dada0561a80a1b8c1f5e..bbbcf84188a59b73af0080c03953a6fd899255d5 100644 (file)
@@ -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)
index 91deb6c815c54b79cec4553d5af6811e11f8366d..915e0f001e2037d2ceba3fded886c62bc54cf11d 100644 (file)
@@ -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)
 
index d90bc87d421302537c860bc49b074c1fcab67186..fb9ef3253585f316cf5f42e641e97ff589636c6f 100644 (file)
@@ -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)'                                              ;\
index 9ab3967e98466e6e612f96da5193a8914728c6ee..2e07d791960235cbfd30708e69bf1077eebbd86f 100644 (file)
@@ -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 = '/';
index c8868be30fb553e856f9a28a455f7b1489bc6ce8..e767f13f5a97de5735fc2c230d17b056575a3f6f 100644 (file)
--- 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"