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'.
This commit is contained in:
parent
6b612c6709
commit
a18f587da5
67
ChangeLog
67
ChangeLog
|
@ -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>
|
Tue Dec 3 08:38:15 1996 Richard Henderson <rth@tamu.edu>
|
||||||
|
|
||||||
* sysdeps/unix/alpha/sysdep.S: Remove definition of __errno_location.
|
* 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.
|
* sysdeps/unix/sysv/linux/gethostid.c: Likewise.
|
||||||
|
|
||||||
* posix/getconf.c: Treat _SC_UNIT_MAX and _SC_ULONG_MAX separately
|
* 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.
|
Print string `undefined' when a value is undefined.
|
||||||
|
|
||||||
* stdlib/l64a.c: Return correct pointer.
|
* stdlib/l64a.c: Return correct pointer.
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -90,6 +90,9 @@ echo-headers: subdir_echo-headers
|
||||||
|
|
||||||
# What to install.
|
# What to install.
|
||||||
install-others = $(includedir)/stubs.h
|
install-others = $(includedir)/stubs.h
|
||||||
|
ifeq (yes,$(build-shared))
|
||||||
|
install-others += $(includedir)/gnu/lib-names.h
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq (yes,$(gnu-ld))
|
ifeq (yes,$(gnu-ld))
|
||||||
libc-init = set-init
|
libc-init = set-init
|
||||||
|
@ -200,8 +203,6 @@ $(includedir)/gnu/lib-names.h: $(common-objpfx)soversions.mk
|
||||||
then echo 'gnu/lib-names.h unchanged'; \
|
then echo 'gnu/lib-names.h unchanged'; \
|
||||||
else $(INSTALL_DATA) $(objpfx)lib-names.h $@; fi
|
else $(INSTALL_DATA) $(objpfx)lib-names.h $@; fi
|
||||||
rm -f $(objpfx)lib-names.h
|
rm -f $(objpfx)lib-names.h
|
||||||
|
|
||||||
install-others += $(includedir)/gnu/lib-names.h
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# This makes the Info or DVI file of the documentation from the Texinfo source.
|
# 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
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
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
|
libc_cv_have_bash2=yes
|
||||||
else
|
else
|
||||||
libc_cv_have_bash2=no
|
libc_cv_have_bash2=no
|
||||||
|
@ -1381,7 +1382,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1405,12 +1406,12 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1414 "configure"
|
#line 1415 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#define __need_size_t
|
#define __need_size_t
|
||||||
#define __need_wchar_t
|
#define __need_wchar_t
|
||||||
|
@ -1425,7 +1426,7 @@ size_t size; wchar_t wchar;
|
||||||
if (&size == NULL || &wchar == NULL) abort ();
|
if (&size == NULL || &wchar == NULL) abort ();
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
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*
|
rm -rf conftest*
|
||||||
libc_cv_friendly_stddef=yes
|
libc_cv_friendly_stddef=yes
|
||||||
else
|
else
|
||||||
|
@ -1444,7 +1445,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1467,7 +1468,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1497,7 +1498,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1532,12 +1533,12 @@ fi
|
||||||
|
|
||||||
if test $elf != yes; then
|
if test $elf != yes; then
|
||||||
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1541 "configure"
|
#line 1542 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
@ -1546,7 +1547,7 @@ asm (".section .init");
|
||||||
asm (".text");
|
asm (".text");
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
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*
|
rm -rf conftest*
|
||||||
libc_cv_have_initfini=yes
|
libc_cv_have_initfini=yes
|
||||||
else
|
else
|
||||||
|
@ -1571,19 +1572,19 @@ if test $elf = yes; then
|
||||||
libc_cv_asm_underscores=no
|
libc_cv_asm_underscores=no
|
||||||
else
|
else
|
||||||
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1580 "configure"
|
#line 1581 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
asm ("_glibc_foobar:");
|
asm ("_glibc_foobar:");
|
||||||
int main() {
|
int main() {
|
||||||
glibc_foobar ();
|
glibc_foobar ();
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
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*
|
rm -rf conftest*
|
||||||
libc_cv_asm_underscores=yes
|
libc_cv_asm_underscores=yes
|
||||||
else
|
else
|
||||||
|
@ -1610,7 +1611,7 @@ if test $elf = yes; then
|
||||||
libc_cv_asm_weakext_directive=no
|
libc_cv_asm_weakext_directive=no
|
||||||
else
|
else
|
||||||
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1633,7 +1634,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
|
||||||
|
|
||||||
if test $libc_cv_asm_weak_directive = no; then
|
if test $libc_cv_asm_weak_directive = no; then
|
||||||
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1670,7 +1671,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1681,7 +1682,7 @@ __throw () {}
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} $CFLAGS
|
if { ac_try='${CC-cc} $CFLAGS
|
||||||
-nostdlib -nostartfiles -Wl,--no-whole-archive
|
-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
|
libc_cv_ld_no_whole_archive=yes
|
||||||
else
|
else
|
||||||
libc_cv_ld_no_whole_archive=no
|
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_t""$libc_cv_ld_no_whole_archive" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 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
|
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1703,7 +1704,7 @@ __throw () {}
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} $CFLAGS
|
if { ac_try='${CC-cc} $CFLAGS
|
||||||
-nostdlib -nostartfiles -fno-exceptions
|
-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
|
libc_cv_gcc_no_exceptions=yes
|
||||||
else
|
else
|
||||||
libc_cv_gcc_no_exceptions=no
|
libc_cv_gcc_no_exceptions=no
|
||||||
|
@ -1755,7 +1756,7 @@ if test "$uname" = generic; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1777,7 +1778,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
|
||||||
uname_release="$libc_cv_uname_release"
|
uname_release="$libc_cv_uname_release"
|
||||||
|
|
||||||
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
|
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
|
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1799,7 +1800,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
|
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
|
case $stdio in
|
||||||
libio) cat >> confdefs.h <<\EOF
|
libio) cat >> confdefs.h <<\EOF
|
||||||
|
|
10
configure.in
10
configure.in
|
@ -34,7 +34,7 @@ esac
|
||||||
|
|
||||||
dnl Arguments to specify presence of other packages/features.
|
dnl Arguments to specify presence of other packages/features.
|
||||||
AC_ARG_WITH(fp, dnl
|
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)
|
with_fp=$withval, with_fp=yes)
|
||||||
AC_ARG_WITH(gnu-binutils, dnl
|
AC_ARG_WITH(gnu-binutils, dnl
|
||||||
--with-gnu-binutils if using GNU binutils (as and ld),
|
--with-gnu-binutils if using GNU binutils (as and ld),
|
||||||
|
@ -59,6 +59,11 @@ AC_ARG_ENABLE(libio, dnl
|
||||||
fi],
|
fi],
|
||||||
stdio=default)
|
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 Arguments to enable or disable building the shared, profiled, and
|
||||||
dnl -fomit-frame-pointer libraries.
|
dnl -fomit-frame-pointer libraries.
|
||||||
AC_ARG_ENABLE(shared, dnl
|
AC_ARG_ENABLE(shared, dnl
|
||||||
|
@ -360,7 +365,8 @@ AC_CHECK_TOOL(AR, ar)
|
||||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||||
|
|
||||||
AC_PATH_PROG(BASH, bash, no)
|
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
|
libc_cv_have_bash2=yes
|
||||||
else
|
else
|
||||||
libc_cv_have_bash2=no
|
libc_cv_have_bash2=no
|
||||||
|
|
|
@ -105,6 +105,8 @@ extern struct group *getgrnam __P ((__const char *__name));
|
||||||
POSIX people would choose. */
|
POSIX people would choose. */
|
||||||
|
|
||||||
#if defined(__USE_SVID) || defined (__USE_BSD) || defined(__USE_XOPEN_EXTENDED)
|
#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,
|
extern int getgrent_r __P ((struct group *__resultbuf, char *buffer,
|
||||||
size_t __buflen, struct group **__result));
|
size_t __buflen, struct group **__result));
|
||||||
#endif
|
#endif
|
||||||
|
|
2
io/fts.c
2
io/fts.c
|
@ -570,7 +570,7 @@ fts_build(sp, type)
|
||||||
register FTS *sp;
|
register FTS *sp;
|
||||||
int type;
|
int type;
|
||||||
{
|
{
|
||||||
register struct dirent dirbuf, *dp;
|
struct dirent dirbuf, *dp;
|
||||||
register FTSENT *p, *head;
|
register FTSENT *p, *head;
|
||||||
register int nitems;
|
register int nitems;
|
||||||
FTSENT *cur, *tail;
|
FTSENT *cur, *tail;
|
||||||
|
|
30
io/getwd.c
30
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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -21,19 +22,15 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.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 *
|
char *
|
||||||
getwd (buf)
|
getwd (buf)
|
||||||
char *buf;
|
char *buf;
|
||||||
{
|
{
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
#define PATH_MAX 1024
|
#define PATH_MAX 1024
|
||||||
char fetchbuf[PATH_MAX];
|
|
||||||
#else
|
|
||||||
#define fetchbuf buf
|
|
||||||
#endif
|
#endif
|
||||||
|
char tmpbuf[PATH_MAX];
|
||||||
|
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
{
|
{
|
||||||
|
@ -41,18 +38,21 @@ getwd (buf)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getcwd (fetchbuf, PATH_MAX) == NULL)
|
if (getcwd (tmpbuf, LOCAL_PATH_MAX) == NULL)
|
||||||
{
|
{
|
||||||
#if defined HAVE_STRERROR_R || defined _LIBC
|
/* We use 1024 here since it should really be enough and because
|
||||||
__strerror_r (errno, buf, PATH_MAX);
|
this is a save value. */
|
||||||
#else
|
__strerror_r (errno, buf, 1024);
|
||||||
strncpy (buf, strerror (errno), PATH_MAX);
|
|
||||||
#endif
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fetchbuf != buf)
|
/* This is completely unsafe. Nobody can say how big the user
|
||||||
strcpy (buf, fetchbuf);
|
provided buffer is. Perhaps the application and the libc
|
||||||
|
disagree about the value of PATH_MAX. */
|
||||||
|
strcpy (buf, tmpbuf);
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
link_warning (getwd,
|
||||||
|
"the `getwd' function is dangerous and should not be used.")
|
||||||
|
|
|
@ -45,21 +45,27 @@ extern int errno;
|
||||||
is that of gptr(); in put mode that of pptr().
|
is that of gptr(); in put mode that of pptr().
|
||||||
|
|
||||||
The position in the buffer that corresponds to the position
|
The position in the buffer that corresponds to the position
|
||||||
in external file system is file_ptr().
|
in external file system is normally _IO_read_end, except in putback
|
||||||
This is normally _IO_read_end, except in putback mode,
|
mode, when it is _IO_save_end.
|
||||||
when it is _IO_save_end.
|
when it is _IO_save_end.
|
||||||
If the field _fb._offset is >= 0, it gives the offset in
|
If the field _fb._offset is >= 0, it gives the offset in
|
||||||
the file as a whole corresponding to eGptr(). (?)
|
the file as a whole corresponding to eGptr(). (?)
|
||||||
|
|
||||||
PUT MODE:
|
PUT MODE:
|
||||||
If a filebuf is in put mode, pbase() is non-NULL and equal to base().
|
If a filebuf is in put mode, then all of _IO_read_ptr, _IO_read_end,
|
||||||
Also, epptr() == ebuf().
|
and _IO_read_base are equal to each other. These are usually equal
|
||||||
Also, eback() == gptr() && gptr() == egptr().
|
to _IO_buf_base, though not necessarily if we have switched from
|
||||||
The un-flushed character are those between pbase() and pptr().
|
get mode to put mode. (The reason is to maintain the invariant
|
||||||
|
that _IO_read_end corresponds to the external file position.)
|
||||||
|
_IO_write_base is non-NULL and usually equal to _IO_base_base.
|
||||||
|
We also have _IO_write_end == _IO_buf_end, but only in fully buffered mode.
|
||||||
|
The un-flushed character are those between _IO_write_base and _IO_write_ptr.
|
||||||
|
|
||||||
GET MODE:
|
GET MODE:
|
||||||
If a filebuf is in get or putback mode, eback() != egptr().
|
If a filebuf is in get or putback mode, eback() != egptr().
|
||||||
In get mode, the unread characters are between gptr() and egptr().
|
In get mode, the unread characters are between gptr() and egptr().
|
||||||
The OS file position corresponds to that of egptr().
|
The OS file position corresponds to that of egptr().
|
||||||
|
|
||||||
PUTBACK MODE:
|
PUTBACK MODE:
|
||||||
Putback mode is used to remember "excess" characters that have
|
Putback mode is used to remember "excess" characters that have
|
||||||
been sputbackc'd in a separate putback buffer.
|
been sputbackc'd in a separate putback buffer.
|
||||||
|
@ -72,7 +78,7 @@ extern int errno;
|
||||||
The OS position corresponds to that of save_egptr().
|
The OS position corresponds to that of save_egptr().
|
||||||
|
|
||||||
LINE BUFFERED OUTPUT:
|
LINE BUFFERED OUTPUT:
|
||||||
During line buffered output, pbase()==base() && epptr()==base().
|
During line buffered output, _IO_write_base==base() && epptr()==base().
|
||||||
However, ptr() may be anywhere between base() and ebuf().
|
However, ptr() may be anywhere between base() and ebuf().
|
||||||
This forces a call to filebuf::overflow(int C) on every put.
|
This forces a call to filebuf::overflow(int C) on every put.
|
||||||
If there is more space in the buffer, and C is not a '\n',
|
If there is more space in the buffer, and C is not a '\n',
|
||||||
|
|
|
@ -42,7 +42,7 @@ _IO_setvbuf (fp, buf, mode, size)
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case _IOFBF:
|
case _IOFBF:
|
||||||
fp->_IO_file_flags &= ~_IO_LINE_BUF;
|
fp->_IO_file_flags &= ~_IO_LINE_BUF|_IO_UNBUFFERED;
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
{
|
{
|
||||||
if (fp->_IO_buf_base == NULL)
|
if (fp->_IO_buf_base == NULL)
|
||||||
|
@ -72,6 +72,7 @@ _IO_setvbuf (fp, buf, mode, size)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _IOLBF:
|
case _IOLBF:
|
||||||
|
fp->_IO_file_flags &= ~_IO_UNBUFFERED;
|
||||||
fp->_IO_file_flags |= _IO_LINE_BUF;
|
fp->_IO_file_flags |= _IO_LINE_BUF;
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -378,9 +378,9 @@ the non-reentrant and reentrant versions of our function above are:
|
||||||
@smallexample
|
@smallexample
|
||||||
struct hostent *gethostbyname (const char *name)
|
struct hostent *gethostbyname (const char *name)
|
||||||
|
|
||||||
struct hostent *gethostbyname_r (const char *name,
|
int gethostbyname_r (const char *name, struct hostent *result_buf,
|
||||||
struct hostent *result_buf, char *buf,
|
char *buf, size_t buflen, struct hostent **result,
|
||||||
int buflen, int *h_errnop)
|
int *h_errnop)
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
|
@ -389,7 +389,7 @@ The actual prototype of the function in the NSS modules in this case is
|
||||||
@smallexample
|
@smallexample
|
||||||
enum nss_status _nss_files_gethostbyname_r (const char *name,
|
enum nss_status _nss_files_gethostbyname_r (const char *name,
|
||||||
struct hostent *result_buf,
|
struct hostent *result_buf,
|
||||||
char *buf, int buflen,
|
char *buf, size_t buflen,
|
||||||
int *h_errnop)
|
int *h_errnop)
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
@ -553,7 +553,7 @@ the interface. All derive from the traditional ones for system databases.
|
||||||
database (e.g., it is @code{pw} for the password database).
|
database (e.g., it is @code{pw} for the password database).
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item int _nss_@var{database}_set@var{db}ent (void)
|
@item enum nss_status _nss_@var{database}_set@var{db}ent (void)
|
||||||
This function prepares the service for following operations. For a
|
This function prepares the service for following operations. For a
|
||||||
simple file based lookup this means files could be opened, for other
|
simple file based lookup this means files could be opened, for other
|
||||||
services this function simply is a noop.
|
services this function simply is a noop.
|
||||||
|
@ -566,14 +566,14 @@ argument for some @var{database}s (i.e., the interface is
|
||||||
The return value should be @var{NSS_STATUS_SUCCESS} or according to the
|
The return value should be @var{NSS_STATUS_SUCCESS} or according to the
|
||||||
table above in case of an error (@pxref{NSS Modules Interface}).
|
table above in case of an error (@pxref{NSS Modules Interface}).
|
||||||
|
|
||||||
@item int _nss_@var{database}_end@var{db}ent (void)
|
@item enum nss_status _nss_@var{database}_end@var{db}ent (void)
|
||||||
This function simply closes all files which are still open or removes
|
This function simply closes all files which are still open or removes
|
||||||
buffer caches. If there are no files or buffers to remove this is again
|
buffer caches. If there are no files or buffers to remove this is again
|
||||||
a simple noop.
|
a simple noop.
|
||||||
|
|
||||||
There normally is no return value different to @var{NSS_STATUS_SUCCESS}.
|
There normally is no return value different to @var{NSS_STATUS_SUCCESS}.
|
||||||
|
|
||||||
@item int _nss_@var{database}_get@var{db}ent_r (@var{STRUCTURE} *result, char *buffer, int buflen)
|
@item enum nss_status _nss_@var{database}_get@var{db}ent_r (@var{STRUCTURE} *result, char *buffer, size_t buflen)
|
||||||
Since this function will be called several times in a row to retrieve
|
Since this function will be called several times in a row to retrieve
|
||||||
one entry after the other it must keep some kind of state. But this
|
one entry after the other it must keep some kind of state. But this
|
||||||
also means the functions are not really reentrant. They are reentrant
|
also means the functions are not really reentrant. They are reentrant
|
||||||
|
@ -602,7 +602,7 @@ returned. When the service was not formerly initialized by a call to
|
||||||
@code{_nss_@var{DATABASE}_set@var{db}ent} all return value allowed for
|
@code{_nss_@var{DATABASE}_set@var{db}ent} all return value allowed for
|
||||||
this function can also be returned here.
|
this function can also be returned here.
|
||||||
|
|
||||||
@item int _nss_@var{DATABASE}_get@var{db}by@var{XX}_r (@var{PARAMS}, @var{STRUCTURE} *result, char *buffer, int buflen)
|
@item enum nss_status _nss_@var{DATABASE}_get@var{db}by@var{XX}_r (@var{PARAMS}, @var{STRUCTURE} *result, char *buffer, size_t buflen)
|
||||||
This function shall return the entry from the database which is
|
This function shall return the entry from the database which is
|
||||||
addressed by the @var{PARAMS}. The type and number of these arguments
|
addressed by the @var{PARAMS}. The type and number of these arguments
|
||||||
vary. It must be individually determined by looking to the user-level
|
vary. It must be individually determined by looking to the user-level
|
||||||
|
|
|
@ -56,6 +56,7 @@ vwarn (const char *format, __gnuc_va_list ap)
|
||||||
vfprintf (stderr, format, ap);
|
vfprintf (stderr, format, ap);
|
||||||
fputs (": ", stderr);
|
fputs (": ", stderr);
|
||||||
}
|
}
|
||||||
|
__set_errno (error);
|
||||||
fprintf (stderr, "%m\n");
|
fprintf (stderr, "%m\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* open a socket, get the process group information of the socket, and use the
|
* open a socket, get the process group information of the socket, and use the
|
||||||
* socket to get the network interface configuration list
|
* socket to get the network interface configuration list
|
||||||
*/
|
*/
|
||||||
main()
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int sock;
|
int sock;
|
||||||
int ioctl_result;
|
int ioctl_result;
|
||||||
|
|
|
@ -49,6 +49,8 @@ static char sccsid[] = "@(#)syslog.c 8.4 (Berkeley) 3/18/94";
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <libc-lock.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
#if __STDC__
|
#if __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -65,6 +67,14 @@ static int LogFacility = LOG_USER; /* default facility code */
|
||||||
static int LogMask = 0xff; /* mask of priorities to be logged */
|
static int LogMask = 0xff; /* mask of priorities to be logged */
|
||||||
extern char *__progname; /* Program name, from crt0. */
|
extern char *__progname; /* Program name, from crt0. */
|
||||||
|
|
||||||
|
/* Define the lock. */
|
||||||
|
__libc_lock_define_initialized (static, syslog_lock)
|
||||||
|
|
||||||
|
static void openlog_internal(const char *, int, int);
|
||||||
|
static void closelog_internal(void);
|
||||||
|
static void sigpipe_handler (int);
|
||||||
|
static void cancel_handler (void *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* syslog, vsyslog --
|
* syslog, vsyslog --
|
||||||
* print message on log file; output is intended for syslogd(8).
|
* print message on log file; output is intended for syslogd(8).
|
||||||
|
@ -103,6 +113,9 @@ vsyslog(pri, fmt, ap)
|
||||||
char *buf = 0;
|
char *buf = 0;
|
||||||
size_t bufsize = 0;
|
size_t bufsize = 0;
|
||||||
size_t prioff, msgoff;
|
size_t prioff, msgoff;
|
||||||
|
struct sigaction action, oldaction;
|
||||||
|
struct sigaction *oldaction_ptr = NULL;
|
||||||
|
int sigpipe;
|
||||||
|
|
||||||
#define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
|
#define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
|
||||||
/* Check for invalid bits. */
|
/* Check for invalid bits. */
|
||||||
|
@ -163,9 +176,22 @@ vsyslog(pri, fmt, ap)
|
||||||
(void)writev(STDERR_FILENO, iov, 2);
|
(void)writev(STDERR_FILENO, iov, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Prepare for multiple users. We have to take care: open and
|
||||||
|
write are cancelation points. */
|
||||||
|
__libc_cleanup_region_start (cancel_handler, &oldaction_ptr);
|
||||||
|
__libc_lock_lock (syslog_lock);
|
||||||
|
|
||||||
|
/* Prepare for a broken connection. */
|
||||||
|
memset (&action, 0, sizeof (action));
|
||||||
|
action.sa_handler = sigpipe_handler;
|
||||||
|
sigemptyset (&action.sa_mask);
|
||||||
|
sigpipe = sigaction (SIGPIPE, &action, &oldaction);
|
||||||
|
if (sigpipe == 0)
|
||||||
|
oldaction_ptr = &oldaction;
|
||||||
|
|
||||||
/* Get connected, output the message to the local logger. */
|
/* Get connected, output the message to the local logger. */
|
||||||
if (!connected)
|
if (!connected)
|
||||||
openlog(LogTag, LogStat | LOG_NDELAY, 0);
|
openlog_internal(LogTag, LogStat | LOG_NDELAY, 0);
|
||||||
|
|
||||||
/* If we have a SOCK_STREAM connection, also send ASCII NUL as
|
/* If we have a SOCK_STREAM connection, also send ASCII NUL as
|
||||||
a record terminator. */
|
a record terminator. */
|
||||||
|
@ -174,7 +200,7 @@ vsyslog(pri, fmt, ap)
|
||||||
|
|
||||||
if (__send(LogFile, buf, bufsize, 0) < 0)
|
if (__send(LogFile, buf, bufsize, 0) < 0)
|
||||||
{
|
{
|
||||||
closelog (); /* attempt re-open next time */
|
closelog_internal (); /* attempt re-open next time */
|
||||||
/*
|
/*
|
||||||
* Output the message to the console; don't worry about blocking,
|
* Output the message to the console; don't worry about blocking,
|
||||||
* if console blocks everything will. Make sure the error reported
|
* if console blocks everything will. Make sure the error reported
|
||||||
|
@ -188,15 +214,20 @@ vsyslog(pri, fmt, ap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sigpipe == 0)
|
||||||
|
sigaction (SIGPIPE, &oldaction, (struct sigaction *) NULL);
|
||||||
|
|
||||||
|
/* End of critical section. */
|
||||||
|
__libc_cleanup_region_end (0);
|
||||||
|
__libc_lock_unlock (syslog_lock);
|
||||||
|
|
||||||
free (buf);
|
free (buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
|
static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
|
||||||
|
|
||||||
void
|
static void
|
||||||
openlog(ident, logstat, logfac)
|
openlog_internal(const char *ident, int logstat, int logfac)
|
||||||
const char *ident;
|
|
||||||
int logstat, logfac;
|
|
||||||
{
|
{
|
||||||
if (ident != NULL)
|
if (ident != NULL)
|
||||||
LogTag = ident;
|
LogTag = ident;
|
||||||
|
@ -237,13 +268,60 @@ openlog(ident, logstat, logfac)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
closelog()
|
openlog (const char *ident, int logstat, int logfac)
|
||||||
|
{
|
||||||
|
/* Protect against multiple users. */
|
||||||
|
__libc_cleanup_region_start ((void (*) __P ((void *))) __libc_mutex_unlock,
|
||||||
|
&syslog_lock);
|
||||||
|
__libc_lock_lock (syslog_lock);
|
||||||
|
|
||||||
|
openlog_internal (ident, logstat, logfac);
|
||||||
|
|
||||||
|
/* Free the lock. */
|
||||||
|
__libc_cleanup_region_end (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
sigpipe_handler (int signo)
|
||||||
|
{
|
||||||
|
closelog_internal();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
closelog_internal()
|
||||||
{
|
{
|
||||||
(void)close(LogFile);
|
(void)close(LogFile);
|
||||||
LogFile = -1;
|
LogFile = -1;
|
||||||
connected = 0;
|
connected = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
closelog ()
|
||||||
|
{
|
||||||
|
/* Protect against multiple users. */
|
||||||
|
__libc_cleanup_region_start ((void (*) __P ((void *))) __libc_mutex_unlock,
|
||||||
|
&syslog_lock);
|
||||||
|
__libc_lock_lock (syslog_lock);
|
||||||
|
|
||||||
|
closelog_internal ();
|
||||||
|
|
||||||
|
/* Free the lock. */
|
||||||
|
__libc_cleanup_region_end (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
cancel_handler (void *ptr)
|
||||||
|
{
|
||||||
|
/* Restore the old signal handler. */
|
||||||
|
struct sigaction *oldaction = *((struct sigaction **) ptr);
|
||||||
|
|
||||||
|
if (oldaction != (struct sigaction *) NULL)
|
||||||
|
sigaction (SIGPIPE, oldaction, (struct sigaction *) NULL);
|
||||||
|
|
||||||
|
/* Free the lock. */
|
||||||
|
__libc_lock_unlock (syslog_lock);
|
||||||
|
}
|
||||||
|
|
||||||
/* setlogmask -- set the log mask level */
|
/* setlogmask -- set the log mask level */
|
||||||
int
|
int
|
||||||
setlogmask(pmask)
|
setlogmask(pmask)
|
||||||
|
|
|
@ -43,7 +43,9 @@ test (input, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main (argc, argv)
|
||||||
|
int argc;
|
||||||
|
char *argv[];
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
#ifndef ELIDE_CODE
|
#ifndef ELIDE_CODE
|
||||||
|
|
||||||
#ifdef STDC_HEADERS
|
#if defined(STDC_HEADERS) || defined(__GNU_LIBRARY__)
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ extern char *alloca ();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STDC_HEADERS
|
#if !(defined (STDC_HEADERS) || defined (__GNU_LIBRARY__))
|
||||||
#undef size_t
|
#undef size_t
|
||||||
#define size_t unsigned int
|
#define size_t unsigned int
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,7 +32,7 @@ routines := \
|
||||||
abs labs llabs \
|
abs labs llabs \
|
||||||
div ldiv lldiv \
|
div ldiv lldiv \
|
||||||
mblen mbstowcs mbtowc wcstombs wctomb \
|
mblen mbstowcs mbtowc wcstombs wctomb \
|
||||||
random random_r rand \
|
random random_r rand rand_r \
|
||||||
drand48 erand48 lrand48 nrand48 mrand48 jrand48 \
|
drand48 erand48 lrand48 nrand48 mrand48 jrand48 \
|
||||||
srand48 seed48 lcong48 \
|
srand48 seed48 lcong48 \
|
||||||
drand48_r erand48_r lrand48_r nrand48_r mrand48_r jrand48_r \
|
drand48_r erand48_r lrand48_r nrand48_r mrand48_r jrand48_r \
|
||||||
|
|
|
@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
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
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Cambridge, MA 02139, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -58,10 +58,22 @@ canonicalize (const char *name, char *resolved)
|
||||||
if (!resolved)
|
if (!resolved)
|
||||||
rpath = malloc (path_max);
|
rpath = malloc (path_max);
|
||||||
|
|
||||||
strcpy (rpath, "/");
|
if (name[0] != '/')
|
||||||
if (name[0] != '/' && !getcwd (rpath, path_max))
|
{
|
||||||
|
/* We don't write to RPATH directly since the application and
|
||||||
|
the library might disagree about the value for PATH_MAX. */
|
||||||
|
char tmpbuf[path_max];
|
||||||
|
|
||||||
|
if (!getcwd (rpath, path_max))
|
||||||
goto error;
|
goto error;
|
||||||
dest = rpath + strlen (rpath);
|
|
||||||
|
dest = __stpcpy (rpath, tmpbuf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rpath[0] = '/';
|
||||||
|
dest = rpath + 1;
|
||||||
|
}
|
||||||
|
|
||||||
for (start = end = name; *start; start = end)
|
for (start = end = name; *start; start = end)
|
||||||
{
|
{
|
||||||
|
@ -164,9 +176,9 @@ error:
|
||||||
free (rpath);
|
free (rpath);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (canonicalize, realpath)
|
weak_alias (canonicalize, realpath)
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
canonicalize_file_name (const char *name)
|
canonicalize_file_name (const char *name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
|
/* Reentrant random function frm POSIX.1c.
|
||||||
|
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
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
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
@ -17,44 +18,32 @@
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
/* For compatibility only: a "long" is 64 bits on the Alpha, so
|
#include <stdlib.h>
|
||||||
llseek() isn't really needed. But there are some programs out
|
|
||||||
there who may depend on it being around. */
|
|
||||||
|
|
||||||
#include <sysdep.h>
|
|
||||||
|
|
||||||
.text
|
/* This algorithm is mentioned in the ISO C standard, here extended
|
||||||
ENTRY(llseek)
|
for 32 bits. */
|
||||||
#ifdef PROF
|
int
|
||||||
ldgp gp, 0(pv)
|
rand_r (unsigned int *seed)
|
||||||
.set noat
|
{
|
||||||
lda AT, _mcount
|
unsigned int next = *seed;
|
||||||
jsr AT, (AT), _mcount
|
int result;
|
||||||
.set at
|
|
||||||
.prologue 1
|
|
||||||
#else
|
|
||||||
.prologue 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */
|
next *= 1103515245;
|
||||||
zap a2, 0xf0, a2
|
next += 12345;
|
||||||
mov a3, t0 /* save result address */
|
result = (unsigned int) (next / 65536) % 2048;
|
||||||
bis a2, a1, a1
|
|
||||||
|
|
||||||
mov a4, a2 /* shift down whence */
|
next *= 1103515245;
|
||||||
|
next += 12345;
|
||||||
|
result <<= 11;
|
||||||
|
result ^= (unsigned int) (next / 65536) % 1024;
|
||||||
|
|
||||||
ldi v0, __NR_lseek
|
next *= 1103515245;
|
||||||
call_pal PAL_callsys
|
next += 12345;
|
||||||
bne a3, error
|
result <<= 10;
|
||||||
|
result ^= (unsigned int) (next / 65536) % 1024;
|
||||||
|
|
||||||
stq v0, 0(t0)
|
*seed = next;
|
||||||
ret
|
|
||||||
|
|
||||||
error:
|
return result;
|
||||||
#ifndef PROF
|
}
|
||||||
br gp, 1f
|
|
||||||
1: ldgp gp, 0(gp)
|
|
||||||
#endif
|
|
||||||
jmp zero, __syscall_error
|
|
||||||
|
|
||||||
END(llseek)
|
|
|
@ -253,7 +253,7 @@ __getcwd (buf, size)
|
||||||
while (!(thisdev == rootdev && thisino == rootino))
|
while (!(thisdev == rootdev && thisino == rootino))
|
||||||
{
|
{
|
||||||
register DIR *dirstream;
|
register DIR *dirstream;
|
||||||
register struct dirent *d;
|
struct dirent *d;
|
||||||
#if defined HAVE_READDIR_R || defined _LIBC
|
#if defined HAVE_READDIR_R || defined _LIBC
|
||||||
struct dirent dirbuf;
|
struct dirent dirbuf;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -48,6 +48,9 @@
|
||||||
/* Lock the named lock variable. */
|
/* Lock the named lock variable. */
|
||||||
#define __libc_lock_lock(NAME)
|
#define __libc_lock_lock(NAME)
|
||||||
|
|
||||||
|
/* Try tp lock the named lock variable. */
|
||||||
|
#define __libc_lock_trylock(NAME)
|
||||||
|
|
||||||
/* Unlock the named lock variable. */
|
/* Unlock the named lock variable. */
|
||||||
#define __libc_lock_unlock(NAME)
|
#define __libc_lock_unlock(NAME)
|
||||||
|
|
||||||
|
@ -58,4 +61,7 @@
|
||||||
#define __libc_cleanup_region_end(DOIT)
|
#define __libc_cleanup_region_end(DOIT)
|
||||||
|
|
||||||
|
|
||||||
|
/* We need protable names for some of the functions. */
|
||||||
|
#define __libc_mutex_unlock
|
||||||
|
|
||||||
#endif /* libc-lock.h */
|
#endif /* libc-lock.h */
|
||||||
|
|
|
@ -22,6 +22,7 @@ sys/mtio.h
|
||||||
sys/procfs.h
|
sys/procfs.h
|
||||||
sys/quota.h
|
sys/quota.h
|
||||||
sys/socketcall.h
|
sys/socketcall.h
|
||||||
|
sys/socketvar.h
|
||||||
sys/soundcard.h
|
sys/soundcard.h
|
||||||
sys/sysctl.h
|
sys/sysctl.h
|
||||||
sys/sysinfo.h
|
sys/sysinfo.h
|
||||||
|
|
|
@ -51,7 +51,7 @@ inhibit-siglist := yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(subdir), inet)
|
ifeq ($(subdir), inet)
|
||||||
sysdep_headers += netinet/in_systm.h
|
sysdep_headers += netinet/in_systm.h sys/socketvar.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Don't compile the ctype glue code, since there is no old non-GNU C library.
|
# Don't compile the ctype glue code, since there is no old non-GNU C library.
|
||||||
|
|
|
@ -1,39 +1,16 @@
|
||||||
# Local configure fragment for sysdeps/unix/sysv/linux.
|
; then
|
||||||
|
|
||||||
# On Linux, the default is to use libio instead of stdio.
|
|
||||||
test $stdio = default && stdio=libio
|
|
||||||
|
|
||||||
# Don't bother trying to generate any glue code to be compatible with the
|
|
||||||
# existing system library, because we are the only system library.
|
|
||||||
inhibit_glue=yes
|
|
||||||
|
|
||||||
echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6
|
|
||||||
if eval "test \"`echo '$''{'libc_cv_linux2010'+set}'`\" = set"; then
|
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
|
||||||
else
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
|
||||||
#line 16 "configure"
|
|
||||||
#include "confdefs.h"
|
|
||||||
#include <linux/version.h>
|
|
||||||
int main() { return 0; }
|
|
||||||
int t() {
|
|
||||||
#if LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */
|
|
||||||
eat flaming death
|
|
||||||
#endif
|
|
||||||
; return 0; }
|
|
||||||
EOF
|
|
||||||
if { (eval echo configure:26: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_linux2010='2.0.10 or later'
|
libc_cv_linux2010='2.0.10 or later'
|
||||||
else
|
else
|
||||||
|
echo "configure: failed program was:" >&AC_FD_CC
|
||||||
|
cat conftest.$ac_ext >&AC_FD_CC
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_linux2010='TOO OLD!'
|
libc_cv_linux2010='TOO OLD!'
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$ac_t""$libc_cv_linux2010" 1>&6
|
echo "$ac_t""$libc_cv_linux2010" 1>&AC_FD_MSG
|
||||||
if test "$libc_cv_linux2010" != '2.0.10 or later'; then
|
if test "$libc_cv_linux2010" != '2.0.10 or later'; then
|
||||||
{ echo "configure: error: GNU libc requires kernel header files from
|
{ echo "configure: error: GNU libc requires kernel header files from
|
||||||
Linux 2.0.10 or later to be installed before configuring.
|
Linux 2.0.10 or later to be installed before configuring.
|
||||||
|
@ -57,20 +34,36 @@ fi
|
||||||
case $add_ons in
|
case $add_ons in
|
||||||
# Both are available. Good.
|
# Both are available. Good.
|
||||||
*linuxthreads*des-crypt* | *des-crypt*linuxthreads*)
|
*linuxthreads*des-crypt* | *des-crypt*linuxthreads*)
|
||||||
|
message=
|
||||||
;;
|
;;
|
||||||
*linuxthreads*)
|
*linuxthreads*)
|
||||||
echo "\
|
message="\
|
||||||
*** WARNING:
|
*** WARNING:
|
||||||
*** Are you sure you do not want to use the \`crypt' add-on?"
|
*** Are you sure you do not want to use the \`crypt' add-on?"
|
||||||
;;
|
;;
|
||||||
*des-crypt*)
|
*des-crypt*)
|
||||||
echo "\
|
message="\
|
||||||
*** WARNING:
|
*** WARNING:
|
||||||
*** Are you sure you do not want to use the \`LinuxThread' add-on?"
|
*** Are you sure you do not want to use the \`LinuxThread' add-on?"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "\
|
message="\
|
||||||
*** WARNING: Are you sure you do not want to use the \`LinuxThreads'
|
*** WARNING: Are you sure you do not want to use the \`LinuxThreads'
|
||||||
*** and \`crypt' add-ons?"
|
*** and \`crypt' add-ons?"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if test "$message"; then
|
||||||
|
if test $enable_sanity = yes; then
|
||||||
|
echo "\
|
||||||
|
*** You should not compile the GNU libc without the \`LinuxThreads' and
|
||||||
|
*** \`crypt' add-on. Not using them risks to be incompatible with the
|
||||||
|
*** libraries of other systems. Consider getting the add-ons and restart
|
||||||
|
*** the configuration.
|
||||||
|
*** If you really mean to avoid those add-ons run configure again, now
|
||||||
|
*** using the extra parameter \`--disable-sanity-checks'."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "$message"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
@ -29,3 +29,50 @@ Linux LIBC_LINUX_VERSION or later. This check uses <linux/version.h>, so
|
||||||
make sure that file was built correctly when installing the kernel header
|
make sure that file was built correctly when installing the kernel header
|
||||||
files.])
|
files.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The Linux filesystem standard prescribes where to place "essential"
|
||||||
|
# files. I.e., when the installation prefix is "/usr" we have to place
|
||||||
|
# shared library objects and the configuation files on the root partition
|
||||||
|
# in /lib and /etc.
|
||||||
|
if test "$prefix" = "/usr"; then
|
||||||
|
libc_cv_slibdir="/lib"
|
||||||
|
libc_cv_sysconfdir="/etc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Under Linux the LinuxThreads and crypt add-on should be available.
|
||||||
|
case $add_ons in
|
||||||
|
# Both are available. Good.
|
||||||
|
*linuxthreads*des-crypt* | *des-crypt*linuxthreads*)
|
||||||
|
message=
|
||||||
|
;;
|
||||||
|
*linuxthreads*)
|
||||||
|
message="\
|
||||||
|
*** WARNING:
|
||||||
|
*** Are you sure you do not want to use the \`crypt' add-on?"
|
||||||
|
;;
|
||||||
|
*des-crypt*)
|
||||||
|
message="\
|
||||||
|
*** WARNING:
|
||||||
|
*** Are you sure you do not want to use the \`LinuxThread' add-on?"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
message="\
|
||||||
|
*** WARNING: Are you sure you do not want to use the \`LinuxThreads'
|
||||||
|
*** and \`crypt' add-ons?"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test "$message"; then
|
||||||
|
if test $enable_sanity = yes; then
|
||||||
|
echo "\
|
||||||
|
*** You should not compile the GNU libc without the \`LinuxThreads' and
|
||||||
|
*** \`crypt' add-on. Not using them risks to be incompatible with the
|
||||||
|
*** libraries of other systems. Consider getting the add-ons and restart
|
||||||
|
*** the configuration.
|
||||||
|
*** If you really mean to avoid those add-ons run configure again, now
|
||||||
|
*** using the extra parameter \`--disable-sanity-checks'."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "$message"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
/* This header is used on many systems but for Linux we have everything
|
||||||
|
already defined in the standard header. */
|
||||||
|
#include <sys/socket.h>
|
Loading…
Reference in New Issue