diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1996-12-07 03:30:25 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1996-12-07 03:30:25 +0000 |
| commit | a18f587da5a0a91bcd1307ed0f122ca2ce994c15 (patch) | |
| tree | 174cca5dd1f842dff255d6491ff6677ac7772eab | |
| parent | 6b612c67093292a99a336fae38e459ee00927d0f (diff) | |
| download | glibc-a18f587da5a0a91bcd1307ed0f122ca2ce994c15.tar.xz glibc-a18f587da5a0a91bcd1307ed0f122ca2ce994c15.zip | |
update from main archive 961206
Sat Dec 7 03:24:36 1996 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Discard error message from test in test for
bash-2.0.
* io/getpw.c: Don't apply getcwd on user supplied buffer.
Instead always use temporary buffer and only copy the result.
Patch by HJ Lu.
* stdlib/canonicalize.c: Likewise.
* libio/fileops.c: Change comments according to libg++2.8b5.
* libio/iosetvbuf.c: Follow change in libg++-2.8b5 to clear
unbuffered flag.
Reported by HJ Lu.
* manual/nss.texi: Correct prototypes.
* misc/syslog.c: Make reentrant. Catch SIGPIPE signal to prevent
crash if syslog daemon is restarted.
* stdlib/rand_r.c: New file. Implementation of POSIX.2 function
rand_r.
* stdlib/Makefile (routines): Add rand_r.
* sysdeps/stub/libc-lock.h: Define __libc_lock_trylock and
__libc_mutex_lock.
* configure.in: Add --disable-sanity-check option.
* sysdeps/unix/sysv/linux/configure.in: If linuxthreads or
des-crypt are not available and --disbale-sanity-check is not
given abort with a message.
Thu Dec 5 19:19:53 1996 Richard Henderson <rth@tamu.edu>
* posix/glob.c: Tests against STDC_HEADERS should also test
__GNU_LIBRARY__.
Thu Dec 5 16:20:55 1996 Ulrich Drepper <drepper@cygnus.com>
* misc/err.c (vwarn): Set errno again before using %m format.
Thu Dec 5 10:14:05 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* grp/grp.h: Add declaration of __getgrent_r.
* io/fts.c (fts_build): Remove "register" from variables dirbuf
and dp since their address is needed.
* sysdeps/posix/getcwd.c (__getcwd): Remove "register" from
variable d since d's address is needed.
* misc/tst-dirname.c (main): Provide prototype.
* misc/ioctltst.c (main): Dito.
* Makefile: Add gnu/lib-names.h to install-others before including
Makerules.
Wed Dec 4 16:00:09 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/sys/socketvar.h: New file. Simply use
<sys/socket.h>.
* sysdeps/unix/sysv/linux/Dist: Add sys/socketvar.h.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)=inet)]: Add
sys/socketvar.h to sysdep_headers.
since the value might be outside the range of the `long int'.
| -rw-r--r-- | ChangeLog | 67 | ||||
| -rw-r--r-- | Makefile | 5 | ||||
| -rwxr-xr-x | configure | 47 | ||||
| -rw-r--r-- | configure.in | 10 | ||||
| -rw-r--r-- | grp/grp.h | 2 | ||||
| -rw-r--r-- | io/fts.c | 2 | ||||
| -rw-r--r-- | io/getwd.c | 30 | ||||
| -rw-r--r-- | libio/fileops.c | 20 | ||||
| -rw-r--r-- | libio/iosetvbuf.c | 3 | ||||
| -rw-r--r-- | manual/nss.texi | 16 | ||||
| -rw-r--r-- | misc/err.c | 1 | ||||
| -rw-r--r-- | misc/ioctltst.c | 6 | ||||
| -rw-r--r-- | misc/syslog.c | 92 | ||||
| -rw-r--r-- | misc/tst-dirname.c | 4 | ||||
| -rw-r--r-- | posix/glob.c | 4 | ||||
| -rw-r--r-- | stdlib/Makefile | 2 | ||||
| -rw-r--r-- | stdlib/canonicalize.c | 50 | ||||
| -rw-r--r-- | stdlib/rand_r.c (renamed from sysdeps/unix/sysv/linux/alpha/llseek.S) | 75 | ||||
| -rw-r--r-- | sysdeps/posix/getcwd.c | 2 | ||||
| -rw-r--r-- | sysdeps/stub/libc-lock.h | 6 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/Dist | 1 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 2 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/configure | 53 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/configure.in | 47 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/sys/socketvar.h | 3 |
25 files changed, 382 insertions, 168 deletions
@@ -1,3 +1,68 @@ +Sat Dec 7 03:24:36 1996 Ulrich Drepper <drepper@cygnus.com> + + * configure.in: Discard error message from test in test for + bash-2.0. + + * io/getpw.c: Don't apply getcwd on user supplied buffer. + Instead always use temporary buffer and only copy the result. + Patch by HJ Lu. + * stdlib/canonicalize.c: Likewise. + + * libio/fileops.c: Change comments according to libg++2.8b5. + * libio/iosetvbuf.c: Follow change in libg++-2.8b5 to clear + unbuffered flag. + Reported by HJ Lu. + + * manual/nss.texi: Correct prototypes. + + * misc/syslog.c: Make reentrant. Catch SIGPIPE signal to prevent + crash if syslog daemon is restarted. + + * stdlib/rand_r.c: New file. Implementation of POSIX.2 function + rand_r. + * stdlib/Makefile (routines): Add rand_r. + + * sysdeps/stub/libc-lock.h: Define __libc_lock_trylock and + __libc_mutex_lock. + + * configure.in: Add --disable-sanity-check option. + * sysdeps/unix/sysv/linux/configure.in: If linuxthreads or + des-crypt are not available and --disbale-sanity-check is not + given abort with a message. + +Thu Dec 5 19:19:53 1996 Richard Henderson <rth@tamu.edu> + + * posix/glob.c: Tests against STDC_HEADERS should also test + __GNU_LIBRARY__. + +Thu Dec 5 16:20:55 1996 Ulrich Drepper <drepper@cygnus.com> + + * misc/err.c (vwarn): Set errno again before using %m format. + +Thu Dec 5 10:14:05 1996 Andreas Jaeger <aj@arthur.pfalz.de> + + * grp/grp.h: Add declaration of __getgrent_r. + + * io/fts.c (fts_build): Remove "register" from variables dirbuf + and dp since their address is needed. + + * sysdeps/posix/getcwd.c (__getcwd): Remove "register" from + variable d since d's address is needed. + + * misc/tst-dirname.c (main): Provide prototype. + * misc/ioctltst.c (main): Dito. + + * Makefile: Add gnu/lib-names.h to install-others before including + Makerules. + +Wed Dec 4 16:00:09 1996 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/unix/sysv/linux/sys/socketvar.h: New file. Simply use + <sys/socket.h>. + * sysdeps/unix/sysv/linux/Dist: Add sys/socketvar.h. + * sysdeps/unix/sysv/linux/Makefile [$(subdir)=inet)]: Add + sys/socketvar.h to sysdep_headers. + Tue Dec 3 08:38:15 1996 Richard Henderson <rth@tamu.edu> * sysdeps/unix/alpha/sysdep.S: Remove definition of __errno_location. @@ -125,7 +190,7 @@ Mon Dec 2 03:59:38 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/gethostid.c: Likewise. * posix/getconf.c: Treat _SC_UNIT_MAX and _SC_ULONG_MAX separately - since the value might be outsode the range of the `long int'. + since the value might be outside the range of the `long int'. Print string `undefined' when a value is undefined. * stdlib/l64a.c: Return correct pointer. @@ -90,6 +90,9 @@ echo-headers: subdir_echo-headers # What to install. install-others = $(includedir)/stubs.h +ifeq (yes,$(build-shared)) +install-others += $(includedir)/gnu/lib-names.h +endif ifeq (yes,$(gnu-ld)) libc-init = set-init @@ -200,8 +203,6 @@ $(includedir)/gnu/lib-names.h: $(common-objpfx)soversions.mk then echo 'gnu/lib-names.h unchanged'; \ else $(INSTALL_DATA) $(objpfx)lib-names.h $@; fi rm -f $(objpfx)lib-names.h - -install-others += $(includedir)/gnu/lib-names.h endif # This makes the Info or DVI file of the documentation from the Texinfo source. @@ -1373,7 +1373,8 @@ else echo "$ac_t""no" 1>&6 fi -if test "$BASH" != no && $BASH -c 'test "$BASH_VERSINFO" -ge 2'; then +if test "$BASH" != no && + $BASH -c 'test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then libc_cv_have_bash2=yes else libc_cv_have_bash2=no @@ -1381,7 +1382,7 @@ fi echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6 -echo "configure:1385: checking for signed size_t type" >&5 +echo "configure:1386: checking for signed size_t type" >&5 if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1405,12 +1406,12 @@ EOF fi echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6 -echo "configure:1409: checking for libc-friendly stddef.h" >&5 +echo "configure:1410: checking for libc-friendly stddef.h" >&5 if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1414 "configure" +#line 1415 "configure" #include "confdefs.h" #define __need_size_t #define __need_wchar_t @@ -1425,7 +1426,7 @@ size_t size; wchar_t wchar; if (&size == NULL || &wchar == NULL) abort (); ; return 0; } EOF -if { (eval echo configure:1429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_friendly_stddef=yes else @@ -1444,7 +1445,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly." fi echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6 -echo "configure:1448: checking whether we need to use -P to assemble .S files" >&5 +echo "configure:1449: checking whether we need to use -P to assemble .S files" >&5 if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1467,7 +1468,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives." fi echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6 -echo "configure:1471: checking for assembler global-symbol directive" >&5 +echo "configure:1472: checking for assembler global-symbol directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1497,7 +1498,7 @@ EOF fi echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6 -echo "configure:1501: checking for .set assembler directive" >&5 +echo "configure:1502: checking for .set assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1532,12 +1533,12 @@ fi if test $elf != yes; then echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6 -echo "configure:1536: checking for .init and .fini sections" >&5 +echo "configure:1537: checking for .init and .fini sections" >&5 if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1541 "configure" +#line 1542 "configure" #include "confdefs.h" int main() { @@ -1546,7 +1547,7 @@ asm (".section .init"); asm (".text"); ; return 0; } EOF -if { (eval echo configure:1550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_have_initfini=yes else @@ -1571,19 +1572,19 @@ if test $elf = yes; then libc_cv_asm_underscores=no else echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6 -echo "configure:1575: checking for _ prefix on C symbol names" >&5 +echo "configure:1576: checking for _ prefix on C symbol names" >&5 if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1580 "configure" +#line 1581 "configure" #include "confdefs.h" asm ("_glibc_foobar:"); int main() { glibc_foobar (); ; return 0; } EOF -if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* libc_cv_asm_underscores=yes else @@ -1610,7 +1611,7 @@ if test $elf = yes; then libc_cv_asm_weakext_directive=no else echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6 -echo "configure:1614: checking for assembler .weak directive" >&5 +echo "configure:1615: checking for assembler .weak directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1633,7 +1634,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6 if test $libc_cv_asm_weak_directive = no; then echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6 -echo "configure:1637: checking for assembler .weakext directive" >&5 +echo "configure:1638: checking for assembler .weakext directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1670,7 +1671,7 @@ EOF fi echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6 -echo "configure:1674: checking for ld --no-whole-archive" >&5 +echo "configure:1675: checking for ld --no-whole-archive" >&5 if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1681,7 +1682,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest conftest.c'; { (eval echo configure:1685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c'; { (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_ld_no_whole_archive=yes else libc_cv_ld_no_whole_archive=no @@ -1692,7 +1693,7 @@ fi echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6 echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6 -echo "configure:1696: checking for gcc -fno-exceptions" >&5 +echo "configure:1697: checking for gcc -fno-exceptions" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1703,7 +1704,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -fno-exceptions - -o conftest conftest.c'; { (eval echo configure:1707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c'; { (eval echo configure:1708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_no_exceptions=yes else libc_cv_gcc_no_exceptions=no @@ -1755,7 +1756,7 @@ if test "$uname" = generic; then fi echo $ac_n "checking OS release for uname""... $ac_c" 1>&6 -echo "configure:1759: checking OS release for uname" >&5 +echo "configure:1760: checking OS release for uname" >&5 if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1777,7 +1778,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6 uname_release="$libc_cv_uname_release" echo $ac_n "checking OS version for uname""... $ac_c" 1>&6 -echo "configure:1781: checking OS version for uname" >&5 +echo "configure:1782: checking OS version for uname" >&5 if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1799,7 +1800,7 @@ else fi echo $ac_n "checking stdio selection""... $ac_c" 1>&6 -echo "configure:1803: checking stdio selection" >&5 +echo "configure:1804: checking stdio selection" >&5 case $stdio in libio) cat >> confdefs.h <<\EOF diff --git a/configure.in b/configure.in index 4a3f663cb5..3a4d200e71 100644 --- a/configure.in +++ b/configure.in @@ -34,7 +34,7 @@ esac dnl Arguments to specify presence of other packages/features. AC_ARG_WITH(fp, dnl - --with-fp if using floating-point hardware [default=yes], +[ --with-fp if using floating-point hardware [default=yes]], with_fp=$withval, with_fp=yes) AC_ARG_WITH(gnu-binutils, dnl --with-gnu-binutils if using GNU binutils (as and ld), @@ -59,6 +59,11 @@ AC_ARG_ENABLE(libio, dnl fi], stdio=default) +AC_ARG_ENABLE(sanity-checks, dnl +[ --disable-sanity-checks really do not use threads (should not be used + except in special situations) [default=yes]], + enable_sanity=$enableval, enable_sanity=yes) + dnl Arguments to enable or disable building the shared, profiled, and dnl -fomit-frame-pointer libraries. AC_ARG_ENABLE(shared, dnl @@ -360,7 +365,8 @@ AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_PATH_PROG(BASH, bash, no) -if test "$BASH" != no && $BASH -c 'test "$BASH_VERSINFO" -ge 2'; then +if test "$BASH" != no && + $BASH -c 'test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then libc_cv_have_bash2=yes else libc_cv_have_bash2=no @@ -105,6 +105,8 @@ extern struct group *getgrnam __P ((__const char *__name)); POSIX people would choose. */ #if defined(__USE_SVID) || defined (__USE_BSD) || defined(__USE_XOPEN_EXTENDED) +extern int __getgrent_r __P ((struct group *__resultbuf, char *buffer, + size_t __buflen, struct group **__result)); extern int getgrent_r __P ((struct group *__resultbuf, char *buffer, size_t __buflen, struct group **__result)); #endif @@ -570,7 +570,7 @@ fts_build(sp, type) register FTS *sp; int type; { - register struct dirent dirbuf, *dp; + struct dirent dirbuf, *dp; register FTSENT *p, *head; register int nitems; FTSENT *cur, *tail; diff --git a/io/getwd.c b/io/getwd.c index 4488cef00e..510a681d78 100644 --- a/io/getwd.c +++ b/io/getwd.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. +/* Obsolete function to get current working directory. + 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 @@ -21,19 +22,15 @@ #include <string.h> #include <unistd.h> -/* Put the absolute pathname of the current working direction in BUF. - If successful, return BUF. If not, put an error message in - BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ + char * getwd (buf) char *buf; { #ifndef PATH_MAX #define PATH_MAX 1024 - char fetchbuf[PATH_MAX]; -#else -#define fetchbuf buf #endif + char tmpbuf[PATH_MAX]; if (buf == NULL) { @@ -41,18 +38,21 @@ getwd (buf) return NULL; } - if (getcwd (fetchbuf, PATH_MAX) == NULL) + if (getcwd (tmpbuf, LOCAL_PATH_MAX) == NULL) { -#if defined HAVE_STRERROR_R || defined _LIBC - __strerror_r (errno, buf, PATH_MAX); -#else - strncpy (buf, strerror (errno), PATH_MAX); -#endif + /* We use 1024 here since it should really be enough and because + this is a save value. */ + __strerror_r (errno, buf, 1024); return NULL; } - if (fetchbuf != buf) - strcpy (buf, fetchbuf); + /* This is completely unsafe. Nobody can say how big the user + provided buffer is. Perhaps the application and the libc + disagree about the value of PATH_MAX. */ + strcpy (buf, tmpbuf); return buf; } + +link_warning (getwd, + "the `getwd' function is dangerous and should not be used.") diff --git a/libio/fileops.c b/libio/fileops.c index 1851d9a1fa..d3f4831e2d 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -45,21 +45,27 @@ extern int errno; is that of gptr(); in put mode that of pptr(). The position in the buffer that corresponds to the position - in external file system is file_ptr(). - This is normally _IO_read_end, except in putback mode, + in external file system is normally _IO_read_end, except in putback + mode, when it is _IO_save_end. when it is _IO_save_end. If the field _fb._offset is >= 0, it gives the offset in the file as a whole corresponding to eGptr(). (?) PUT MODE: - If a filebuf is in put mode, pbase() is non-NULL and equal to base(). - Also, epptr() == ebuf(). - Also, eback() == gptr() && gptr() == egptr(). - The un-flushed character are those between pbase() and |
