diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-03-02 18:02:11 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-03-02 18:02:11 +0000 |
commit | ae828bc6f9a3ff47cb92846f71a9a7f8c6d5c941 (patch) | |
tree | bb606d530a4fb73de56d29c0a3433f6fe7f4ac27 | |
parent | fb973e7f76fae77b6678921bc689960b65acf7ad (diff) | |
download | glibc-ae828bc6f9a3ff47cb92846f71a9a7f8c6d5c941.tar glibc-ae828bc6f9a3ff47cb92846f71a9a7f8c6d5c941.tar.gz glibc-ae828bc6f9a3ff47cb92846f71a9a7f8c6d5c941.tar.bz2 glibc-ae828bc6f9a3ff47cb92846f71a9a7f8c6d5c941.zip |
Update.
1998-03-02 17:55 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/add_n.S: Change to use ENTRY and END macro.
* sysdeps/i386/addmul_1.S: Likewise.
* sysdeps/i386/lshift.S: Likewise.
* sysdeps/i386/mul_1.S: Likewise.
* sysdeps/i386/rshift.S: Likewise.
* sysdeps/i386/sub_n.S: Likewise.
* sysdeps/i386/submul_1.S: Likewise.
* sysdeps/i386/i586/add_n.S: Likewise.
* sysdeps/i386/i586/addmul_1.S: Likewise.
* sysdeps/i386/i586/lshift.S: Likewise.
* sysdeps/i386/i586/mul_1.S: Likewise.
* sysdeps/i386/i586/rshift.S: Likewise.
* sysdeps/i386/i586/sub_n.S: Likewise.
* sysdeps/i386/i586/submul_1.S: Likewise.
* sysdeps/i386/sysdep.h: Extend last change.
* sysdeps/unix/sysv/linux/i386/sysdep.h: Follow Intel's advice
to have only one exit point for functions.
1998-03-02 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Fix msgfmt test. Fix handling of //s in sysdeps
search.
1998-03-02 13:28 Ulrich Drepper <drepper@cygnus.com>
* Makerules: Generate libc.so with absolute paths for the used
shared objects.
* config.make.in: Add MAKEINFO definition.
1998-03-02 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/sysdep.h (ASM_SIZE_DIRECTIVE): Add ; at the end.
(ENTRY): Use STABS_FUN.
(END): Use STABS_FUN_END.
(STABS_FUN, STABS_FUN2, STABS_FUN_END): New macro to emit stabs info.
* elf/Makefile: Add rules to build sprof program.
* elf/sprof.c: New file.
1998-02-28 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* misc/syslog.c (openlog_internal): Insert missing closing brace.
1998-02-06 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* configure.in: Check for working msgfmt version (from GNU gettext
0.10 or later).
1998-03-02 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Avoid //s in sysdirs.
Patch by Roland McGrath.
* stdlib/a64l.c (a64l): Rewrite by Joe Keane <jgk@jgk.org>.
1998-03-02 07:17 H.J. Lu <hjl@gnu.org>
* elf/dl-open.c (_dl_open): Update _dl_global_scope_end when
setting _dl_global_scope for RTLD_GLOBAL.
1998-02-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/make-syscalls.sh: Fix last change so that all
possible lists of object-suffixes are taken care of.
1998-03-02 10:16 Ulrich Drepper <drepper@cygnus.com>
* timezone/private.h: Update from tzcode1998c.
* timezone/zic.c: Likewise.
* timezone/antarctica: Updated from tzdata1998c.
* timezone/asia: Likewise.
* timezone/australasia: Likewise.
* timezone/europe: Likewise.
* timezone/southamerica: Likewise.
1998-03-02 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c (glob_in_dir): Add support for cases insensitive
VMS. Patch by John W. Eaton <jwe@bevo.che.wisc.edu>.
34 files changed, 1418 insertions, 288 deletions
@@ -1,3 +1,88 @@ +1998-03-02 17:55 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/i386/add_n.S: Change to use ENTRY and END macro. + * sysdeps/i386/addmul_1.S: Likewise. + * sysdeps/i386/lshift.S: Likewise. + * sysdeps/i386/mul_1.S: Likewise. + * sysdeps/i386/rshift.S: Likewise. + * sysdeps/i386/sub_n.S: Likewise. + * sysdeps/i386/submul_1.S: Likewise. + * sysdeps/i386/i586/add_n.S: Likewise. + * sysdeps/i386/i586/addmul_1.S: Likewise. + * sysdeps/i386/i586/lshift.S: Likewise. + * sysdeps/i386/i586/mul_1.S: Likewise. + * sysdeps/i386/i586/rshift.S: Likewise. + * sysdeps/i386/i586/sub_n.S: Likewise. + * sysdeps/i386/i586/submul_1.S: Likewise. + + * sysdeps/i386/sysdep.h: Extend last change. + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Follow Intel's advice + to have only one exit point for functions. + +1998-03-02 Ulrich Drepper <drepper@cygnus.com> + + * configure.in: Fix msgfmt test. Fix handling of //s in sysdeps + search. + +1998-03-02 13:28 Ulrich Drepper <drepper@cygnus.com> + + * Makerules: Generate libc.so with absolute paths for the used + shared objects. + + * config.make.in: Add MAKEINFO definition. + +1998-03-02 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/i386/sysdep.h (ASM_SIZE_DIRECTIVE): Add ; at the end. + (ENTRY): Use STABS_FUN. + (END): Use STABS_FUN_END. + (STABS_FUN, STABS_FUN2, STABS_FUN_END): New macro to emit stabs info. + + * elf/Makefile: Add rules to build sprof program. + * elf/sprof.c: New file. + +1998-02-28 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * misc/syslog.c (openlog_internal): Insert missing closing brace. + +1998-02-06 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * configure.in: Check for working msgfmt version (from GNU gettext + 0.10 or later). + +1998-03-02 Ulrich Drepper <drepper@cygnus.com> + + * configure.in: Avoid //s in sysdirs. + Patch by Roland McGrath. + + * stdlib/a64l.c (a64l): Rewrite by Joe Keane <jgk@jgk.org>. + +1998-03-02 07:17 H.J. Lu <hjl@gnu.org> + + * elf/dl-open.c (_dl_open): Update _dl_global_scope_end when + setting _dl_global_scope for RTLD_GLOBAL. + +1998-02-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * sysdeps/unix/make-syscalls.sh: Fix last change so that all + possible lists of object-suffixes are taken care of. + +1998-03-02 10:16 Ulrich Drepper <drepper@cygnus.com> + + * timezone/private.h: Update from tzcode1998c. + * timezone/zic.c: Likewise. + * timezone/antarctica: Updated from tzdata1998c. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/europe: Likewise. + * timezone/southamerica: Likewise. + +1998-03-02 Ulrich Drepper <drepper@cygnus.com> + + * posix/glob.c (glob_in_dir): Add support for cases insensitive + VMS. Patch by John W. Eaton <jwe@bevo.che.wisc.edu>. + 1998-03-01 19:05 H.J. Lu (hjl@gnu.org) * sysdeps/libm-ieee754/e_exp.c (__ieee754_exp): Use __isinf. @@ -960,7 +960,9 @@ for d in $add_ons_pfx ''; do for b in $base ''; do for m0 in $mach ''; do for v in /$vendor ''; do + test "$v" = / && continue for o in /$ostry ''; do + test "$o" = / && continue for m in $mach ''; do if test "$m0$b$v$o$m"; then try="${d}sysdeps$m0$b$v$o$m" @@ -1093,7 +1095,7 @@ echo "$ac_t""sysdeps/generic" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1097: checking for a BSD compatible install" >&5 +echo "configure:1099: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1147,7 +1149,7 @@ if test "$INSTALL" = "${srcdir}/install-sh -c"; then INSTALL='\$(..)./install-sh -c' fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1151: checking whether ln -s works" >&5 +echo "configure:1153: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1172,7 +1174,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1176: checking for $ac_word" >&5 +echo "configure:1178: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1201,10 +1203,20 @@ test -n "$MSGFMT" && break done test -n "$MSGFMT" || MSGFMT=":" +if test "$MSGFMT" != ":"; then + if $MSGFMT --version 2>&1 | grep 'GNU gettext.*0\.[1-9][0-9]' >/dev/null 2>&1 + then : # msgfmt from gettext 0.10 or greater, works. + else + echo "configure: warning: +*** (g)msgfmt is too old or wrong version (need gettext 0.10 or better)." 1>&2 + MSGFMT=":" + fi +fi + # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1208: checking for $ac_word" >&5 +echo "configure:1220: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1244,7 +1256,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1248: checking for $ac_word" >&5 +echo "configure:1260: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1273,7 +1285,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1277: checking for $ac_word" >&5 +echo "configure:1289: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1321,7 +1333,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1325: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1337: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1331,11 +1343,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 1335 "configure" +#line 1347 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1358,13 +1370,13 @@ else cross_linkable=yes fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1362: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1374: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1368: checking whether we are using GNU C" >&5 +echo "configure:1380: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1373,7 +1385,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1390,7 +1402,7 @@ if test $ac_cv_prog_gcc = yes; then yes; #endif EOF - if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then if test -z "$CFLAGS"; then CFLAGS="-g -O2" fi @@ -1402,7 +1414,7 @@ else fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1406: checking build system type" >&5 +echo "configure:1418: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1425,7 +1437,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1429: checking for $ac_word" >&5 +echo "configure:1441: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1456,7 +1468,7 @@ done fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1460: checking how to run the C preprocessor" >&5 +echo "configure:1472: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1471,13 +1483,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1475 "configure" +#line 1487 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1488,13 +1500,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1492 "configure" +#line 1504 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1527,7 +1539,7 @@ LD=`$CC -print-file-name=ld` # Determine whether we are using GNU binutils. echo $ac_n "checking whether $AS is GNU as""... $ac_c" 1>&6 -echo "configure:1531: checking whether $AS is GNU as" >&5 +echo "configure:1543: checking whether $AS is GNU as" >&5 if eval "test \"`echo '$''{'libc_cv_prog_as_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1545,7 +1557,7 @@ rm -f a.out gnu_as=$libc_cv_prog_as_gnu echo $ac_n "checking whether $LD is GNU ld""... $ac_c" 1>&6 -echo "configure:1549: checking whether $LD is GNU ld" >&5 +echo "configure:1561: checking whether $LD is GNU ld" >&5 if eval "test \"`echo '$''{'libc_cv_prog_ld_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1569,7 +1581,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1573: checking for $ac_word" >&5 +echo "configure:1585: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1600,7 +1612,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1604: checking for $ac_word" >&5 +echo "configure:1616: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1631,7 +1643,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1635: checking for $ac_word" >&5 +echo "configure:1647: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1666,7 +1678,7 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1670: checking for $ac_word" >&5 +echo "configure:1682: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1708,7 +1720,7 @@ if test "$BASH" = no; then # Extract the first word of "ksh", so it can be a program name with args. set dummy ksh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1712: checking for $ac_word" >&5 +echo "configure:1724: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1754,7 +1766,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1758: checking for $ac_word" >&5 +echo "configure:1770: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1789,7 +1801,7 @@ test -n "$PERL" || PERL="no" echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6 -echo "configure:1793: checking for signed size_t type" >&5 +echo "configure:1805: 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 @@ -1813,12 +1825,12 @@ EOF fi echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6 -echo "configure:1817: checking for libc-friendly stddef.h" >&5 +echo "configure:1829: 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 1822 "configure" +#line 1834 "configure" #include "confdefs.h" #define __need_size_t #define __need_wchar_t @@ -1833,7 +1845,7 @@ size_t size; wchar_t wchar; if (&size == NULL || &wchar == NULL) abort (); ; return 0; } EOF -if { (eval echo configure:1837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_friendly_stddef=yes else @@ -1852,7 +1864,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:1856: checking whether we need to use -P to assemble .S files" >&5 +echo "configure:1868: 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 @@ -1883,7 +1895,7 @@ if test $ac_cv_prog_gcc = yes; then # We must check this even if -pipe is not given here, because the user # might do `make CFLAGS=-pipe'. echo $ac_n "checking for gcc 2.7.x -pipe bug""... $ac_c" 1>&6 -echo "configure:1887: checking for gcc 2.7.x -pipe bug" >&5 +echo "configure:1899: checking for gcc 2.7.x -pipe bug" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_pipe_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1912,7 +1924,7 @@ else fi echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6 -echo "configure:1916: checking for assembler global-symbol directive" >&5 +echo "configure:1928: 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 @@ -1942,7 +1954,7 @@ EOF fi echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6 -echo "configure:1946: checking for .set assembler directive" >&5 +echo "configure:1958: 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 @@ -1976,7 +1988,7 @@ EOF fi echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6 -echo "configure:1980: checking for .symver assembler directive" >&5 +echo "configure:1992: checking for .symver assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1995,7 +2007,7 @@ fi echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6 echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6 -echo "configure:1999: checking for ld --version-script" >&5 +echo "configure:2011: checking for ld --version-script" >&5 if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2018,7 +2030,7 @@ EOF if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o -nostartfiles -nostdlib -Wl,--version-script,conftest.map - 1>&5'; { (eval echo configure:2022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; + 1>&5'; { (eval echo configure:2034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_ld_version_script_option=yes else @@ -2056,7 +2068,7 @@ if test $VERSIONING = no; then fi if test $elf = yes; then echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6 -echo "configure:2060: checking for .previous assembler directive" >&5 +echo "configure:2072: checking for .previous assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2064,7 +2076,7 @@ else .section foo_section .previous EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_previous_directive=yes else libc_cv_asm_previous_directive=no @@ -2080,7 +2092,7 @@ EOF else echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6 -echo "configure:2084: checking for .popsection assembler directive" >&5 +echo "configure:2096: checking for .popsection assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2088,7 +2100,7 @@ else .pushsection foo_section .popsection EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_popsection_directive=yes else libc_cv_asm_popsection_directive=no @@ -2108,12 +2120,12 @@ fi if test $elf != yes; then echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6 -echo "configure:2112: checking for .init and .fini sections" >&5 +echo "configure:2124: 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 2117 "configure" +#line 2129 "configure" #include "confdefs.h" int main() { @@ -2122,7 +2134,7 @@ asm (".section .init"); asm (".text"); ; return 0; } EOF -if { (eval echo configure:2126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_have_initfini=yes else @@ -2150,19 +2162,19 @@ if test $elf = yes; then else if test $ac_cv_prog_cc_works = yes; then echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6 -echo "configure:2154: checking for _ prefix on C symbol names" >&5 +echo "configure:2166: 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 2159 "configure" +#line 2171 "configure" #include "confdefs.h" asm ("_glibc_foobar:"); int main() { glibc_foobar (); ; return 0; } EOF -if { (eval echo configure:2166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* libc_cv_asm_underscores=yes else @@ -2177,17 +2189,17 @@ fi echo "$ac_t""$libc_cv_asm_underscores" 1>&6 else echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6 -echo "configure:2181: checking for _ prefix on C symbol names" >&5 +echo "configure:2193: 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 2186 "configure" +#line 2198 "configure" #include "confdefs.h" void underscore_test(void) { return; } EOF -if { (eval echo configure:2191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if grep _underscore_test conftest* >/dev/null; then rm -f conftest* libc_cv_asm_underscores=yes @@ -2220,7 +2232,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:2224: checking for assembler .weak directive" >&5 +echo "configure:2236: 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 @@ -2243,7 +2255,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:2247: checking for assembler .weakext directive" >&5 +echo "configure:2259: 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 @@ -2280,7 +2292,7 @@ EOF fi echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6 -echo "configure:2284: checking for ld --no-whole-archive" >&5 +echo "configure:2296: 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 @@ -2291,7 +2303,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest conftest.c 1>&5'; { (eval echo configure:2295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c 1>&5'; { (eval echo configure:2307: \"$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 @@ -2302,7 +2314,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:2306: checking for gcc -fno-exceptions" >&5 +echo "configure:2318: 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 @@ -2313,7 +2325,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -fno-exceptions - -o conftest conftest.c 1>&5'; { (eval echo configure:2317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c 1>&5'; { (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_no_exceptions=yes else libc_cv_gcc_no_exceptions=no @@ -2325,14 +2337,14 @@ echo "$ac_t""$libc_cv_gcc_no_exceptions" 1>&6 if test "$base_machine" = alpha ; then echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6 -echo "configure:2329: checking for function ..ng prefix" >&5 +echo "configure:2341: checking for function ..ng prefix" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<\EOF foo () { } EOF -if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; +if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_alpha_ng_prefix=yes else @@ -2356,12 +2368,12 @@ fi fi echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6 -echo "configure:2360: checking for DWARF2 unwind info support" >&5 +echo "configure:2372: checking for DWARF2 unwind info support" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF -#line 2365 "configure" +#line 2377 "configure" static char __EH_FRAME_BEGIN__; _start () { @@ -2388,7 +2400,7 @@ __bzero () {} EOF if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame_info -nostdlib -nostartfiles - -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_dwarf2_unwind_info=static else libc_cv_gcc_dwarf2_unwind_info=no @@ -2396,7 +2408,7 @@ fi if test $libc_cv_gcc_dwarf2_unwind_info = no; then if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame -nostdlib -nostartfiles - -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_dwarf2_unwind_info=yes else libc_cv_gcc_dwarf2_unwind_info=no @@ -2467,7 +2479,7 @@ if test "$uname" = "sysdeps/generic"; then fi echo $ac_n "checking OS release for uname""... $ac_c" 1>&6 -echo "configure:2471: checking OS release for uname" >&5 +echo "configure:2483: 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 @@ -2489,7 +2501,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:2493: checking OS version for uname" >&5 +echo "configure:2505: 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 @@ -2511,7 +2523,7 @@ else fi echo $ac_n "checking stdio selection""... $ac_c" 1>&6 -echo "configure:2515: checking stdio selection" >&5 +echo "configure:2527: checking stdio selection" >&5 case $stdio in libio) cat >> confdefs.h <<\EOF @@ -2523,7 +2535,7 @@ esac echo "$ac_t""$stdio" 1>&6 echo $ac_n "checking ldap selection""... $ac_c" 1>&6 -echo "configure:2527: checking ldap selection" >&5 +echo "configure:2539: checking ldap selection" >&5 case $add_ons in *ldap*) @@ -2585,7 +2597,7 @@ if test $static = no && test $shared = yes; then fi echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6 -echo "configure:2589: checking whether -fPIC is default" >&5 +echo "configure:2601: checking whether -fPIC is default" >&5 if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index 04a68809a2..0406eacaab 100644 --- a/configure.in +++ b/configure.in @@ -291,7 +291,9 @@ for d in $add_ons_pfx ''; do for b in $base ''; do for m0 in $mach ''; do for v in /$vendor ''; do + test "$v" = / && continue for o in /$ostry ''; do + test "$o" = / && continue for m in $mach ''; do if test "$m0$b$v$o$m"; then try="${d}sysdeps$m0$b$v$o$m" @@ -422,6 +424,18 @@ if test "$INSTALL" = "${srcdir}/install-sh -c"; then fi AC_PROG_LN_S AC_CHECK_PROGS(MSGFMT, msgfmt gmsgfmt, :) +if test "$MSGFMT" != ":"; then +changequote(,)dnl Need [] for regexps. + if $MSGFMT --version 2>&1 | grep 'GNU gettext.*0\.[1-9][0-9]' >/dev/null 2>&1 +changequote([,])dnl + then : # msgfmt from gettext 0.10 or greater, works. + else + AC_MSG_WARN([ +*** (g)msgfmt is too old or wrong version (need gettext 0.10 or better).]) + MSGFMT=":" + fi +fi + AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo) if test "$MAKEINFO"; then changequote(,)dnl Need [] for regexps. diff --git a/db2/README b/db2/README index e497562bef..0793d740be 100644 --- a/db2/README +++ b/db2/README @@ -1,8 +1,8 @@ -When Berkeley DB is distributed as part of the GNU system, the Berkeley -DB license requirement that derivative works using Berkeley DB themselves -be freely redistributable, does not apply to programs loading standard -UNIX interfaces via the GNU C library and dynamically loading Berkeley DB -support to obtain the underlying functionality. +As a special exception, when Berkeley DB is distributed along with the +GNU C Library, in any program which uses the GNU C Library in accord +with that library's distribution terms, it is also permitted for +Berkeley DB to be loaded dynamically by the GNU C Library to implement +standard ISO/IEC 9945 (POSIX 1003) and Unix interface functionality. Sleepycat Software, Inc. diff --git a/elf/Makefile b/elf/Makefile index f45f7b0321..0b37b1f449 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -60,6 +60,9 @@ install-bin = ldd generated += ldd endif +others = sprof +install-bin = sprof + ifeq (yes,$(has-ldconfig)) others-static += ldconfig others += ldconfig @@ -178,6 +181,12 @@ $(objpfx)ldd: ldd.bash.in $(common-objpfx)version.mk \ chmod 555 $@.new mv -f $@.new $@ endif + +ifeq ($(build-shared),yes) +$(objpfx)sprof: $(objpfx)libdl.so$(libdl.so-version) +else +$(objpfx)sprof: $(objpfx)libdl.a +endif # muwahaha diff --git a/elf/dl-open.c b/elf/dl-open.c index c97321edf0..c5a5fde285 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -133,6 +133,7 @@ _dl_open (const char *file, int mode) _dl_global_scope[3] = new; _dl_global_scope[4] = NULL; _dl_global_scope[5] = NULL; + _dl_global_scope_end = &_dl_global_scope [4]; } else { diff --git a/elf/sprof.c b/elf/sprof.c new file mode 100644 index 0000000000..0d50806126 --- /dev/null +++ b/elf/sprof.c @@ -0,0 +1,937 @@ +/* Read and display shared object profiling data. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + + 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 <argp.h> +#include <dlfcn.h> +#include <elf.h> +#include <endian.h> +#include <error.h> +#include <fcntl.h> +#include <inttypes.h> +#include <libintl.h> +#include <link.h> +#include <locale.h> +#include <obstack.h> +#include <search.h> +#include <stab.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <sys/gmon.h> +#include <sys/gmon_out.h> +#include <sys/mman.h> +#include <sys/param.h> +#include <sys/stat.h> + +/* Undefine the following line line in the production version. */ +/* #define _NDEBUG 1 */ +#include <assert.h> + +/* Get libc version number. */ +#include "../version.h" + +#define PACKAGE _libc_intl_domainname + + +#include <endian.h> +#if BYTE_ORDER == BIG_ENDIAN +#define byteorder ELFDATA2MSB +#define byteorder_name "big-endian" +#elif BYTE_ORDER == LITTLE_ENDIAN +#define byteorder ELFDATA2LSB +#define byteorder_name "little-endian" +#else +#error "Unknown BYTE_ORDER " BYTE_ORDER +#define byteorder ELFDATANONE +#endif + + +extern int __profile_frequency __P ((void)); + +/* Name and version of program. */ +static void print_version (FILE *stream, struct argp_state *state); +void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; + +#define OPT_COUNT_TOTAL 1 +#define OPT_TEST 2 + +/* Definitions of arguments for argp functions. */ +static const struct argp_option options[] = +{ + { NULL, 0, NULL, 0, N_("Output selection:") }, + { "count-total", OPT_COUNT_TOTAL, NULL, 0, + N_("print number of invocations for each function") }, + { "test", OPT_TEST, NULL, OPTION_HIDDEN, NULL }, + { NULL, 0, NULL, 0, NULL } +}; + +/* Short description of program. */ +static const char doc[] = N_("Read and display shared object profiling data"); + +/* Strings for arguments in help texts. */ +static const char args_doc[] = N_("SHOBJ [PROFDATA]"); + +/* Prototype for option handler. */ +static error_t parse_opt (int key, char *arg, struct argp_state *state); + +/* Data structure to communicate with argp functions. */ +static struct argp argp = +{ + options, parse_opt, args_doc, doc, NULL, NULL +}; + + +/* Operation modes. */ +static enum +{ + NONE = 0, + COUNT_TOTAL +} mode; + +/* If nonzero the total number of invocations of a function is emitted. */ +int count_total; + +/* Nozero for testing. */ +int do_test; + +/* Strcuture describing calls. */ +struct here_fromstruct + { + struct here_cg_arc_record volatile *here; + uint16_t link; + }; + +/* We define a special type to address the elements of the arc table. + This is basically the `gmon_cg_arc_record' format but it includes + the room for the tag and it uses real types. */ +struct here_cg_arc_record + { + uintptr_t from_pc; + uintptr_t self_pc; + uint32_t count; + } __attribute__ ((packed)); + +/* Information about the stab debugging info. This should be in a + head but it is not. */ +#define STRDXOFF (0) +#define TYPEOFF (4) +#define OTHEROFF (5) +#define DESCOFF (6) +#define VALOFF (8) +#define STABSIZE (12) + + +struct known_symbol +{ + const char *name; + uintptr_t addr; + size_t size; +}; + + +struct shobj +{ + const char *name; /* User-provided name. */ + + struct link_map *map; + const char *strtab; /* String table of shared object. */ + const char *soname; /* Soname of shared object. */ + + uintptr_t lowpc; + uintptr_t highpc; + unsigned long int kcountsize; + size_t expected_size; /* Expected size of profiling file. */ + size_t tossize; + size_t fromssize; + size_t fromlimit; + unsigned int hashfraction; + int s_scale; + + void *stab_map; + size_t stab_mapsize; + const char *stab; + size_t stab_size; + const char *stabstr; + size_t stabstr_size; + + struct obstack ob_str; + struct obstack ob_sym; +}; + + +struct profdata +{ + void *addr; + off_t size; + + char *hist; + uint16_t *kcount; + uint32_t narcs; /* Number of arcs in toset. */ + struct here_cg_arc_record *data; + uint16_t *tos; + struct here_fromstruct *froms; +}; + +/* Search tree for symbols. */ +void *symroot; +static const struct known_symbol **sortsym; +static size_t symidx; + +/* Prototypes for local functions. */ +static struct shobj *load_shobj (const char *name); +static void unload_shobj (struct shobj *shobj); +static struct profdata *load_profdata (const char *name, struct shobj *shobj); +static void unload_profdata (struct profdata *profdata); +static void count_total_ticks (struct shobj *shobj, struct profdata *profdata); +static void read_symbols (struct shobj *shobj); + + +int +main (int argc, char *argv[]) +{ + const char *shobj; + const char *profdata; + struct shobj *shobj_handle; + struct profdata *profdata_handle; + int remaining; + + setlocale (LC_ALL, ""); + + /* Initialize the message catalog. */ + textdomain (_libc_intl_domainname); + + /* Parse and process arguments. */ + argp_parse (&argp, argc, argv, 0, &remaining, NULL); + + if (argc - remaining == 0 || argc - remaining > 2) + { + /* We need exactly two non-option parameter. */ + argp_help (&argp, stdout, ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR, + program_invocation_short_name); + exit (1); + } + + /* Get parameters. */ + shobj = argv[remaining]; + if (argc - remaining == 2) + profdata = argv[remaining + 1]; + else + /* No filename for the profiling data given. We will determine it + from the soname of the shobj, later. */ + profdata = NULL; + + /* First see whether we can load the shared object. */ + shobj_handle = load_shobj (shobj); + if (shobj_handle == NULL) + exit (1); + + /* We can now determine the filename for the profiling data, if + nececessary. */ + if (profdata == NULL) + { + char *newp; + + if (shobj_handle->soname == NULL) + { + unload_shobj (shobj_handle); + + error (EXIT_FAILURE, 0, _("\ +no filename for profiling data given and shared object `%s' has no soname"), + shobj); + } + + newp = (char *) alloca (strlen (shobj_handle->soname) + + sizeof ".profile"); + stpcpy (stpcpy (newp, shobj_handle->soname), ".profile"); + profdata = newp; + } + + /* Now see whether the profiling data file matches the given object. */ + profdata_handle = load_profdata (profdata, shobj_handle); + if (profdata_handle == NULL) + { + unload_shobj (shobj_handle); + + exit (1); + } + + read_symbols (shobj_handle); + + /* Do some work. */ + switch (mode) + { + case COUNT_TOTAL: + count_total_ticks (shobj_handle, profdata_handle); + break; + case NONE: + /* Do nothing. */ + break; + default: + assert (! "Internal error"); + } + + /* Free the resources. */ + unload_shobj (shobj_handle); + unload_profdata (profdata_handle); + + return 0; +} + + +/* Handle program arguments. */ +static error_t +parse_opt (int key, char *arg, struct argp_state *state) +{ + switch (key) + { + case OPT_COUNT_TOTAL: + mode = COUNT_TOTAL; + break; + case OPT_TEST: + do_test = 1; + break; + default: + return ARGP_ERR_UNKNOWN; + } + return 0; +} + + +/* Print the version information. */ +static void +print_version (FILE *stream, struct argp_state *state) +{ + fprintf (stream, "sprof (GNU %s) %s\n", PACKAGE, VERSION); + fprintf (stream, gettext ("\ +Copyright (C) %s Free Software Foundation, Inc.\n\ +This is free software; see the source for copying conditions. There is NO\n\ +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ +"), + "1997, 1998"); + fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); +} + + +/* Note that we must not use `dlopen' etc. The shobj object must not + be loaded for use. */ +static struct shobj * +load_shobj (const char *name) +{ + struct link_map *map = NULL; + struct shobj *result; + ElfW(Addr) mapstart = ~((ElfW(Addr)) 0); + ElfW(Addr) mapend = 0; + const ElfW(Phdr) *ph; + size_t textsize; + unsigned int log_hashfraction; + ElfW(Ehdr) *ehdr; + int fd; + ElfW(Shdr) *shdr; + void *ptr; + size_t pagesize = getpagesize (); + const char *shstrtab; + int idx; + ElfW(Shdr) *stab_entry; + ElfW(Shdr) *stabstr_entry; + + /* Since we use dlopen() we must be prepared to work around the sometimes + strange lookup rules for the shared objects. If we have a file foo.so + in the current directory and the user specfies foo.so on the command + line (without specifying a directory) we should load the file in the + current directory even if a normal dlopen() call would read the other + file. We do this by adding a directory portion to the name. */ + if (strchr (name, '/') == NULL) + { + char *load_name = (char *) alloca (strlen (name) + 3); + stpcpy (stpcpy (load_name, "./"), name); + + map = (struct link_map *) dlopen (load_name, RTLD_LAZY); + } + if (map == NULL) + { + map = (struct link_map *) dlopen (name, RTLD_LAZY); + if (map == NULL) + { + error (0, errno, _("failed to load shared object `%s'"), name); + return NULL; + } + } + + /* Prepare the result. */ + result = (struct shobj *) calloc (1, sizeof (struct shobj)); + if (result == NULL) + { + error (0, errno, _("cannot create internal descriptors")); + dlclose (map); + return NULL; + } + result->name = name; + result->map = map; + + /* Compute the size of the sections which contain program code. + This must match the code in dl-profile.c (_dl_start_profile). */ + for (ph = map->l_phdr; ph < &map->l_phdr[map->l_phnum]; ++ph) + if (ph->p_type == PT_LOAD && (ph->p_flags & PF_X)) + { + ElfW(Addr) start = (ph->p_vaddr & ~(_dl_pagesize - 1)); + ElfW(Addr) end = ((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1) + & ~(_dl_pagesize - 1)); + + if (start < mapstart) + mapstart = start; + if (end > mapend) + mapend = end; + } + + result->lowpc = ROUNDDOWN ((uintptr_t) (mapstart + map->l_addr), + HISTFRACTION * sizeof (HISTCOUNTER)); + result->highpc = ROUNDUP ((uintptr_t) (mapend + map->l_addr), + HISTFRACTION * sizeof (HISTCOUNTER)); + if (do_test) + printf ("load addr: %0#*" PRIxPTR "\n" + "lower bound PC: %0#*" PRIxPTR "\n" + "upper bound PC: %0#*" PRIxPTR "\n", + __ELF_NATIVE_CLASS == 32 ? 10 : 18, map->l_addr, + __ELF_NATIVE_CLASS == 32 ? 10 : 18, result->lowpc, + __ELF_NATIVE_CLASS == 32 ? 10 : 18, result->highpc); + + textsize = result->highpc - result->lowpc; + result->kcountsize = textsize / HISTFRACTION; + result->hashfraction = HASHFRACTION; + if ((HASHFRACTION & (HASHFRACTION - 1)) == 0) + /* If HASHFRACTION is a power of two, mcount can use shifting + instead of integer division. Precompute shift amount. */ + log_hashfraction = __builtin_ffs (result->hashfraction + * sizeof (struct here_fromstruct)) - 1; + else + log_hashfraction = -1; + if (do_test) + printf ("hashfraction = %d\ndivider = %d\n", + result->hashfraction, + result->hashfraction * sizeof (struct here_fromstruct)); + result->tossize = textsize / HASHFRACTION; + result->fromlimit = textsize * ARCDENSITY / 100; + if (result->fromlimit < MINARCS) + result->fromlimit = MINARCS; + if (result->fromlimit > MAXARCS) + result->fromlimit = MAXARCS; + result->fromssize = result->fromlimit * sizeof (struct here_fromstruct); + + result->expected_size = (sizeof (struct gmon_hdr) + + 4 + sizeof (struct gmon_hist_hdr) + + result->kcountsize + + 4 + 4 + + (result->fromssize + * sizeof (struct here_cg_arc_record))); + + if (do_test) + { +#define SCALE_1_TO_1 0x10000L + + printf ("expected size: %Zd\n", result->expected_size); + + if (result->kcountsize < result->highpc - result->lowpc) + { + size_t range = result->highpc - result->lowpc; + size_t quot = range / result->kcountsize; + + if (quot >= SCALE_1_TO_1) + result->s_scale = 1; + else if (quot >= SCALE_1_TO_1 / 256) + result->s_scale = SCALE_1_TO_1 / quot; + else if (range > ULONG_MAX / 256) + result->s_scale = ((SCALE_1_TO_1 * 256) + / (range / (result->kcountsize / 256))); + else + result->s_scale = ((SCALE_1_TO_1 * 256) + / ((range * 256) / result->kcountsize)); + } + else + result->s_scale = SCALE_1_TO_1; + + printf ("s_scale: %d\n", result->s_scale); + } + + /* Determine the string table. */ + if (map->l_info[DT_STRTAB] == NULL) + result->strtab = NULL; + else + result->strtab = (const char *) (map->l_addr + + map->l_info[DT_STRTAB]->d_un.d_ptr); + if (do_test) + printf ("string table: %p\n", result->strtab); + + /* Determine the soname. */ + if (map->l_info[DT_SONAME] == NULL) + result->soname = NULL; + else + result->soname = result->strtab + map->l_info[DT_SONAME]->d_un.d_val; + if (do_test) + printf ("soname: %s\n", result->soname); + + /* Now the hard part, we have to load the debugging data. For now + we support stabs only. + + First load the section header table. */ + ehdr = (ElfW(Ehdr) *) map->l_addr; + + /* Make sure we are on the right party. */ + if (ehdr->e_shentsize != sizeof (ElfW(Shdr))) + abort (); + + /* And we need the shared object file descriptor again. */ + fd = open (map->l_name, O_RDONLY); + if (fd == -1) + /* Dooh, this really shouldn't happen. We know the file is available. */ + error (EXIT_FAILURE, errno, _("Reopening shared object `%s' failed")); + + /* Now map the section header. */ + ptr = mmap (NULL, (ehdr->e_phnum * sizeof (ElfW(Shdr)) + + (ehdr->e_shoff & (pagesize - 1))), PROT_READ, + MAP_SHARED|MAP_FILE, fd, ehdr->e_shoff & ~(pagesize - 1)); + if (ptr == MAP_FAILED) + error (EXIT_FAILURE, errno, _("mapping of section headers failed")); + shdr = (ElfW(Shdr) *) ((char *) ptr + (ehdr->e_shoff & (pagesize - 1))); + + /* Get the section header string table. */ + ptr = mmap (NULL, (shdr[ehdr->e_shstrndx].sh_size + + (shdr[ehdr->e_shstrndx].sh_offset & (pagesize - 1))), + PROT_READ, MAP_SHARED|MAP_FILE, fd, + shdr[ehdr->e_shstrndx].sh_offset & ~(pagesize - 1)); + if (ptr == MAP_FAILED) + error (EXIT_FAILURE, errno, + _("mapping of section header string table failed")); + shstrtab = ((const char *) ptr + + (shdr[ehdr->e_shstrndx].sh_offset & (pagesize - 1))); + + /* Search for the ".stab" and ".stabstr" section (and ".rel.stab" ?). */ + stab_entry = NULL; + stabstr_entry = NULL; + for (idx = 0; idx < ehdr->e_shnum; ++idx) + /* We only have to look for sections which are not loaded. */ + if (shdr[idx].sh_addr == 0) + { + if (strcmp (shstrtab + shdr[idx].sh_name, ".stab") == 0) + stab_entry = &shdr[idx]; + else if (strcmp (shstrtab + shdr[idx].sh_name, ".stabstr") == 0) + stabstr_entry = &shdr[idx]; + } + + /* We don't need the sectin header string table anymore. */ + munmap (ptr, (shdr[ehdr->e_shstrndx].sh_size + + (shdr[ehdr->e_shstrndx].sh_offset & (pagesize - 1)))); + + if (stab_entry == NULL || stabstr_entry == NULL) + { + fprintf (stderr, _("\ +*** The file `%s' is stripped: no detailed analysis possible\n"), + name); + result->stab = NULL; + result->stabstr = NULL; + } + else + { + if (stab_entry->sh_offset + stab_entry->sh_size + != stabstr_entry->sh_offset) + abort (); + if (stab_entry->sh_size % STABSIZE != 0) + abort (); + + result->stab_map = mmap (NULL, (stab_entry->sh_size + + stabstr_entry->sh_size + + (stab_entry->sh_offset + & (pagesize - 1))), + PROT_READ, MAP_SHARED|MAP_FILE, fd, + stab_entry->sh_offset & ~(pagesize - 1)); + if (result->stab_map == NULL) + error (EXIT_FAILURE, errno, _("failed to load stab data:")); + + result->stab = ((const char *) result->stab_map + + (stab_entry->sh_offset & (pagesize - 1))); + result->stab_size = stab_entry->sh_size; + result->stabstr = result->stab + stab_entry->sh_size; + result->stabstr_size = stabstr_entry->sh_size; + result->stab_mapsize = (stab_entry->sh_size + stabstr_entry->sh_size + + (stab_entry->sh_offset & (pagesize - 1))); + } + + /* Now we also don't need the sectio header table anymore. */ + munmap ((char *) shdr - (ehdr->e_shoff & (pagesize - 1)), + (ehdr->e_phnum * sizeof (ElfW(Shdr)) + + (ehdr->e_shoff & (pagesize - 1)))); + + /* Free the descriptor for the shared object. */ + close (fd); + + return result; +} + + +static void +unload_shobj (struct shobj *shobj) +{ + munmap (shobj->stab_map, shobj->stab_mapsize); + dlclose (shobj->map); +} + + +static struct profdata * +load_profdata (const char *name, struct shobj *shobj) +{ + struct profdata *result; + int fd; + struct stat st; + void *addr; + struct gmon_hdr gmon_hdr; + struct gmon_hist_hdr hist_hdr; + uint32_t *narcsp; + size_t fromlimit; + struct here_cg_arc_record *data; + struct here_fromstruct *froms; + uint16_t *tos; + size_t fromidx; + size_t idx; + + fd = open (name, O_RDONLY); + if (fd == -1) + { + char *ext_name; + + if (errno != ENOENT || strchr (name, '/') != NULL) + /* The file exists but we are not allowed to read it or the + file does not exist and the name includes a path + specification.. */ + return NULL; + + /* A file with the given name does not exist in the current + directory, try it in the default location where the profiling + files are created. */ + ext_name = (char *) alloca (strlen (name) + sizeof "/var/tmp/"); + stpcpy (stpcpy (ext_name, "/var/tmp/"), name); + name = ext_name; + + fd = open (ext_name, O_RDONLY); + if (fd == -1) + { + /* Even this file does not exist. */ + error (0, errno, _("cannot load profiling data")); + return NULL; + } + } + + /* We have found the file, now make sure it is the right one for the + data file. */ + if (fstat (fd, &st) < 0) + { + error (0, errno, _("while stat'ing profiling data file")); + close (fd); + return NULL; + } + + if (st.st_size != shobj->expected_size) + { + error (0, 0, _("profiling data file `%s' does match shared object `%s'"), + name, shobj->name); + close (fd); + return NULL; + } + + /* The data file is most probably the right one for our shared + object. Map it now. */ + addr = mmap (NULL, st.st_size, PROT_READ, MAP_SHARED|MAP_FILE, fd, 0); + if (addr == MAP_FAILED) + { + error (0, errno, _("failed to mmap the profiling data file")); + close (fd); + return NULL; + } + + /* We don't need the file desriptor anymore. */ + if (close (fd) < 0) + { + error (0, errno, _("error while closing the profiling data file")); + munmap (addr, st.st_size); + return NULL; + } + + /* Prepare the result. */ + result = (struct profdata *) calloc (1, sizeof (struct profdata)); + if (result == NULL) + { + error (0, errno, _("cannot create internal descriptor")); + munmap (addr, st.st_size); + return NULL; + } + + /* Store the address and size so that we can later free the resources. */ + result->addr = addr; + result->size = st.st_size; + + /* Pointer to data after the header. */ + result->hist = (char *) ((struct gmon_hdr *) addr + 1); + result->kcount = (uint16_t *) ((char *) result->hist + sizeof (uint32_t) + + sizeof (struct gmon_hist_hdr)); + + /* Compute pointer to array of the arc information. */ + narcsp = (uint32_t *) ((char *) result->kcount + shobj->kcountsize + + sizeof (uint32_t)); + result->narcs = *narcsp; + result->data = (struct here_cg_arc_record *) ((char *) narcsp + + sizeof (uint32_t)); + + /* Create the gmon_hdr we expect or write. */ + memset (&gmon_hdr, '\0', sizeof (struct gmon_hdr)); + memcpy (&gmon_hdr.cookie[0], GMON_MAGIC, sizeof (gmon_hdr.cookie)); + *(int32_t *) gmon_hdr.version = GMON_SHOBJ_VERSION; + + /* Create the hist_hdr we expect or write. */ + *(char **) hist_hdr.low_pc = (char *) shobj->lowpc - shobj->map->l_addr; + *(char **) hist_hdr.high_pc = (char *) shobj->highpc - shobj->map->l_addr; + if (do_test) + printf ("low_pc = %p\nhigh_pc = %p\n", + hist_hdr.low_pc, hist_hdr.high_pc); + *(int32_t *) hist_hdr.hist_size = shobj->kcountsize / sizeof (HISTCOUNTER); + *(int32_t *) hist_hdr.prof_rate = __profile_frequency (); + strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen)); + hist_hdr.dimen_abbrev = 's'; + + /* Test whether the header of the profiling data is ok. */ + if (memcmp (addr, &gmon_hdr, sizeof (struct gmon_hdr)) != 0 + || *(uint32_t *) result->hist != GMON_TAG_TIME_HIST + || memcmp (result->hist + sizeof (uint32_t), &hist_hdr, + sizeof (struct gmon_hist_hdr)) != 0 + || narcsp[-1] != GMON_TAG_CG_ARC) + { + free (result); + error (0, 0, _("`%s' is no correct profile data file for `%s'"), + name, shobj->name); + munmap (addr, st.st_size); + return NULL; + } + + /* We are pretty sure now that this is a correct input file. Set up + the remaining information in the result structure and return. */ + result->tos = (uint16_t *) calloc (shobj->tossize + shobj->fromssize, 1); + if (result->tos == NULL) + { + error (0, errno, _("cannot create internal descriptor")); + munmap (addr, st.st_size); + free (result); + return NULL; + } + + result->froms = (struct here_fromstruct *) ((char *) result->tos + + shobj->tossize); + fromidx = 0; + + /* Now we have to process all the arc count entries. */ + fromlimit = shobj->fromlimit; + data = result->data; + froms = result->froms; + tos = result->tos; + for (idx = 0; idx < MIN (*narcsp, fromlimit); ++idx) + { + size_t to_index; + size_t newfromidx; + to_index = (data[idx].self_pc / (shobj->hashfraction * sizeof (*tos))); + newfromidx = fromidx++; + froms[newfromidx].here = &data[idx]; + froms[newfromidx].link = tos[to_index]; + tos[to_index] = newfromidx; + } + + return result; +} + + +static void +unload_profdata (struct profdata *profdata) +{ + free (profdata->tos); + munmap (profdata->addr, profdata->size); + free (profdata); +} + + +static void +count_total_ticks (struct shobj *shobj, struct profdata *profdata) +{ + volatile uint16_t *kcount = profdata->kcount; + uint64_t sum = 0; + size_t idx; + size_t factor = 2 * (65536 / shobj->s_scale); + + for (idx = shobj->kcountsize / sizeof (*kcount); idx > 0; ) + { + --idx; + if (kcount[idx] != 0) + { + size_t n; + + for (n = 0; n < symidx; ++n) + if (sortsym[n]->addr <= factor * idx + && sortsym[n]->addr + sortsym[n]->size > factor * idx) + break; + + if (n < symidx) + printf ("idx = %d, count = %d, name = %s\n", idx, kcount[idx], + sortsym[n]->name); + else + printf ("idx = %d, N/A\n", idx); + } + sum += kcount[idx]; + } + + printf ("total ticks: %10" PRId64 "\n", sum); +} + + +static int +symorder (const void *o1, const void *o2) +{ + const struct known_symbol *p1 = (struct known_symbol *) o1; + const struct known_symbol *p2 = (struct known_symbol *) o2; + + return p1->addr - p2->addr; +} + + +static void +printsym (const void *node, VISIT value, int level) +{ + if (value == leaf || value == postorder) + { + const struct known_symbol *sym = *(const struct known_symbol **) node; + + printf ("Name: %30s, Start: %6x, Len: %5d\n", + sym->name, sym->addr, sym->size); + + sortsym[symidx++] = sym; + } +} + + +static void +read_symbols (struct shobj *shobj) +{ + void *load_addr = (void *) shobj->map->l_addr; + int n = 0; + int idx; + const char *last_name = NULL; + uintptr_t last_addr = 0; + + /* Initialize the obstacks. */ +#define obstack_chunk_alloc malloc +#define obstack_chunk_free free + obstack_init (&shobj->ob_str); + obstack_init (&shobj->ob_sym); + + /* Process the stabs. */ + for (idx = 0; idx < shobj->stab_size; idx += 12) + if (*(shobj->stab + idx + TYPEOFF) == N_FUN) + { + const char *str = (shobj->stabstr + + *((uint32_t *) (shobj->stab + idx + STRDXOFF))); + + if (*str != '\0') + { + last_name = str; + last_addr = *((uint32_t *) (shobj->stab + idx + VALOFF)); + } + else + { + const char *endp; + char *name0; + struct known_symbol *newsym; + + if (last_name == NULL) + abort (); + + endp = strchr (last_name, ':'); + + name0 = (char *) obstack_copy0 (&shobj->ob_str, last_name, + endp - last_name); + if (name0 != NULL) + newsym = + (struct known_symbol *) obstack_alloc (&shobj->ob_sym, + sizeof (*newsym)); + else + /* Keep the stupid compiler happy. */ + newsym = NULL; + if (name0 == NULL || newsym == NULL) + error (EXIT_FAILURE, errno, _("cannot allocate symbol data")); + + newsym->name = name0; + newsym->addr = last_addr; + newsym->size = *((uint32_t *) (shobj->stab + idx + VALOFF)); + + tsearch (newsym, &symroot, symorder); + ++n; + + last_name = NULL; + last_addr = 0; + } + } + + if (shobj->stab == NULL) + { + /* Blarg, the binary is stripped. We have to rely on the + information contained in the dynamic section of the object. */ + const ElfW(Sym) *symtab = (load_addr + + shobj->map->l_info[DT_SYMTAB]->d_un.d_ptr); + const char *strtab = (load_addr + + shobj->map->l_info[DT_STRTAB]->d_un.d_ptr); + + /* We assume that the string table follows the symbol table, + because there is no way in ELF to know the size of the + dynamic symbol table!! */ + while ((void *) symtab < (void *) strtab) + { + if (/*(ELFW(ST_TYPE)(symtab->st_info) == STT_FUNC + || ELFW(ST_TYPE)(symtab->st_info) == STT_NOTYPE) + &&*/ symtab->st_size != 0) + { + struct known_symbol *newsym; + + newsym = + (struct known_symbol *) obstack_alloc (&shobj->ob_sym, + sizeof (*newsym)); + if (newsym == NULL) + error (EXIT_FAILURE, errno, _("cannot allocate symbol data")); + + newsym->name = &strtab[symtab->st_name]; + newsym->addr = symtab->st_value; + newsym->size = symtab->st_size; + + tsearch (newsym, &symroot, symorder); + ++n; + } + } + + ++symtab; + } + + sortsym = malloc (n * sizeof (struct known_symbol *)); + if (sortsym == NULL) + abort (); + + twalk (symroot, printsym); +} diff --git a/math/libm.map b/math/libm.map index 8bf62642a4..9220171ae5 100644 --- a/math/libm.map +++ b/math/libm.map @@ -60,7 +60,7 @@ GLIBC_2.0 { _LIB_VERSION; signgam; # functions used in inline functions or macros - __log1p; + __log1p; __atan2; local: *; diff --git a/misc/syslog.c b/misc/syslog.c index 0373ee1241..090926a2c5 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -270,6 +270,7 @@ openlog_internal(const char *ident, int logstat, int logfac) } } else connected = 1; + } break; } } diff --git a/stdlib/a64l.c b/stdlib/a64l.c index d1dd3a9b6b..eb1eef5cbf 100644 --- a/stdlib/a64l.c +++ b/stdlib/a64l.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. @@ -19,36 +19,47 @@ #include <stdlib.h> +#define TABLE_BASE 0x20 +#define TABLE_SIZE 0x60 + +#define XX ((char)0x40) + + +static const char a64l_table[TABLE_SIZE] = +{ + /* 0x20 */ XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, 0, 1, + /* 0x30 */ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, XX, XX, XX, XX, XX, XX, + /* 0x40 */ XX, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + /* 0x50 */ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, XX, XX, XX, XX, XX, + /* 0x60 */ XX, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + /* 0x70 */ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, XX, XX, XX, XX, XX +}; + + long int a64l (string) const char *string; { - size_t cnt; - unsigned long int result = 0l; + const char *ptr = string; + unsigned long int result = 0ul; + const char *end = ptr + 6; - for (cnt = 0; cnt < 6; ++cnt) + do { + unsigned index; + unsigned value; + + index = *ptr - TABLE_BASE; + if ((unsigned int) index >= TABLE_SIZE) + break; + value = (int) a64l_table[index]; + if (value == (int) XX) + break; result <<= 6; - switch (string[cnt]) - { - case '.': - break; - case '/': - result |= 1; - break; - case '0' ... '9': - result |= 2 + string[cnt] - '0'; - break; - case 'A' ... 'Z': - result |= 12 + string[cnt] - 'A'; - break; - case 'a' ... 'z': - result |= 38 + string[cnt] - 'a'; - break; - default: - return result >> 6; - } + ++ptr; + result |= value; } + while (ptr != end); return (long int) result; } diff --git a/sysdeps/i386/add_n.S b/sysdeps/i386/add_n.S index a93e2899a7..8bf1512087 100644 --- a/sysdeps/i386/add_n.S +++ b/sysdeps/i386/add_n.S @@ -1,6 +1,6 @@ /* Add two limb vectors of the same length > 0 and store sum in a third limb vector. - Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 95, 97, 98 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -29,11 +29,8 @@ #include "sysdep.h" #include "asm-syntax.h" -.text - ALIGN (3) - .globl C_SYMBOL_NAME(__mpn_add_n) - ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_add_n),@function) -C_SYMBOL_NAME(__mpn_add_n:) + .text +ENTRY(__mpn_add_n) pushl %edi pushl %esi @@ -103,5 +100,4 @@ L(oop): movl (%esi),%eax popl %esi popl %edi ret - - ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_add_n)) +END(__mpn_add_n) diff --git a/sysdeps/i386/addmul_1.S b/sysdeps/i386/addmul_1.S index 7116c1646d..d7df5270c3 100644 --- a/sysdeps/i386/addmul_1.S +++ b/sysdeps/i386/addmul_1.S @@ -1,6 +1,6 @@ /* i80386 __mpn_addmul_1 -- Multiply a limb vector with a limb and add the result to a second limb vector. - Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1994, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -34,11 +34,8 @@ #define sizeP ecx #define s2_limb ebp - TEXT - ALIGN (3) - GLOBL C_SYMBOL_NAME(__mpn_addmul_1) - ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1),@function) -C_SYMBOL_NAME(__mpn_addmul_1:) + .text +ENTRY(__mpn_addmul_1) INSN1(push,l ,R(edi)) INSN1(push,l ,R(esi)) @@ -73,5 +70,4 @@ L(oop): INSN1(pop,l ,R(esi)) INSN1(pop,l ,R(edi)) ret - - ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1)) +END(__mpn_addmul_1) diff --git a/sysdeps/i386/i586/add_n.S b/sysdeps/i386/i586/add_n.S index 6d86027b1f..8b4130b415 100644 --- a/sysdeps/i386/i586/add_n.S +++ b/sysdeps/i386/i586/add_n.S @@ -1,6 +1,6 @@ /* Pentium __mpn_add_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. - Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -29,10 +29,8 @@ #include "sysdep.h" #include "asm-syntax.h" -.text - ALIGN (3) - .globl C_SYMBOL_NAME(__mpn_add_n) -C_SYMBOL_NAME(__mpn_add_n:) + .text +ENTRY(__mpn_add_n) pushl %edi pushl %esi pushl %ebx @@ -126,3 +124,4 @@ L(end2): popl %esi popl %edi ret +END(__mpn_add_n) diff --git a/sysdeps/i386/i586/addmul_1.S b/sysdeps/i386/i586/addmul_1.S index 0d410f6ac3..b97799f387 100644 --- a/sysdeps/i386/i586/addmul_1.S +++ b/sysdeps/i386/i586/addmul_1.S @@ -1,6 +1,6 @@ /* Pentium __mpn_addmul_1 -- Multiply a limb vector with a limb and add the result to a second limb vector. - Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -34,10 +34,8 @@ #define size ecx #define s2_limb ebp - TEXT - ALIGN (3) - GLOBL C_SYMBOL_NAME(__mpn_addmul_1) -C_SYMBOL_NAME(__mpn_addmul_1:) + .text +ENRTY(__mpn_addmul_1) INSN1(push,l ,R(edi)) INSN1(push,l ,R(esi)) @@ -79,3 +77,5 @@ L(oop): INSN2(adc,l ,R(ebx),$0) INSN1(pop,l ,R(esi)) INSN1(pop,l ,R(edi)) ret +#undef size +END(__mpn_addmul_1) diff --git a/sysdeps/i386/i586/lshift.S b/sysdeps/i386/i586/lshift.S index 1d72fc901e..22dc03ea65 100644 --- a/sysdeps/i386/i586/lshift.S +++ b/sysdeps/i386/i586/lshift.S @@ -1,5 +1,5 @@ /* Pentium optimized __mpn_lshift -- - Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 95, 96, 97, 98 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 @@ -29,9 +29,7 @@ #include "asm-syntax.h" .text - ALIGN (3) - .globl C_SYMBOL_NAME(__mpn_lshift) -C_SYMBOL_NAME(__mpn_lshift:) +ENTRY(__mpn_lshift) pushl %edi pushl %esi pushl %ebx @@ -219,3 +217,4 @@ L(L1): movl %edx,(%edi) /* store last limb */ popl %esi popl %edi ret +END(__mpn_lshift) diff --git a/sysdeps/i386/i586/mul_1.S b/sysdeps/i386/i586/mul_1.S index 905e65cb58..e2f7f6ce6c 100644 --- a/sysdeps/i386/i586/mul_1.S +++ b/sysdeps/i386/i586/mul_1.S @@ -1,6 +1,6 @@ /* Pentium __mpn_mul_1 -- Multiply a limb vector with a limb and store the result in a second limb vector. - Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -34,10 +34,8 @@ #define size ecx #define s2_limb ebp - TEXT - ALIGN (3) - GLOBL C_SYMBOL_NAME(__mpn_mul_1) -C_SYMBOL_NAME(__mpn_mul_1:) + .text +ENTRY(__mpn_mul_1) INSN1(push,l ,R(edi)) INSN1(push,l ,R(esi)) @@ -75,3 +73,5 @@ L(oop): INSN2(adc,l ,R(ebx),$0) INSN1(pop,l ,R(esi)) INSN1(pop,l ,R(edi)) ret +#undef size +END(__mpn_mul_1) diff --git a/sysdeps/i386/i586/rshift.S b/sysdeps/i386/i586/rshift.S index 14ffbb8454..64e4047642 100644 --- a/sysdeps/i386/i586/rshift.S +++ b/sysdeps/i386/i586/rshift.S @@ -1,5 +1,5 @@ /* Pentium optimized __mpn_rshift -- - Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -29,9 +29,7 @@ #include "asm-syntax.h" .text - ALIGN (3) - .globl C_SYMBOL_NAME(__mpn_rshift) -C_SYMBOL_NAME(__mpn_rshift:) +ENTRY(__mpn_rshift) pushl %edi pushl %esi pushl %ebx @@ -219,3 +217,4 @@ L(L1): movl %edx,(%edi) /* store last limb */ popl %esi popl %edi ret +END(__mpn_rshift) diff --git a/sysdeps/i386/i586/sub_n.S b/sysdeps/i386/i586/sub_n.S index 758fa86bd3..03c85d9aa6 100644 --- a/sysdeps/i386/i586/sub_n.S +++ b/sysdeps/i386/i586/sub_n.S @@ -1,6 +1,6 @@ /* Pentium __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store difference in a third limb vector. - Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -29,10 +29,8 @@ #include "sysdep.h" #include "asm-syntax.h" -.text - ALIGN (3) - .globl C_SYMBOL_NAME(__mpn_sub_n) -C_SYMBOL_NAME(__mpn_sub_n:) + .text +ENTRY(__mpn_sub_n) pushl %edi pushl %esi pushl %ebx @@ -126,3 +124,4 @@ L(end2): popl %esi popl %edi ret +END(__mpn_sub_n) diff --git a/sysdeps/i386/i586/submul_1.S b/sysdeps/i386/i586/submul_1.S index 20c4d8df0e..905ad19d7f 100644 --- a/sysdeps/i386/i586/submul_1.S +++ b/sysdeps/i386/i586/submul_1.S @@ -1,6 +1,6 @@ /* Pentium __mpn_submul_1 -- Multiply a limb vector with a limb and subtract the result from a second limb vector. - Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -34,10 +34,8 @@ #define size ecx #define s2_limb ebp - TEXT - ALIGN (3) - GLOBL C_SYMBOL_NAME(__mpn_submul_1) -C_SYMBOL_NAME(__mpn_submul_1:) + .text +ENTRY(__mpn_submul_1) INSN1(push,l ,R(edi)) INSN1(push,l ,R(esi)) @@ -79,3 +77,5 @@ L(oop): INSN2(adc,l ,R(ebx),$0) INSN1(pop,l ,R(esi)) INSN1(pop,l ,R(edi)) ret +#undef size +END(__mpn_submul_1) diff --git a/sysdeps/i386/lshift.S b/sysdeps/i386/lshift.S index b5b7d6be32..c427ff0262 100644 --- a/sysdeps/i386/lshift.S +++ b/sysdeps/i386/lshift.S @@ -1,5 +1,5 @@ /* i80386 __mpn_lshift -- - Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1994, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -28,11 +28,8 @@ #include "sysdep.h" #include "asm-syntax.h" -.text - ALIGN (3) - .globl C_SYMBOL_NAME(__mpn_lshift) - ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_lshift),@function) -C_SYMBOL_NAME(__mpn_lshift:) + .text +ENTRY(__mpn_lshift) pushl %edi pushl %esi pushl %ebx @@ -82,5 +79,4 @@ L(end): shll %cl,%ebx /* compute least significant limb */ popl %esi popl %edi ret - - ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_lshift)) +END(__mpn_lshift) diff --git a/sysdeps/i386/mul_1.S b/sysdeps/i386/mul_1.S index 7c3a62323c..459f6239fb 100644 --- a/sysdeps/i386/mul_1.S +++ b/sysdeps/i386/mul_1.S @@ -1,6 +1,6 @@ /* i80386 __mpn_mul_1 -- Multiply a limb vector with a limb and store the result in a second limb vector. - Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1994, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ s2_limb (sp + 16) */ -#include "sysdep.h" +#include <sysdep.h> #include "asm-syntax.h" #define res_ptr edi @@ -34,10 +34,8 @@ #define size ecx #define s2_limb ebp - TEXT - ALIGN (3) - GLOBL C_SYMBOL_NAME(__mpn_mul_1) -C_SYMBOL_NAME(__mpn_mul_1:) + .text +ENTRY(__mpn_mul_1) INSN1(push,l ,R(edi)) INSN1(push,l ,R(esi)) @@ -71,3 +69,5 @@ L(oop): INSN1(pop,l ,R(esi)) INSN1(pop,l ,R(edi)) ret +#undef size +END(__mpn_mul_1) diff --git a/sysdeps/i386/rshift.S b/sysdeps/i386/rshift.S index 1eb84db802..af8c64777b 100644 --- a/sysdeps/i386/rshift.S +++ b/sysdeps/i386/rshift.S @@ -1,5 +1,5 @@ /* i80386 __mpn_rshift -- - Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1994, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -28,11 +28,8 @@ #include "sysdep.h" #include "asm-syntax.h" -.text - ALIGN (3) - .globl C_SYMBOL_NAME(__mpn_rshift) - ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_rshift),@function) -C_SYMBOL_NAME(__mpn_rshift:) + .text +ENTRY(__mpn_rshift) pushl %edi pushl %esi pushl %ebx @@ -84,5 +81,4 @@ L(end): shrl %cl,%ebx /* compute most significant limb */ popl %esi popl %edi ret - - ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_rshift)) +END(__mpn_rshift) diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S index ea9986b889..ef9a8292e2 100644 --- a/sysdeps/i386/sub_n.S +++ b/sysdeps/i386/sub_n.S @@ -1,6 +1,6 @@ /* i80386 __mpn_sub_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. - Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1994, 1995, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -29,11 +29,8 @@ #include "sysdep.h" #include "asm-syntax.h" -.text - ALIGN (3) - .globl C_SYMBOL_NAME(__mpn_sub_n) - ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_sub_n),@function) -C_SYMBOL_NAME(__mpn_sub_n:) + .text +ENTRY(__mpn_sub_n) pushl %edi pushl %esi @@ -103,5 +100,4 @@ L(oop): movl (%esi),%eax popl %esi popl %edi ret - - ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_sub_n)) +END(__mpn_sub_n) diff --git a/sysdeps/i386/submul_1.S b/sysdeps/i386/submul_1.S index 17050bc078..fc50585f86 100644 --- a/sysdeps/i386/submul_1.S +++ b/sysdeps/i386/submul_1.S @@ -1,6 +1,6 @@ /* i80386 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract the result from a second limb vector. - Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 1994, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify @@ -34,11 +34,8 @@ #define sizeP ecx #define s2_limb ebp - TEXT - ALIGN (3) - GLOBL C_SYMBOL_NAME(__mpn_submul_1) - ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_submul_1),@function) -C_SYMBOL_NAME(__mpn_submul_1:) + .text +ENTRY(__mpn_submul_1) INSN1(push,l ,R(edi)) INSN1(push,l ,R(esi)) @@ -73,5 +70,4 @@ L(oop): INSN1(pop,l ,R(esi)) INSN1(pop,l ,R(edi)) ret - - ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1)) +END(__mpn_submul_1) diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h index eea863304f..563e7dd009 100644 --- a/sysdeps/i386/sysdep.h +++ b/sysdeps/i386/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for i386. - Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 95, 96, 98 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 @@ -29,7 +29,7 @@ #define ALIGNARG(log2) 1<<log2 /* For ELF we need the `.type' directive to make shared libs work right. */ #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; -#define ASM_SIZE_DIRECTIVE(name) .size name,.-name +#define ASM_SIZE_DIRECTIVE(name) .size name,.-name; /* In ELF C symbols are asm symbols. */ #undef NO_UNDERSCORES @@ -44,17 +44,39 @@ #endif -/* Define an entry point visible from C. */ +/* Define an entry point visible from C. + + There is currently a bug in gdb which prevents us from specifying + incomplete stabs information. Fake some entries here which specify + the current source file. */ #define ENTRY(name) \ + STABS_CURRENT_FILE1("") \ + STABS_CURRENT_FILE(name) \ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ .align ALIGNARG(4); \ + STABS_FUN(name) \ C_LABEL(name) \ CALL_MCOUNT #undef END #define END(name) \ - ASM_SIZE_DIRECTIVE(name) + ASM_SIZE_DIRECTIVE(name) \ + STABS_FUN_END(name) + +/* Remove the following two lines once the gdb bug is fixed. */ +#define STABS_CURRENT_FILE(name) \ + STABS_CURRENT_FILE1 (#name) +#define STABS_CURRENT_FILE1(name) \ + 1: .stabs name,100,0,0,1b; +/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int', + the same way gcc does it. */ +#define STABS_FUN(name) STABS_FUN2(name, name##:F(0,1)) +#define STABS_FUN2(name, namestr) \ + .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \ + .stabs #namestr,36,0,0,name; +#define STABS_FUN_END(name) \ + 1: .stabs "",36,0,0,1b-name; /* If compiled for profiling, call `mcount' at the start of each function. */ #ifdef PROF diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh index c7ddb88999..18a032600d 100644 --- a/sysdeps/unix/make-syscalls.sh +++ b/sysdeps/unix/make-syscalls.sh @@ -67,10 +67,8 @@ EOF *@*) # The versioned symbols are only in the shared library. echo "\ -\$(objpfx)${file}.o: \$(common-objpfx)empty.o - rm -f \$@ - ln \$< \$@ -\$(objpfx)${file}.op: \$(common-objpfx)empty.op +\$(foreach o,\$(filter-out .os,\$(object-suffixes)),\$(objpfx)$file\$o): \\ +\$(objpfx)$file%: \$(common-objpfx)empty% rm -f \$@ ln \$< \$@ \$(objpfx)${file}.os: \\" diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 66fbeca73e..7455e8d321 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc. +/* Copyright (C) 1992, 93, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995. @@ -49,7 +49,8 @@ ENTRY (name) \ DO_CALL (args, syscall_name); \ cmpl $-4095, %eax; \ - jae syscall_error; + jae syscall_error; \ + L(pseudo_end): #undef PSEUDO_END #define PSEUDO_END(name) \ @@ -78,7 +79,7 @@ syscall_error: \ popl %ebx; \ movl %ecx, (%eax); \ movl $-1, %eax; \ - ret; \ + jmp L(pseudo_end); \ .size syscall_error,.-syscall_error; /* A quick note: it is assumed that the call to `__errno_location' does not modify the stack! */ @@ -94,7 +95,7 @@ syscall_error: \ movl errno@GOT(%ecx), %ecx; \ movl %edx, (%ecx); \ movl $-1, %eax; \ - ret; \ + jmp L(pseudo_end); \ .size syscall_error,.-syscall_error; #endif /* _LIBC_REENTRANT */ #endif /* PIC */ diff --git a/timezone/antarctica b/timezone/antarctica index 1e6e73eff2..c4dc3e4180 100644 --- a/timezone/antarctica +++ b/timezone/antarctica @@ -1,4 +1,4 @@ -# @(#)antarctica 7.12 +# @(#)antarctica 7.13 # From Paul Eggert (1997-03-28): # To keep things manageable, we list only locations occupied year-round; @@ -51,10 +51,10 @@ Zone Antarctica/Mawson 0 - ___ 1954 Feb 13 6:00 - MAWT # Mawson Time # References: # <a href="http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html"> -# http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html (1996-07-15) +# Casey Weather (1998-02-26) # </a> # <a href="http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html"> -# http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html (1996-04-19) +# Mawson Station, Antarctica (1998-02-25) # </a> # Brazil - year-round base @@ -104,7 +104,7 @@ Zone Antarctica/DumontDUrville 0 - ___ 1947 10:00 - DDUT # Dumont-d'Urville Time # Reference: # <a href="http://www.icair.iac.org.nz/science/reports/fr/IFRTP.html"> -# Support and Development of Polar Research and Technology (1996-09-10) +# Support and Development of Polar Research and Technology (1997-02-03) # </a> @@ -212,9 +212,8 @@ Zone Antarctica/McMurdo 0 - ___ 1956 # at that time (1957). (Source: Siple's book 90 degrees SOUTH.) # # From Susan Smith -# <a href="http://www.cybertours.com/whs/pole10.html"> -# http://www.cybertours.com/whs/pole10.html (1995-11-13 16:24:56 +1300): -# </a> +# http://www.cybertours.com/whs/pole10.html +# (1995-11-13 16:24:56 +1300, no longer available): # We use the same time as McMurdo does. # And they use the same time as Christchurch, NZ does.... # One last quirk about South Pole time. diff --git a/timezone/asia b/timezone/asia index c7180eb408..de1a379846 100644 --- a/timezone/asia +++ b/timezone/asia @@ -1,4 +1,4 @@ -# @(#)asia 7.35 +# @(#)asia 7.36 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -154,7 +154,7 @@ Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jun 9 8:00 - ICT 1931 May 7:00 - ICT -# People's Republic of China +# China # From Guy Harris: # People's Republic of China. Yes, they really have only one time zone. @@ -237,7 +237,7 @@ Zone Asia/Hong_Kong 7:36:36 - LMT 1904 Oct 30 ############################################################################### -# Republic of China +# Taiwan # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Taiwan 1945 1951 - May 1 0:00 1:00 D @@ -354,7 +354,7 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # From Paul Eggert (1996-12-17), following up a suggestion by Rich Wales: # Ahmea Alavi in # <a href="http://tehran.stanford.edu/Iran_Lib/Calendar/taghveem.txt"> -# http://tehran.stanford.edu/Iran_Lib/Calendar/taghveem.txt (1993-08-04) +# TAGHVEEM (1993-08-04) # </a> # writes ``Daylight saving time in Iran starts from the first day # of Farvardin and ends the first day of Mehr.'' This disagrees with the SSIM: @@ -677,7 +677,7 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May 2 ############################################################################### -# Korea +# Korea (North and South) # From Guy Harris: # According to someone at the Korean Times in San Francisco, @@ -779,9 +779,9 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male 5:00 - MVT # Maldives Time # Mongolia -# Shanks says that Mongolia has three time zones, but usno1995 and -# <a href="http://www.odci.gov/cia/publications/95fact/802389h.gif"> -# http://www.odci.gov/cia/publications/95fact/802389h.gif (1995) +# Shanks says that Mongolia has three time zones, but usno1995 and the CIA map +# <a href="http://www.odci.gov/cia/publications/nsolo/rmap-pdf/802483.pdf"> +# Standard Time Zones of the World (1997-01) # </a> # both say that it has just one. # Let's comment out the western and eastern Mongolian time zones @@ -827,6 +827,61 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 5:00 - PKT # Pakistan Time # Palestine + +# From Amos Shapir <amos@nsof.co.il> (1998-02-15): +# +# From 1917 until 1948-05-15, all of Palestine, including the parts now +# known as the Gaza Strip and the West Bank, was under British rule. +# Therefore the rules given for Israel for that period, apply there too... +# +# The Gaza Strip was under Egyptian rule between 1948-05-15 until 1967-06-05 +# (except a short occupation by Israel from 1956-11 till 1957-03, but no +# time zone was affected then). It was never formally annexed to Egypt, +# though. +# +# The rest of Palestine was under Jordanian rule at that time, formally +# annexed in 1950 as the West Bank (and the word "Trans" was dropped from +# the country's previous name of "the Hashemite Kingdom of the +# Trans-Jordan"). So the rules for Jordan for that time apply. Major +# towns in that area are Nablus (Shchem), El-Halil (Hebron), Ramallah, and +# East Jerusalem. +# +# Both areas were occupied by Israel in June 1967, but not annexed (except +# for East Jerusalem). They were on Israel time since then; there might +# have been a Military Governor's order about time zones, but I'm not aware +# of any (such orders may have been issued semi-annually whenever summer +# time was in effect, but maybe the legal aspect of time was just neglected). +# +# The Palestinian Authority was established in 1993, and got hold of most +# towns in the West Bank and Gaza by 1995. I know that in order to +# demonstrate...independence, they have been switching to +# summer time and back on a different schedule than Israel's, but I don't +# know when this was started, or what algorithm is used (most likely the +# Jordanian one). +# +# To summarize, the table should probably look something like that: +# +# Area \ when | 1918-1947 | 1948-1967 | 1967-1995 | 1996- +# ------------+-----------+-----------+-----------+----------- +# Israel | Zion | Zion | Zion | Zion +# West bank | Zion | Jordan | Zion | Jordan +# Gaza | Zion | Egypt | Zion | Jordan +# +# I guess more info may be available from the PA's web page (if/when they +# have one). + +# From Paul Eggert (1998-02-25): +# Shanks writes that Gaza did not observe DST until 1957, but we'll go +# with Shapir and assume that it observed DST from 1940 through 1947, +# and that it used Jordanian rules starting in 1996. +# We don't yet need a separate entry for the West Bank, since +# the only differences between it and Gaza that we know about +# occurred before our cutoff date of 1970. +# However, as we get more information, we may need to add entries +# for parts of the West Bank as they transitioned from Israel's rules +# to Palestine's rules. If you have more info about this, please +# send it to tz@elsie.nci.nih.gov for incorporation into future editions. + # These rules for Egypt are stolen from the `africa' file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -837,9 +892,10 @@ Rule EgyptAsia 1959 1965 - Sep 30 3:00 0 - Rule EgyptAsia 1966 only - Oct 1 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct - 2:00 - EET 1957 May 10 - 2:00 EgyptAsia EE%sT 1967 Jun 30 - 2:00 Zion I%sT + 2:00 Zion EET 1948 May 15 + 2:00 EgyptAsia EE%sT 1967 Jun 5 + 2:00 Zion I%sT 1996 + 2:00 Jordan EE%sT # Paracel Is # no information @@ -890,17 +946,17 @@ Zone Asia/Singapore 6:55:24 - LMT 1880 # Sri Lanka # From Paul Eggert (1996-09-03): # <a href="http://www.virtual-pc.com/lankaweb/news/items/240596-2.html"> -# http://www.virtual-pc.com/lankaweb/news/items/240596-2.html (1996-05-24) +# Sri Lanka advances clock by an hour to avoid blackout (1996-05-24) # </a> # reported ``the country's standard time will be put forward by one hour at # midnight Friday (1830 GMT) `in the light of the present power crisis'.'' # Transitions before 1996 are from Shanks (1991). # # From Dharmasiri Senanayake, Sri Lanka Media Minister (1996-10-24), as quoted -# in +# by Shamindra in # <a href="news:54rka5$m5h@mtinsc01-mgt.ops.worldnet.att.net"> -# news:54rka5$m5h@mtinsc01-mgt.ops.worldnet.att.net (1996-10-26): -# </a> +# Daily News - Hot News Section (1996-10-26) +# </a>: # With effect from 12.30 a.m. on 26th October 1996 # Sri Lanka will be six (06) hours ahead of GMT. @@ -990,14 +1046,6 @@ Zone Asia/Tashkent 4:37:12 - LMT 1924 May 2 5:00 - UZT # Uzbekistan Time # Shanks has Tashkent using DST after 1991, but usno1995 says they don't. # Guess no DST after 1991. -# <a href="http://www.odci.gov/cia/publications/95fact/802389h.gif"> -# http://www.odci.gov/cia/publications/95fact/802389h.gif (1995) -# </a> -# says that Uzbekistan has two time zones, but a cable -# <a href="http://www.itaiep.doc.gov/bisnis/cables/960510uz.html"> -# http://www.itaiep.doc.gov/bisnis/cables/960510uz.html (1996-05-10) -# </a> -# from the American Embassy in Tashkent implies that they have just one. # Vietnam # From Paul Eggert <eggert@twinsun.com> (1993-11-18): diff --git a/timezone/australasia b/timezone/australasia index 5121cd32fd..2bb3a0a771 100644 --- a/timezone/australasia +++ b/timezone/australasia @@ -1,4 +1,4 @@ -# @(#)australasia 7.39 +# @(#)australasia 7.40 # This file also includes Pacific islands. # Notes are at the end of this file @@ -213,21 +213,6 @@ Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct # Papeete Zone Pacific/Guam 9:39:00 - LMT 1901 # Agana 10:00 - GST -# Howland, Baker -# uninhabited since World War II -# no information; was probably like Pacific/Pago_Pago - -# Jarvis -# uninhabited since 1958 -# no information; was probably like Pacific/Kiritimati - -# Johnston -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Johnston -10:00 - HST - -# Kingman -# uninhabited - # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki @@ -352,9 +337,6 @@ Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror 9:00 - PWT # Palau Time -# Palmyra -# uninhabited since World War II; was probably like Pacific/Kiritimati - # Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 @@ -402,6 +384,33 @@ Zone Pacific/Tongatapu 12:19:20 - LMT 1901 Zone Pacific/Funafuti 11:56:52 - LMT 1901 12:00 - TVT # Tuvalu Time + +# US minor outlying islands + +# Howland, Baker +# uninhabited since World War II +# no information; was probably like Pacific/Pago_Pago + +# Jarvis +# uninhabited since 1958 +# no information; was probably like Pacific/Kiritimati + +# Johnston +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Johnston -10:00 - HST + +# Kingman +# uninhabited + +# Palmyra +# uninhabited since World War II; was probably like Pacific/Kiritimati + +# Wake +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Wake 11:06:28 - LMT 1901 + 12:00 - WAKT # Wake Time + + # Vanuatu # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Vanuatu 1983 only - Sep 25 0:00 1:00 S @@ -414,11 +423,6 @@ Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 S Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila 11:00 Vanuatu VU%sT # Vanuatu Time -# Wake -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Wake 11:06:28 - LMT 1901 - 12:00 - WAKT # Wake Time - # Wallis and Futuna # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wallis 12:15:20 - LMT 1901 @@ -517,16 +521,15 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # # NSW (including LHI and Broken Hill): # <a href="http://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html"> -# http://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html +# Standard Time Act 1987 (updated 1995-04-04) # </a> # ACT -# <a href="http://www.austlii.edu.au/au/legis/act/consol_act/consol_act/stasta1972279/i"> -# http://www.austlii.edu.au/au/legis/act/consol_act/consol_act/stasta1972279/i +# <a href="http://www.austlii.edu.au/au/legis/act/consol_act/consol_act/stasta1972279/index.html"> +# Standard Time and Summer Time Act 1972 # </a> -# ndex.html # SA # <a href="http://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html"> -# http://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html +# Standard Time Act, 1898 # </a> # Northern Territory diff --git a/timezone/europe b/timezone/europe index dbaa01f2f4..0df00f3a69 100644 --- a/timezone/europe +++ b/timezone/europe @@ -1,4 +1,4 @@ -# @(#)europe 7.52 +# @(#)europe 7.53 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -65,7 +65,7 @@ ############################################################################### -# United Kingdom +# Britain (United Kingdom) and Ireland (Eire) # The UK and its colonies adopted the Gregorian calendar on 1752-09-14. # From Peter Ilieve <peter@memex.co.uk> (1994-07-06): @@ -1132,7 +1132,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850 1:00 Czech CE%sT 1979 1:00 EU CE%sT -# Denmark +# Denmark, Faeroe Islands, and Greenland # Gregorian calendar adopted 1700-03-01. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Denmark 1916 only - May 14 23:00 1:00 S @@ -1464,7 +1464,7 @@ Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 # From Paul Eggert (1996-05-06): # For Italian DST we have three sources: Shanks, Whitman, and F. Pollastri # <a href="http://pisolo.cstv.to.cnr.it/toi/uk/ienitlt.html"> -# http://pisolo.cstv.to.cnr.it/toi/uk/ienitlt.html (1996-03-14) +# Day-light Saving Time in Italy (1996-03-14) # </a> # (`FP' below), taken from an Italian National Electrotechnical Institute # publication. When the three sources disagree, guess who's right, as follows: @@ -1712,11 +1712,9 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 1:00 C-Eur CE%sT 1945 Apr 2 2:00 1:00 Norway CE%sT 1980 1:00 EU CE%sT -# -# Svalbard + +# Svalbard & Jan Mayen Link Europe/Oslo Arctic/Longyearbyen -# -# Jan Mayen # From Whitman: # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Jan_Mayen -1:00 - EGT @@ -2084,9 +2082,10 @@ Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C. # Sweden # From: msb@sq.com (Mark Brader) -# <a href=news:1996Jul6.012937.29190@sq.com> -# news:1996Jul6.012937.29190@sq.com -# </a>: +# <a href="news:1996Jul6.012937.29190@sq.com"> +# Subject: Re: Gregorian reform -- a part of locale? +# </a> +# Date: 1996-07-06 # # In 1700, Denmark made the transition from Julian to Gregorian. Sweden # decided to *start* a transition in 1700 as well, but rather than have one of diff --git a/timezone/private.h b/timezone/private.h index 7f98a67391..f36541c19f 100644 --- a/timezone/private.h +++ b/timezone/private.h @@ -21,7 +21,7 @@ #ifndef lint #ifndef NOID -static char privatehid[] = "@(#)private.h 7.46"; +static char privatehid[] = "@(#)private.h 7.47"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -46,6 +46,10 @@ static char privatehid[] = "@(#)private.h 7.46"; #define HAVE_STRERROR 0 #endif /* !defined HAVE_STRERROR */ +#ifndef HAVE_SYMLINK +#define HAVE_SYMLINK 1 +#endif /* !defined HAVE_SYMLINK */ + #ifndef HAVE_UNISTD_H #define HAVE_UNISTD_H 1 #endif /* !defined HAVE_UNISTD_H */ diff --git a/timezone/southamerica b/timezone/southamerica index f53355c4c0..f2bf217063 100644 --- a/timezone/southamerica +++ b/timezone/southamerica @@ -1,4 +1,4 @@ -# @(#)southamerica 7.22 +# @(#)southamerica 7.23 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -274,8 +274,25 @@ Rule Brazil 1992 only - Feb 9 0:00 0 S Rule Brazil 1993 1995 - Oct Sun>=11 0:00 1:00 D Rule Brazil 1993 only - Jan 31 0:00 0 S Rule Brazil 1994 1995 - Feb Sun>=15 0:00 0 S -Rule Brazil 1996 max - Feb Sun>=11 0:00 0 S -Rule Brazil 1996 max - Oct Sun>=1 0:00 1:00 D +Rule Brazil 1996 only - Feb Sun>=11 0:00 0 S +Rule Brazil 1996 only - Oct Sun>=1 0:00 1:00 D +# From Daniel C. Sobral <dcs@gns.com.br> (1998-02-12): +# In 1997, the DS began on October 6. The stated reason was that +# because international television networks ignored Brazil's policy on DS, +# they bought the wrong times on satellite for coverage of Pope's visit. +# This year, the ending date of DS was postponed to March 1 +# to help dealing with the shortages of electric power. +# +# From Paul Eggert (1998-02-25): +# Reference for 1997-10-06 change: +# <a href="http://churchnet.ucsm.ac.uk/news/files2/news165.htm"> +# Brazil Prepares for Papal Visit +# </a>, +# Church Net UK (1997-10-02). +Rule Brazil 1997 only - Oct 6 0:00 1:00 D +Rule Brazil 1998 only - Mar 1 0:00 0 S +Rule Brazil 1998 max - Oct Sun>=1 0:00 1:00 D +Rule Brazil 1999 max - Feb Sun>=11 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] # diff --git a/timezone/zic.c b/timezone/zic.c index adec622672..2397a7841e 100644 --- a/timezone/zic.c +++ b/timezone/zic.c @@ -1,6 +1,6 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)zic.c 7.93"; +static char elsieid[] = "@(#)zic.c 7.94"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -601,23 +601,20 @@ const char * const tofile; if (!itsdir(toname)) (void) remove(toname); if (link(fromname, toname) != 0) { - int failure = errno; - if (failure == ENOENT) - if (mkdirs(toname) != 0) - failure = errno; - else if (link(fromname, toname) == 0) - failure = 0; - else - failure = errno; -#ifndef MISSING_SYMLINK - if (failure == EXDEV) - if (symlink(fromname, toname) != 0) - failure = errno; - else - failure = 0; + int result; + + if (mkdirs(toname) != 0) + (void) exit(EXIT_FAILURE); + result = link(fromname, toname); +#if (HAVE_SYMLINK - 0) + if (result != 0) { + result = symlink(fromname, toname); + if (result == 0) +warning(_("hard link failed, symbolic link used")); + } #endif - if (failure) { - const char *e = strerror(failure); + if (result != 0) { + const char *e = strerror(errno); (void) fprintf(stderr, _("%s: Can't link from %s to %s: %s\n"), |