aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-08-14 01:54:13 +0000
committerUlrich Drepper <drepper@redhat.com>1997-08-14 01:54:13 +0000
commitca34d7a7c77fa8dc823fd05439870e5a96610c5a (patch)
tree4b4057b8b919007f42caa4e1558bb9c5487976ae
parent0413b54c02d31cae62e8d13b3ee7ac109ceeff0e (diff)
downloadglibc-ca34d7a7c77fa8dc823fd05439870e5a96610c5a.zip
glibc-ca34d7a7c77fa8dc823fd05439870e5a96610c5a.tar.gz
glibc-ca34d7a7c77fa8dc823fd05439870e5a96610c5a.tar.bz2
1997-08-14 03:14 Ulrich Drepper <drepper@cygnus.com> * elf/dl-minimal.c: Don't use relative #include paths. (malloc): Don't try to initialize _dl_pagesize, it already is. (__sigjmp_save, longjmp): Reformat. * sysdeps/generic/dl-sysdep.c: Implement _dl_show_auxv function to show content of auxiliary array. (_dl_sysdep_start): Remember start of auxiliary vector. * sysdeps/mach/hurd/dl-sysdep.c: (_dl_show_auxv): New dummy function. * elf/link.h: Add prototype for _dl_show_auxv. * elf/rtld.c (dl_main): Call _dl_show_auxv if LD_SHOW_AUXV envvar is present. * libio/iofdopen.c: Better prepare for use in libstdc++. * libio/iofflush.c: Likewise. * libio/iofgetpos.c: Likewise. * libio/iofgets.c: Likewise. * libio/iofopen.c: Likewise. * libio/iofputs.c: Likewise. * libio/iofread.c: Likewise. * libio/iofsetpos.c: Likewise. * libio/ioftell.c: Likewise. * libio/iofwrite.c: Likewise. * libio/iogetdelim.c: Likewise. * libio/iogets.c: Likewise. * libio/iopopen.c: Likewise. * libio/ioputs.c: Likewise. * libio/iosetbuffer.c: Likewise. * libio/iosetvbuf.c: Likewise. * libio/ioungetc.c: Likewise. * libio/iovsprintf.c: Likewise. * libio/iovsscanf.c: Likewise. * manual/creature.texi: Mention _XOPEN_SOURCE_EXTENDED in correct place. * manual/math.texi: Add comment to sincos decsription to say it's a GNU extension. Fix description of random function. * posix/fnmatch.h: Recognize Windog by _WINDOWS32 not WIN32. * posix/glob.c: Likewise. Handle stupid system headers on SunOS. Add casts for all __alloca calls. * posix/glob.h: Recognize Windog by _WINDOWS32 not WIN32. Declare additional GLOB_* constants also if _GNU_SOURCE is defined. Patches by Paul D. Smith <psmith@BayNetworks.COM>. * stdio-common/_itoa.c: Don't use relateive #include paths. * sysdeps/i386/fpu/bits/mathinline.h: Enable optimizations even for gcc 2.7. (atan): Loading 1.0 from memory does not pay off. (asinh): Fix typo. 1997-08-13 09:44 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/stub/accept.c: Use socklen_t where necessary. * sysdeps/stub/bind.c: Likewise. * sysdeps/stub/connect.c: Likewise. * sysdeps/stub/getsockname.c: Likewise. * sysdeps/stub/getsockopt.c: Likewise. * sysdeps/stub/recvfrom.c: Likewise. * sysdeps/stub/sendto.c: Likewise. * sysdeps/stub/setsockopt.c: Likewise. 1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * io/ftw.c (object_compare): Avoid memcmp when comparing scalar types. 1997-08-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/libm-test.c (cbrt_test): Add epsilon for long double to `cbrt (-0.001)'. 1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/stub/bits/string.h: Fix comment. 1997-08-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/Makefile (routines): Remove dl-version. (dl-routines): Add it here instead. This removes dead code from libc.so. 1997-08-12 17:17 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> * malloc/thread-m.h (thread_atfork, thread_atfork_static): New macros to encapsulate pthread_atfork's functionality. * malloc/malloc.c (ptmalloc_lock_all, ptmalloc_unlock_all): New functions, registered via thread_atfork in the initialization routine or via thread_atfork_static in global scope. This ensures a consistent state of all locks across fork(). 1997-08-11 23:00:32 1997 Mark Kettenis <kettenis@phys.uva.nl> * login/programs/xtmp.c (compare_entry): Partially undo patch made by Klaus Espenlaub. There was no xtmp/utmp typo. Added comment to cclarify this. * login/programs/xtmp.h: Likewise. * posix/getopt.c: Recognize Windog by _WINDOWS32 not WIN32. Patch by Paul D. Smith <psmith@BayNetworks.COM>. 1997-08-12 13:51 Ulrich Drepper <drepper@cygnus.com> * login/getutid.c: Rename to __getutid and make getutid and getutxid weak aliases. Patch by ir. Mark M._Kettenis <kettenis@phys.uva.nl>. 1997-08-11 23:55 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/Makefile [subdir=misc] (sysdep_headers): Add bits/mman.h. 1997-08-11 08:51:21 1997 H.J. Lu <hjl@gnu.ai.mit.edu> * stdlib/fmtmsg.c (fmtmsg): Add static to __libc_once_define macro. * libc.map (__progname_full, __progname): Added. 1997-08-04 08:31 H.J. Lu <hjl@gnu.ai.mit.edu> * sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Return 0 if SIOGIFINDEX is not defined. (if_indextoname): Initialize "result" to NULL. (if_nametoindex, if_nameindex): Fix ENOSYS setting. 1997-08-11 11:58 Richard Henderson <rth@cygnus.com> Sparc ISO C 9x exception handling: * sysdeps/sparc/fpu/bits/mathdef.h: New file. * sysdeps/sparc/fpu/fclrexcpt.c: New file. * sysdeps/sparc/fpu/fegetenv.c: New file. * sysdeps/sparc/fpu/fegetround.c: New file. * sysdeps/sparc/fpu/feholdexcpt.c: New file. * sysdeps/sparc/fpu/fesetenv.c: New file. * sysdeps/sparc/fpu/fesetround.c: New file. * sysdeps/sparc/fpu/feupdateenv.c: New file. * sysdeps/sparc/fpu/fgetexcptflg.c: New file. * sysdeps/sparc/fpu/fraiseexcpt.c: New file. * sysdeps/sparc/fpu/fsetexcptflg.c: New file. * sysdeps/sparc/fpu/ftestexcept.c: New file. * sysdeps/sparc/sparc32/fpu/bits/fenv.h: New file. * sysdeps/sparc/sparc64/fpu/bits/fenv.h: New file. 1997-08-11 11:58 Richard Henderson <rth@cygnus.com> Sparc64 merge: * configure.in: Change up subdirectories, rename sparc8->sparcv8. * csu/Makefile: Nuke need-nopic-initfini bits. The problem was that sparc64 ld did not recognize pic relocs at all. * elf/dl-deps.c: Include <string.h>. * elf/do-rel.h (elf_dynamic_do_rel): Take reloc address and size directly instead of the DT names to get them from. * elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): New macro distilled from ELF_DYNAMIC_DO_REL{,A}. Define a second version that accounts for the possibility that DT_RELA and DT_JMPPLT overlap, as such is the case on the Sparc. * elf/elf.h: Stub out Elf64_Ver*, and make them the same as the Elf32_Ver* bits. The linker does not even know to differentiate between the word sizes. Someone should examine this and figure out what the proper sizes of things should be for 64-bit hosts before the sparc64 libraries are distributed. * shlib-versions: Rename sparc64 ld.so to not conflict with sparc32 on the same machine. Move old sysdeps/sparc contents to sysdeps/sparc/sparc32, rename sparc8 subdir to sparcv8, move sysdeps/sparc64 content to sysdeps/sparc/sparc64. Same for sysdeps/unix/sysv/linux/sparc. * sysdeps/sparc/Implies: Do ieee754 here. * sysdeps/sparc/configure.in: Move from sparc32/. * sysdeps/sparc/sparc32/Implies: Do wordsize here. * sysdeps/sparc/sparc64/Implies: Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_load_address): Use uninitialized .got to find load address instead of AT_BASE, as the later does not exist when running ld.so directly. * sysdeps/sparc/sparc32/fpu/fpu_control.h: Move from ../. * sysdeps/sparc/sparc64/fpu/fpu_control.h: Likewise. * sysdeps/sparc/sparc32/udiv_qrnnd.S: Clean up PIC support. * sysdeps/sparc/sparc64/Makefile (sysdep_routines): Add s_finitel and s_signbitl for stdio. * sysdeps/sparc/sparc64/configure.in: Remove, we no longer need nopic_initfini. * sysdeps/sparc/sparc64/bsd-_setjmp.S: Remove. * sysdeps/sparc/sparc64/bsd-setjmp.S: Remove. * sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S: New empty file. * sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S: New empty file. * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Add __longjmp alias. * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Add weak _setjmp and setjmp entry points. * sysdeps/sparc/sparc64/dl-machine.h: Finish real implementation. * sysdeps/sparc/sparc64/elf/crtbegin.S: Add copyright, fix PIC. * sysdeps/sparc/sparc64/elf/crtend.S: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (struct sigaction): Fix sa_flags size for sparc64; add sa_restorer for kernel. * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Fix PIC. * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: New file. 1997-08-10 18:29:08 1997 Mark Kettenis <kettenis@phys.uva.nl> * login/login.c (login): Check for correct return value of utmpname. 1997-08-11 16:49 Ulrich Drepper <drepper@cygnus.com> * time/tzset.c (__tzset_internal): Correctly handle TZ strings following incorrect old POSIX specs. Patch by Paul Eggert <eggert@twinsun.com>. * sysdeps/generic/bits/sigaction.h: Correct comment for SA_RESTART. * sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise. Reported by NIIBE Yutaka <gniibe@mri.co.jp>. 1997-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/math.texi: Define the macros @mul and @infinity and use them to format the multiplication and infinity signs. (FP Comparison Functions): Use @code, not @math, for C code examples. * elf/dl-profile.c: Add descriptions and implement reading of
-rw-r--r--ChangeLog249
-rw-r--r--bits/sigaction.h6
-rwxr-xr-xconfigure117
-rw-r--r--configure.in9
-rw-r--r--csu/Makefile36
-rw-r--r--elf/Makefile4
-rw-r--r--elf/dl-deps.c2
-rw-r--r--elf/dl-minimal.c15
-rw-r--r--elf/do-rel.h7
-rw-r--r--elf/dynamic-link.h81
-rw-r--r--elf/elf.h51
-rw-r--r--elf/link.h4
-rw-r--r--elf/rtld.c5
-rw-r--r--io/ftw.c4
-rw-r--r--libc.map4
-rw-r--r--libio/iofdopen.c2
-rw-r--r--libio/iofflush.c2
-rw-r--r--libio/iofgetpos.c2
-rw-r--r--libio/iofgets.c2
-rw-r--r--libio/iofopen.c2
-rw-r--r--libio/iofputs.c2
-rw-r--r--libio/iofread.c3
-rw-r--r--libio/iofsetpos.c2
-rw-r--r--libio/ioftell.c2
-rw-r--r--libio/iofwrite.c2
-rw-r--r--libio/iogetdelim.c2
-rw-r--r--libio/iogets.c2
-rw-r--r--libio/iopopen.c2
-rw-r--r--libio/ioputs.c3
-rw-r--r--libio/iosetbuffer.c2
-rw-r--r--libio/iosetvbuf.c2
-rw-r--r--libio/ioungetc.c2
-rw-r--r--libio/iovsprintf.c2
-rw-r--r--libio/iovsscanf.c3
-rw-r--r--login/getutid.c6
-rw-r--r--login/login.c2
-rw-r--r--login/programs/xtmp.c29
-rw-r--r--login/programs/xtmp.h3
-rw-r--r--malloc/malloc.c124
-rw-r--r--malloc/thread-m.h21
-rw-r--r--manual/creature.texi1
-rw-r--r--manual/math.texi200
-rw-r--r--math/libm-test.c7
-rw-r--r--posix/fnmatch.h4
-rw-r--r--posix/getopt.c2
-rw-r--r--posix/glob.c41
-rw-r--r--posix/glob.h4
-rw-r--r--shlib-versions2
-rw-r--r--stdio-common/_itoa.c6
-rw-r--r--stdlib/fmtmsg.c2
-rw-r--r--stdlib/strtod.c6
-rw-r--r--sysdeps/generic/bits/sigaction.h6
-rw-r--r--sysdeps/generic/dl-sysdep.c77
-rw-r--r--sysdeps/i386/fpu/bits/mathinline.h13
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c7
-rw-r--r--sysdeps/sparc/Implies1
-rw-r--r--sysdeps/sparc/fpu/bits/mathdef.h64
-rw-r--r--sysdeps/sparc/fpu/fclrexcpt.c32
-rw-r--r--sysdeps/sparc/fpu/fegetenv.c26
-rw-r--r--sysdeps/sparc/fpu/fegetround.c30
-rw-r--r--sysdeps/sparc/fpu/feholdexcpt.c35
-rw-r--r--sysdeps/sparc/fpu/fesetenv.c (renamed from sysdeps/sparc64/bsd-setjmp.S)48
-rw-r--r--sysdeps/sparc/fpu/fesetround.c37
-rw-r--r--sysdeps/sparc/fpu/feupdateenv.c (renamed from sysdeps/sparc64/bsd-_setjmp.S)37
-rw-r--r--sysdeps/sparc/fpu/fgetexcptflg.c31
-rw-r--r--sysdeps/sparc/fpu/fraiseexcpt.c66
-rw-r--r--sysdeps/sparc/fpu/fsetexcptflg.c34
-rw-r--r--sysdeps/sparc/fpu/ftestexcept.c30
-rw-r--r--sysdeps/sparc/sparc32/Dist (renamed from sysdeps/sparc/Dist)0
-rw-r--r--sysdeps/sparc/sparc32/Implies1
-rw-r--r--sysdeps/sparc/sparc32/Makefile (renamed from sysdeps/sparc/Makefile)0
-rw-r--r--sysdeps/sparc/sparc32/__longjmp.S (renamed from sysdeps/sparc/__longjmp.S)0
-rw-r--r--sysdeps/sparc/sparc32/add_n.S (renamed from sysdeps/sparc/add_n.S)0
-rw-r--r--sysdeps/sparc/sparc32/addmul_1.S (renamed from sysdeps/sparc/addmul_1.S)0
-rw-r--r--sysdeps/sparc/sparc32/alloca.S (renamed from sysdeps/sparc/alloca.S)0
-rw-r--r--sysdeps/sparc/sparc32/bits/endian.h (renamed from sysdeps/sparc/bits/endian.h)0
-rw-r--r--sysdeps/sparc/sparc32/bits/setjmp.h (renamed from sysdeps/sparc/bits/setjmp.h)0
-rw-r--r--sysdeps/sparc/sparc32/bsd-_setjmp.S (renamed from sysdeps/sparc/bsd-_setjmp.S)0
-rw-r--r--sysdeps/sparc/sparc32/bsd-setjmp.S (renamed from sysdeps/sparc/bsd-setjmp.S)0
-rw-r--r--sysdeps/sparc/sparc32/divrem.m4 (renamed from sysdeps/sparc/divrem.m4)0
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h (renamed from sysdeps/sparc/dl-machine.h)18
-rw-r--r--sysdeps/sparc/sparc32/dotmul.S (renamed from sysdeps/sparc/dotmul.S)0
-rw-r--r--sysdeps/sparc/sparc32/e_sqrt.c (renamed from sysdeps/sparc/e_sqrt.c)0
-rw-r--r--sysdeps/sparc/sparc32/elf/Makefile (renamed from sysdeps/sparc/elf/Makefile)0
-rw-r--r--sysdeps/sparc/sparc32/elf/start.c (renamed from sysdeps/sparc/elf/start.c)0
-rw-r--r--sysdeps/sparc/sparc32/fpu/bits/fenv.h76
-rw-r--r--sysdeps/sparc/sparc32/fpu/fpu_control.h (renamed from sysdeps/sparc/fpu_control.h)0
-rw-r--r--sysdeps/sparc/sparc32/lshift.S (renamed from sysdeps/sparc/lshift.S)0
-rw-r--r--sysdeps/sparc/sparc32/memcopy.h (renamed from sysdeps/sparc/memcopy.h)0
-rw-r--r--sysdeps/sparc/sparc32/mul_1.S (renamed from sysdeps/sparc/mul_1.S)0
-rw-r--r--sysdeps/sparc/sparc32/rem.S (renamed from sysdeps/sparc/rem.S)0
-rw-r--r--sysdeps/sparc/sparc32/rshift.S (renamed from sysdeps/sparc/rshift.S)0
-rw-r--r--sysdeps/sparc/sparc32/sdiv.S (renamed from sysdeps/sparc/sdiv.S)0
-rw-r--r--sysdeps/sparc/sparc32/setjmp.S (renamed from sysdeps/sparc/setjmp.S)0
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/addmul_1.S (renamed from sysdeps/sparc/sparc8/addmul_1.S)0
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/mul_1.S (renamed from sysdeps/sparc/sparc8/mul_1.S)0
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/submul_1.S (renamed from sysdeps/sparc/sparc8/submul_1.S)0
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/udiv_qrnnd.S (renamed from sysdeps/sparc/sparc8/udiv_qrnnd.S)0
-rw-r--r--sysdeps/sparc/sparc32/sub_n.S (renamed from sysdeps/sparc/sub_n.S)0
-rw-r--r--sysdeps/sparc/sparc32/submul_1.S (renamed from sysdeps/sparc/submul_1.S)0
-rw-r--r--sysdeps/sparc/sparc32/udiv.S (renamed from sysdeps/sparc/udiv.S)0
-rw-r--r--sysdeps/sparc/sparc32/udiv_qrnnd.S (renamed from sysdeps/sparc/udiv_qrnnd.S)51
-rw-r--r--sysdeps/sparc/sparc32/umul.S (renamed from sysdeps/sparc/umul.S)0
-rw-r--r--sysdeps/sparc/sparc32/urem.S (renamed from sysdeps/sparc/urem.S)0
-rw-r--r--sysdeps/sparc/sparc64/Implies1
-rw-r--r--sysdeps/sparc/sparc64/Makefile (renamed from sysdeps/sparc64/Makefile)2
-rw-r--r--sysdeps/sparc/sparc64/add_n.S (renamed from sysdeps/sparc64/add_n.S)0
-rw-r--r--sysdeps/sparc/sparc64/addmul_1.S (renamed from sysdeps/sparc64/addmul_1.S)0
-rw-r--r--sysdeps/sparc/sparc64/bits/endian.h (renamed from sysdeps/sparc64/bits/endian.h)0
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h (renamed from sysdeps/sparc64/dl-machine.h)119
-rw-r--r--sysdeps/sparc/sparc64/elf/Dist (renamed from sysdeps/sparc64/elf/Dist)0
-rw-r--r--sysdeps/sparc/sparc64/elf/Makefile (renamed from sysdeps/sparc64/elf/Makefile)0
-rw-r--r--sysdeps/sparc/sparc64/elf/crtbegin.S69
-rw-r--r--sysdeps/sparc/sparc64/elf/crtbeginS.S (renamed from sysdeps/sparc64/elf/crtbeginS.S)0
-rw-r--r--sysdeps/sparc/sparc64/elf/crtend.S70
-rw-r--r--sysdeps/sparc/sparc64/elf/crtendS.S (renamed from sysdeps/sparc64/elf/crtendS.S)0
-rw-r--r--sysdeps/sparc/sparc64/elf/start.S (renamed from sysdeps/sparc64/elf/start.S)0
-rw-r--r--sysdeps/sparc/sparc64/fpu/bits/fenv.h76
-rw-r--r--sysdeps/sparc/sparc64/fpu/fpu_control.h (renamed from sysdeps/sparc64/fpu_control.h)0
-rw-r--r--sysdeps/sparc/sparc64/gmp-mparam.h (renamed from sysdeps/sparc64/gmp-mparam.h)0
-rw-r--r--sysdeps/sparc/sparc64/lshift.S (renamed from sysdeps/sparc64/lshift.S)0
-rw-r--r--sysdeps/sparc/sparc64/mul_1.S (renamed from sysdeps/sparc64/mul_1.S)0
-rw-r--r--sysdeps/sparc/sparc64/rshift.S (renamed from sysdeps/sparc64/rshift.S)0
-rw-r--r--sysdeps/sparc/sparc64/sub_n.S (renamed from sysdeps/sparc64/sub_n.S)0
-rw-r--r--sysdeps/sparc/sparc64/submul_1.S (renamed from sysdeps/sparc64/submul_1.S)0
-rw-r--r--sysdeps/sparc64/Implies3
-rwxr-xr-xsysdeps/sparc64/configure3
-rw-r--r--sysdeps/sparc64/configure.in7
-rw-r--r--sysdeps/sparc64/elf/crtbegin.S49
-rw-r--r--sysdeps/sparc64/elf/crtend.S50
-rw-r--r--sysdeps/stub/accept.c2
-rw-r--r--sysdeps/stub/bind.c2
-rw-r--r--sysdeps/stub/bits/string.h2
-rw-r--r--sysdeps/stub/connect.c3
-rw-r--r--sysdeps/stub/getsockname.c2
-rw-r--r--sysdeps/stub/getsockopt.c3
-rw-r--r--sysdeps/stub/recvfrom.c3
-rw-r--r--sysdeps/stub/sendto.c3
-rw-r--r--sysdeps/stub/setsockopt.c3
-rw-r--r--sysdeps/unix/bsd/osf/bits/sigaction.h8
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/sigaction.h24
-rw-r--r--sysdeps/unix/sysv/linux/bits/sigaction.h26
-rw-r--r--sysdeps/unix/sysv/linux/if_index.c17
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/mman.h75
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/sigaction.h28
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/sigaction.h29
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/Dist (renamed from sysdeps/unix/sysv/linux/sparc/Dist)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/Makefile (renamed from sysdeps/unix/sysv/linux/sparc/Makefile)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/__sigtrampoline.S (renamed from sysdeps/unix/sysv/linux/sparc/__sigtrampoline.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/bits/mman.h (renamed from sysdeps/unix/sysv/linux/sparc/bits/mman.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/brk.c (renamed from sysdeps/unix/sysv/linux/sparc/brk.c)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (renamed from sysdeps/unix/sysv/linux/sparc/clone.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/fork.S (renamed from sysdeps/unix/sysv/linux/sparc/fork.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/init-first.h (renamed from sysdeps/unix/sysv/linux/sparc/init-first.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h (renamed from sysdeps/unix/sysv/linux/sparc/kernel_stat.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S (renamed from sysdeps/unix/sysv/linux/sparc/pipe.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h (renamed from sysdeps/unix/sysv/linux/sparc/profil-counter.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (renamed from sysdeps/unix/sysv/linux/sparc/sigaction.c)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/socket.S (renamed from sysdeps/unix/sysv/linux/sparc/socket.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S (renamed from sysdeps/unix/sysv/linux/sparc/syscall.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (renamed from sysdeps/unix/sysv/linux/sparc/syscalls.list)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.S (renamed from sysdeps/unix/sysv/linux/sparc/sysdep.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (renamed from sysdeps/unix/sysv/linux/sparc/sysdep.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/Dist (renamed from sysdeps/unix/sysv/linux/sparc64/Dist)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/Makefile (renamed from sysdeps/unix/sysv/linux/sparc64/Makefile)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/__longjmp.S (renamed from sysdeps/unix/sysv/linux/sparc64/__longjmp.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/mman.h (renamed from sysdeps/unix/sysv/linux/sparc64/bits/mman.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h (renamed from sysdeps/unix/sysv/linux/sparc64/bits/setjmp.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h (renamed from sysdeps/unix/sysv/linux/sparc64/bits/types.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/brk.S (renamed from sysdeps/unix/sysv/linux/sparc64/brk.S)6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (renamed from sysdeps/unix/sysv/linux/sparc64/clone.S)10
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/fork.S (renamed from sysdeps/unix/sysv/linux/sparc64/fork.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S (renamed from sysdeps/unix/sysv/linux/sparc64/getcontext.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h (renamed from sysdeps/unix/sysv/linux/sparc64/init-first.h)50
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h (renamed from sysdeps/unix/sysv/linux/sparc64/kernel_stat.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S (renamed from sysdeps/unix/sysv/linux/sparc64/longjmp.S)2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S (renamed from sysdeps/unix/sysv/linux/sparc64/pipe.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h (renamed from sysdeps/unix/sysv/linux/sparc64/profil-counter.h)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/setcontext.S (renamed from sysdeps/unix/sysv/linux/sparc64/setcontext.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S (renamed from sysdeps/unix/sysv/linux/sparc64/setjmp.S)19
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/sigjmp.S (renamed from sysdeps/unix/sysv/linux/sparc64/sigjmp.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S39
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (renamed from sysdeps/unix/sysv/linux/sparc64/syscalls.list)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.S (renamed from sysdeps/unix/sysv/linux/sparc64/sysdep.S)0
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (renamed from sysdeps/unix/sysv/linux/sparc64/sysdep.h)68
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/ucontext.h (renamed from sysdeps/unix/sysv/linux/sparc64/ucontext.h)0
-rw-r--r--sysdeps/unix/sysv/minix/bits/sigaction.h16
-rw-r--r--sysdeps/unix/sysv/sysv4/bits/sigaction.h12
-rw-r--r--time/tzset.c9
192 files changed, 2026 insertions, 703 deletions
diff --git a/ChangeLog b/ChangeLog
index 8605760..bdcdeb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,250 @@
+1997-08-14 03:14 Ulrich Drepper <drepper@cygnus.com>
+
+ * elf/dl-minimal.c: Don't use relative #include paths.
+ (malloc): Don't try to initialize _dl_pagesize, it already is.
+ (__sigjmp_save, longjmp): Reformat.
+
+ * sysdeps/generic/dl-sysdep.c: Implement _dl_show_auxv function to
+ show content of auxiliary array.
+ (_dl_sysdep_start): Remember start of auxiliary vector.
+ * sysdeps/mach/hurd/dl-sysdep.c: (_dl_show_auxv): New dummy function.
+ * elf/link.h: Add prototype for _dl_show_auxv.
+ * elf/rtld.c (dl_main): Call _dl_show_auxv if LD_SHOW_AUXV envvar
+ is present.
+
+ * libio/iofdopen.c: Better prepare for use in libstdc++.
+ * libio/iofflush.c: Likewise.
+ * libio/iofgetpos.c: Likewise.
+ * libio/iofgets.c: Likewise.
+ * libio/iofopen.c: Likewise.
+ * libio/iofputs.c: Likewise.
+ * libio/iofread.c: Likewise.
+ * libio/iofsetpos.c: Likewise.
+ * libio/ioftell.c: Likewise.
+ * libio/iofwrite.c: Likewise.
+ * libio/iogetdelim.c: Likewise.
+ * libio/iogets.c: Likewise.
+ * libio/iopopen.c: Likewise.
+ * libio/ioputs.c: Likewise.
+ * libio/iosetbuffer.c: Likewise.
+ * libio/iosetvbuf.c: Likewise.
+ * libio/ioungetc.c: Likewise.
+ * libio/iovsprintf.c: Likewise.
+ * libio/iovsscanf.c: Likewise.
+
+ * manual/creature.texi: Mention _XOPEN_SOURCE_EXTENDED in correct
+ place.
+
+ * manual/math.texi: Add comment to sincos decsription to say it's a
+ GNU extension.
+ Fix description of random function.
+
+ * posix/fnmatch.h: Recognize Windog by _WINDOWS32 not WIN32.
+ * posix/glob.c: Likewise. Handle stupid system headers on SunOS.
+ Add casts for all __alloca calls.
+ * posix/glob.h: Recognize Windog by _WINDOWS32 not WIN32.
+ Declare additional GLOB_* constants also if _GNU_SOURCE is defined.
+ Patches by Paul D. Smith <psmith@BayNetworks.COM>.
+
+ * stdio-common/_itoa.c: Don't use relateive #include paths.
+
+ * sysdeps/i386/fpu/bits/mathinline.h: Enable optimizations even for
+ gcc 2.7.
+ (atan): Loading 1.0 from memory does not pay off.
+ (asinh): Fix typo.
+
+1997-08-13 09:44 Philip Blundell <Philip.Blundell@pobox.com>
+
+ * sysdeps/stub/accept.c: Use socklen_t where necessary.
+ * sysdeps/stub/bind.c: Likewise.
+ * sysdeps/stub/connect.c: Likewise.
+ * sysdeps/stub/getsockname.c: Likewise.
+ * sysdeps/stub/getsockopt.c: Likewise.
+ * sysdeps/stub/recvfrom.c: Likewise.
+ * sysdeps/stub/sendto.c: Likewise.
+ * sysdeps/stub/setsockopt.c: Likewise.
+
+1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * io/ftw.c (object_compare): Avoid memcmp when comparing scalar
+ types.
+
+1997-08-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * math/libm-test.c (cbrt_test): Add epsilon for long double to
+ `cbrt (-0.001)'.
+
+1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * sysdeps/stub/bits/string.h: Fix comment.
+
+1997-08-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * elf/Makefile (routines): Remove dl-version.
+ (dl-routines): Add it here instead. This removes dead code from
+ libc.so.
+
+1997-08-12 17:17 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
+
+ * malloc/thread-m.h (thread_atfork, thread_atfork_static): New
+ macros to encapsulate pthread_atfork's functionality.
+ * malloc/malloc.c (ptmalloc_lock_all, ptmalloc_unlock_all): New
+ functions, registered via thread_atfork in the initialization
+ routine or via thread_atfork_static in global scope. This
+ ensures a consistent state of all locks across fork().
+
+1997-08-11 23:00:32 1997 Mark Kettenis <kettenis@phys.uva.nl>
+
+ * login/programs/xtmp.c (compare_entry):
+ Partially undo patch made by Klaus Espenlaub. There
+ was no xtmp/utmp typo. Added comment to cclarify this.
+ * login/programs/xtmp.h: Likewise.
+
+ * posix/getopt.c: Recognize Windog by _WINDOWS32 not WIN32.
+ Patch by Paul D. Smith <psmith@BayNetworks.COM>.
+
+1997-08-12 13:51 Ulrich Drepper <drepper@cygnus.com>
+
+ * login/getutid.c: Rename to __getutid and make getutid and getutxid
+ weak aliases.
+ Patch by ir. Mark M._Kettenis <kettenis@phys.uva.nl>.
+
+1997-08-11 23:55 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/unix/sysv/linux/Makefile [subdir=misc] (sysdep_headers):
+ Add bits/mman.h.
+
+1997-08-11 08:51:21 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * stdlib/fmtmsg.c (fmtmsg): Add static to
+ __libc_once_define macro.
+
+ * libc.map (__progname_full, __progname): Added.
+
+1997-08-04 08:31 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Return 0
+ if SIOGIFINDEX is not defined.
+ (if_indextoname): Initialize "result" to NULL.
+ (if_nametoindex, if_nameindex): Fix ENOSYS setting.
+
+1997-08-11 11:58 Richard Henderson <rth@cygnus.com>
+
+ Sparc ISO C 9x exception handling:
+ * sysdeps/sparc/fpu/bits/mathdef.h: New file.
+ * sysdeps/sparc/fpu/fclrexcpt.c: New file.
+ * sysdeps/sparc/fpu/fegetenv.c: New file.
+ * sysdeps/sparc/fpu/fegetround.c: New file.
+ * sysdeps/sparc/fpu/feholdexcpt.c: New file.
+ * sysdeps/sparc/fpu/fesetenv.c: New file.
+ * sysdeps/sparc/fpu/fesetround.c: New file.
+ * sysdeps/sparc/fpu/feupdateenv.c: New file.
+ * sysdeps/sparc/fpu/fgetexcptflg.c: New file.
+ * sysdeps/sparc/fpu/fraiseexcpt.c: New file.
+ * sysdeps/sparc/fpu/fsetexcptflg.c: New file.
+ * sysdeps/sparc/fpu/ftestexcept.c: New file.
+ * sysdeps/sparc/sparc32/fpu/bits/fenv.h: New file.
+ * sysdeps/sparc/sparc64/fpu/bits/fenv.h: New file.
+
+1997-08-11 11:58 Richard Henderson <rth@cygnus.com>
+
+ Sparc64 merge:
+ * configure.in: Change up subdirectories, rename sparc8->sparcv8.
+
+ * csu/Makefile: Nuke need-nopic-initfini bits. The problem was
+ that sparc64 ld did not recognize pic relocs at all.
+
+ * elf/dl-deps.c: Include <string.h>.
+ * elf/do-rel.h (elf_dynamic_do_rel): Take reloc address and size
+ directly instead of the DT names to get them from.
+ * elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): New macro distilled
+ from ELF_DYNAMIC_DO_REL{,A}. Define a second version that accounts
+ for the possibility that DT_RELA and DT_JMPPLT overlap, as such is
+ the case on the Sparc.
+
+ * elf/elf.h: Stub out Elf64_Ver*, and make them the same as the
+ Elf32_Ver* bits. The linker does not even know to differentiate
+ between the word sizes. Someone should examine this and figure
+ out what the proper sizes of things should be for 64-bit hosts
+ before the sparc64 libraries are distributed.
+
+ * shlib-versions: Rename sparc64 ld.so to not conflict with sparc32
+ on the same machine.
+
+ Move old sysdeps/sparc contents to sysdeps/sparc/sparc32,
+ rename sparc8 subdir to sparcv8, move sysdeps/sparc64 content to
+ sysdeps/sparc/sparc64. Same for sysdeps/unix/sysv/linux/sparc.
+
+ * sysdeps/sparc/Implies: Do ieee754 here.
+ * sysdeps/sparc/configure.in: Move from sparc32/.
+ * sysdeps/sparc/sparc32/Implies: Do wordsize here.
+ * sysdeps/sparc/sparc64/Implies: Likewise.
+
+ * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_load_address):
+ Use uninitialized .got to find load address instead of AT_BASE, as
+ the later does not exist when running ld.so directly.
+
+ * sysdeps/sparc/sparc32/fpu/fpu_control.h: Move from ../.
+ * sysdeps/sparc/sparc64/fpu/fpu_control.h: Likewise.
+
+ * sysdeps/sparc/sparc32/udiv_qrnnd.S: Clean up PIC support.
+
+ * sysdeps/sparc/sparc64/Makefile (sysdep_routines): Add s_finitel
+ and s_signbitl for stdio.
+ * sysdeps/sparc/sparc64/configure.in: Remove, we no longer need
+ nopic_initfini.
+
+ * sysdeps/sparc/sparc64/bsd-_setjmp.S: Remove.
+ * sysdeps/sparc/sparc64/bsd-setjmp.S: Remove.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S: New empty file.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S: New empty file.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Add __longjmp alias.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Add weak _setjmp
+ and setjmp entry points.
+
+ * sysdeps/sparc/sparc64/dl-machine.h: Finish real implementation.
+
+ * sysdeps/sparc/sparc64/elf/crtbegin.S: Add copyright, fix PIC.
+ * sysdeps/sparc/sparc64/elf/crtend.S: Likewise.
+
+ * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (struct sigaction):
+ Fix sa_flags size for sparc64; add sa_restorer for kernel.
+
+ * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Fix PIC.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: New file.
+
+1997-08-10 18:29:08 1997 Mark Kettenis <kettenis@phys.uva.nl>
+
+ * login/login.c (login): Check for correct return value of
+ utmpname.
+
+1997-08-11 16:49 Ulrich Drepper <drepper@cygnus.com>
+
+ * time/tzset.c (__tzset_internal): Correctly handle TZ strings
+ following incorrect old POSIX specs.
+ Patch by Paul Eggert <eggert@twinsun.com>.
+
+ * sysdeps/generic/bits/sigaction.h: Correct comment for SA_RESTART.
+ * sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise.
+ Reported by NIIBE Yutaka <gniibe@mri.co.jp>.
+
+1997-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * manual/math.texi: Define the macros @mul and @infinity and use
+ them to format the multiplication and infinity signs.
+ (FP Comparison Functions): Use @code, not @math, for C code
+ examples.
+
1997-08-10 18:48 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Define build-programs to no if not set and $(config-os)
@@ -49,7 +296,7 @@
* gmon/sys/gmon.h: Add prototype for write_profiling.
- * elf/dl-profile.c: Add decsriptions and implement reading of
+ * elf/dl-profile.c: Add descriptions and implement reading of
existing data in profiling file.
* gmon/sys/gmon_out.h (GMON_SHOBJ_VERSION): New macro for shared
lib profiling data.
diff --git a/bits/sigaction.h b/bits/sigaction.h
index e5f661d..e89479b 100644
--- a/bits/sigaction.h
+++ b/bits/sigaction.h
@@ -37,9 +37,9 @@ struct sigaction
/* Bits in `sa_flags'. */
#ifdef __USE_BSD
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */
-#define SA_DISABLE 0x4 /* Disable alternate signal stack. */
+# define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+# define SA_RESTART 0x2 /* Restart syscall on signal return. */
+# define SA_DISABLE 0x4 /* Disable alternate signal stack. */
#endif
#define SA_NOCLDSTOP 0x8 /* Don't send SIGCHLD when children stop. */
diff --git a/configure b/configure
index e2f2b78..cd07ec9 100755
--- a/configure
+++ b/configure
@@ -826,9 +826,12 @@ m88???) base_machine=m88k machine=m88k/$machine ;;
m88k) base_machine=m88k machine=m88k/m88100 ;;
mips64*) base_machine=mips64 machine=mips/mips64/$machine ;;
mips*) base_machine=mips machine=mips/$machine ;;
-sparc[6789]) base_machine=sparc machine=sparc/$machine ;;
-supersparc) base_machine=sparc machine=sparc/sparc8 ;;
-sparc64) base_machine=sparc64 machine=sparc64/$machine ;;
+sparc | sparcv[67])
+ base_machine=sparc machine=sparc/sparc32 ;;
+sparcv8 | supersparc | hypersparc)
+ base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
+sparc64 | ultrasparc)
+ base_machine=sparc machine=sparc/sparc64 ;;
esac
@@ -836,7 +839,7 @@ esac
# This can take a while to compute.
sysdep_dir=$srcdir/sysdeps
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
-echo "configure:840: checking sysdep dirs" >&5
+echo "configure:843: checking sysdep dirs" >&5
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
@@ -1037,7 +1040,7 @@ echo "$ac_t""sysdeps/generic sysdeps/stub" 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:1041: checking for a BSD compatible install" >&5
+echo "configure:1044: 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
@@ -1091,7 +1094,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:1095: checking whether ln -s works" >&5
+echo "configure:1098: 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
@@ -1116,7 +1119,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:1120: checking for $ac_word" >&5
+echo "configure:1123: 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
@@ -1149,7 +1152,7 @@ test -n "$MSGFMT" || MSGFMT=":"
# 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:1153: checking for $ac_word" >&5
+echo "configure:1156: 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
@@ -1178,7 +1181,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:1182: checking for $ac_word" >&5
+echo "configure:1185: 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
@@ -1226,7 +1229,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1230: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1233: 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.
@@ -1236,11 +1239,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 1240 "configure"
+#line 1243 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1247: \"$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
@@ -1263,13 +1266,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:1267: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1270: 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:1273: checking whether we are using GNU C" >&5
+echo "configure:1276: 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
@@ -1278,7 +1281,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1282: \"$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:1285: \"$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
@@ -1295,7 +1298,7 @@ if test $ac_cv_prog_gcc = yes; then
yes;
#endif
EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1299: \"$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:1302: \"$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
@@ -1307,7 +1310,7 @@ else
fi
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1311: checking build system type" >&5
+echo "configure:1314: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1330,7 +1333,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:1334: checking for $ac_word" >&5
+echo "configure:1337: 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
@@ -1361,7 +1364,7 @@ done
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1365: checking how to run the C preprocessor" >&5
+echo "configure:1368: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1376,13 +1379,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 1380 "configure"
+#line 1383 "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:1386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1393,13 +1396,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1397 "configure"
+#line 1400 "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:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1430,7 +1433,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:1434: checking for $ac_word" >&5
+echo "configure:1437: 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
@@ -1461,7 +1464,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:1465: checking for $ac_word" >&5
+echo "configure:1468: 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
@@ -1492,7 +1495,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:1496: checking for $ac_word" >&5
+echo "configure:1499: 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
@@ -1527,7 +1530,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:1531: checking for $ac_word" >&5
+echo "configure:1534: 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
@@ -1568,7 +1571,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:1572: checking for $ac_word" >&5
+echo "configure:1575: 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
@@ -1610,7 +1613,7 @@ fi
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
-echo "configure:1614: checking for signed size_t type" >&5
+echo "configure:1617: 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
@@ -1634,12 +1637,12 @@ EOF
fi
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
-echo "configure:1638: checking for libc-friendly stddef.h" >&5
+echo "configure:1641: 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 1643 "configure"
+#line 1646 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
@@ -1654,7 +1657,7 @@ size_t size; wchar_t wchar;
if (&size == NULL || &wchar == NULL) abort ();
; return 0; }
EOF
-if { (eval echo configure:1658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_friendly_stddef=yes
else
@@ -1673,7 +1676,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:1677: checking whether we need to use -P to assemble .S files" >&5
+echo "configure:1680: 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
@@ -1696,7 +1699,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
fi
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
-echo "configure:1700: checking for assembler global-symbol directive" >&5
+echo "configure:1703: 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
@@ -1726,7 +1729,7 @@ EOF
fi
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
-echo "configure:1730: checking for .set assembler directive" >&5
+echo "configure:1733: 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
@@ -1760,7 +1763,7 @@ EOF
fi
echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
-echo "configure:1764: checking for .symver assembler directive" >&5
+echo "configure:1767: 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
@@ -1779,7 +1782,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:1783: checking for ld --version-script" >&5
+echo "configure:1786: 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
@@ -1798,7 +1801,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:1802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
+ 1>&5'; { (eval echo configure:1805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_ld_version_script_option=yes
else
@@ -1828,7 +1831,7 @@ fi
if test $elf = yes; then
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
-echo "configure:1832: checking for .previous assembler directive" >&5
+echo "configure:1835: 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
@@ -1836,7 +1839,7 @@ else
.section foo_section
.previous
EOF
- if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_previous_directive=yes
else
libc_cv_asm_previous_directive=no
@@ -1852,7 +1855,7 @@ EOF
else
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
-echo "configure:1856: checking for .popsection assembler directive" >&5
+echo "configure:1859: 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
@@ -1860,7 +1863,7 @@ else
.pushsection foo_section
.popsection
EOF
- if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_popsection_directive=yes
else
libc_cv_asm_popsection_directive=no
@@ -1880,12 +1883,12 @@ fi
if test $elf != yes; then
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
-echo "configure:1884: checking for .init and .fini sections" >&5
+echo "configure:1887: 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 1889 "configure"
+#line 1892 "configure"
#include "confdefs.h"
int main() {
@@ -1894,7 +1897,7 @@ asm (".section .init");
asm (".text");
; return 0; }
EOF
-if { (eval echo configure:1898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_have_initfini=yes
else
@@ -1919,19 +1922,19 @@ if test $elf = yes; then
libc_cv_asm_underscores=no
else
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
-echo "configure:1923: checking for _ prefix on C symbol names" >&5
+echo "configure:1926: 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 1928 "configure"
+#line 1931 "configure"
#include "confdefs.h"
asm ("_glibc_foobar:");
int main() {
glibc_foobar ();
; return 0; }
EOF
-if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
libc_cv_asm_underscores=yes
else
@@ -1958,7 +1961,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:1962: checking for assembler .weak directive" >&5
+echo "configure:1965: 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
@@ -1981,7 +1984,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:1985: checking for assembler .weakext directive" >&5
+echo "configure:1988: 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
@@ -2018,7 +2021,7 @@ EOF
fi
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
-echo "configure:2022: checking for ld --no-whole-archive" >&5
+echo "configure:2025: 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
@@ -2029,7 +2032,7 @@ __throw () {}
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive
- -o conftest conftest.c 1>&5'; { (eval echo configure:2033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c 1>&5'; { (eval echo configure:2036: \"$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
@@ -2040,7 +2043,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:2044: checking for gcc -fno-exceptions" >&5
+echo "configure:2047: 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
@@ -2051,7 +2054,7 @@ __throw () {}
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fno-exceptions
- -o conftest conftest.c 1>&5'; { (eval echo configure:2055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c 1>&5'; { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_no_exceptions=yes
else
libc_cv_gcc_no_exceptions=no
@@ -2103,7 +2106,7 @@ if test "$uname" = "sysdeps/generic"; then
fi
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
-echo "configure:2107: checking OS release for uname" >&5
+echo "configure:2110: 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
@@ -2125,7 +2128,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:2129: checking OS version for uname" >&5
+echo "configure:2132: 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
@@ -2147,7 +2150,7 @@ else
fi
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
-echo "configure:2151: checking stdio selection" >&5
+echo "configure:2154: checking stdio selection" >&5
case $stdio in
libio) cat >> confdefs.h <<\EOF
diff --git a/configure.in b/configure.in
index ba8b413..481a1e3 100644
--- a/configure.in
+++ b/configure.in
@@ -159,9 +159,12 @@ m88???) base_machine=m88k machine=m88k/$machine ;;
m88k) base_machine=m88k machine=m88k/m88100 ;;
mips64*) base_machine=mips64 machine=mips/mips64/$machine ;;
mips*) base_machine=mips machine=mips/$machine ;;
-sparc[6789]) base_machine=sparc machine=sparc/$machine ;;
-supersparc) base_machine=sparc machine=sparc/sparc8 ;;
-sparc64) base_machine=sparc64 machine=sparc64/$machine ;;
+sparc | sparcv[67])
+ base_machine=sparc machine=sparc/sparc32 ;;
+sparcv8 | supersparc | hypersparc)
+ base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
+sparc64 | ultrasparc)
+ base_machine=sparc machine=sparc/sparc64 ;;
esac
changequote([,])dnl
AC_SUBST(base_machine)
diff --git a/csu/Makefile b/csu/Makefile
index 4c34354..6c8c877 100644
--- a/csu/Makefile
+++ b/csu/Makefile
@@ -52,42 +52,21 @@ CPPFLAGS += -DHAVE_INITFINI
# "functions" _init and _fini to run the .init and .fini sections.
crtstuff = crti crtn
-# If we need separate startup code, require separate code.
-ifeq ($(need-nopic-initfini),yes)
-crtstuff += crtiS crtnS
-endif
-
install-lib += $(crtstuff:=.o)
extra-objs += $(crtstuff:=.o)
-generated += $(crtstuff:=.S) initfini.s initfiniS.s align.h end.h
+generated += $(crtstuff:=.S) initfini.s align.h end.h
omit-deps += $(crtstuff)
# Special rules for the building of crti.o and crtn.o
$(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
- $(compile.S) -g0 -o $@
+ $(compile.S) -g0 $(ASFLAGS-.so) -o $@
$(objpfx)initfini.s: initfini.c
- $(compile.c) -g0 -S -finhibit-size-directive \
- $(no-exceptions) -o $@
-
-$(objpfx)initfiniS.s: initfini.c
$(compile.c) -g0 -S -fPIC -finhibit-size-directive \
$(no-exceptions) -o $@
-ifneq ($(need-nopic-initfini),yes)
# We only have one kind of startup code files. Static binaries and
# shared libraries are build using the PIC version.
-$(objpfx)crti.S: $(objpfx)initfiniS.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-
-$(objpfx)crtn.S: $(objpfx)initfiniS.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-else
-# We have to build two versions, one with one without PIC code.
$(objpfx)crti.S: $(objpfx)initfini.s
sed -n -e '1,/@HEADER_ENDS/p' \
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
@@ -98,17 +77,6 @@ $(objpfx)crtn.S: $(objpfx)initfini.s
-e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
-e '/@TRAILER_BEGINS/,$$p' $< > $@
-$(objpfx)crtiS.S: $(objpfx)initfiniS.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-
-$(objpfx)crtnS.S: $(objpfx)initfiniS.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-endif
-
$(objpfx)defs.h: $(objpfx)initfini.s
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
awk -f defs.awk > $@
diff --git a/elf/Makefile b/elf/Makefile
index 904099c..f8dc9d0 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -22,13 +22,13 @@ subdir := elf
headers = elf.h bits/elfclass.h bits/dlfcn.h link.h dlfcn.h
routines = $(dl-routines) dl-open dl-close dl-symbol dl-support \
- dl-version enbl-secure
+ enbl-secure
# The core dynamic linking functions are in libc for the static and
# profiled libraries.
dl-routines = $(addprefix dl-,load cache lookup object reloc deps \
runtime error init fini debug misc \
- profile)
+ version profile)
# But they are absent from the shared libc, because that code is in ld.so.
elide-routines.so = $(dl-routines) dl-support enbl-secure
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index e990d69..3fbb3db 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -21,7 +21,7 @@
#include <errno.h>
#include <dlfcn.h>
#include <stdlib.h>
-
+#include <string.h>
#include <assert.h>
/* Whether an shared object references one or more auxiliary objects
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c
index 486e5bc..a76e01d 100644
--- a/elf/dl-minimal.c
+++ b/elf/dl-minimal.c
@@ -23,7 +23,7 @@
#include <assert.h>
#include <string.h>
#include <link.h>
-#include "../stdio-common/_itoa.h"
+#include <stdio-common/_itoa.h>
/* Minimal `malloc' allocator for use while loading shared libraries.
Only small blocks are allocated, and none are ever freed. */
@@ -43,9 +43,6 @@ malloc (size_t n)
#define MAP_ANON 0
#endif
- if (_dl_pagesize == 0)
- _dl_pagesize = __getpagesize ();
-
if (alloc_end == 0)
{
/* Consume any unused space in the last page of our data segment. */
@@ -115,10 +112,16 @@ realloc (void *ptr, size_t n)
int weak_function
__sigjmp_save (sigjmp_buf env, int savemask)
-{ env[0].__mask_was_saved = savemask; return 0; }
+{
+ env[0].__mask_was_saved = savemask;
+ return 0;
+}
void weak_function
-longjmp (jmp_buf env, int val) { __longjmp (env[0].__jmpbuf, val); }
+longjmp (jmp_buf env, int val)
+{
+ __longjmp (env[0].__jmpbuf, val);
+}
/* Define our own stub for the localization function used by strerror.
English-only in the dynamic linker keeps it smaller. */
diff --git a/elf/do-rel.h b/elf/do-rel.h
index 7f4b125..2e0f26b 100644
--- a/elf/do-rel.h
+++ b/elf/do-rel.h
@@ -37,12 +37,11 @@
static inline void
elf_dynamic_do_rel (struct link_map *map,
- int reltag, int sztag,
+ ElfW(Addr) reladdr, ElfW(Addr) relsize,
int lazy)
{
- const ElfW(Rel) *r
- = (const ElfW(Rel) *) (map->l_addr + map->l_info[reltag]->d_un.d_ptr);
- const ElfW(Rel) *end = &r[map->l_info[sztag]->d_un.d_val / sizeof *r];
+ const ElfW(Rel) *r = (const ElfW(Rel) *)(map->l_addr + reladdr);
+ const ElfW(Rel) *end = (const ElfW(Rel) *)(map->l_addr + reladdr + relsize);
if (lazy)
/* Doing lazy PLT relocations; they need very little info. */
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
index 4a946f8..64b5f78 100644
--- a/elf/dynamic-link.h
+++ b/elf/dynamic-link.h
@@ -75,14 +75,75 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn,
duplicating their code. It cannot be done in a more general function
because we must be able to completely inline. */
+/* On some machines, notably Sparc, DT_REL* includes DT_JMPREL in its
+ range. Note that according to the ELF spec, this is completely legal!
+ But conditionally define things so that on machines we know this will
+ not happen we do something more optimal. */
+
+#ifdef ELF_MACHINE_PLTREL_OVERLAP
+#define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, lazy) \
+ do { \
+ ElfW(Addr) r_addr, r_size, p_addr, p_size; \
+ if ((map)->l_info[DT_##RELOC]) \
+ { \
+ r_addr = (map)->l_info[DT_##RELOC]->d_un.d_ptr; \
+ r_size = (map)->l_info[DT_##RELOC##SZ]->d_un.d_val; \
+ if ((map)->l_info[DT_PLTREL] && \
+ (map)->l_info[DT_PLTREL]->d_un.d_val == DT_##RELOC) \
+ { \
+ p_addr = (map)->l_info[DT_JMPREL]->d_un.d_ptr; \
+ p_size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
+ if (r_addr <= p_addr && r_addr+r_size > p_addr) \
+ { \
+ ElfW(Addr) r2_addr, r2_size; \
+ r2_addr = p_addr+p_size; \
+ if (r2_addr < r_addr+r_size) \
+ { \
+ r2_size = r_addr+r_size - r2_addr; \
+ elf_dynamic_do_##reloc ((map), r2_addr, r2_size, 0); \
+ } \
+ r_size = p_addr - r_addr; \
+ } \
+ } \
+ \
+ elf_dynamic_do_##reloc ((map), r_addr, r_size, 0); \
+ if (p_addr) \
+ elf_dynamic_do_##reloc ((map), p_addr, p_size, (lazy)); \
+ } \
+ else if ((map)->l_info[DT_PLTREL] && \
+ (map)->l_info[DT_PLTREL]->d_un.d_val == DT_##RELOC) \
+ { \
+ p_addr = (map)->l_info[DT_JMPREL]->d_un.d_ptr; \
+ p_size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
+ \
+ elf_dynamic_do_##reloc ((map), p_addr, p_size, (lazy)); \
+ } \
+ } while (0)
+#else
+#define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, lazy) \
+ do { \
+ if ((map)->l_info[DT_##RELOC]) \
+ { \
+ ElfW(Addr) r_addr, r_size; \
+ r_addr = (map)->l_info[DT_##RELOC]->d_un.d_ptr; \
+ r_size = (map)->l_info[DT_##RELOC##SZ]->d_un.d_val; \
+ elf_dynamic_do_##reloc ((map), r_addr, r_size, 0); \
+ } \
+ if ((map)->l_info[DT_PLTREL] && \
+ (map)->l_info[DT_PLTREL]->d_un.d_val == DT_##RELOC) \
+ { \
+ ElfW(Addr) p_addr, p_size; \
+ p_addr = (map)->l_info[DT_JMPREL]->d_un.d_ptr; \
+ p_size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
+ elf_dynamic_do_##reloc ((map), p_addr, p_size, (lazy)); \
+ } \
+ } while (0)
+#endif
+
#if ! ELF_MACHINE_NO_REL
#include "do-rel.h"
-#define ELF_DYNAMIC_DO_REL(map, lazy) \
- if ((map)->l_info[DT_REL]) \
- elf_dynamic_do_rel ((map), DT_REL, DT_RELSZ, 0); \
- if ((map)->l_info[DT_PLTREL] && \
- (map)->l_info[DT_PLTREL]->d_un.d_val == DT_REL) \
- elf_dynamic_do_rel ((map), DT_JMPREL, DT_PLTRELSZ, (lazy));
+#define ELF_DYNAMIC_DO_REL(map, lazy) \
+ _ELF_DYNAMIC_DO_RELOC (REL, rel, map, lazy)
#else
#define ELF_DYNAMIC_DO_REL(map, lazy) /* Nothing to do. */
#endif
@@ -90,12 +151,8 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn,
#if ! ELF_MACHINE_NO_RELA
#define DO_RELA
#include "do-rel.h"
-#define ELF_DYNAMIC_DO_RELA(map, lazy) \
- if ((map)->l_info[DT_RELA]) \
- elf_dynamic_do_rela ((map), DT_RELA, DT_RELASZ, 0); \
- if ((map)->l_info[DT_PLTREL] && \
- (map)->l_info[DT_PLTREL]->d_un.d_val == DT_RELA) \
- elf_dynamic_do_rela ((map), DT_JMPREL, DT_PLTRELSZ, (lazy));
+#define ELF_DYNAMIC_DO_RELA(map, lazy) \
+ _ELF_DYNAMIC_DO_RELOC (RELA, rela, map, lazy)
#else
#define ELF_DYNAMIC_DO_RELA(map, lazy) /* Nothing to do. */
#endif
diff --git a/elf/elf.h b/elf/elf.h
index 02d092f..e78bcb5 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -505,6 +505,7 @@ typedef struct
entry */
} Elf32_Verdef;
+#if 0
/* XXX We have no information what types should be used for 64 bit
architectures. What is following is only an intelligent guess. */
typedef struct
@@ -518,6 +519,11 @@ typedef struct
Elf64_Word vd_next; /* Offset in bytes to next verdef
entry */
} Elf64_Verdef;
+#else
+/* The linker doesn't even parameterize the version info swapping
+ routines. I wonder if it should or is this good enough. */
+typedef Elf32_Verdef Elf64_Verdef;
+#endif
/* Legal values for vd_version (version revision). */
#define VER_DEF_NONE 0 /* No version */
@@ -537,6 +543,7 @@ typedef struct
entry */
} Elf32_Verdaux;
+#if 0
/* XXX We have no information what types should be used for 64 bit
architectures. What is following is only an intelligent guess. */
typedef struct
@@ -545,6 +552,10 @@ typedef struct
Elf64_Word vda_next; /* Offset in bytes to next verdaux
entry */
} Elf64_Verdaux;
+#else
+/* The linker doesn't even parameterize this -- should it? */
+typedef Elf32_Verdaux Elf64_Verdaux;
+#endif
/* Version dependency section. */
@@ -559,6 +570,7 @@ typedef struct
entry */
} Elf32_Verneed;
+#if 0
/* XXX We have no information what types should be used for 64 bit
architectures. What is following is only an intelligent guess. */
typedef struct
@@ -571,6 +583,10 @@ typedef struct
Elf64_Word vn_next; /* Offset in bytes to next verneed
entry */
} Elf64_Verneed;
+#else
+/* The linker doesn't even parameterize this -- should it? */
+typedef Elf32_Verneed Elf64_Verneed;
+#endif
/* Legal values for vn_version (version revision). */
#define VER_NEED_NONE 0 /* No version */
@@ -589,6 +605,7 @@ typedef struct
entry */
} Elf32_Vernaux;
+#if 0
/* XXX We have no information what types should be used for 64 bit
architectures. What is following is only an intelligent guess. */
typedef struct
@@ -600,6 +617,10 @@ typedef struct
Elf64_Word vna_next; /* Offset in bytes to next vernaux
entry */
} Elf64_Vernaux;
+#else
+/* The linker doesn't even parameterize these -- should it? */
+typedef Elf32_Vernaux Elf64_Vernaux;
+#endif
/* Legal values for vna_flags. */
#define VER_FLG_WEAK 0x2 /* Weak verison identifier */
@@ -732,6 +753,36 @@ typedef struct
#define R_SPARC_RELATIVE 22 /* Adjust by program base */
#define R_SPARC_UA32 23 /* Direct 32 bit unaligned */
+/* Additional Sparc64 relocs. */
+
+#define R_SPARC_PLT32 24 /* Direct 32 bit ref to PLT entry */
+#define R_SPARC_HIPLT22 25 /* High 22 bit PLT entry */
+#define R_SPARC_LOPLT10 26 /* Truncated 10 bit PLT entry */
+#define R_SPARC_PCPLT32 27 /* PC rel 32 bit ref to PLT entry */
+#define R_SPARC_PCPLT22 28 /* PC rel high 22 bit PLT entry */
+#define R_SPARC_PCPLT10 29 /* PC rel trunc 10 bit PLT entry */
+#define R_SPARC_10 30 /* Direct 10 bit */
+#define R_SPARC_11 31 /* Direct 11 bit */
+#define R_SPARC_64 32 /* Direct 64 bit */
+#define R_SPARC_OLO10 33 /* ?? */
+#define R_SPARC_HH22 34 /* Top 22 bits of direct 64 bit */
+#define R_SPARC_HM10 35 /* High middle 10 bits of ... */
+#define R_SPARC_LM22 36 /* Low middle 22 bits of ... */
+#define R_SPARC_PC_HH22 37 /* Top 22 bits of pc rel 64 bit */
+#define R_SPARC_PC_HM10 38 /* High middle 10 bit of ... */
+#define R_SPARC_PC_LM22 39 /* Low miggle 22 bits of ... */
+#define R_SPARC_WDISP16 40 /* PC relative 16 bit shifted */
+#define R_SPARC_WDISP19 41 /* PC relative 19 bit shifted */
+#define R_SPARC_GLOB_JMP 42 /* ?? */
+#define R_SPARC_7 43 /* Direct 7 bit */
+#define R_SPARC_5 44 /* Direct 5 bit */
+#define R_SPARC_6 45 /* Direct 6 bit */
+
+/* For Sparc64, legal values for d_tag of Elf64_Dyn. */
+
+#define DT_SPARC_PLTFMT 0x70000001 /* .plt format version/type */
+#define DT_SPARC_NUM 2
+
/* MIPS R3000 specific definitions. */
/* Legal values for e_flags field of Elf32_Ehdr. */
diff --git a/elf/link.h b/elf/link.h
index 38a7c88..a90854a 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -444,6 +444,10 @@ extern void _dl_start_profile (struct link_map *map, const char *output_dir);
/* The actual functions used to keep book on the calls. */
extern void _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc);
+
+/* Show the member of the auxiliry aray passed up from the kernel. */
+extern void _dl_show_auxv (void);
+
__END_DECLS
#endif /* link.h */
diff --git a/elf/rtld.c b/elf/rtld.c
index 726463c..c3d81e1 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -261,6 +261,11 @@ dl_main (const ElfW(Phdr) *phdr,
char *file;
int has_interp = 0;
+ /* Test whether we want to see the content of the auxiliary array passed
+ up from the kernel. */
+ if (getenv ("LD_SHOW_AUXV") != NULL)
+ _dl_show_auxv ();
+
mode = getenv ("LD_TRACE_LOADED_OBJECTS") != NULL ? trace : normal;
_dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1;
diff --git a/io/ftw.c b/io/ftw.c
index a89055e..8cccbac 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -105,10 +105,10 @@ object_compare (const void *p1, const void *p2)
accidentally compare `holes' in the structure. */
const struct known_object *kp1 = p1, *kp2 = p2;
int cmp1;
- cmp1 = memcmp(&kp1->dev, &kp2->dev, sizeof(kp1->dev));
+ cmp1 = (kp1->dev > kp2->dev) - (kp1->dev < kp2->dev);
if (cmp1 != 0)
return cmp1;
- return memcmp (&kp1->ino, &kp2->ino, sizeof (kp1->ino));
+ return (kp1->ino > kp2->ino) - (kp1->ino < kp2->ino);
}
diff --git a/libc.map b/libc.map
index a3567b6..e503c9c 100644
--- a/libc.map
+++ b/libc.map
@@ -11,7 +11,8 @@ GLIBC_2.0 {
_nl_current_LC_COLLATE; __collate_element_hash;
__collate_element_strings; __collate_symbol_classes;
__collate_symbol_hash; __collate_symbol_strings;
- _obstack;
+ _obstack; _libio_using_thunks;
+ __progname_full; __progname;
# helper functions
__errno_location; __libc_init_first; __h_errno_location;
@@ -84,6 +85,7 @@ GLIBC_2.0 {
_IO_str_underflow; _IO_str_init_static; _IO_str_init_readonly;
_IO_str_seekoff; _IO_str_pbackfail; _IO_list_all; _IO_file_jumps;
_IO_peekc_locked;
+ __vsscanf; __vfscanf; __vsnprintf;
_rpc_dtablesize; _null_auth; _seterr_reply;
__res_randomid;
diff --git a/libio/iofdopen.c b/libio/iofdopen.c
index 67c629c..4ec9a1c 100644
--- a/libio/iofdopen.c
+++ b/libio/iofdopen.c
@@ -128,4 +128,6 @@ _IO_fdopen (fd, mode)
return (_IO_FILE *) &new_f->fp;
}
+#ifdef weak_alias
weak_alias (_IO_fdopen, fdopen)
+#endif
diff --git a/libio/iofflush.c b/libio/iofflush.c
index 96cb49b..0829888 100644
--- a/libio/iofflush.c
+++ b/libio/iofflush.c
@@ -43,4 +43,6 @@ _IO_fflush (fp)
}
}
+#ifdef weak_alias
weak_alias (_IO_fflush, fflush)
+#endif
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index 53a359e..9682af9 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.c
@@ -49,4 +49,6 @@ _IO_fgetpos (fp, posp)
return 0;
}
+#ifdef weak_alias
weak_alias (_IO_fgetpos, fgetpos)
+#endif
diff --git a/libio/iofgets.c b/libio/iofgets.c
index 7a1044f..c8ec289 100644
--- a/libio/iofgets.c
+++ b/libio/iofgets.c
@@ -50,4 +50,6 @@ _IO_fgets (buf, n, fp)
return result;
}
+#ifdef weak_alias
weak_alias (_IO_fgets, fgets)
+#endif
diff --git a/libio/iofopen.c b/libio/iofopen.c
index cea2415..acf034c 100644
--- a/libio/iofopen.c
+++ b/libio/iofopen.c
@@ -58,4 +58,6 @@ _IO_fopen (filename, mode)
return NULL;
}
+#ifdef weak_alias
weak_alias (_IO_fopen, fopen)
+#endif
diff --git a/libio/iofputs.c b/libio/iofputs.c
index 9ce3caa..7c76ac6 100644
--- a/libio/iofputs.c
+++ b/libio/iofputs.c
@@ -43,4 +43,6 @@ _IO_fputs (str, fp)
return result;
}
+#ifdef weak_alias
weak_alias (_IO_fputs, fputs)
+#endif
diff --git a/libio/iofread.c b/libio/iofread.c
index 5fed0d8..ad7e484 100644
--- a/libio/iofread.c
+++ b/libio/iofread.c
@@ -42,4 +42,7 @@ _IO_fread (buf, size, count, fp)
_IO_cleanup_region_end (1);
return bytes_requested == bytes_read ? count : bytes_read / size;
}
+
+#ifdef weak_alias
weak_alias (_IO_fread, fread)
+#endif
diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c
index 2d29fa7..2f71d79 100644
--- a/libio/iofsetpos.c
+++ b/libio/iofsetpos.c
@@ -50,4 +50,6 @@ _IO_fsetpos (fp, posp)
return result;
}
+#ifdef weak_alias
weak_alias (_IO_fsetpos, fsetpos)
+#endif
diff --git a/libio/ioftell.c b/libio/ioftell.c
index 7fe18f8..37156bb 100644
--- a/libio/ioftell.c
+++ b/libio/ioftell.c
@@ -47,4 +47,6 @@ _IO_ftell (fp)
return _IO_pos_as_off (pos);
}
+#ifdef weak_alias
weak_alias (_IO_ftell, ftell)
+#endif
diff --git a/libio/iofwrite.c b/libio/iofwrite.c
index 542fa77..3f098e0 100644
--- a/libio/iofwrite.c
+++ b/libio/iofwrite.c
@@ -48,4 +48,6 @@ _IO_fwrite (buf, size, count, fp)
return written/size;
}
+#ifdef weak_alias
weak_alias (_IO_fwrite, fwrite)
+#endif
diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c
index b1662e4..8e87511 100644
--- a/libio/iogetdelim.c
+++ b/libio/iogetdelim.c
@@ -118,5 +118,7 @@ unlock_return:
return result;
}
+#ifdef weak_alias
weak_alias (_IO_getdelim, __getdelim)
weak_alias (_IO_getdelim, getdelim)
+#endif
diff --git a/libio/iogets.c b/libio/iogets.c
index 0e87504..ed07876 100644
--- a/libio/iogets.c
+++ b/libio/iogets.c
@@ -61,7 +61,9 @@ unlock_return:
return retval;
}
+#ifdef weak_alias
weak_alias (_IO_gets, gets)
+#endif
#ifdef _LIBC
link_warning (gets, "the `gets' function is dangerous and should not be used.")
diff --git a/libio/iopopen.c b/libio/iopopen.c
index 5703c99..0768321 100644
--- a/libio/iopopen.c
+++ b/libio/iopopen.c
@@ -177,7 +177,9 @@ DEFUN(_IO_popen, (command, mode),
return NULL;
}
+#ifdef strong_alias
strong_alias (_IO_popen, popen);
+#endif
int
DEFUN(_IO_proc_close, (fp),
diff --git a/libio/ioputs.c b/libio/ioputs.c
index c35ceb8..fcc296a 100644
--- a/libio/ioputs.c
+++ b/libio/ioputs.c
@@ -41,4 +41,7 @@ _IO_puts (str)
_IO_cleanup_region_end (1);
return result;
}
+
+#ifdef weak_alias
weak_alias (_IO_puts, puts)
+#endif
diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c
index 09751af..8921887 100644
--- a/libio/iosetbuffer.c
+++ b/libio/iosetbuffer.c
@@ -40,4 +40,6 @@ _IO_setbuffer (fp, buf, size)
_IO_cleanup_region_end (1);
}
+#ifdef weak_alias
weak_alias (_IO_setbuffer, setbuffer)
+#endif
diff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c
index 0bd6025..3e105f3 100644
--- a/libio/iosetvbuf.c
+++ b/libio/iosetvbuf.c
@@ -94,4 +94,6 @@ unlock_return:
return result;
}
+#ifdef weak_alias
weak_alias (_IO_setvbuf, setvbuf)
+#endif
diff --git a/libio/ioungetc.c b/libio/ioungetc.c
index d36b07a..866cba6 100644
--- a/libio/ioungetc.c
+++ b/libio/ioungetc.c
@@ -40,4 +40,6 @@ _IO_ungetc (c, fp)
return result;
}
+#ifdef weak_alias
weak_alias (_IO_ungetc, ungetc)
+#endif
diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c
index 099863c..25bae66 100644
--- a/libio/iovsprintf.c
+++ b/libio/iovsprintf.c
@@ -51,4 +51,6 @@ _IO_vsprintf (string, format, args)
return ret;
}
+#ifdef weak_alias
weak_alias (_IO_vsprintf, vsprintf)
+#endif
diff --git a/libio/iovsscanf.c b/libio/iovsscanf.c
index c0c2ef0..e9376fe 100644
--- a/libio/iovsscanf.c
+++ b/libio/iovsscanf.c
@@ -44,5 +44,8 @@ DEFUN(_IO_vsscanf, (string, format, args),
_IO_cleanup_region_end (1);
return ret;
}
+
+#ifdef weak_alias
weak_alias (_IO_vsscanf, __vsscanf)
weak_alias (_IO_vsscanf, vsscanf)
+#endif
diff --git a/login/getutid.c b/login/getutid.c
index d3d3b5d..98e8e4a 100644
--- a/login/getutid.c
+++ b/login/getutid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,7 +25,7 @@ static struct utmp buffer;
struct utmp *
-getutid (const struct utmp *id)
+__getutid (const struct utmp *id)
{
struct utmp *result;
@@ -34,3 +34,5 @@ getutid (const struct utmp *id)
return result;
}
+weak_alias (__getutid, getutid)
+weak_alias (__getutid, getutxid)
diff --git a/login/login.c b/login/login.c
index 075ef15..4d08dbb 100644
--- a/login/login.c
+++ b/login/login.c
@@ -115,7 +115,7 @@ login (const struct utmp *ut)
strncpy (copy.ut_line, ttyp, UT_LINESIZE);
/* Tell that we want to use the UTMP file. */
- if (utmpname (_PATH_UTMP) != 0)
+ if (utmpname (_PATH_UTMP) == 0)
{
struct utmp *old;
diff --git a/login/programs/xtmp.c b/login/programs/xtmp.c
index 105145b..e27e1a8 100644
--- a/login/programs/xtmp.c
+++ b/login/programs/xtmp.c
@@ -85,30 +85,37 @@ utmp_to_xtmp (const struct utmp *utmp, struct xtmp *xtmp)
/* Compare an old style entry XTMP with a new style entry UTMP. The
function returns 1 if the information that is in both old and new
- style entries is identical. Otherwise this function returns 0. */
+ style entries is identical. Otherwise this function returns 0.
+
+ The type of the argument `xtmp' is `struct utmp *', not `struct
+ utmp *'. This is intentional! We convert from and to `struct
+ xtmp' directly when we read and write an old style entry. But
+ since XTMP is converted from an old style entry, we compare only
+ those elements of the structure that are common to both the new and
+ the old style entry. */
int
-compare_entry (const struct xtmp *xtmp, const struct utmp *utmp)
+compare_entry (const struct utmp *xtmp, const struct utmp *utmp)
{
return
(
#if _HAVE_XT_TYPE - 0
- xtmp->xt_type == utmp->ut_type
+ xtmp->ut_type == utmp->ut_type
#endif
#if _HAVE_XT_PID - 0
- && xtmp->xt_pid == utmp->ut_pid
+ && xtmp->ut_pid == utmp->ut_pid
#endif
- && !strncmp (xtmp->xt_line, utmp->ut_line, XT_LINESIZE - 1)
+ && !strncmp (xtmp->ut_line, utmp->ut_line, XT_LINESIZE - 1)
#if _HAVE_XT_ID - 0
- && !strncmp (xtmp->xt_id, utmp->ut_id, sizeof utmp->ut_id)
+ && !strncmp (xtmp->ut_id, utmp->ut_id, sizeof utmp->ut_id)
#endif
#if _HAVE_UT_TV - 0
- && xtmp->xt_time == utmp->ut_tv.tv_sec
+ && xtmp->ut_tv.tv_sec == utmp->ut_tv.tv_sec
#else
- && xtmp->xt_time == utmp->ut_time
+ && xtmp->ut_time == utmp->ut_time
#endif
- && !strncmp (xtmp->xt_user, utmp->ut_user, XT_NAMESIZE)
+ && !strncmp (xtmp->ut_user, utmp->ut_user, XT_NAMESIZE)
#if _HAVE_XT_HOST - 0
- && !strncmp (xtmp->xt_host, utmp->ut_host, XT_HOSTSIZE - 1)
+ && !strncmp (xtmp->ut_host, utmp->ut_host, XT_HOSTSIZE - 1)
#endif
- && xtmp->xt_addr == utmp->ut_addr);
+ && xtmp->ut_addr == utmp->ut_addr);
}
diff --git a/login/programs/xtmp.h b/login/programs/xtmp.h
index 5089932..25949ef 100644
--- a/login/programs/xtmp.h
+++ b/login/programs/xtmp.h
@@ -20,7 +20,6 @@
#ifndef _XTMP_H
#define _XTMP_H 1
-#include <features.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -50,7 +49,7 @@ struct xtmp
extern void xtmp_to_utmp (const struct xtmp *xtmp, struct utmp *utmp);
extern void utmp_to_xtmp (const struct utmp *utmp, struct xtmp *xtmp);
-extern int compare_entry (const struct xtmp *xtmp,
+extern int compare_entry (const struct utmp *xtmp,
const struct utmp *utmp);
#endif /* xtmp.h */
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 1a5c886..fb51483 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -1185,6 +1185,8 @@ static Void_t* realloc_check(Void_t* oldmem, size_t bytes);
static Void_t* memalign_check(size_t alignment, size_t bytes);
static Void_t* malloc_starter(size_t sz);
static void free_starter(Void_t* mem);
+static Void_t* malloc_atfork(size_t sz);
+static void free_atfork(Void_t* mem);
#endif
#else
@@ -1204,6 +1206,8 @@ static Void_t* realloc_check();
static Void_t* memalign_check();
static Void_t* malloc_starter();
static void free_starter();
+static Void_t* malloc_atfork();
+static void free_atfork();
#endif
#endif
@@ -1510,6 +1514,58 @@ static unsigned long max_mmapped_mem = 0;
int __malloc_initialized = 0;
+/* The following two functions are registered via thread_atfork() to
+ make sure that the mutexes remain in a consistent state in the
+ fork()ed version of a thread. Also adapt the malloc and free hooks
+ temporarily, because the `atfork' handler mechanism may use
+ malloc/free internally (e.g. in LinuxThreads). */
+
+#if defined(_LIBC) || defined(MALLOC_HOOKS)
+static __malloc_ptr_t (*save_malloc_hook) __MALLOC_P ((size_t __size));
+static void (*save_free_hook) __MALLOC_P ((__malloc_ptr_t __ptr));
+static Void_t* save_arena;
+#endif
+
+static void
+ptmalloc_lock_all __MALLOC_P((void))
+{
+ arena *ar_ptr;
+
+ (void)mutex_lock(&list_lock);
+ for(ar_ptr = &main_arena;;) {
+ (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = ar_ptr->next;
+ if(ar_ptr == &main_arena) break;
+ }
+#if defined(_LIBC) || defined(MALLOC_HOOKS)
+ save_malloc_hook = __malloc_hook;
+ save_free_hook = __free_hook;
+ __malloc_hook = malloc_atfork;
+ __free_hook = free_atfork;
+ /* Only the current thread may perform malloc/free calls now. */
+ tsd_getspecific(arena_key, save_arena);
+ tsd_setspecific(arena_key, (Void_t*)0);
+#endif
+}
+
+static void
+ptmalloc_unlock_all __MALLOC_P((void))
+{
+ arena *ar_ptr;
+
+#if defined(_LIBC) || defined(MALLOC_HOOKS)
+ tsd_setspecific(arena_key, save_arena);
+ __malloc_hook = save_malloc_hook;
+ __free_hook = save_free_hook;
+#endif
+ for(ar_ptr = &main_arena;;) {
+ (void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = ar_ptr->next;
+ if(ar_ptr == &main_arena) break;
+ }
+ (void)mutex_unlock(&list_lock);
+}
+
/* Initialization routine. */
#if defined(_LIBC)
#if 0
@@ -1524,8 +1580,6 @@ ptmalloc_init __MALLOC_P((void))
#endif
{
#if defined(_LIBC) || defined(MALLOC_HOOKS)
- __malloc_ptr_t (*save_malloc_hook) __MALLOC_P ((size_t __size));
- void (*save_free_hook) __MALLOC_P ((__malloc_ptr_t __ptr));
const char* s;
#endif
@@ -1550,6 +1604,7 @@ ptmalloc_init __MALLOC_P((void))
mutex_init(&list_lock);
tsd_key_create(&arena_key, NULL);
tsd_setspecific(arena_key, (Void_t *)&main_arena);
+ thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_unlock_all);
#endif
#if defined(_LIBC) || defined(MALLOC_HOOKS)
if((s = getenv("MALLOC_TRIM_THRESHOLD_")))
@@ -1572,6 +1627,12 @@ ptmalloc_init __MALLOC_P((void))
#endif
}
+/* There are platforms (e.g. Hurd) with a link-time hook mechanism. */
+#ifdef thread_atfork_static
+thread_atfork_static(ptmalloc_lock_all, ptmalloc_unlock_all, \
+ ptmalloc_unlock_all)
+#endif
+
#if defined(_LIBC) || defined(MALLOC_HOOKS)
/* Hooks for debugging versions. The initial hooks just call the
@@ -4240,6 +4301,65 @@ free_starter(mem) Void_t* mem;
chunk_free(&main_arena, p);
}
+/* The following hooks are used while the `atfork' handling mechanism
+ is active. */
+
+static Void_t*
+#if __STD_C
+malloc_atfork(size_t sz)
+#else
+malloc_atfork(sz) size_t sz;
+#endif
+{
+ Void_t *vptr = NULL;
+
+ tsd_getspecific(arena_key, vptr);
+ if(!vptr) {
+ mchunkptr victim = chunk_alloc(&main_arena, request2size(sz));
+ return victim ? chunk2mem(victim) : 0;
+ } else {
+ /* Suspend the thread until the `atfork' handlers have completed.
+ By that time, the hooks will have been reset as well, so that
+ mALLOc() can be used again. */
+ (void)mutex_lock(&list_lock);
+ (void)mutex_unlock(&list_lock);
+ return mALLOc(sz);
+ }
+}
+
+static void
+#if __STD_C
+free_atfork(Void_t* mem)
+#else
+free_atfork(mem) Void_t* mem;
+#endif
+{
+ Void_t *vptr = NULL;
+ arena *ar_ptr;
+ mchunkptr p; /* chunk corresponding to mem */
+
+ if (mem == 0) /* free(0) has no effect */
+ return;
+
+ p = mem2chunk(mem);
+
+#if HAVE_MMAP
+ if (chunk_is_mmapped(p)) /* release mmapped memory. */
+ {
+ munmap_chunk(p);
+ return;
+ }
+#endif
+
+ ar_ptr = arena_for_ptr(p);
+ tsd_getspecific(arena_key, vptr);
+ if(vptr)
+ (void)mutex_lock(&ar_ptr->mutex);
+ chunk_free(ar_ptr, p);
+ if(vptr)
+ (void)mutex_unlock(&ar_ptr->mutex);
+}
+
#endif /* defined(_LIBC) || defined(MALLOC_HOOKS) */
diff --git a/malloc/thread-m.h b/malloc/thread-m.h
index 9afd058..24d95df 100644
--- a/malloc/thread-m.h
+++ b/malloc/thread-m.h
@@ -26,6 +26,8 @@
#ifndef _THREAD_M_H
#define _THREAD_M_H
+#undef thread_atfork_static
+
#if defined(_LIBC) /* The GNU C library, a special case of Posix threads */
#include <bits/libc-lock.h>
@@ -65,6 +67,9 @@ static Void_t *malloc_key_data;
#define mutex_unlock(m) \
(__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (m) : 0)
+#define thread_atfork(prepare, parent, child) \
+ (__pthread_atfork != NULL ? __pthread_atfork(prepare, parent, child) : 0)
+
#elif defined(MUTEX_INITIALIZER)
/* Assume hurd, with cthreads */
@@ -95,6 +100,12 @@ static int tsd_keys_alloced = 0;
#define tsd_getspecific(key, vptr) \
((vptr) = (void *)*__hurd_threadvar_location (_HURD_THREADVAR_MALLOC))
+#define thread_atfork(prepare, parent, child) do {} while(0)
+#define thread_atfork_static(prepare, parent, child) \
+ text_set_element(_hurd_fork_prepare_hook, prepare); \
+ text_set_element(_hurd_fork_parent_hook, parent); \
+ text_set_element(_hurd_fork_child_hook, child);
+
/* No we're *not* using pthreads. */
#define __pthread_initialize ((void (*)(void))0)
@@ -126,6 +137,10 @@ typedef pthread_key_t tsd_key_t;
#define tsd_setspecific(key, data) pthread_setspecific(key, data)
#define tsd_getspecific(key, vptr) (vptr = pthread_getspecific(key))
+/* at fork */
+#define thread_atfork(prepare, parent, child) \
+ pthread_atfork(prepare, parent, child)
+
#elif USE_THR /* Solaris threads */
#include <thread.h>
@@ -147,6 +162,8 @@ typedef void *tsd_key_t[256];
#define tsd_setspecific(key, data) (key[(unsigned)thr_self() % 256] = (data))
#define tsd_getspecific(key, vptr) (vptr = key[(unsigned)thr_self() % 256])
+#define thread_atfork(prepare, parent, child) do {} while(0)
+
#elif USE_SPROC /* SGI sproc() threads */
#include <sys/wait.h>
@@ -170,6 +187,8 @@ int tsd_key_next;
#define tsd_setspecific(key, data) (((void **)(&PRDA->usr_prda))[key] = data)
#define tsd_getspecific(key, vptr) (vptr = ((void **)(&PRDA->usr_prda))[key])
+#define thread_atfork(prepare, parent, child) do {} while(0)
+
#else /* no _LIBC or USE_... are defined */
#define NO_THREADS
@@ -193,6 +212,8 @@ typedef void *tsd_key_t;
#define tsd_setspecific(key, data) do {} while(0)
#define tsd_getspecific(key, vptr) (vptr = NULL)
+#define thread_atfork(prepare, parent, child) do {} while(0)
+
#endif /* defined(NO_THREADS) */
#endif /* !defined(_THREAD_M_H) */
diff --git a/manual/creature.texi b/manual/creature.texi
index 5eb665d..edac770 100644
--- a/manual/creature.texi
+++ b/manual/creature.texi
@@ -73,6 +73,7 @@ included as well as the @w{ISO C}, POSIX.1, POSIX.2, and X/Open material.
@comment (none)
@comment XOPEN
@defvr Macro _XOPEN_SOURCE
+@defvrx Macro _XOPEN_SOURCE_EXTENDED
If you define this macro, functionality described in the X/Open
Portability Guide is included. This is a superset of the POSIX.1 and
POSIX.2 functionality and in fact @code{_POSIX_SOURCE} and
diff --git a/manual/math.texi b/manual/math.texi
index 71b3651..a703e89 100644
--- a/manual/math.texi
+++ b/manual/math.texi
@@ -1,10 +1,25 @@
@c We need some definitions here.
-@iftex
-@set TEXFORMULAS
-@end iftex
@ifhtml
@set cdot ·
@end ifhtml
+@iftex
+@set cdot @cdot
+@end iftex
+@ifclear cdot
+@set cdot x
+@end ifclear
+@iftex
+@set infty @infty
+@end iftex
+@ifclear infty
+@set infty oo
+@end ifclear
+@macro mul
+@value{cdot}
+@end macro
+@macro infinity
+@value{infty}
+@end macro
@node Mathematics, Arithmetic, Low-Level Terminal Interface, Top
@chapter Mathematics
@@ -53,7 +68,7 @@ in case of double using @code{double} is a good compromise.
@cindex domain error
Many of the functions listed in this chapter are defined mathematically
over a domain that is only a subset of real numbers. For example, the
-@code{acos} function is defined over the domain between @code{-1} and
+@code{acos} function is defined over the domain between @code{@minus{}1} and
@code{1}. If you pass an argument to one of these functions that is
outside the domain over which it is defined, the function sets
@code{errno} to @code{EDOM} to indicate a @dfn{domain error}. On
@@ -73,7 +88,7 @@ be representable as a floating point number. If magnitude of the
correct result is too large to be represented, the function sets
@code{errno} to @code{ERANGE} to indicate a @dfn{range error}, and
returns a particular very large value (named by the macro
-@code{HUGE_VAL}) or its negation (@w{@code{- HUGE_VAL}}).
+@code{HUGE_VAL}) or its negation (@code{@minus{}HUGE_VAL}).
If the magnitude of the result is too small, a value of zero is returned
instead. In this case, @code{errno} might or might not be
@@ -191,46 +206,19 @@ operation to be performed. Examples are
Any operation on a signalling NaN.
@item
Addition or subtraction; magnitude subtraction of infinities such as
-@iftex
-@tex
-$(+\infty) + (-\infty)$.
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{(+oo) + (-oo)}.
-@end ifclear
+@math{(+@infinity{}) + (-@infinity{})}.
@item
Multiplication:
-@iftex
-@tex
-$0 \cdot \infty$.
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@ifset cdot
-@math{0 @value{cdot} oo}.
-@end ifset
-@ifclear cdot
-@math{0 x oo}.
-@end ifclear
-@end ifclear
+@math{0 @mul{} @infinity{}}.
@item
-Division: @math{0/0} or
-@iftex
-@tex
-$\infty/\infty$.
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{oo/oo}.
-@end ifclear
+Division: @math{0/0} or @math{@infinity{}/@infinity{}}.
@item
Remainder: @math{x} REM @math{y}, where @math{y} is zero or @math{x} is
infinite.
@item
-Squre root if the operand is less then zero.
+Square root if the operand is less then zero.
@item
Conversion of an internal floating-point number to an integer or to a
decimal string when overflow, infinity, or NaN precludes a faithful
@@ -249,24 +237,7 @@ of the operation is taken as a quiet NaN.
@item Division by Zero
This exception is raised if the devisor is zero and the dividend is a
finite nonzero number. If no trap occurs the result is either
-@iftex
-@tex
-$\infty$
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{+oo}
-@end ifclear
-or
-@iftex
-@tex
-$-\infty$
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{-oo}
-@end ifclear
-, depending on the
+@math{+@infinity{}} or @math{-@infinity{}}, depending on the
signs of the operands.
@item Overflow
@@ -276,61 +247,20 @@ occurs the result depends on the sign of the intermediate result and the
current rounding mode (@w{IEEE 754}, @w{section 7.3}):
@enumerate
@item
-Round to nearest carries all overflows to
-@iftex
-@tex
-$\infty$
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{oo}
-@end ifclear
+Round to nearest carries all overflows to @math{@infinity{}}
with the sign of the intermediate result.
@item
-Round towards @math{0} carries all overflows to the precision's largest
+Round toward @math{0} carries all overflows to the precision's largest
finite number with the sign of the intermediate result.
@item
-Round towards
-@iftex
-@tex
-$-\infty$
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{-oo}
-@end ifclear
-carries positive overflows to the
+Round toward @math{-@infinity{}} carries positive overflows to the
precision's largest finite number and carries negative overflows to
-@iftex
-@tex
-$-\infty$.
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{-oo}.
-@end ifclear
+@math{-@infinity{}}.
@item
-Round towards
-@iftex
-@tex
-$\infty$
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{oo}
-@end ifclear
-carries negative overflows to the
+Round toward @math{@infinity{}} carries negative overflows to the
precision's most negative finite number and carries positive overflows
-to
-@iftex
-@tex
-$\infty$.
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{oo}.
-@end ifclear
+to @math{@infinity{}}.
@end enumerate
@item Underflow
@@ -565,9 +495,10 @@ unwanted exception and raise the remaining exceptions.
mode is supported by the floating-point implementation the corresponding
of the following macros is defined:
-@vtable @code
+@table @code
@comment fenv.h
@comment ISO
+@vindex FE_TONEAREST
@item FE_TONEAREST
Round to nearest. This is the default mode and should always be used
except when a different mode is explicitely required. Only rounding to
@@ -575,35 +506,22 @@ nearest guarantees numeric stability of the computations.
@comment fenv.h
@comment ISO
+@vindex FE_UPWARD
@item FE_UPWARD
-Round toward
-@iftex
-@tex
-$+\infty$.
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{+oo}.
-@end ifclear
+Round toward @math{+@infinity{}}.
@comment fenv.h
@comment ISO
+@vindex FE_DOWNWARD
@item FE_DOWNWARD
-Round toward
-@iftex
-@tex
-$-\infty$.
-@end tex
-@end iftex
-@ifclear TEXFORMULAS
-@math{-oo}.
-@end ifclear
+Round toward @math{-@infinity{}}.
@comment fenv.h
@comment ISO
+@vindex FE_TOWARDZERO
@item FE_TOWARDZERO
Round toward zero.
-@end vtable
+@end table
At any time one of the above four rounding modes is selected. To get
information about the currently selected mode one can use this function:
@@ -682,10 +600,10 @@ The value is the square root of the value of the number pi.
The value is the reziprocal of the square root of the value of the number pi.
@end vtable
-ALl values are defined as @code{long double} values unless the compiler
+All values are defined as @code{long double} values unless the compiler
does not support this type or @code{__STDC__} is not defined (both is
unlikely). Historically the numbers were @code{double} values and some
-old code still relies on this so you might want to add explizit casts if
+old code still relies on this so you might want to add explicit casts if
the extra precision of the @code{long double} value is not needed. One
critical case are functions with a variable number of arguments, such as
@code{printf}.
@@ -697,7 +615,7 @@ book about his C++ programming language where this value is used in
examples (and perhaps some AT&T headers contain this value). But due to
possible name space problems (@code{PI} is a quite frequently used name)
this value is not added to @file{math.h}. Every program should use
-@code{M_PI} instead or add on the the compiler command line
+@code{M_PI} instead or add on the compiler command line
@code{-DPI=M_PI}.
@@ -727,15 +645,15 @@ double} type.
@comment ISO
@deftypefn {Macro} int isgreater (@emph{real-floating} @var{x}, @emph{real-floating} @var{y})
This macro determines whether the argument @var{x} is greater than
-@var{y}. This is equivalent to @math{(x) > (y)} but no exception is
-raised if @var{x} or @var{y} are unordered.
+@var{y}. This is equivalent to @code{(@var{x}) > (@var{y})} but no
+exception is raised if @var{x} or @var{y} are unordered.
@end deftypefn
@comment math.h
@comment ISO
@deftypefn {Macro} int isgreaterequal (@emph{real-floating} @var{x}, @emph{real-floating} @var{y})
This macro determines whether the argument @var{x} is greater than or
-equal to @var{y}. This is equivalent to @math{(x) >= (y)} but no
+equal to @var{y}. This is equivalent to @code{(@var{x}) >= (@var{y})} but no
exception is raised if @var{x} or @var{y} are unordered.
@end deftypefn
@@ -743,7 +661,7 @@ exception is raised if @var{x} or @var{y} are unordered.
@comment ISO
@deftypefn {Macro} int isless (@emph{real-floating} @var{x}, @emph{real-floating} @var{y})
This macro determines whether the argument @var{x} is less than @var{y}.
-This is equivalent @math{(x) < (y)} but no exception is raised if
+This is equivalent @code{(@var{x}) < (@var{y})} but no exception is raised if
@var{x} or @var{y} are unordered.
@end deftypefn
@@ -751,17 +669,18 @@ This is equivalent @math{(x) < (y)} but no exception is raised if
@comment ISO
@deftypefn {Macro} int islessequal (@emph{real-floating} @var{x}, @emph{real-floating} @var{y})
This macro determines whether the argument @var{x} is less than or equal
-to @var{y}. This is equivalent to @math{(x) <= (y)} but no exception
-is raised if @var{x} or @var{y} are unordered.
+to @var{y}. This is equivalent to @code{(@var{x}) <= (@var{y})} but no
+exception is raised if @var{x} or @var{y} are unordered.
@end deftypefn
@comment math.h
@comment ISO
@deftypefn {Macro} int islessgreater (@emph{real-floating} @var{x}, @emph{real-floating} @var{y})
This macro determines whether the argument @var{x} is less or greater
-than @var{y}. This is equivalent to @math{(x) < (y) || (x) > (y)}
-(except that @var{x} and @var{y} are only evaluated once) but no
-exception is raised if @var{x} or @var{y} are unordered.
+than @var{y}. This is equivalent to @code{(@var{x}) < (@var{y}) ||
+(@var{x}) > (@var{y})} (except that @var{x} and @var{y} are only
+evaluated once) but no exception is raised if @var{x} or @var{y} are
+unordered.
@end deftypefn
@comment math.h
@@ -774,7 +693,7 @@ All the macros are defined in a way to ensure that both arguments are
evaluated exactly once and so they can be used exactly like the builtin
operators.
-On several platform these macros are mapped to very efficient functions
+On several platform these macros are mapped to efficient instructions
the processor understands. But on machines missing these functions, the
macros above might be rather slow. So it is best to use the builtin
operators unless it is necessary to use unordered comparisons.
@@ -855,6 +774,10 @@ These functions return the sine of @var{x} in @code{*@var{sinx}} and the
cosine of @var{x} in @code{*@var{cos}}, where @var{x} is given in
radians. Both values, @code{*@var{sinx}} and @code{*@var{cosx}}, are in
the range of @code{-1} to @code{1}.
+
+This function is a GNU extension. It should be used whenever both sine
+and cosine are needed but in protable applications there should be a
+fallback method for systems without this function.
@end deftypefun
@cindex complex trigonometric functions
@@ -1533,7 +1456,7 @@ may be as low as @code{32767}.
@comment stdlib.h
@comment ISO
-@deftypefun int rand ()
+@deftypefun int rand (void)
The @code{rand} function returns the next pseudo-random number in the
series. The value is in the range from @code{0} to @code{RAND_MAX}.
@end deftypefun
@@ -1562,9 +1485,14 @@ The prototypes for these functions are in @file{stdlib.h}.
@comment stdlib.h
@comment BSD
-@deftypefun {long int} random ()
+@deftypefun {int32_t} random (void)
This function returns the next pseudo-random number in the sequence.
The range of values returned is from @code{0} to @code{RAND_MAX}.
+
+@strong{Please note:} Historically this function returned a @code{long
+int} value. But with the appearence of 64bit machines this could lead
+to severe compatibility problems and therefore the type now explicitly
+limits the return value to 32bit.
@end deftypefun
@comment stdlib.h
diff --git a/math/libm-test.c b/math/libm-test.c
index 5b773d6..7e4e144 100644
--- a/math/libm-test.c
+++ b/math/libm-test.c
@@ -999,7 +999,8 @@ cbrt_test (void)
check_isinfn ("cbrt (-inf) == -inf", FUNC(cbrt) (minus_infty));
check_isnan ("cbrt (NaN) == NaN", FUNC(cbrt) (nan_value));
#endif
- check ("cbrt (-0.001) == -0.1", FUNC(cbrt) (-0.001), -0.1);
+ check_eps ("cbrt (-0.001) == -0.1", FUNC(cbrt) (-0.001), -0.1,
+ CHOOSE (5e-18L, 0, 0));
check_eps ("cbrt (8) == 2", FUNC(cbrt) (8), 2, CHOOSE (5e-17L, 0, 0));
check_eps ("cbrt (-27) == -3", FUNC(cbrt) (-27.0), -3.0,
CHOOSE (3e-16L, 0, 0));
@@ -1120,10 +1121,12 @@ static void
expm1_test (void)
{
check ("expm1 (+0) == 0", FUNC(expm1) (0), 0);
+#ifndef TEST_INLINE
check ("expm1 (-0) == -0", FUNC(expm1) (minus_zero), minus_zero);
check_isinfp ("expm1 (+inf) == +inf", FUNC(expm1) (plus_infty));
check ("expm1 (-inf) == -1", FUNC(expm1) (minus_infty), -1);
+#endif
check_eps ("expm1 (1) == e-1", FUNC(expm1) (1), M_E - 1.0,
CHOOSE (4e-18L, 0, 0));
@@ -4652,6 +4655,7 @@ identities1_test (MATHTYPE x, MATHTYPE epsilon)
static void
identities2_test (MATHTYPE x, MATHTYPE epsilon)
{
+#ifndef TEST_INLINE
MATHTYPE res1, res2, res3, res4, diff;
int result;
@@ -4668,6 +4672,7 @@ identities2_test (MATHTYPE x, MATHTYPE epsilon)
result = check_equal (res4, res3, epsilon, &diff);
output_result_ext ("sin/cos == tan", result,
res4, res3, diff, x, PRINT, PRINT);
+#endif
}
diff --git a/posix/fnmatch.h b/posix/fnmatch.h
index 58880ec..38b7255 100644
--- a/posix/fnmatch.h
+++ b/posix/fnmatch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ extern "C" {
#endif
#if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \
- || defined (WIN32))
+ || defined (WINDOWS32))
#undef __P
#define __P(protos) protos
#else /* Not C++ or ANSI C. */
diff --git a/posix/getopt.c b/posix/getopt.c
index 59b51cd..c5574ea 100644
--- a/posix/getopt.c
+++ b/posix/getopt.c
@@ -76,7 +76,7 @@
#endif
#endif
-#if defined (WIN32) && !defined (__CYGWIN32__)
+#if defined (_WINDOWS32) && !defined (__CYGWIN32__)
/* It's not Unix, really. See? Capital letters. */
#include <windows.h>
#define getpid() GetCurrentProcessId()
diff --git a/posix/glob.c b/posix/glob.c
index 6d9af10..6a82fe0 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -37,6 +37,8 @@
/* #define NDEBUG 1 */
#include <assert.h>
+#include <stdio.h> /* Needed on stupid SunOS for assert. */
+
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
@@ -69,7 +71,7 @@
#endif
#endif
-#if !defined (_AMIGA) && !defined (VMS) && !defined(WIN32)
+#if !defined (_AMIGA) && !defined (VMS) && !defined(WINDOWS32)
#include <pwd.h>
#endif
@@ -113,7 +115,7 @@ extern int errno;
#endif
-#if (defined (POSIX) || defined (WIN32)) && !defined (__GNU_LIBRARY__)
+#if (defined (POSIX) || defined (WINDOWS32)) && !defined (__GNU_LIBRARY__)
/* Posix does not require that the d_ino field be present, and some
systems do not provide it. */
#define REAL_DIR_ENTRY(dp) 1
@@ -173,7 +175,7 @@ extern void bcopy ();
__inline
#endif
#ifndef __SASC
-#ifdef WIN32
+#ifdef WINDOWS32
static void *
#else
static char *
@@ -203,11 +205,11 @@ my_realloc (p, n)
#include <alloca.h>
#else /* Not HAVE_ALLOCA_H. */
#ifndef _AIX
-#ifdef WIN32
+#ifdef WINDOWS32
#include <malloc.h>
#else
extern char *alloca ();
-#endif /* WIN32 */
+#endif /* WINDOWS32 */
#endif /* Not _AIX. */
#endif /* sparc or HAVE_ALLOCA_H. */
#endif /* GCC. */
@@ -265,7 +267,8 @@ static
inline
#endif
const char *
-next_brace_sub (const char *begin)
+next_brace_sub (begin)
+ const char *begin;
{
unsigned int depth = 0;
const char *cp = begin;
@@ -504,17 +507,15 @@ glob (pattern, flags, errfunc, pglob)
if (home_dir == NULL || home_dir[0] == '\0')
home_dir = "SYS:";
#else
-#ifdef WIN32
+#ifdef WINDOWS32
if (home_dir == NULL || home_dir[0] == '\0')
home_dir = "c:/users/default"; /* poor default */
#else
if (home_dir == NULL || home_dir[0] == '\0')
{
- extern char *getlogin __P ((void));
- extern int getlogin_r __P ((char *, size_t));
int success;
-
#if defined HAVE_GETLOGIN_R || defined _LIBC
+ extern int getlogin_r __P ((char *, size_t));
size_t buflen = sysconf (_SC_LOGIN_NAME_MAX) + 1;
char *name;
@@ -522,11 +523,13 @@ glob (pattern, flags, errfunc, pglob)
/* `sysconf' does not support _SC_LOGIN_NAME_MAX. Try
a moderate value. */
buflen = 16;
- name = __alloca (buflen);
+ name = (char *) __alloca (buflen);
success = getlogin_r (name, buflen) >= 0;
#else
+ extern char *getlogin __P ((void));
char *name;
+
success = (name = getlogin ()) != NULL;
#endif
if (success)
@@ -536,7 +539,7 @@ glob (pattern, flags, errfunc, pglob)
char *pwtmpbuf;
struct passwd pwbuf, *p;
- pwtmpbuf = __alloca (pwbuflen);
+ pwtmpbuf = (char *) __alloca (pwbuflen);
success = (__getpwnam_r (name, &pwbuf, pwtmpbuf,
pwbuflen, &p) >= 0);
@@ -550,7 +553,7 @@ glob (pattern, flags, errfunc, pglob)
}
if (home_dir == NULL || home_dir[0] == '\0')
home_dir = (char *) "~"; /* No luck. */
-#endif /* WIN32 */
+#endif /* WINDOWS32 */
#endif
/* Now construct the full directory. */
if (dirname[1] == '\0')
@@ -559,13 +562,13 @@ glob (pattern, flags, errfunc, pglob)
{
char *newp;
size_t home_len = strlen (home_dir);
- newp = __alloca (home_len + dirlen);
+ newp = (char *) __alloca (home_len + dirlen);
memcpy (newp, home_dir, home_len);
memcpy (&newp[home_len], &dirname[1], dirlen);
dirname = newp;
}
}
-#if !defined _AMIGA && !defined WIN32
+#if !defined _AMIGA && !defined WINDOWS32
else
{
char *end_name = strchr (dirname, '/');
@@ -576,7 +579,7 @@ glob (pattern, flags, errfunc, pglob)
user_name = dirname + 1;
else
{
- user_name = __alloca (end_name - dirname);
+ user_name = (char *) __alloca (end_name - dirname);
memcpy (user_name, dirname + 1, end_name - dirname);
user_name[end_name - dirname - 1] = '\0';
}
@@ -585,7 +588,7 @@ glob (pattern, flags, errfunc, pglob)
{
#if defined HAVE_GETPWNAM_R || defined _LIBC
size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
- char *pwtmpbuf = __alloca (buflen);
+ char *pwtmpbuf = (char *) __alloca (buflen);
struct passwd pwbuf, *p;
if (__getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) >= 0)
home_dir = p->pw_dir;
@@ -605,14 +608,14 @@ glob (pattern, flags, errfunc, pglob)
char *newp;
size_t home_len = strlen (home_dir);
size_t rest_len = end_name == NULL ? 0 : strlen (end_name);
- newp = __alloca (home_len + rest_len + 1);
+ newp = (char *) __alloca (home_len + rest_len + 1);
memcpy (newp, home_dir, home_len);
memcpy (&newp[home_len], end_name, rest_len);
newp[home_len + rest_len] = '\0';
dirname = newp;
}
}
-#endif /* Not Amiga && not Win32. */
+#endif /* Not Amiga && not WINDOWS32. */
}
#endif /* Not VMS. */
diff --git a/posix/glob.h b/posix/glob.h
index db44f7a..515514a 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -28,7 +28,7 @@ extern "C"
#undef __ptr_t
#if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \
- || defined (WIN32))
+ || defined (WINDOWS32))
#undef __P
#define __P(protos) protos
#define __ptr_t void *
@@ -54,7 +54,7 @@ extern "C"
GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \
GLOB_NOMAGIC|GLOB_TILDE)
-#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE)
+#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE) || defined (_GNU_SOURCE)
#define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */
#define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */
#define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */
diff --git a/shlib-versions b/shlib-versions
index e1a9f9a..f7c913a 100644
--- a/shlib-versions
+++ b/shlib-versions
@@ -34,7 +34,7 @@ alpha-.*-linux.* libc=6.1
# The dynamic loader also requires different names.
i.86-.*-linux.* ld=ld-linux.so.2
sparc-.*-linux.* ld=ld-linux.so.2
-sparc64-.*-linux.* ld=ld-linux.so.2
+sparc64-.*-linux.* ld=ld-linux64.so.2
alpha-.*-linux.* ld=ld-linux.so.2
# We use the ELF ABI standard name for the default.
.*-.*-.* ld=ld.so.1
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index 77181d9..91bc8a8 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -20,9 +20,9 @@
Boston, MA 02111-1307, USA. */
#include <gmp-mparam.h>
-#include "../stdlib/gmp.h"
-#include "../stdlib/gmp-impl.h"
-#include "../stdlib/longlong.h"
+#include <stdlib/gmp.h>
+#include <stdlib/gmp-impl.h>
+#include <stdlib/longlong.h>
#include "_itoa.h"
diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c
index 9945ab9..101beb7 100644
--- a/stdlib/fmtmsg.c
+++ b/stdlib/fmtmsg.c
@@ -99,7 +99,7 @@ int
fmtmsg (long int classification, const char *label, int severity,
const char *text, const char *action, const char *tag)
{
- __libc_once_define (once);
+ __libc_once_define (static, once);
int result = MM_OK;
struct severity_info *severity_rec;
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 0618b30..d35dc2d 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -63,10 +63,10 @@
/* The gmp headers need some configuration frobs. */
#define HAVE_ALLOCA 1
-#include "gmp.h"
-#include "gmp-impl.h"
+#include <gmp.h>
+#include <gmp-impl.h>
#include <gmp-mparam.h>
-#include "longlong.h"
+#include <longlong.h>
#include "fpioconst.h"
#define NDEBUG 1
diff --git a/sysdeps/generic/bits/sigaction.h b/sysdeps/generic/bits/sigaction.h
index e5f661d..e89479b 100644
--- a/sysdeps/generic/bits/sigaction.h
+++ b/sysdeps/generic/bits/sigaction.h
@@ -37,9 +37,9 @@ struct sigaction
/* Bits in `sa_flags'. */
#ifdef __USE_BSD
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */
-#define SA_DISABLE 0x4 /* Disable alternate signal stack. */
+# define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+# define SA_RESTART 0x2 /* Restart syscall on signal return. */
+# define SA_DISABLE 0x4 /* Disable alternate signal stack. */
#endif
#define SA_NOCLDSTOP 0x8 /* Don't send SIGCHLD when children stop. */
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index 4f97f85..fd79bc4 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -25,6 +25,7 @@
#include <fcntl.h>
#include <link.h>
#include <unistd.h>
+#include <stdio-common/_itoa.h>
#include <dl-machine.h>
@@ -40,6 +41,7 @@ extern void ENTRY_POINT (void);
int __libc_enable_secure;
int __libc_multiple_libcs; /* Defining this here avoids the inclusion
of init-first. */
+static ElfW(auxv_t) *_dl_auxv;
ElfW(Addr)
_dl_sysdep_start (void **start_argptr,
@@ -68,7 +70,7 @@ _dl_sysdep_start (void **start_argptr,
seen = 0;
#define M(type) (1 << (type))
- for (av = (void *) ++start_argptr;
+ for (av = _dl_auxv = (void *) ++start_argptr;
av->a_type != AT_NULL;
seen |= M ((++av)->a_type))
switch (av->a_type)
@@ -148,3 +150,76 @@ void
_dl_sysdep_start_cleanup (void)
{
}
+
+void
+_dl_show_auxv (void)
+{
+ char buf[64];
+ ElfW(auxv_t) *av;
+
+ /* Terminate string. */
+ buf[63] = '\0';
+
+ for (av = _dl_auxv; av->a_type != AT_NULL; ++av)
+ switch (av->a_type)
+ {
+ case AT_PHDR:
+ _dl_sysdep_message ("AT_PHDR: 0x",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 16, 0),
+ "\n", NULL);
+ break;
+ case AT_PHNUM:
+ _dl_sysdep_message ("AT_PHNUM: ",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 10, 0),
+ "\n", NULL);
+ break;
+ case AT_PAGESZ:
+ _dl_sysdep_message ("AT_PAGESZ: ",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 10, 0),
+ "\n", NULL);
+ break;
+ case AT_ENTRY:
+ _dl_sysdep_message ("AT_ENTRY: 0x",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 16, 0),
+ "\n", NULL);
+ break;
+ case AT_UID:
+ _dl_sysdep_message ("AT_UID: ",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 10, 0),
+ "\n", NULL);
+ break;
+ case AT_GID:
+ _dl_sysdep_message ("AT_GID: ",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 10, 0),
+ "\n", NULL);
+ break;
+ case AT_EUID:
+ _dl_sysdep_message ("AT_EUID: ",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 10, 0),
+ "\n", NULL);
+ break;
+ case AT_EGID:
+ _dl_sysdep_message ("AT_EGID: ",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 10, 0),
+ "\n", NULL);
+ break;
+ case AT_PLATFORM:
+ _dl_sysdep_message ("AT_PLATFORM: ", av->a_un.a_ptr, NULL);
+ break;
+ case AT_HWCAP:
+ /* Well, what shall we use? A string or an integer with bits? */
+ _dl_sysdep_message ("AT_HWCAP: ",
+ _itoa_word (av->a_un.a_val, buf + sizeof buf - 1,
+ 10, 0),
+ "\n", NULL);
+ break;
+ }
+}
diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h
index b3736f8..c6b9331 100644
--- a/sysdeps/i386/fpu/bits/mathinline.h
+++ b/sysdeps/i386/fpu/bits/mathinline.h
@@ -70,15 +70,6 @@
#endif
-#if defined __GNUC__ && \
- (__GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ <= 7))
-/* gcc 2.7.2 and 2.7.2.1 have problems with inlining `long double'
- functions so we disable this now. */
-# undef __NO_MATH_INLINES
-# define __NO_MATH_INLINES
-#endif
-
-
#ifdef __GNUC__
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
@@ -301,7 +292,7 @@ __inline_mathop (sin, "fsin")
/* The argument range of this inline version is reduced. */
__inline_mathop (cos, "fcos")
-__inline_mathop_decl (atan, "fpatan", "u" (__x), "0" (1.0) : "st(1)")
+__inline_mathop (atan, "fld1; fpatan")
__inline_mathop (log, "fldln2; fxch; fyl2x")
__inline_mathop (log10, "fldlg2; fxch; fyl2x")
@@ -390,7 +381,7 @@ __inline_mathcode (log1p, __x, \
__inline_mathcode (asinh, __x, \
register long double __y = __fabsl (__x); \
return (log1pl (__y * __y / (__sqrtl (__y * __y + 1.0) + 1.0) + __y) \
- * __sgn1l (__x))
+ * __sgn1l (__x)))
__inline_mathcode (acosh, __x, \
return logl (__x + __sqrtl (__x - 1.0) * __sqrtl (__x + 1.0)))
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 69dd55a..88918c5 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -713,3 +713,10 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
return __mach_msg (msg, option, send_size, rcv_size, rcv_name,
timeout, notify);
}
+
+
+void
+_dl_show_auxv (void)
+{
+ /* There is nothing to print. Hurd has no auxiliary vector. */
+}
diff --git a/sysdeps/sparc/Implies b/sysdeps/sparc/Implies
index 8a2007c..da719e1 100644
--- a/sysdeps/sparc/Implies
+++ b/sysdeps/sparc/Implies
@@ -1,3 +1,2 @@
-wordsize-32
# SPARC uses IEEE 754 floating point.
ieee754
diff --git a/sysdeps/sparc/fpu/bits/mathdef.h b/sysdeps/sparc/fpu/bits/mathdef.h
new file mode 100644
index 0000000..0bc9c94
--- /dev/null
+++ b/sysdeps/sparc/fpu/bits/mathdef.h
@@ -0,0 +1,64 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATH_H
+#error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+/* FIXME! This file describes properties of the compiler, not the machine;
+ it should not be part of libc! */
+
+#ifdef __GNUC__
+#if __STDC__ == 1
+
+/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */
+typedef float float_t;
+typedef double double_t;
+
+/* Signal that types stay as they were declared. */
+#define FLT_EVAL_METHOD 0
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VALF
+
+#else
+
+/* For `gcc -traditional', `float' expressions are evaluated as `double'. */
+typedef double float_t;
+typedef double double_t;
+
+/* Signal that both types are `double'. */
+#define FLT_EVAL_METHOD 1
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VAL
+
+#endif
+#else
+
+/* Wild guess at types for float_t and double_t. */
+typedef double float_t;
+typedef double double_t;
+
+/* Strange compiler, we don't know how it works. */
+#define FLT_EVAL_METHOD -1
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VAL
+
+#endif
diff --git a/sysdeps/sparc/fpu/fclrexcpt.c b/sysdeps/sparc/fpu/fclrexcpt.c
new file mode 100644
index 0000000..8dc68e8
--- /dev/null
+++ b/sysdeps/sparc/fpu/fclrexcpt.c
@@ -0,0 +1,32 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feclearexcept (int excepts)
+{
+ fenv_t tmp;
+
+ __fenv_stfsr (tmp);
+
+ tmp &= ~(excepts & FE_ALL_EXCEPT);
+
+ __fenv_ldfsr (tmp);
+}
diff --git a/sysdeps/sparc/fpu/fegetenv.c b/sysdeps/sparc/fpu/fegetenv.c
new file mode 100644
index 0000000..a796ccb
--- /dev/null
+++ b/sysdeps/sparc/fpu/fegetenv.c
@@ -0,0 +1,26 @@
+/* Store current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetenv (fenv_t *envp)
+{
+ __fenv_stfsr (*envp);
+}
diff --git a/sysdeps/sparc/fpu/fegetround.c b/sysdeps/sparc/fpu/fegetround.c
new file mode 100644
index 0000000..ea1df2b
--- /dev/null
+++ b/sysdeps/sparc/fpu/fegetround.c
@@ -0,0 +1,30 @@
+/* Return current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetround (void)
+{
+ fenv_t tmp;
+
+ __fenv_stfsr (tmp);
+
+ return tmp & __FE_ROUND_MASK;
+}
diff --git a/sysdeps/sparc/fpu/feholdexcpt.c b/sysdeps/sparc/fpu/feholdexcpt.c
new file mode 100644
index 0000000..9b4c213
--- /dev/null
+++ b/sysdeps/sparc/fpu/feholdexcpt.c
@@ -0,0 +1,35 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ fenv_t tmp;
+
+ __fenv_stfsr (*envp);
+
+ /* Set all exceptions to non-stop. */
+ tmp = *envp | (0x1f << 23);
+
+ __fenv_ldfsr (tmp);
+
+ return 1;
+}
diff --git a/sysdeps/sparc64/bsd-setjmp.S b/sysdeps/sparc/fpu/fesetenv.c
index c42123f..44c5b26 100644
--- a/sysdeps/sparc64/bsd-setjmp.S
+++ b/sysdeps/sparc/fpu/fesetenv.c
@@ -1,4 +1,4 @@
-/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Sparc64 version.
+/* Install given floating-point environment.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -17,25 +17,27 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <sysdep.h>
-
-ENTRY(setjmp)
-
-#ifdef PIC
-1: rd %pc,%g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)),%g2
- or %g2,%lo(_GLOBAL_OFFSET_TABLE_-(1b-.)),%g2
- add %g1,%g2,%g1
- sethi %hi(C_SYMBOL_NAME(__sigsetjmp)),%g2
- or %g2,%lo(C_SYMBOL_NAME(__sigsetjmp)),%g2
- ld [%g1+%g2], %g1
-#else
- sethi %hi(C_SYMBOL_NAME(__sigsetjmp)), %g1
- or %lo(C_SYMBOL_NAME(__sigsetjmp)), %g1, %g1
- add %g1, %g4, %g1
-#endif
-
- jmp %g1
- mov 1, %o1 /* Pass second argument of one. */
-
-END(setjmp)
+#include <fenv.h>
+
+void
+fesetenv (const fenv_t *envp)
+{
+ fenv_t dummy;
+
+ /* Put these constants in memory explicitly, so as to cope with a
+ -fPIC bug as of gcc 970624. Making them automatic is quicker
+ than loading up the pic register in this instance. */
+
+ if (envp == FE_DFL_ENV)
+ {
+ dummy = 0;
+ envp = &dummy;
+ }
+ else if (envp == FE_NOMASK_ENV)
+ {
+ dummy = 0x1f << 23;
+ envp = &dummy;
+ }
+
+ __fenv_ldfsr (*envp);
+}
diff --git a/sysdeps/sparc/fpu/fesetround.c b/sysdeps/sparc/fpu/fesetround.c
new file mode 100644
index 0000000..74963d7
--- /dev/null
+++ b/sysdeps/sparc/fpu/fesetround.c
@@ -0,0 +1,37 @@
+/* Set current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fesetround (int round)
+{
+ fenv_t tmp;
+
+ if ((round & ~__FE_ROUND_MASK) != 0)
+ /* ROUND is no valid rounding mode. */
+ return 0;
+
+ __fenv_stfsr (tmp);
+ tmp &= ~__FE_ROUND_MASK;
+ tmp |= round;
+ __fenv_ldfsr (tmp);
+
+ return 1;
+}
diff --git a/sysdeps/sparc64/bsd-_setjmp.S b/sysdeps/sparc/fpu/feupdateenv.c
index 1388c4c..0fba997 100644
--- a/sysdeps/sparc64/bsd-_setjmp.S
+++ b/sysdeps/sparc/fpu/feupdateenv.c
@@ -1,4 +1,4 @@
-/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Sparc64 version.
+/* Install given floating-point environment and raise exceptions.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -17,27 +17,22 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <sysdep.h>
+#include <fenv.h>
-ENTRY(_setjmp)
+void
+feupdateenv (const fenv_t *envp)
+{
+ fexcept_t tmp;
-#ifdef PIC
-1: rd %pc,%g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)),%g2
- or %g2,%lo(_GLOBAL_OFFSET_TABLE_-(1b-.)),%g2
- add %g1,%g2,%g1
- sethi %hi(C_SYMBOL_NAME(__sigsetjmp)),%g2
- or %g2,%lo(C_SYMBOL_NAME(__sigsetjmp)),%g2
- ld [%g1+%g2], %g1
-#else
- sethi %hi(C_SYMBOL_NAME(__sigsetjmp)), %g1
- or %lo(C_SYMBOL_NAME(__sigsetjmp)), %g1, %g1
- add %g1, %g4, %g1
-#endif
+ /* Save current exceptions. */
+ __fenv_stfsr (tmp);
+ tmp &= FE_ALL_EXCEPT;
- jmp %g1
- mov %g0, %o1 /* Pass second argument of zero. */
+ /* Install new environment. */
+ fesetenv (envp);
-END(_setjmp)
-
-strong_alias(_setjmp, __setjmp)
+ /* Raise the safed exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+ feraiseexcept ((int) tmp);
+}
diff --git a/sysdeps/sparc/fpu/fgetexcptflg.c b/sysdeps/sparc/fpu/fgetexcptflg.c
new file mode 100644
index 0000000..977c93e
--- /dev/null
+++ b/sysdeps/sparc/fpu/fgetexcptflg.c
@@ -0,0 +1,31 @@
+/* Store current representation for exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ fexcept_t tmp;
+
+ /* Get the current exceptions. */
+ __fenv_stfsr (tmp);
+
+ *flagp = tmp & excepts & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/sparc/fpu/fraiseexcpt.c b/sysdeps/sparc/fpu/fraiseexcpt.c
new file mode 100644
index 0000000..308c9b2
--- /dev/null
+++ b/sysdeps/sparc/fpu/fraiseexcpt.c
@@ -0,0 +1,66 @@
+/* Raise given exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+static void
+ignore_me(double foo)
+{
+}
+
+void
+feraiseexcept (int excepts)
+{
+ /* Raise exceptions represented by EXPECTS. But we must raise only
+ one signal at a time. It is important the if the overflow/underflow
+ exception and the inexact exception are given at the same time,
+ the overflow/underflow exception follows the inexact exception. */
+
+ /* First: invalid exception. */
+ if ((FE_INVALID & excepts) != 0)
+ {
+ /* One example of a invalid operation is 0/0. */
+ ignore_me (0.0 / 0.0);
+ }
+
+ /* Next: division by zero. */
+ if ((FE_DIVBYZERO & excepts) != 0)
+ {
+ ignore_me (1.0 / 0.0);
+ }
+
+ /* Next: overflow. */
+ if ((FE_OVERFLOW & excepts) != 0)
+ {
+ ignore_me (LDBL_MAX * LDBL_MAX);
+ }
+
+ /* Next: underflow. */
+ if ((FE_UNDERFLOW & excepts) != 0)
+ {
+ ignore_me (LDBL_MIN / 16.0);
+ }
+
+ /* Last: inexact. */
+ if ((FE_INEXACT & excepts) != 0)
+ {
+ ignore_me (1.0 / M_PI);
+ }
+}
diff --git a/sysdeps/sparc/fpu/fsetexcptflg.c b/sysdeps/sparc/fpu/fsetexcptflg.c
new file mode 100644
index 0000000..1029cde
--- /dev/null
+++ b/sysdeps/sparc/fpu/fsetexcptflg.c
@@ -0,0 +1,34 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+void
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ fenv_t tmp;
+
+ __fenv_stfsr (tmp);
+
+ tmp &= ~(excepts & FE_ALL_EXCEPT);
+ tmp |= *flagp & excepts & FE_ALL_EXCEPT;
+
+ __fenv_ldfsr (tmp);
+}
diff --git a/sysdeps/sparc/fpu/ftestexcept.c b/sysdeps/sparc/fpu/ftestexcept.c
new file mode 100644
index 0000000..3efe9e8
--- /dev/null
+++ b/sysdeps/sparc/fpu/ftestexcept.c
@@ -0,0 +1,30 @@
+/* Test exception in current environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fetestexcept (int excepts)
+{
+ int tmp;
+
+ __fenv_stfsr (tmp);
+
+ return tmp & excepts & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/sparc/Dist b/sysdeps/sparc/sparc32/Dist
index 6c3b23b..6c3b23b 100644
--- a/sysdeps/sparc/Dist
+++ b/sysdeps/sparc/sparc32/Dist
diff --git a/sysdeps/sparc/sparc32/Implies b/sysdeps/sparc/sparc32/Implies
new file mode 100644
index 0000000..39a34c5
--- /dev/null
+++ b/sysdeps/sparc/sparc32/Implies
@@ -0,0 +1 @@
+wordsize-32
diff --git a/sysdeps/sparc/Makefile b/sysdeps/sparc/sparc32/Makefile
index deec2f8..deec2f8 100644
--- a/sysdeps/sparc/Makefile
+++ b/sysdeps/sparc/sparc32/Makefile
diff --git a/sysdeps/sparc/__longjmp.S b/sysdeps/sparc/sparc32/__longjmp.S
index 36e1c17..36e1c17 100644
--- a/sysdeps/sparc/__longjmp.S
+++ b/sysdeps/sparc/sparc32/__longjmp.S
diff --git a/sysdeps/sparc/add_n.S b/sysdeps/sparc/sparc32/add_n.S
index 9852c25..9852c25 100644
--- a/sysdeps/sparc/add_n.S
+++ b/sysdeps/sparc/sparc32/add_n.S
diff --git a/sysdeps/sparc/addmul_1.S b/sysdeps/sparc/sparc32/addmul_1.S
index 375d25d..375d25d 100644
--- a/sysdeps/sparc/addmul_1.S
+++ b/sysdeps/sparc/sparc32/addmul_1.S
diff --git a/sysdeps/sparc/alloca.S b/sysdeps/sparc/sparc32/alloca.S
index dcbd171..dcbd171 100644
--- a/sysdeps/sparc/alloca.S
+++ b/sysdeps/sparc/sparc32/alloca.S
diff --git a/sysdeps/sparc/bits/endian.h b/sysdeps/sparc/sparc32/bits/endian.h
index f1a75c0..f1a75c0 100644
--- a/sysdeps/sparc/bits/endian.h
+++ b/sysdeps/sparc/sparc32/bits/endian.h
diff --git a/sysdeps/sparc/bits/setjmp.h b/sysdeps/sparc/sparc32/bits/setjmp.h
index 43bae1a..43bae1a 100644
--- a/sysdeps/sparc/bits/setjmp.h
+++ b/sysdeps/sparc/sparc32/bits/setjmp.h
diff --git a/sysdeps/sparc/bsd-_setjmp.S b/sysdeps/sparc/sparc32/bsd-_setjmp.S
index bf49765..bf49765 100644
--- a/sysdeps/sparc/bsd-_setjmp.S
+++ b/sysdeps/sparc/sparc32/bsd-_setjmp.S
diff --git a/sysdeps/sparc/bsd-setjmp.S b/sysdeps/sparc/sparc32/bsd-setjmp.S
index 16dc260..16dc260 100644
--- a/sysdeps/sparc/bsd-setjmp.S
+++ b/sysdeps/sparc/sparc32/bsd-setjmp.S
diff --git a/sysdeps/sparc/divrem.m4 b/sysdeps/sparc/sparc32/divrem.m4
index 665abf1..665abf1 100644
--- a/sysdeps/sparc/divrem.m4
+++ b/sysdeps/sparc/sparc32/divrem.m4
diff --git a/sysdeps/sparc/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index dc38e17..f7bcba0 100644
--- a/sysdeps/sparc/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -51,11 +51,25 @@ elf_machine_dynamic (void)
return *got;
}
-
/* Return the run-time load address of the shared object. */
static inline Elf32_Addr
elf_machine_load_address (void)
{
+ register Elf32_Addr pc __asm("%o7"), got;
+
+ /* Utilize the fact that a local .got entry will be partially
+ initialized at startup awaiting its RELATIVE fixup. */
+
+ __asm("sethi %%hi(.Load_address),%1\n"
+ ".Load_address:\n\t"
+ "call 1f\n\t"
+ "or %1,%%lo(.Load_address),%1\n"
+ "1:\tld [%%l7+%1],%1"
+ : "=r"(pc), "=r"(got));
+
+ return pc - got;
+}
+
Elf32_Addr addr;
asm (
@@ -219,6 +233,8 @@ elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
/* The SPARC never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
+/* The SPARC overlaps DT_RELA and DT_PLTREL. */
+#define ELF_MACHINE_PLTREL_OVERLAP 1
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
diff --git a/sysdeps/sparc/dotmul.S b/sysdeps/sparc/sparc32/dotmul.S
index 7ce695c..7ce695c 100644
--- a/sysdeps/sparc/dotmul.S
+++ b/sysdeps/sparc/sparc32/dotmul.S
diff --git a/sysdeps/sparc/e_sqrt.c b/sysdeps/sparc/sparc32/e_sqrt.c
index a98ae21..a98ae21 100644
--- a/sysdeps/sparc/e_sqrt.c
+++ b/sysdeps/sparc/sparc32/e_sqrt.c
diff --git a/sysdeps/sparc/elf/Makefile b/sysdeps/sparc/sparc32/elf/Makefile
index 319fbde..319fbde 100644
--- a/sysdeps/sparc/elf/Makefile
+++ b/sysdeps/sparc/sparc32/elf/Makefile
diff --git a/sysdeps/sparc/elf/start.c b/sysdeps/sparc/sparc32/elf/start.c
index f1e8019..f1e8019 100644
--- a/sysdeps/sparc/elf/start.c
+++ b/sysdeps/sparc/sparc32/elf/start.c
diff --git a/sysdeps/sparc/sparc32/fpu/bits/fenv.h b/sysdeps/sparc/sparc32/fpu/bits/fenv.h
new file mode 100644
index 0000000..0560dd9
--- /dev/null
+++ b/sysdeps/sparc/sparc32/fpu/bits/fenv.h
@@ -0,0 +1,76 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Define bits representing the exception. We use the bit positions
+ of the appropriate accrued exception bits from the FSR. */
+enum
+ {
+ FE_INVALID = (1 << 9),
+#define FE_INVALID FE_INVALID
+ FE_OVERFLOW = (1 << 8),
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = (1 << 7),
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_DIVBYZERO = (1 << 6),
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_INEXACT = (1 << 5)
+#define FE_INEXACT FE_INEXACT
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The Sparc FPU supports all of the four defined rounding modes. We
+ use again the bit positions in the FPU control word as the values
+ for the appropriate macros. */
+enum
+ {
+ FE_TONEAREST = (0U << 30),
+#define FE_TONEAREST FE_TONEAREST
+ FE_TOWARDSZERO = (1U << 30),
+#define FE_TOWARDSZERO FE_TOWARDSZERO
+ FE_UPWARD = (2U << 30),
+#define FE_UPWARD FE_UPWARD
+ FE_DOWNWARD = (3U << 30)
+#define FE_DOWNWARD FE_DOWNWARD
+ };
+
+#define __FE_ROUND_MASK (3U << 30)
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef unsigned int fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exception is masked. */
+# define FE_NOMASK_ENV ((fenv_t *) -2)
+#endif
+
+/* For internal use only: access the fp state register. */
+#define __fenv_stfsr(X) __asm__("stfsr %0" : "=m"(X))
+#define __fenv_ldfsr(X) __asm__ __volatile__("ldfsr %0" : : "m"(X))
diff --git a/sysdeps/sparc/fpu_control.h b/sysdeps/sparc/sparc32/fpu/fpu_control.h
index 5ef3824..5ef3824 100644
--- a/sysdeps/sparc/fpu_control.h
+++ b/sysdeps/sparc/sparc32/fpu/fpu_control.h
diff --git a/sysdeps/sparc/lshift.S b/sysdeps/sparc/sparc32/lshift.S
index 4f0595f..4f0595f 100644
--- a/sysdeps/sparc/lshift.S
+++ b/sysdeps/sparc/sparc32/lshift.S
diff --git a/sysdeps/sparc/memcopy.h b/sysdeps/sparc/sparc32/memcopy.h
index ff73f45..ff73f45 100644
--- a/sysdeps/sparc/memcopy.h
+++ b/sysdeps/sparc/sparc32/memcopy.h
diff --git a/sysdeps/sparc/mul_1.S b/sysdeps/sparc/sparc32/mul_1.S
index 142fd8b..142fd8b 100644
--- a/sysdeps/sparc/mul_1.S
+++ b/sysdeps/sparc/sparc32/mul_1.S
diff --git a/sysdeps/sparc/rem.S b/sysdeps/sparc/sparc32/rem.S
index d50f1af..d50f1af 100644
--- a/sysdeps/sparc/rem.S
+++ b/sysdeps/sparc/sparc32/rem.S
diff --git a/sysdeps/sparc/rshift.S b/sysdeps/sparc/sparc32/rshift.S
index fea4f3b..fea4f3b 100644
--- a/sysdeps/sparc/rshift.S
+++ b/sysdeps/sparc/sparc32/rshift.S
diff --git a/sysdeps/sparc/sdiv.S b/sysdeps/sparc/sparc32/sdiv.S
index 02ed2e9..02ed2e9 100644
--- a/sysdeps/sparc/sdiv.S
+++ b/sysdeps/sparc/sparc32/sdiv.S
diff --git a/sysdeps/sparc/setjmp.S b/sysdeps/sparc/sparc32/setjmp.S
index 772ec72..772ec72 100644
--- a/sysdeps/sparc/setjmp.S
+++ b/sysdeps/sparc/sparc32/setjmp.S
diff --git a/sysdeps/sparc/sparc8/addmul_1.S b/sysdeps/sparc/sparc32/sparcv8/addmul_1.S
index fb9ea7c..fb9ea7c 100644
--- a/sysdeps/sparc/sparc8/addmul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv8/addmul_1.S
diff --git a/sysdeps/sparc/sparc8/mul_1.S b/sysdeps/sparc/sparc32/sparcv8/mul_1.S
index b641feb..b641feb 100644
--- a/sysdeps/sparc/sparc8/mul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv8/mul_1.S
diff --git a/sysdeps/sparc/sparc8/submul_1.S b/sysdeps/sparc/sparc32/sparcv8/submul_1.S
index e40119d..e40119d 100644
--- a/sysdeps/sparc/sparc8/submul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv8/submul_1.S
diff --git a/sysdeps/sparc/sparc8/udiv_qrnnd.S b/sysdeps/sparc/sparc32/sparcv8/udiv_qrnnd.S
index 49c2398..49c2398 100644
--- a/sysdeps/sparc/sparc8/udiv_qrnnd.S
+++ b/sysdeps/sparc/sparc32/sparcv8/udiv_qrnnd.S
diff --git a/sysdeps/sparc/sub_n.S b/sysdeps/sparc/sparc32/sub_n.S
index b7a1195..b7a1195 100644
--- a/sysdeps/sparc/sub_n.S
+++ b/sysdeps/sparc/sparc32/sub_n.S
diff --git a/sysdeps/sparc/submul_1.S b/sysdeps/sparc/sparc32/submul_1.S
index a8ebd50..a8ebd50 100644
--- a/sysdeps/sparc/submul_1.S
+++ b/sysdeps/sparc/sparc32/submul_1.S
diff --git a/sysdeps/sparc/udiv.S b/sysdeps/sparc/sparc32/udiv.S
index 4a7d152..4a7d152 100644
--- a/sysdeps/sparc/udiv.S
+++ b/sysdeps/sparc/sparc32/udiv.S
diff --git a/sysdeps/sparc/udiv_qrnnd.S b/sysdeps/sparc/sparc32/udiv_qrnnd.S
index 437d66e..5b67f87 100644
--- a/sysdeps/sparc/udiv_qrnnd.S
+++ b/sysdeps/sparc/sparc32/udiv_qrnnd.S
@@ -18,7 +18,6 @@
! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-!
! Added PIC support - May/96, Miguel de Icaza
! INPUT PARAMETERS
@@ -32,8 +31,16 @@
.text
.align 8
-LC0: .double 0r4294967296
-LC1: .double 0r2147483648
+
+ .type two_to_32,@object
+two_to_32:
+ .double 0r4294967296
+ .size two_to_32,8
+
+ .type two_to_31,@object
+two_to_31:
+ .double 0r2147483648
+ .size two_to_31,8
.align 4
.global __udiv_qrnnd
@@ -45,22 +52,19 @@ ENTRY(__udiv_qrnnd)
st %i1,[%fp-8]
ld [%fp-8],%f10
#ifdef PIC
-._XL11:
- call ._XL1
+.Lbase: call 1f
fitod %f10,%f4
-._XL1:
- sub %o7,(._XL11-LC0),%o7
- ldd [%o7],%f8
+1: ldd [%o7-(.Lbase-two_to_32)],%f8
#else
- sethi %hi(LC0),%o7
+ sethi %hi(two_to_32),%o7
fitod %f10,%f4
- ldd [%o7+%lo(LC0)],%f8
+ ldd [%o7+%lo(two_to_32)],%f8
#endif
cmp %i1,0
bge L248
mov %i0,%i5
faddd %f4,%f8,%f4
-L248:
+.L248:
st %i2,[%fp-8]
ld [%fp-8],%f10
fmuld %f4,%f8,%f6
@@ -68,7 +72,7 @@ L248:
bge L249
fitod %f10,%f2
faddd %f2,%f8,%f2
-L249:
+.L249:
st %i3,[%fp-8]
faddd %f6,%f2,%f2
ld [%fp-8],%f10
@@ -76,18 +80,13 @@ L249:
bge L250
fitod %f10,%f4
faddd %f4,%f8,%f4
-L250:
+.L250:
fdivd %f2,%f4,%f2
#ifdef PIC
-._XL22:
- call ._XL2
- nop
-._XL2:
- sub %o7,(._XL22-LC1),%o7
- ldd [%o7],%f4
+ ldd [%o7-(.Lbase-two_to_31)],%f4
#else
- sethi %hi(LC1),%o7
- ldd [%o7+%lo(LC1)],%f4
+ sethi %hi(two_to_31),%o7
+ ldd [%o7+%lo(two_to_31)],%f4
#endif
fcmped %f2,%f4
nop
@@ -97,13 +96,13 @@ L250:
st %f2,[%fp-8]
b L252
ld [%fp-8],%i4
-L251:
+.L251:
fdtoi %f2,%f2
st %f2,[%fp-8]
ld [%fp-8],%i4
sethi %hi(-2147483648),%g2
xor %i4,%g2,%i4
-L252:
+.L252:
wr %g0,%i4,%y
sra %i3,31,%g2
and %i4,%g2,%g2
@@ -153,12 +152,14 @@ L252:
st %o7,[%i5]
ret
restore
-L253:
+.L253:
blu L246
mov %i4,%i0
add %i4,1,%i0
sub %o7,%i3,%o7
-L246:
+.L246:
st %o7,[%i5]
ret
restore
+
+ .size __udiv_qrnnd, .-__udiv_qrnnd
diff --git a/sysdeps/sparc/umul.S b/sysdeps/sparc/sparc32/umul.S
index 7a26c29..7a26c29 100644
--- a/sysdeps/sparc/umul.S
+++ b/sysdeps/sparc/sparc32/umul.S
diff --git a/sysdeps/sparc/urem.S b/sysdeps/sparc/sparc32/urem.S
index e72c33d..e72c33d 100644
--- a/sysdeps/sparc/urem.S
+++ b/sysdeps/sparc/sparc32/urem.S
diff --git a/sysdeps/sparc/sparc64/Implies b/sysdeps/sparc/sparc64/Implies
new file mode 100644
index 0000000..a8cae95
--- /dev/null
+++ b/sysdeps/sparc/sparc64/Implies
@@ -0,0 +1 @@
+wordsize-64
diff --git a/sysdeps/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index 48a86c6..656274d 100644
--- a/sysdeps/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -7,5 +7,5 @@ omit-long-double-fcts = yes
# But we do need these few functions to even link stdio proggies
ifeq ($(subdir),math)
-sysdep_routines += s_isinfl s_isnanl
+sysdep_routines += s_isinfl s_isnanl s_finitel s_signbitl
endif
diff --git a/sysdeps/sparc64/add_n.S b/sysdeps/sparc/sparc64/add_n.S
index 68bb008..68bb008 100644
--- a/sysdeps/sparc64/add_n.S
+++ b/sysdeps/sparc/sparc64/add_n.S
diff --git a/sysdeps/sparc64/addmul_1.S b/sysdeps/sparc/sparc64/addmul_1.S
index 2604812..2604812 100644
--- a/sysdeps/sparc64/addmul_1.S
+++ b/sysdeps/sparc/sparc64/addmul_1.S
diff --git a/sysdeps/sparc64/bits/endian.h b/sysdeps/sparc/sparc64/bits/endian.h
index a2ab072..a2ab072 100644
--- a/sysdeps/sparc64/bits/endian.h
+++ b/sysdeps/sparc/sparc64/bits/endian.h
diff --git a/sysdeps/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index df09c8f..eb46ba9 100644
--- a/sysdeps/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -26,6 +26,9 @@
#include <sysdep.h>
+/* Translate a processor-specific dynamic tag to the index into l_info. */
+#define DT_SPARC(x) (DT_SPARC_##x - DT_LOPROC + DT_NUM)
+
/* Return nonzero iff E_MACHINE is compatible with the running host. */
static inline int
elf_machine_matches_host (Elf64_Half e_machine)
@@ -33,15 +36,15 @@ elf_machine_matches_host (Elf64_Half e_machine)
return e_machine == EM_SPARC64;
}
-
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. */
static inline Elf64_Addr
elf_machine_dynamic (void)
{
- register Elf64_Addr *got asm ("%l7");
- return *got;
+ register Elf64_Addr elf_pic_register __asm__("%l7");
+
+ return *(Elf64_Addr *)elf_pic_register;
}
@@ -49,17 +52,19 @@ elf_machine_dynamic (void)
static inline Elf64_Addr
elf_machine_load_address (void)
{
- Elf64_Addr here;
+ register Elf64_Addr elf_pic_register __asm__("%l7");
+ Elf64_Addr pc, la;
+
+ /* Utilize the fact that a local .got entry will be partially
+ initialized at startup awaiting its RELATIVE fixup. */
- __asm("rd %pc,%0\n\t"
- "ba 1f\n\t"
- " add %0,12,%0\n\t"
- ".weak __load_address_undefined\n\t"
- "call __load_address_undefined\n"
- "1:"
- : "=r"(here));
+ __asm("sethi %%hi(.Load_address), %1\n"
+ ".Load_address:\n\t"
+ "rd %%pc, %0\n\t"
+ "or %1, %%lo(.Load_address), %1\n\t"
+ : "=r"(pc), "=r"(la));
- return here + (*(int *)here << 2);
+ return pc - *(Elf64_Addr *)(elf_pic_register + la);
}
#ifdef RESOLVE
@@ -71,8 +76,6 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
const Elf64_Sym *sym, const struct r_found_version *version,
Elf64_Addr *const reloc_addr)
{
- Elf64_Addr loadbase;
-
#ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
@@ -87,7 +90,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
#ifndef RTLD_BOOTSTRAP
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
#endif
- *reloc_addr += map->l_addr + reloc->r_addend;
+ *reloc_addr = map->l_addr + reloc->r_addend;
}
else
{
@@ -123,9 +126,9 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
refsym->st_size));
break;
+
+ case R_SPARC_64:
case R_SPARC_GLOB_DAT:
- /* case R_SPARC_64: */
- case R_SPARC_JMP_SLOT:
*reloc_addr = value;
break;
case R_SPARC_8:
@@ -155,6 +158,25 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
*(unsigned *)reloc_addr = (*(unsigned *)reloc_addr & 0xffc00000)
| (value >> 10);
break;
+
+ case R_SPARC_JMP_SLOT:
+ {
+ Elf64_Dyn *pltfmt = map->l_info[DT_SPARC(PLTFMT)];
+ switch (pltfmt ? pltfmt->d_un.d_val : 0)
+ {
+ case 1: /* .got.plt with absolute addresses */
+ *reloc_addr = value;
+ break;
+ case 2: /* .got.plt with got-relative addresses */
+ *reloc_addr = value - (map->l_info[DT_PLTGOT]->d_un.d_ptr
+ + map->l_addr);
+ break;
+ default:
+ assert (! "unexpected .plt format type");
+ }
+ }
+ break;
+
case R_SPARC_NONE: /* Alright, Wilbur. */
break;
default:
@@ -195,6 +217,8 @@ elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc)
/* The SPARC never uses Elf64_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
+/* The SPARC overlaps DT_RELA and DT_PLTREL. */
+#define ELF_MACHINE_PLTREL_OVERLAP 1
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
@@ -203,7 +227,7 @@ static inline int
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
Elf64_Addr *got;
- extern void _dl_runtime_resolve (Elf64_Word);
+ extern void _dl_runtime_resolve (void);
if (l->l_info[DT_JMPREL] && lazy)
{
@@ -224,9 +248,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
.type _dl_runtime_resolve, @function
_dl_runtime_resolve:
save %sp, -160, %sp
- mov %g1, %o1
+ mov %g5, %o0
call fixup
- mov %g2, %o0
+ mov %g6, %o1
jmp %o0
restore
.size _dl_runtime_resolve, .-_dl_runtime_resolve
@@ -236,10 +260,6 @@ _dl_runtime_resolve:
#define elf_machine_relplt elf_machine_rela
-/* Mask identifying addresses reserved for the user program,
- where the dynamic linker should not map anything. */
-#define ELF_MACHINE_USER_ADDRESS_MASK ???
-
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -257,33 +277,59 @@ _start:
call _dl_start
add %sp," __S(STACK_BIAS) "+22*8,%o0
/* FALLTHRU */
+ .size _start, .-_start
.global _dl_start_user
.type _dl_start_user, @function
_dl_start_user:
/* Load the GOT register. */
-1: rd %pc,%g1
+1: call 11f
sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)),%l7
- or %l2,%lo(_GLOBAL_OFFSET_TABLE_-(1b-.)),%l7
- add %l7,%g1,%l7
+11: or %l7,%lo(_GLOBAL_OFFSET_TABLE_-(1b-.)),%l7
+ add %l7,%o7,%l7
/* Save the user entry point address in %l0. */
mov %o0,%l0
/* See if we were run as a command with the executable file name as an
- extra leading argument. If so, adjust the stack pointer. */
+ extra leading argument. If so, we must shift things around since we
+ must keep the stack doubleword aligned. */
sethi %hi(_dl_skip_args), %g2
or %g2, %lo(_dl_skip_args), %g2
- ld [%l7+%g2], %i0
+ ldx [%l7+%g2], %i0
+ ld [%i0], %i0
brz,pt %i0, 2f
- ldx [%sp+" __S(STACK_BIAS) "+22*8], %i1
+ nop
+ /* Find out how far to shift. */
+ ldx [%sp+" __S(STACK_BIAS) "+22*8], %i1
sub %i1, %i0, %i1
sllx %i0, 3, %i2
- add %sp, %i2, %sp
stx %i1, [%sp+" __S(STACK_BIAS) "+22*8]
+ add %sp, " __S(STACK_BIAS) "+23*8, %i1
+ add %i1, %i2, %i2
+ /* Copy down argv. */
+12: ldx [%i2], %i3
+ add %i2, 8, %i2
+ stx %i3, [%i1]
+ brnz,pt %i3, 12b
+ add %i1, 8, %i1
+ /* Copy down envp. */
+13: ldx [%i2], %i3
+ add %i2, 8, %i2
+ stx %i3, [%i1]
+ brnz,pt %i3, 13b
+ add %i1, 8, %i1
+ /* Copy down auxiliary table. */
+14: ldx [%i2], %i3
+ ldx [%i2+8], %i4
+ add %i2, 16, %i2
+ stx %i3, [%i1]
+ stx %i4, [%i1+8]
+ brnz,pt %i3, 13b
+ add %i1, 16, %i1
/* Load _dl_default_scope[2] to pass to _dl_init_next. */
2: sethi %hi(_dl_default_scope), %g2
- or %g2, %lo(_dl_defalt_scope), %g2
- add %g2, 2*8, %g2
- ldx [%l7+%g2], %l1
+ or %g2, %lo(_dl_default_scope), %g2
+ ldx [%l7+%g2], %g2
+ ldx [%g2+2*8], %l1
/* Call _dl_init_next to return the address of an initializer to run. */
3: call _dl_init_next
mov %l1, %o0
@@ -295,8 +341,9 @@ _dl_start_user:
/* Clear the startup flag. */
4: sethi %hi(_dl_starting_up), %g2
or %g2, %lo(_dl_starting_up), %g2
- st %g0, [%l7+%g2]
- /* Pass our finalizer function to the user in %g1
+ ldx [%l7+%g2], %g2
+ st %g0, [%g2]
+ /* Pass our finalizer function to the user in %g1. */
sethi %hi(_dl_fini), %g1
or %g1, %lo(_dl_fini), %g1
ldx [%l7+%g1], %g1
diff --git a/sysdeps/sparc64/elf/Dist b/sysdeps/sparc/sparc64/elf/Dist
index d9338c8..d9338c8 100644
--- a/sysdeps/sparc64/elf/Dist
+++ b/sysdeps/sparc/sparc64/elf/Dist
diff --git a/sysdeps/sparc64/elf/Makefile b/sysdeps/sparc/sparc64/elf/Makefile
index 1b38355..1b38355 100644
--- a/sysdeps/sparc64/elf/Makefile
+++ b/sysdeps/sparc/sparc64/elf/Makefile
diff --git a/sysdeps/sparc/sparc64/elf/crtbegin.S b/sysdeps/sparc/sparc64/elf/crtbegin.S
new file mode 100644
index 0000000..318e7a6
--- /dev/null
+++ b/sysdeps/sparc/sparc64/elf/crtbegin.S
@@ -0,0 +1,69 @@
+/* Destructor cleanup code for elf64-sparc
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 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. */
+
+
+.section ".ctors",#alloc,#write
+
+ .align 8
+__CTOR_LIST__:
+ .xword -1
+
+.section ".dtors",#alloc,#write
+
+ .align 8
+__DTOR_LIST__:
+ .xword -1
+
+.section ".fini",#alloc,#execinstr
+
+ call __do_global_dtors_aux
+ nop
+
+.text
+
+ .align 4
+ .type __do_global_dtors_aux,#function
+__do_global_dtors_aux:
+ save %sp,-160,%sp
+
+#ifdef PIC
+1: call 11f
+ sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
+11: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
+ add %l7, %o7, %l7
+ sethi %hi(__DTOR_LIST__), %l0
+ or %l0, %lo(__DTOR_LIST__), %l0
+ ldx [%l7+%l0], %l0
+#else
+ sethi %hi(__DTOR_LIST__), %l0
+ or %l0, %lo(__DTOR_LIST__), %l0
+ add %l0, %g4, %l0
+#endif
+
+ ba 3f
+ ldx [%l0+8], %l1
+2: jmpl %l1, %o7
+ ldx [%l0+8], %l1
+3: brnz,pt %l1, 2b
+ add %l0, 8, %l0
+
+ ret
+ restore
+
+ .size __do_global_dtors_aux,.-__do_global_dtors_aux
diff --git a/sysdeps/sparc64/elf/crtbeginS.S b/sysdeps/sparc/sparc64/elf/crtbeginS.S
index 7db4bc5..7db4bc5 100644
--- a/sysdeps/sparc64/elf/crtbeginS.S
+++ b/sysdeps/sparc/sparc64/elf/crtbeginS.S
diff --git a/sysdeps/sparc/sparc64/elf/crtend.S b/sysdeps/sparc/sparc64/elf/crtend.S
new file mode 100644
index 0000000..7a5c067
--- /dev/null
+++ b/sysdeps/sparc/sparc64/elf/crtend.S
@@ -0,0 +1,70 @@
+/* Constructor startup code for elf64-sparc
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 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. */
+
+
+.section ".ctors",#alloc,#write
+
+ .align 8
+__CTOR_END__:
+ .xword 0
+
+.section ".dtors",#alloc,#write
+
+ .align 8
+__DTOR_END__:
+ .xword 0
+
+.section ".init",#alloc,#execinstr
+
+ call __do_global_ctors_aux
+ nop
+
+.text
+
+ .align 4
+ .type __do_global_ctors_aux,#function
+__do_global_ctors_aux:
+ save %sp,-160,%sp
+
+#ifdef PIC
+1: call 11f
+ sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
+11: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
+ add %l7, %o7, %l7
+ sethi %hi(__CTOR_END__), %l0
+ or %l0, %lo(__CTOR_END__), %l0
+ ldx [%l7+%l0], %l0
+#else
+ sethi %hi(__CTOR_END__), %l0
+ or %l0, %lo(__CTOR_END__), %l0
+ add %l0, %g4, %l0
+#endif
+
+ ba 3f
+ ldx [%l0+8], %l1
+2: jmpl %l1, %o7
+ ldx [%l0+8], %l1
+3: addcc %l1, 1, %g0
+ bnz,pt %xcc, 2b
+ add %l0, 8, %l0
+
+ ret
+ restore
+
+ .size __do_global_ctors_aux,.-__do_global_ctors_aux
diff --git a/sysdeps/sparc64/elf/crtendS.S b/sysdeps/sparc/sparc64/elf/crtendS.S
index 56532f5..56532f5 100644
--- a/sysdeps/sparc64/elf/crtendS.S
+++ b/sysdeps/sparc/sparc64/elf/crtendS.S
diff --git a/sysdeps/sparc64/elf/start.S b/sysdeps/sparc/sparc64/elf/start.S
index 73f4236..73f4236 100644
--- a/sysdeps/sparc64/elf/start.S
+++ b/sysdeps/sparc/sparc64/elf/start.S
diff --git a/sysdeps/sparc/sparc64/fpu/bits/fenv.h b/sysdeps/sparc/sparc64/fpu/bits/fenv.h
new file mode 100644
index 0000000..802c58b
--- /dev/null
+++ b/sysdeps/sparc/sparc64/fpu/bits/fenv.h
@@ -0,0 +1,76 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Define bits representing the exception. We use the bit positions
+ of the appropriate accrued exception bits from the FSR. */
+enum
+ {
+ FE_INVALID = (1 << 9),
+#define FE_INVALID FE_INVALID
+ FE_OVERFLOW = (1 << 8),
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = (1 << 7),
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_DIVBYZERO = (1 << 6),
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_INEXACT = (1 << 5)
+#define FE_INEXACT FE_INEXACT
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The Sparc FPU supports all of the four defined rounding modes. We
+ use again the bit positions in the FPU control word as the values
+ for the appropriate macros. */
+enum
+ {
+ FE_TONEAREST = (0U << 30),
+#define FE_TONEAREST FE_TONEAREST
+ FE_TOWARDSZERO = (1U << 30),
+#define FE_TOWARDSZERO FE_TOWARDSZERO
+ FE_UPWARD = (2U << 30),
+#define FE_UPWARD FE_UPWARD
+ FE_DOWNWARD = (3U << 30)
+#define FE_DOWNWARD FE_DOWNWARD
+ };
+
+#define __FE_ROUND_MASK (3U << 30)
+
+/* Type representing exception flags. */
+typedef unsigned long fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef unsigned long fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exception is masked. */
+# define FE_NOMASK_ENV ((fenv_t *) -2)
+#endif
+
+/* For internal use only: access the fp state register. */
+#define __fenv_stfsr(X) __asm__("stx %%fsr,%0" : "=m"(X))
+#define __fenv_ldfsr(X) __asm__ __volatile__("ldx %0,%%fsr" : : "m"(X))
diff --git a/sysdeps/sparc64/fpu_control.h b/sysdeps/sparc/sparc64/fpu/fpu_control.h
index fd8abb1..fd8abb1 100644
--- a/sysdeps/sparc64/fpu_control.h
+++ b/sysdeps/sparc/sparc64/fpu/fpu_control.h
diff --git a/sysdeps/sparc64/gmp-mparam.h b/sysdeps/sparc/sparc64/gmp-mparam.h
index a3c6697..a3c6697 100644
--- a/sysdeps/sparc64/gmp-mparam.h
+++ b/sysdeps/sparc/sparc64/gmp-mparam.h
diff --git a/sysdeps/sparc64/lshift.S b/sysdeps/sparc/sparc64/lshift.S
index 1678991..1678991 100644
--- a/sysdeps/sparc64/lshift.S
+++ b/sysdeps/sparc/sparc64/lshift.S
diff --git a/sysdeps/sparc64/mul_1.S b/sysdeps/sparc/sparc64/mul_1.S
index 87e441d..87e441d 100644
--- a/sysdeps/sparc64/mul_1.S
+++ b/sysdeps/sparc/sparc64/mul_1.S
diff --git a/sysdeps/sparc64/rshift.S b/sysdeps/sparc/sparc64/rshift.S
index e1b3aca..e1b3aca 100644
--- a/sysdeps/sparc64/rshift.S
+++ b/sysdeps/sparc/sparc64/rshift.S
diff --git a/sysdeps/sparc64/sub_n.S b/sysdeps/sparc/sparc64/sub_n.S
index 93f8a82..93f8a82 100644
--- a/sysdeps/sparc64/sub_n.S
+++ b/sysdeps/sparc/sparc64/sub_n.S
diff --git a/sysdeps/sparc64/submul_1.S b/sysdeps/sparc/sparc64/submul_1.S
index 3cc0e3b..3cc0e3b 100644
--- a/sysdeps/sparc64/submul_1.S
+++ b/sysdeps/sparc/sparc64/submul_1.S
diff --git a/sysdeps/sparc64/Implies b/sysdeps/sparc64/Implies
deleted file mode 100644
index 1d793f9..0000000
--- a/sysdeps/sparc64/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-wordsize-64
-# SPARC uses IEEE 754 floating point.
-ieee754
diff --git a/sysdeps/sparc64/configure b/sysdeps/sparc64/configure
deleted file mode 100755
index 099f5b0..0000000
--- a/sysdeps/sparc64/configure
+++ /dev/null
@@ -1,3 +0,0 @@
- # Local configure fragment for sysdeps/sparc64
-
-nopic_initfini=yes
diff --git a/sysdeps/sparc64/configure.in b/sysdeps/sparc64/configure.in
deleted file mode 100644
index 5f74b82..0000000
--- a/sysdeps/sparc64/configure.in
+++ /dev/null
@@ -1,7 +0,0 @@
-sinclude(./aclocal.m4)dnl Autoconf lossage
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/sparc64
-
-dnl We need to have separate crt? files for static linking which does
-dnl not use PIC.
-nopic_initfini=yes
diff --git a/sysdeps/sparc64/elf/crtbegin.S b/sysdeps/sparc64/elf/crtbegin.S
deleted file mode 100644
index fbd731c..0000000
--- a/sysdeps/sparc64/elf/crtbegin.S
+++ /dev/null
@@ -1,49 +0,0 @@
-.section ".ctors",#alloc,#write
-
- .align 8
-__CTOR_LIST__:
- .xword -1
-
-.section ".dtors",#alloc,#write
-
- .align 8
-__DTOR_LIST__:
- .xword -1
-
-.section ".fini",#alloc,#execinstr
-
- call __do_global_dtors_aux
- nop
-
-.text
-
- .align 4
- .type __do_global_dtors_aux,#function
-__do_global_dtors_aux:
- save %sp,-160,%sp
-
-#ifdef PIC
-1: rd %pc, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- add %l7, %g1, %l7
- sethi %hi(__DTOR_LIST__), %l0
- or %l0, %lo(__DTOR_LIST__), %l0
- ldx [%l7+%l0], %l0
-#else
- sethi %hi(__DTOR_LIST__), %l0
- or %l0, %lo(__DTOR_LIST__), %l0
- add %l0, %g4, %l0
-#endif
-
- ba 3f
- ldx [%l0+8], %l1
-2: jmpl %l1, %o7
- ldx [%l0+8], %l1
-3: brnz,pt %l1, 2b
- add %l0, 8, %l0
-
- ret
- restore
-
- .size __do_global_dtors_aux,.-__do_global_dtors_aux
diff --git a/sysdeps/sparc64/elf/crtend.S b/sysdeps/sparc64/elf/crtend.S
deleted file mode 100644
index ea69083..0000000
--- a/sysdeps/sparc64/elf/crtend.S
+++ /dev/null
@@ -1,50 +0,0 @@
-.section ".ctors",#alloc,#write
-
- .align 8
-__CTOR_END__:
- .xword 0
-
-.section ".dtors",#alloc,#write
-
- .align 8
-__DTOR_END__:
- .xword 0
-
-.section ".init",#alloc,#execinstr
-
- call __do_global_ctors_aux
- nop
-
-.text
-
- .align 4
- .type __do_global_ctors_aux,#function
-__do_global_ctors_aux:
- save %sp,-160,%sp
-
-#ifdef PIC
-1: rd %pc, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- add %l7, %g1, %l7
- sethi %hi(__CTOR_END__), %l0
- or %l0, %lo(__CTOR_END__), %l0
- ldx [%l7+%l0], %l0
-#else
- sethi %hi(__CTOR_END__), %l0
- or %l0, %lo(__CTOR_END__), %l0
- add %l0, %g4, %l0
-#endif
-
- ba 3f
- ldx [%l0+8], %l1
-2: jmpl %l1, %o7
- ldx [%l0+8], %l1
-3: addcc %l1, 1, %g0
- bnz,pt %xcc, 2b
- add %l0, 8, %l0
-
- ret
- restore
-
- .size __do_global_ctors_aux,.-__do_global_ctors_aux
diff --git a/sysdeps/stub/accept.c b/sysdeps/stub/accept.c
index 8f65f5f..c27070c 100644
--- a/sysdeps/stub/accept.c
+++ b/sysdeps/stub/accept.c
@@ -28,7 +28,7 @@ int
accept (fd, addr, addr_len)
int fd;
__SOCKADDR_ARG addr;
- size_t *addr_len;
+ socklen_t *addr_len;
{
__set_errno (ENOSYS);
return -1;
diff --git a/sysdeps/stub/bind.c b/sysdeps/stub/bind.c
index bfd2888..7e7f0d7 100644
--- a/sysdeps/stub/bind.c
+++ b/sysdeps/stub/bind.c
@@ -24,7 +24,7 @@ int
bind (fd, addr, len)
int fd;
__CONST_SOCKADDR_ARG addr;
- size_t len;
+ socklen_t len;
{
__set_errno (ENOSYS);
return -1;
diff --git a/sysdeps/stub/bits/string.h b/sysdeps/stub/bits/string.h
index bd1b774..ad68b03 100644
--- a/sysdeps/stub/bits/string.h
+++ b/sysdeps/stub/bits/string.h
@@ -1,4 +1,4 @@
-/* This file should provide inline versions of math functions.
+/* This file should provide inline versions of string functions.
Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
diff --git a/sysdeps/stub/connect.c b/sysdeps/stub/connect.c
index 9152a94..fb8b503 100644
--- a/sysdeps/stub/connect.c
+++ b/sysdeps/stub/connect.c
@@ -27,12 +27,11 @@ int
__connect (fd, addr, len)
int fd;
__CONST_SOCKADDR_ARG addr;
- size_t len;
+ socklen_t len;
{
__set_errno (ENOSYS);
return -1;
}
weak_alias (__connect, connect)
-
stub_warning (connect)
diff --git a/sysdeps/stub/getsockname.c b/sysdeps/stub/getsockname.c
index 0706e59..f0d46db 100644
--- a/sysdeps/stub/getsockname.c
+++ b/sysdeps/stub/getsockname.c
@@ -24,7 +24,7 @@ int
getsockname (fd, addr, len)
int fd;
__SOCKADDR_ARG addr;
- size_t *len;
+ socklen_t *len;
{
__set_errno (ENOSYS);
return -1;
diff --git a/sysdeps/stub/getsockopt.c b/sysdeps/stub/getsockopt.c
index d06b3e6..6f3c866 100644
--- a/sysdeps/stub/getsockopt.c
+++ b/sysdeps/stub/getsockopt.c
@@ -28,11 +28,10 @@ getsockopt (fd, level, optname, optval, optlen)
int level;
int optname;
void *optval;
- size_t *optlen;
+ socklen_t *optlen;
{
__set_errno (ENOSYS);
return -1;
}
-
stub_warning (getsockopt)
diff --git a/sysdeps/stub/recvfrom.c b/sysdeps/stub/recvfrom.c
index d759c3d..931bdbb 100644
--- a/sysdeps/stub/recvfrom.c
+++ b/sysdeps/stub/recvfrom.c
@@ -29,11 +29,10 @@ recvfrom (fd, buf, n, flags, addr, addr_len)
size_t n;
int flags;
__SOCKADDR_ARG addr;
- size_t *addr_len;
+ socklen_t *addr_len;
{
__set_errno (ENOSYS);
return -1;
}
-
stub_warning (recvfrom)
diff --git a/sysdeps/stub/sendto.c b/sysdeps/stub/sendto.c
index d09efba..47dad95 100644
--- a/sysdeps/stub/sendto.c
+++ b/sysdeps/stub/sendto.c
@@ -28,11 +28,10 @@ sendto (fd, buf, n, flags, addr, addr_len)
size_t n;
int flags;
__CONST_SOCKADDR_ARG addr;
- size_t addr_len;
+ socklen_t addr_len;
{
__set_errno (ENOSYS);
return -1;
}
-
stub_warning (sendto)
diff --git a/sysdeps/stub/setsockopt.c b/sysdeps/stub/setsockopt.c
index b1c02a1..5fad292 100644
--- a/sysdeps/stub/setsockopt.c
+++ b/sysdeps/stub/setsockopt.c
@@ -28,11 +28,10 @@ setsockopt (fd, level, optname, optval, optlen)
int level;
int optname;
void *optval;
- size_t optlen;
+ socklen_t optlen;
{
__set_errno (ENOSYS);
return -1;
}
-
stub_warning (setsockopt)
diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h
index df400d4..56e28a0 100644
--- a/sysdeps/unix/bsd/osf/bits/sigaction.h
+++ b/sysdeps/unix/bsd/osf/bits/sigaction.h
@@ -1,5 +1,5 @@
/* Structure and constant definitions for sigaction et al. OSF/1 version.
- Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -33,9 +33,9 @@ struct sigaction
/* Bits in `sa_flags'. */
#ifdef __USE_BSD
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */
-#define SA_DISABLE 0x4 /* Disable alternate signal stack. */
+# define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+# define SA_RESTART 0x2 /* Restart syscall on signal return. */
+# define SA_DISABLE 0x4 /* Disable alternate signal stack. */
#endif
#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index ed9ae87..ea1ab49 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -11,7 +11,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
sys/user.h sys/sysmacros.h sys/procfs.h \
sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h \
- sys/quota.h sys/fsuid.h
+ sys/quota.h sys/fsuid.h bits/mman.h
install-others += $(inst_includedir)/bits/syscall.h
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index e2e97bd..f28b6f2 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -31,21 +31,21 @@ struct sigaction
};
/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
-#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */
-#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when
- its handler is being executed. */
-#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */
+# define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+# define SA_NOMASK 0x00000008 /* Don't automatically block the signal
+ when its handler is being executed. */
+# define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */
/* Some aliases for the SA_ constants. */
-#define SA_NODEFER SA_NOMASK
-#define SA_RESETHAND SA_ONESHOT
+# define SA_NODEFER SA_NOMASK
+# define SA_RESETHAND SA_ONESHOT
#endif
/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
-#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/linux/bits/sigaction.h b/sysdeps/unix/sysv/linux/bits/sigaction.h
index 13a6a03..247b534 100644
--- a/sysdeps/unix/sysv/linux/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux's sigaction.
- Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,21 +34,21 @@ struct sigaction
};
/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-#define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
-#define SA_RESTART 0x10000000 /* Don't restart syscall on signal return. */
-#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-#define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
- its handler is being executed. */
-#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+# define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+ its handler is being executed. */
+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
/* Some aliases for the SA_ constants. */
-#define SA_NOMASK SA_NODEFER
-#define SA_ONESHOT SA_RESETHAND
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
#endif
/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_BLOCK 0 /* Block signals. */
-#define SIG_UNBLOCK 1 /* Unblock signals. */
-#define SIG_SETMASK 2 /* Set the set of blocked signals. */
+#define SIG_BLOCK 0 /* Block signals. */
+#define SIG_UNBLOCK 1 /* Unblock signals. */
+#define SIG_SETMASK 2 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c
index f64fe1e..615a81d 100644
--- a/sysdeps/unix/sysv/linux/if_index.c
+++ b/sysdeps/unix/sysv/linux/if_index.c
@@ -68,20 +68,21 @@ if_nametoindex (const char *ifname)
{
#ifndef SIOGIFINDEX
__set_errno (ENOSYS);
+ return 0;
#else
struct ifreq ifr;
- int rc;
int fd = opensock ();
if (fd < 0)
return 0;
strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
- rc = ioctl (fd, SIOGIFINDEX, &ifr);
- if (rc < 0)
+ if (ioctl (fd, SIOGIFINDEX, &ifr) < 0)
{
+ int saved_errno = errno;
close (fd);
- __set_errno (rc == -EINVAL ? ENOSYS : -rc);
+ if (saved_errno == EINVAL)
+ __set_errno (ENOSYS);
return 0;
}
close (fd);
@@ -109,7 +110,6 @@ if_nameindex (void)
__set_errno (ENOSYS);
return NULL;
#else
- int rc;
int fd = opensock ();
struct ifconf ifc;
unsigned int rq_ifs = 4, nifs, i;
@@ -153,12 +153,13 @@ if_nameindex (void)
goto jump;
}
strcpy (idx[i].if_name, ifr->ifr_name);
- rc = ioctl (fd, SIOGIFINDEX, ifr);
- if (rc < 0)
+ if (ioctl (fd, SIOGIFINDEX, ifr) < 0)
{
+ int saved_errno = errno;
free (idx);
idx = NULL;
- __set_errno (rc == -EINVAL ? ENOSYS : -rc);
+ if (saved_errno == EINVAL)
+ __set_errno (ENOSYS);
goto jump;
}
idx[i].if_index = ifr->ifr_ifindex;
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
new file mode 100644
index 0000000..d6c29d2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -0,0 +1,75 @@
+/* Definitions for POSIX memory map inerface. Linux/m68k version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MMAN_H
+# error "Never include this file directly. Use <sys/mman.h> instead"
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_READ 0x1 /* Page can be read. */
+#define PROT_WRITE 0x2 /* Page can be written. */
+#define PROT_EXEC 0x4 /* Page can be executed. */
+#define PROT_NONE 0x0 /* Page can not be accessed. */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes are private. */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x0f /* Mask for type of mapping. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Interpret addr exactly. */
+#ifdef __USE_MISC
+# define MAP_FILE 0
+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# define MAP_ANON MAP_ANONYMOUS
+#endif
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x2000 /* Lock the mapping. */
+# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+/* Flags for `mlockall'. */
+#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 2 /* Lock all additions to address
+ space. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 66c58cc..d6f70f2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -39,24 +39,24 @@ struct sigaction
};
/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-#define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
-#define SA_RESTART 0x10000000 /* Don't restart syscall on signal return. */
-#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-#define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
- its handler is being executed. */
-#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+# define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+ its handler is being executed. */
+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
/* Some aliases for the SA_ constants. */
-#define SA_NOMASK SA_NODEFER
-#define SA_ONESHOT SA_RESETHAND
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
#endif
/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_NOP 0 /* 0 is unused to catch errors */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
-#define SIG_SETMASK 3 /* Set the set of blocked signals. */
-#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
+#define SIG_NOP 0 /* 0 is unused to catch errors */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
set only the low 32 bit of the sigset. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
index 19aa7e3..1347199 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
@@ -27,26 +27,29 @@ struct sigaction
__sigset_t sa_mask;
/* Special flags. */
- unsigned int sa_flags;
+ unsigned long sa_flags;
+
+ /* Not used by Linux/Sparc yet. */
+ void (*sa_restorer)(void);
};
/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 0x00000008 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDSTOP 0x00000008 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
-#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */
-#define SA_INTERRUPT 0x00000010 /* Historical no-op. */
-#define SA_NOMASK 0x00000020 /* Don't automatically block the signal when
- its handler is being executed. */
-#define SA_ONESHOT 0x00000004 /* Reset to SIG_DFL on entry to handler. */
+# define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
+# define SA_INTERRUPT 0x00000010 /* Historical no-op. */
+# define SA_NOMASK 0x00000020 /* Don't automatically block the signal when
+ its handler is being executed. */
+# define SA_ONESHOT 0x00000004 /* Reset to SIG_DFL on entry to handler. */
/* Some aliases for the SA_ constants. */
-#define SA_NODEFER SA_NOMASK
-#define SA_RESETHAND SA_ONESHOT
+# define SA_NODEFER SA_NOMASK
+# define SA_RESETHAND SA_ONESHOT
#endif
/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
-#define SIG_SETMASK 4 /* Set the set of blocked signals. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 4 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/linux/sparc/Dist b/sysdeps/unix/sysv/linux/sparc/sparc32/Dist
index 9729f07..9729f07 100644
--- a/sysdeps/unix/sysv/linux/sparc/Dist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Dist
diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
index 4cbd3bd..4cbd3bd 100644
--- a/sysdeps/unix/sysv/linux/sparc/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile
diff --git a/sysdeps/unix/sysv/linux/sparc/__sigtrampoline.S b/sysdeps/unix/sysv/linux/sparc/sparc32/__sigtrampoline.S
index a639511..a639511 100644
--- a/sysdeps/unix/sysv/linux/sparc/__sigtrampoline.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/__sigtrampoline.S
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/sparc32/bits/mman.h
index 3e7f290..3e7f290 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/bits/mman.h
diff --git a/sysdeps/unix/sysv/linux/sparc/brk.c b/sysdeps/unix/sysv/linux/sparc/sparc32/brk.c
index 8f079bf..8f079bf 100644
--- a/sysdeps/unix/sysv/linux/sparc/brk.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/brk.c
diff --git a/sysdeps/unix/sysv/linux/sparc/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
index 64735e9..64735e9 100644
--- a/sysdeps/unix/sysv/linux/sparc/clone.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
diff --git a/sysdeps/unix/sysv/linux/sparc/fork.S b/sysdeps/unix/sysv/linux/sparc/sparc32/fork.S
index 951ab49..951ab49 100644
--- a/sysdeps/unix/sysv/linux/sparc/fork.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/fork.S
diff --git a/sysdeps/unix/sysv/linux/sparc/init-first.h b/sysdeps/unix/sysv/linux/sparc/sparc32/init-first.h
index 39822fc..39822fc 100644
--- a/sysdeps/unix/sysv/linux/sparc/init-first.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/init-first.h
diff --git a/sysdeps/unix/sysv/linux/sparc/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h
index 91f02f4..91f02f4 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h
diff --git a/sysdeps/unix/sysv/linux/sparc/pipe.S b/sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S
index 4c50656..4c50656 100644
--- a/sysdeps/unix/sysv/linux/sparc/pipe.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S
diff --git a/sysdeps/unix/sysv/linux/sparc/profil-counter.h b/sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h
index 1bd0648..1bd0648 100644
--- a/sysdeps/unix/sysv/linux/sparc/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h
diff --git a/sysdeps/unix/sysv/linux/sparc/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
index d39eb7c..d39eb7c 100644
--- a/sysdeps/unix/sysv/linux/sparc/sigaction.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
diff --git a/sysdeps/unix/sysv/linux/sparc/socket.S b/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S
index bdfc2fc..bdfc2fc 100644
--- a/sysdeps/unix/sysv/linux/sparc/socket.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S
diff --git a/sysdeps/unix/sysv/linux/sparc/syscall.S b/sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S
index 3921ca5..3921ca5 100644
--- a/sysdeps/unix/sysv/linux/sparc/syscall.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S
diff --git a/sysdeps/unix/sysv/linux/sparc/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
index 7883d70..7883d70 100644
--- a/sysdeps/unix/sysv/linux/sparc/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.S b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.S
index 7e90239..7e90239 100644
--- a/sysdeps/unix/sysv/linux/sparc/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.S
diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
index 0e5a8cd..0e5a8cd 100644
--- a/sysdeps/unix/sysv/linux/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
diff --git a/sysdeps/unix/sysv/linux/sparc64/Dist b/sysdeps/unix/sysv/linux/sparc/sparc64/Dist
index e770e20..e770e20 100644
--- a/sysdeps/unix/sysv/linux/sparc64/Dist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Dist
diff --git a/sysdeps/unix/sysv/linux/sparc64/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
index c4d8322..c4d8322 100644
--- a/sysdeps/unix/sysv/linux/sparc64/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
diff --git a/sysdeps/unix/sysv/linux/sparc64/__longjmp.S b/sysdeps/unix/sysv/linux/sparc/sparc64/__longjmp.S
index 3107179..3107179 100644
--- a/sysdeps/unix/sysv/linux/sparc64/__longjmp.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/__longjmp.S
diff --git a/sysdeps/unix/sysv/linux/sparc64/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/mman.h
index 3e7f290..3e7f290 100644
--- a/sysdeps/unix/sysv/linux/sparc64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/mman.h
diff --git a/sysdeps/unix/sysv/linux/sparc64/bits/setjmp.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h
index ab850e5..ab850e5 100644
--- a/sysdeps/unix/sysv/linux/sparc64/bits/setjmp.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h
diff --git a/sysdeps/unix/sysv/linux/sparc64/bits/types.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
index 2229678..2229678 100644
--- a/sysdeps/unix/sysv/linux/sparc64/bits/types.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
diff --git a/sysdeps/unix/sysv/linux/sparc64/brk.S b/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S
index 87412e0..abdd7e6 100644
--- a/sysdeps/unix/sysv/linux/sparc64/brk.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S
@@ -40,10 +40,10 @@ __curbrk: .skip 8
ENTRY(__brk)
save %sp, -160, %sp
#ifdef PIC
-1: rd %pc, %g1
+1: call 2f
sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- add %l7, %g1, %l7
+2: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
+ add %l7, %o7, %l7
#endif
LOADSYSCALL(brk)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S b/sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S
new file mode 100644
index 0000000..4e6a2da
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S
@@ -0,0 +1 @@
+/* _setjmp is in setjmp.S */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S b/sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S
new file mode 100644
index 0000000..1da848d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S
@@ -0,0 +1 @@
+/* setjmp is in setjmp.S */
diff --git a/sysdeps/unix/sysv/linux/sparc64/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S
index fe38bf4..a5cb1a4 100644
--- a/sysdeps/unix/sysv/linux/sparc64/clone.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S
@@ -54,10 +54,10 @@ __libc_clone:
restore
99:
#ifdef PIC
- rd %pc, %g1
+ call 1f
sethi %hi(_GLOBAL_OFFSET_TABLE_-(99b-.)), %l7
- or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(99b-.)), %l7
- add %l7, %g1, %l7
+1: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(99b-.)), %l7
+ add %l7, %o7, %l7
set EINVAL, %i0
sethi %hi(errno), %g2
or %g2, %lo(errno), %g2
@@ -76,7 +76,7 @@ __libc_clone:
mov -1,%i0
ret
restore
- .size __libc_clone,.-__libc_clone
+ .size __libc_clone, .-__libc_clone
.type __thread_start,@function
__thread_start:
@@ -86,4 +86,4 @@ __thread_start:
mov %l3,%o0
call _exit,0
nop
- .size __thread_start,.-__thread_start
+ .size __thread_start, .-__thread_start
diff --git a/sysdeps/unix/sysv/linux/sparc64/fork.S b/sysdeps/unix/sysv/linux/sparc/sparc64/fork.S
index c735da5..c735da5 100644
--- a/sysdeps/unix/sysv/linux/sparc64/fork.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/fork.S
diff --git a/sysdeps/unix/sysv/linux/sparc64/getcontext.S b/sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S
index 05b0626..05b0626 100644
--- a/sysdeps/unix/sysv/linux/sparc64/getcontext.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S
diff --git a/sysdeps/unix/sysv/linux/sparc64/init-first.h b/sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h
index f7fad7f..3e27c6d 100644
--- a/sysdeps/unix/sysv/linux/sparc64/init-first.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h
@@ -33,33 +33,33 @@
.global " #NAME "
.type " #NAME ",@function
" #NAME ":
- save %sp, -64, %sp
-1: rd %pc, %g1
+ save %sp, -128, %sp
+1: call 11f
sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
- or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
+11: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
add %l7, %o7, %l7
/* Are we a dynamic libc being loaded into a static program? */
- sethi %hi(_dl_starting_up), %g2
- or %g2, %lo(_dl_starting_up), %g2
- ld [%l7+%g2], %g2
- brz,pn %g2, 3f
- sethi %hi(__libc_multiple_libcs), %g3
- ld [%g2], %g2
- subcc %g0, %g2, %g0
- subc %g0, -1, %g2
-3: or %g3, %lo(__libc_multiple_libcs), %g3
- ld [%l7+%g3], %g3
- st %g2, [%g3]
+ sethi %hi(_dl_starting_up), %l2
+ or %l2, %lo(_dl_starting_up), %l2
+ ldx [%l7+%l2], %l2
+ brz,pn %l2, 3f
+ sethi %hi(__libc_multiple_libcs), %l3
+ ld [%l2], %l4
+ mov %g0, %l2
+ movrz %l4, 1, %l2
+3: or %l3, %lo(__libc_multiple_libcs), %l3
+ ldx [%l7+%l3], %l3
+ st %l2, [%l3]
/* If so, argc et al are in %o0-%o2 already. Otherwise, load them. */
- brnz,pn %g2, " #INIT "
+ brnz,pn %l2, " #INIT "
restore
- ld [%sp+" __S(STACK_BIAS) "+22*8], %o0
+ ldx [%sp+" __S(STACK_BIAS) "+22*8], %o0
add %sp, " __S(STACK_BIAS) "+23*8, %o1
sll %o0, 3, %o2
add %o2, %o1, %o2
- add %o2, 8, %o2
- ba,a " #INIT "
- .size "#NAME " .-" #NAME);
+ ba " #INIT "
+ add %o2, 8, %o2
+ .size "#NAME ", .-" #NAME);
#else
@@ -73,15 +73,15 @@
or %g2, %lo(_dl_starting_up), %g2
brz,pt %g2, 3f
sethi %hi(__libc_multiple_libcs), %g3
- ld [%g4+%g2], %g2
- subcc %g0, %g2, %g0
- subc %g0, -1, %g2
-3: add %g3, %g4, %g3
- st %g2, [%g3+%lo(__libc_multiple_libcs)]
+ ld [%g4+%g2], %g1
+ mov %g0, %g2
+ movrz %g1, 1, %g2
+3: or %g3, %lo(__libc_multiple_libcs), %g3
+ st %g2, [%g3+%g4]
/* If so, argc et al are in %o0-%o2 already. Otherwise, load them. */
brnz,pn %g2, " #INIT "
nop
- ld [%sp+" __S(STACK_BIAS) "+22*8], %o0
+ ldx [%sp+" __S(STACK_BIAS) "+22*8], %o0
add %sp, " __S(STACK_BIAS) "+23*8, %o1
sll %o0, 3, %o2
add %o2, %o1, %o2
diff --git a/sysdeps/unix/sysv/linux/sparc64/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
index fcb752e..fcb752e 100644
--- a/sysdeps/unix/sysv/linux/sparc64/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
diff --git a/sysdeps/unix/sysv/linux/sparc64/longjmp.S b/sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S
index c81b104..c456377 100644
--- a/sysdeps/unix/sysv/linux/sparc64/longjmp.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S
@@ -42,3 +42,5 @@ ENTRY(longjmp)
ta 0x6f
END(longjmp)
+
+strong_alias(longjmp, __longjmp)
diff --git a/sysdeps/unix/sysv/linux/sparc64/pipe.S b/sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S
index 82ff4ea..82ff4ea 100644
--- a/sysdeps/unix/sysv/linux/sparc64/pipe.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S
diff --git a/sysdeps/unix/sysv/linux/sparc64/profil-counter.h b/sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h
index 6a3f0a2..6a3f0a2 100644
--- a/sysdeps/unix/sysv/linux/sparc64/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h
diff --git a/sysdeps/unix/sysv/linux/sparc64/setcontext.S b/sysdeps/unix/sysv/linux/sparc/sparc64/setcontext.S
index 2968b65..2968b65 100644
--- a/sysdeps/unix/sysv/linux/sparc64/setcontext.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/setcontext.S
diff --git a/sysdeps/unix/sysv/linux/sparc64/setjmp.S b/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S
index 8b88b49..fcc5cb5 100644
--- a/sysdeps/unix/sysv/linux/sparc64/setjmp.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S
@@ -27,10 +27,29 @@
#define O_gregs 32
#define O_g1 (O_gregs + 4*8)
+/* int _setjmp(jmp_buf) */
+
+.weak _setjmp
+ENTRY(_setjmp)
+
+ ba __sigsetjmp_local
+ set 0, %o1
+
+END(setjmp)
+
+/* int setjmp(jmp_buf) */
+
+.weak setjmp
+ENTRY(setjmp)
+
+ set 1, %o1
+
+END(setjmp)
/* int __sigsetjmp(jmp_buf, savemask) */
ENTRY(__sigsetjmp)
+__sigsetjmp_local:
/* Record whether the user is intending to save the sigmask. */
st %o1, [%o0 + O_mask_was_saved]
diff --git a/sysdeps/unix/sysv/linux/sparc64/sigjmp.S b/sysdeps/unix/sysv/linux/sparc/sparc64/sigjmp.S
index 940ccbc..940ccbc 100644
--- a/sysdeps/unix/sysv/linux/sparc64/sigjmp.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigjmp.S
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S b/sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S
new file mode 100644
index 0000000..30dace5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S
@@ -0,0 +1,39 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+ .text
+
+ENTRY (syscall)
+
+ mov %o0,%g1
+ mov %o1,%o0
+ mov %o2,%o1
+ mov %o3,%o2
+ mov %o4,%o3
+ mov %o5,%o4
+
+ ta 0x11
+
+ bcc,pt %xcc,1f
+ nop
+ SYSCALL_ERROR_HANDLER
+
+1: retl
+
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index 66ba470..66ba470 100644
--- a/sysdeps/unix/sysv/linux/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
diff --git a/sysdeps/unix/sysv/linux/sparc64/sysdep.S b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.S
index 7365780..7365780 100644
--- a/sysdeps/unix/sysv/linux/sparc64/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.S
diff --git a/sysdeps/unix/sysv/linux/sparc64/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
index f01c1f4..c880e4a 100644
--- a/sysdeps/unix/sysv/linux/sparc64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
@@ -44,43 +44,65 @@
.type name,@function;
#ifdef PIC
-#define SYSCALL_ERROR_HANDLER1(R) \
+# ifdef _LIBC_REENTRANT
+# define SYSCALL_ERROR_HANDLER \
.global C_SYMBOL_NAME(errno); \
.type C_SYMBOL_NAME(errno),@object; \
-0: rd %pc,%g1; \
- sethi %hi(_GLOBAL_OFFSET_TABLE_-(0b-.)),%g2; \
- add %g2,%lo(_GLOBAL_OFFSET_TABLE_-(0b-.)),%g2; \
- add %g2,%g1,%g1; \
- sethi %hi(errno),%g2; \
- add %g2,%lo(errno),%g2; \
- ldx [%g1+%g2],%g2; \
- st R,[%g2]
+ save %sp,-160,%sp; \
+ 101: call 102f; \
+ sethi %hi(_GLOBAL_OFFSET_TABLE_-(101b-.)),%g2; \
+ 102: or %g2,%lo(_GLOBAL_OFFSET_TABLE_-(101b-.)),%g2; \
+ sethi %hi(errno),%i1; \
+ add %g2,%o7,%l7; \
+ or %i1,%lo(errno),%i1; \
+ ldx [%l7+%i1],%g2; \
+ st %i0,[%g2]; \
+ call __errno_location; \
+ nop; \
+ st %i0,[%o0]; \
+ sub %g0,1,%i0; \
+ jmpl %i7+8, %g0; \
+ restore
+# else
+# define SYSCALL_ERROR_HANDLER \
+ .global C_SYMBOL_NAME(errno); \
+ .type C_SYMBOL_NAME(errno),@object; \
+ mov %o7,%g3; \
+ 101: call 102f; \
+ sethi %hi(_GLOBAL_OFFSET_TABLE_-(101b-.)),%g2; \
+ 102: or %g2,%lo(_GLOBAL_OFFSET_TABLE_-(101b-.)),%g2; \
+ sethi %hi(errno),%o1; \
+ add %g2,%o7,%l7; \
+ or %o1,%lo(errno),%o1; \
+ mov %g3,%o7; \
+ ldx [%l7+%o1],%g2; \
+ st %o0,[%g2]
+# endif
#else
-#define SYSCALL_ERROR_HANDLER1(R) \
+# ifdef _LIBC_REENTRANT
+# define SYSCALL_ERROR_HANDLER \
.global C_SYMBOL_NAME(errno); \
.type C_SYMBOL_NAME(errno),@object; \
+ save %sp,-160,%sp; \
sethi %hi(errno),%g1; \
- add %g1,%g4,%g1; \
- st R,[%g1+%lo(errno)]
-#endif
-
-#ifdef _LIBC_REENTRANT
-#define SYSCALL_ERROR_HANDLER \
- .global C_SYMBOL_NAME(__errno_location); \
- .type C_SYMBOL_NAME(__errno_location),@function; \
- save %sp,-128,%sp; \
- SYSCALL_ERROR_HANDLER1(%i0); \
+ or %g1,%lo(errno),%g1; \
+ st %i0,[%g1+%g4]; \
call __errno_location; \
nop; \
st %i0,[%o0]; \
sub %g0,1,%i0; \
jmpl %i7+8, %g0; \
restore
-#else
-#define SYSCALL_ERROR_HANDLER \
- SYSCALL_ERROR_HANDLER1(%o0); \
+# else
+# define SYSCALL_ERROR_HANDLER \
+ .global C_SYMBOL_NAME(errno); \
+ .type C_SYMBOL_NAME(errno),@object; \
+ sethi %hi(errno),%g1; \
+ or %g1,%lo(errno),%g1; \
+ st %i0,[%g1+%g4]; \
retl; \
sub %g0,1,%i0
+# endif
#endif
#define PSEUDO(name, syscall_name, args) \
diff --git a/sysdeps/unix/sysv/linux/sparc64/ucontext.h b/sysdeps/unix/sysv/linux/sparc/sparc64/ucontext.h
index 160e2fc..160e2fc 100644
--- a/sysdeps/unix/sysv/linux/sparc64/ucontext.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/ucontext.h
diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h
index 5bf5985..732befc 100644
--- a/sysdeps/unix/sysv/minix/bits/sigaction.h
+++ b/sysdeps/unix/sysv/minix/bits/sigaction.h
@@ -31,14 +31,14 @@ struct sigaction
/* Bits in `sa_flags'. */
#ifdef __USE_MISC
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */
-#define SA_NODEFER 0x4 /* Don't block signal while catching it. */
-#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */
-#define SA_SIGINFO 0x10 /* Extended signal handling. */
-#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */
-#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */
-#define SA_DISABLE 0x100 /* Disable alternate signal stack. */
+# define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+# define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */
+# define SA_NODEFER 0x4 /* Don't block signal while catching it. */
+# define SA_RESTART 0x8 /* Restart syscall on signal return. */
+# define SA_SIGINFO 0x10 /* Extended signal handling. */
+# define SA_NOCLDWAIT 0x20 /* Don't create zombies. */
+# define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */
+# define SA_DISABLE 0x100 /* Disable alternate signal stack. */
#endif
#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
index 3a2ffb2..ce3ab5e 100644
--- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h
+++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
@@ -35,13 +35,13 @@ struct sigaction
/* Bits in `sa_flags'. */
#ifdef __USE_MISC
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */
-#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */
-#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
-#define SA_NODEFER 0x10 /* Don't automatically block the signal when
+# define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+# define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */
+# define SA_RESTART 0x4 /* Restart syscall on signal return. */
+# define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
+# define SA_NODEFER 0x10 /* Don't automatically block the signal when
its handler is being executed. */
-#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */
+# define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */
#endif
#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */
diff --git a/time/tzset.c b/time/tzset.c
index d3625fe..d765900 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -328,12 +328,9 @@ __tzset_internal (always)
{
register tz_rule *tzr = &tz_rules[whichrule];
- if (*tz == ',')
- {
- ++tz;
- if (*tz == '\0')
- return;
- }
+ /* Ignore comma to support string following the incorrect
+ specification in early POSIX.1 printings. */
+ tz += *tz == ',';
/* Get the date of the change. */
if (*tz == 'J' || isdigit (*tz))