From: Jakub Jelinek Date: Mon, 19 Dec 2005 12:11:38 +0000 (+0000) Subject: Updated to fedora-glibc-20051219T1003 X-Git-Tag: cvs/fedora-glibc-2_3_90-19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c6cfe6853a30deb4af842aacc924fa298d0521a;p=thirdparty%2Fglibc.git Updated to fedora-glibc-20051219T1003 --- diff --git a/ChangeLog b/ChangeLog index a83b6a0e49e..54801f90f97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,2191 @@ +2005-12-18 Ulrich Drepper + + * iconv/gconv.c: Demangle pointers before use if necessary. + * iconv/gconv_cache.c: Likewise. + * iconv/skeleton.c: Likewise. + * libio/iofwide.c: Likewise. + * wcsmbs/btowc.c: Likewise. + * wcsmbs/mbrtowc.c: Likewise. + * wcsmbs/mbsnrtowcs.c: Likewise. + * wcsmbs/mbsrtowcs_l.c: Likewise. + * wcsmbs/wcrtomb.c: Likewise. + * wcsmbs/wcsnrtombs.c: Likewise. + * wcsmbs/wcsrtombs.c: Likewise. + * wcsmbs/wctob.c: Likewise. + * iconv_gconv_db.c: Likewise. After init functions returns mangle + btowc pointer if necessary. + * iconv/gconv_dl.c: Mangle function pointers retrieved from dlsym. + + * iconv/gconv_builtin.c (builtin_map): Change type of size + information fields to int8_t. + + * libio/iofwide.c (__libio_codecvt): Mark as const. + (__libio_translit): Likewise. + * libio/libioP.h (__libio_codecvt): Adjust declaraction. + + * wcsmbs/wcsmbsload.c (to_wc): Mark as const. + (to_mb): Likewise. + +2005-12-18 Richard Henderson + + * sysdeps/alpha/libc-tls.c: Fix directory on include of base file. + +2005-12-18 Ulrich Drepper + + * iconv/gconv_builtin.c: Mark map with attribute_relro. + + * sysdeps/unix/sysv/linux/x86_64/sysdep.h (PTR_MANGLE): Define C + version for inside ld.so. + + * elf/rtld.c (dl_main): Don't use hp timing code unless it's available. + + * sysdeps/powerpc/powerpc32/setjmp-common.S [IS_IN_rtld]: Avoid + call to __sigjmp_save. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. + + * stdlib/cxa_atexit.c: Use PTR_MANGLE on function pointer. Fill in + flavor field last and protect with memory barrier. + * stdlib/on_exit.c: Likewise. + * stdlib/cxa_finalize.c: Use PTR_DEMANGLE on function pointer before + using it. + * stdlib/exit.c: Likewise. + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Define PTR_MANGLE and + PTR_DEMANGLE for C code in libc. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. + +2005-12-17 Ulrich Drepper + + * elf/Versions [GLIBC_PRIVATE]: Export __pointer_chk_guard if defined. + * elf/rtld.c: Define __pointer_chk_guard_local and if necessary + __pointer_chk_guard. + (_rtld_global_ro): Initialize _dl_pointer_guard. + (dl_main): Initialize __pointer_chk_guard_local and either + __pointer_chk_guard or TLS value if necessary. + (process_envvars): Recognize and handle LD_POINTER_GUARD. + * sysdeps/generic/ldsodefs.h (rtld_global_ro): Add _dl_pointer_guard. + * sysdeps/i386/__longjmp.S: Use PTR_DEMANGLE for PC if defined. + * sysdeps/x86_64/__longjmp.S: Likewise. + * sysdeps/i386/bsd-_setjmp.S: Use PTR_MANGLE for PC if defined. + * sysdeps/i386/bsd-_setjmp.S: Likewise. + * sysdeps/i386/setjmp.S: Likewise. + [IS_IN_rtld]: Avoid call to __sigjmp_save. + * sysdeps/i386/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/i386/sysdep.h: Define PTR_MANGLE and + PTR_DEMANGLE. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. + + * sysdeps/i386/elf/setjmp.S: Removed. + * sysdeps/i386/elf/bsd-setjmp.S: Removed. + + * elf/dl-error.c (_dl_catch_error): Use __sigsetgjmp instead of + setjmp. + * elf/dl-error.c (_dl_signal_error): Use __longjmp instead of longjmp. + * elf/dl-minimal.c (longjmp): Remove definition. + + * sysdeps/x86_64/bsd-setjmp.S [PIC] (setjmp): Add missing jmp. + +2005-12-14 Thorsten Kukuk + + * nscd/Makefile: Don't build nscd_nischeck. + * nscd/nscd_nischeck.c: Removed. + +2005-12-15 Ulrich Drepper + + * sysdeps/unix/sysv/linux/renameat.c: Move errno setting code in + separate function __atfct_seterrno_2. + * include/fcntl.h: Declare __atfct_seterrno_2. + * posix/unistd.h: Declare linkat, symlinkat, readlinkat. + * io/Makefile (routines): Add linkat, symlinkat, readlinkat. + * io/Versions [GLIBC_2.4]: Export linkat, symlinkat, readlinkat. + * io/linkat.c: New file. + * io/readlinkat.c: New file. + * io/symlinkat.c: New file. + * sysdeps/unix/sysv/linux/linkat.c: New file. + * sysdeps/unix/sysv/linux/readlinkat.c: New file. + * sysdeps/unix/sysv/linux/symlinkat.c: New file. + +2005-12-15 Roland McGrath + + [BZ #1997] + * manual/stdio.texi (String Streams): For open_memstream, elaborate a + little on malloc reference. + + * sysdeps/alpha/fpu/s_cacosf.c: Don't use sysdeps/generic/. + * sysdeps/alpha/fpu/s_cacoshf.c: Likewise. + * sysdeps/alpha/fpu/s_casinf.c: Likewise. + * sysdeps/alpha/fpu/s_casinhf.c: Likewise. + * sysdeps/alpha/fpu/s_catanf.c: Likewise. + * sysdeps/alpha/fpu/s_catanhf.c: Likewise. + * sysdeps/alpha/fpu/s_ccosf.c: Likewise. + * sysdeps/alpha/fpu/s_ccoshf.c: Likewise. + * sysdeps/alpha/fpu/s_cexpf.c: Likewise. + * sysdeps/alpha/fpu/s_clog10f.c: Likewise. + * sysdeps/alpha/fpu/s_clogf.c: Likewise. + * sysdeps/alpha/fpu/s_cpowf.c: Likewise. + * sysdeps/alpha/fpu/s_cprojf.c: Likewise. + * sysdeps/alpha/fpu/s_csinf.c: Likewise. + * sysdeps/alpha/fpu/s_csinhf.c: Likewise. + * sysdeps/alpha/fpu/s_csqrtf.c: Likewise. + * sysdeps/alpha/fpu/s_ctanf.c: Likewise. + * sysdeps/alpha/fpu/s_ctanhf.c: Likewise. + * sysdeps/alpha/libc-tls.c: Likewise. + * sysdeps/gnu/glob64.c: Likewise. + * sysdeps/gnu/updwtmp.c: Likewise. + * sysdeps/gnu/utmp_file.c: Likewise. + * sysdeps/i386/bzero.c: Likewise. + * sysdeps/i386/ffs.c: Likewise. + * sysdeps/i386/i686/ffs.c: Likewise. + * sysdeps/i386/memset.c: Likewise. + * sysdeps/ia64/fpu/printf_fphex.c: Likewise. + * sysdeps/ia64/libc-tls.c: Likewise. + * sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise. + * sysdeps/m68k/ffs.c: Likewise. + * sysdeps/mach/hurd/getdents.c: Likewise. + * sysdeps/mach/hurd/init-posix.c: Likewise. + * sysdeps/mach/msync.c: Likewise. + * sysdeps/mips/libc-tls.c: Likewise. + * sysdeps/posix/profil.c: Likewise. + * sysdeps/posix/shm_open.c: Likewise. + * sysdeps/posix/shm_unlink.c: Likewise. + * sysdeps/posix/sprofil.c: Likewise. + * sysdeps/powerpc/ffs.c: Likewise. + * sysdeps/rs6000/ffs.c: Likewise. + * sysdeps/s390/libc-tls.c: Likewise. + * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/glob.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/wordexp.c: Likewise. + * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/gai_sigqueue.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getmsg.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. + * sysdeps/unix/sysv/linux/i386/putmsg.c: Likewise. + * sysdeps/unix/sysv/linux/i386/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/mq_close.c: Likewise. + * sysdeps/unix/sysv/linux/mq_getattr.c: Likewise. + * sysdeps/unix/sysv/linux/mq_notify.c: Likewise. + * sysdeps/unix/sysv/linux/mq_open.c: Likewise. + * sysdeps/unix/sysv/linux/mq_receive.c: Likewise. + * sysdeps/unix/sysv/linux/mq_send.c: Likewise. + * sysdeps/unix/sysv/linux/mq_unlink.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/s390/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/sched_getaffinity.c: Likewise. + * sysdeps/unix/sysv/linux/sched_setaffinity.c: Likewise. + * sysdeps/unix/sysv/linux/sigqueue.c: Likewise. + * sysdeps/unix/sysv/linux/sigstack.c: Likewise. + * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. + * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/vfork.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/readelflib.c: Likewise. + + * sysdeps/unix/sysv/linux/Makefile (inhibit-siglist): Removed. + +2005-12-13 Ulrich Drepper + + * locale/programs/charmap-kw.h: Regenerated with new gperf. + * locale/programs/locfile-kw.h: Likewise. + + * Makeconfig (+includes): Look in current directory late. + * Makerules: Add rules from rules before the rules for the current + directory. + * sysdeps/generic/__longjmp.c: Moved to... + * setjmp/__longjmp.c: ...here. + * sysdeps/generic/_exit.c: Moved to... + * posix/_exit.c: ...here. + * sysdeps/generic/_strerror.c: Moved to... + * string/_strerror.c: ...here. + * sysdeps/generic/abort.c: Moved to... + * stdlib/abort.c: ...here. + * sysdeps/generic/accept.c: Moved to... + * socket/accept.c: ...here. + * sysdeps/generic/access.c: Moved to... + * io/access.c: ...here. + * sysdeps/generic/acct.c: Moved to... + * misc/acct.c: ...here. + * sysdeps/generic/add_n.c: Moved to... + * stdlib/add_n.c: ...here. + * sysdeps/generic/addmul_1.c: Moved to... + * stdlib/addmul_1.c: ...here. + * sysdeps/generic/adjtime.c: Moved to... + * time/adjtime.c: ...here. + * sysdeps/generic/aio_cancel.c: Moved to... + * rt/aio_cancel.c: ...here. + * sysdeps/generic/aio_fsync.c: Moved to... + * rt/aio_fsync.c: ...here. + * sysdeps/generic/aio_misc.c: Moved to... + * rt/aio_misc.c: ...here. + * sysdeps/generic/aio_notify.c: Moved to... + * rt/aio_notify.c: ...here. + * sysdeps/generic/aio_read.c: Moved to... + * rt/aio_read.c: ...here. + * sysdeps/generic/aio_read64.c: Moved to... + * rt/aio_read64.c: ...here. + * sysdeps/generic/aio_sigqueue.c: Moved to... + * rt/aio_sigqueue.c: ...here. + * sysdeps/generic/aio_suspend.c: Moved to... + * rt/aio_suspend.c: ...here. + * sysdeps/generic/aio_write.c: Moved to... + * rt/aio_write.c: ...here. + * sysdeps/generic/aio_write64.c: Moved to... + * rt/aio_write64.c: ...here. + * sysdeps/generic/alarm.c: Moved to... + * posix/alarm.c: ...here. + * sysdeps/generic/allocrtsig.c: Moved to... + * signal/allocrtsig.c: ...here. + * sysdeps/generic/alphasort64.c: Moved to... + * dirent/alphasort64.c: ...here. + * sysdeps/generic/backtrace.c: Moved to... + * debug/backtrace.c: ...here. + * sysdeps/generic/backtracesyms.c: Moved to... + * debug/backtracesyms.c: ...here. + * sysdeps/generic/backtracesymsfd.c: Moved to... + * debug/backtracesymsfd.c: ...here. + * sysdeps/generic/bb_init_func.c: Moved to... + * gmon/bb_init_func.c: ...here. + * sysdeps/generic/bcopy.c: Moved to... + * string/bcopy.c: ...here. + * sysdeps/generic/bind.c: Moved to... + * socket/bind.c: ...here. + * sysdeps/generic/brdinit.c: Moved to... + * bare/brdinit.c: ...here. + * sysdeps/generic/brk.c: Moved to... + * misc/brk.c: ...here. + * sysdeps/generic/bsd-_setjmp.c: Moved to... + * setjmp/bsd-_setjmp.c: ...here. + * sysdeps/generic/bsd-setjmp.c: Moved to... + * setjmp/bsd-setjmp.c: ...here. + * sysdeps/generic/bzero.c: Moved to... + * string/bzero.c: ...here. + * sysdeps/generic/cabsf.c: Moved to... + * math/cabsf.c: ...here. + * sysdeps/generic/cargf.c: Moved to... + * math/cargf.c: ...here. + * sysdeps/generic/chdir.c: Moved to... + * io/chdir.c: ...here. + * sysdeps/generic/check_fds.c: Moved to... + * csu/check_fds.c: ...here. + * sysdeps/generic/check_pf.c: Moved to... + * inet/check_pf.c: ...here. + * sysdeps/generic/chflags.c: Moved to... + * misc/chflags.c: ...here. + * sysdeps/generic/chmod.c: Moved to... + * io/chmod.c: ...here. + * sysdeps/generic/chown.c: Moved to... + * io/chown.c: ...here. + * sysdeps/generic/chroot.c: Moved to... + * misc/chroot.c: ...here. + * sysdeps/generic/cimagf.c: Moved to... + * math/cimagf.c: ...here. + * sysdeps/generic/clock.c: Moved to... + * time/clock.c: ...here. + * sysdeps/generic/clock_getcpuclockid.c: Moved to... + * rt/clock_getcpuclockid.c: ...here. + * sysdeps/generic/clock_getres.c: Moved to... + * rt/clock_getres.c: ...here. + * sysdeps/generic/clock_gettime.c: Moved to... + * rt/clock_gettime.c: ...here. + * sysdeps/generic/clock_nanosleep.c: Moved to... + * rt/clock_nanosleep.c: ...here. + * sysdeps/generic/clock_settime.c: Moved to... + * rt/clock_settime.c: ...here. + * sysdeps/generic/close.c: Moved to... + * io/close.c: ...here. + * sysdeps/generic/closedir.c: Moved to... + * dirent/closedir.c: ...here. + * sysdeps/generic/cmp.c: Moved to... + * stdlib/cmp.c: ...here. + * sysdeps/generic/conjf.c: Moved to... + * math/conjf.c: ...here. + * sysdeps/generic/connect.c: Moved to... + * socket/connect.c: ...here. + * sysdeps/generic/console.c: Moved to... + * bare/console.c: ...here. + * sysdeps/generic/crealf.c: Moved to... + * math/crealf.c: ...here. + * sysdeps/generic/creat.c: Moved to... + * io/creat.c: ...here. + * sysdeps/generic/creat64.c: Moved to... + * io/creat64.c: ...here. + * sysdeps/generic/ctermid.c: Moved to... + * stdio-common/ctermid.c: ...here. + * sysdeps/generic/cuserid.c: Moved to... + * stdio-common/cuserid.c: ...here. + * sysdeps/generic/dbl2mpn.c: Moved to... + * stdlib/dbl2mpn.c: ...here. + * sysdeps/generic/dirfd.c: Moved to... + * dirent/dirfd.c: ...here. + * sysdeps/generic/div.c: Moved to... + * stdlib/div.c: ...here. + * sysdeps/generic/divmod_1.c: Moved to... + * stdlib/divmod_1.c: ...here. + * sysdeps/generic/divrem.c: Moved to... + * stdlib/divrem.c: ...here. + * sysdeps/generic/dl-brk.c: Moved to... + * elf/dl-brk.c: ...here. + * sysdeps/generic/dl-cache.c: Moved to... + * elf/dl-cache.c: ...here. + * sysdeps/generic/dl-environ.c: Moved to... + * elf/dl-environ.c: ...here. + * sysdeps/generic/dl-execstack.c: Moved to... + * elf/dl-execstack.c: ...here. + * sysdeps/generic/dl-fptr.c: Moved to... + * elf/dl-fptr.c: ...here. + * sysdeps/generic/dl-origin.c: Moved to... + * elf/dl-origin.c: ...here. + * sysdeps/generic/dl-sbrk.c: Moved to... + * elf/dl-sbrk.c: ...here. + * sysdeps/generic/dl-symaddr.c: Moved to... + * elf/dl-symaddr.c: ...here. + * sysdeps/generic/dl-sysdep.c: Moved to... + * elf/dl-sysdep.c: ...here. + * sysdeps/generic/dl-tls.c: Moved to... + * elf/dl-tls.c: ...here. + * sysdeps/generic/dl-trampoline.c: Moved to... + * elf/dl-trampoline.c: ...here. + * sysdeps/generic/dup.c: Moved to... + * io/dup.c: ...here. + * sysdeps/generic/dup2.c: Moved to... + * io/dup2.c: ...here. + * sysdeps/generic/e_acoshl.c: Moved to... + * math/e_acoshl.c: ...here. + * sysdeps/generic/e_acosl.c: Moved to... + * math/e_acosl.c: ...here. + * sysdeps/generic/e_asinl.c: Moved to... + * math/e_asinl.c: ...here. + * sysdeps/generic/e_atan2l.c: Moved to... + * math/e_atan2l.c: ...here. + * sysdeps/generic/e_atanhl.c: Moved to... + * math/e_atanhl.c: ...here. + * sysdeps/generic/e_coshl.c: Moved to... + * math/e_coshl.c: ...here. + * sysdeps/generic/e_exp10.c: Moved to... + * math/e_exp10.c: ...here. + * sysdeps/generic/e_exp10f.c: Moved to... + * math/e_exp10f.c: ...here. + * sysdeps/generic/e_exp10l.c: Moved to... + * math/e_exp10l.c: ...here. + * sysdeps/generic/e_exp2l.c: Moved to... + * math/e_exp2l.c: ...here. + * sysdeps/generic/e_expl.c: Moved to... + * math/e_expl.c: ...here. + * sysdeps/generic/e_fmodl.c: Moved to... + * math/e_fmodl.c: ...here. + * sysdeps/generic/e_gammal_r.c: Moved to... + * math/e_gammal_r.c: ...here. + * sysdeps/generic/e_hypotl.c: Moved to... + * math/e_hypotl.c: ...here. + * sysdeps/generic/e_j0l.c: Moved to... + * math/e_j0l.c: ...here. + * sysdeps/generic/e_j1l.c: Moved to... + * math/e_j1l.c: ...here. + * sysdeps/generic/e_jnl.c: Moved to... + * math/e_jnl.c: ...here. + * sysdeps/generic/e_lgammal_r.c: Moved to... + * math/e_lgammal_r.c: ...here. + * sysdeps/generic/e_log10l.c: Moved to... + * math/e_log10l.c: ...here. + * sysdeps/generic/e_log2l.c: Moved to... + * math/e_log2l.c: ...here. + * sysdeps/generic/e_logl.c: Moved to... + * math/e_logl.c: ...here. + * sysdeps/generic/e_powl.c: Moved to... + * math/e_powl.c: ...here. + * sysdeps/generic/e_rem_pio2l.c: Moved to... + * math/e_rem_pio2l.c: ...here. + * sysdeps/generic/e_scalb.c: Moved to... + * math/e_scalb.c: ...here. + * sysdeps/generic/e_scalbf.c: Moved to... + * math/e_scalbf.c: ...here. + * sysdeps/generic/e_scalbl.c: Moved to... + * math/e_scalbl.c: ...here. + * sysdeps/generic/e_sinhl.c: Moved to... + * math/e_sinhl.c: ...here. + * sysdeps/generic/e_sqrtl.c: Moved to... + * math/e_sqrtl.c: ...here. + * sysdeps/generic/enbl-secure.c: Moved to... + * elf/enbl-secure.c: ...here. + * sysdeps/generic/endutxent.c: Moved to... + * login/endutxent.c: ...here. + * sysdeps/generic/environ.c: Moved to... + * posix/environ.c: ...here. + * sysdeps/generic/errlist.c: Moved to... + * stdio-common/errlist.c: ...here. + * sysdeps/generic/errno-loc.c: Moved to... + * csu/errno-loc.c: ...here. + * sysdeps/generic/errno-loc.c: Moved to... + * csu/errno-loc.c: ...here. + * sysdeps/generic/errno.c: Moved to... + * csu/errno.c: ...here. + * sysdeps/generic/euidaccess.c: Moved to... + * io/euidaccess.c: ...here. + * sysdeps/generic/exc2signal.c: Moved to... + * hurd/exc2signal.c: ...here. + * sysdeps/generic/execve.c: Moved to... + * posix/execve.c: ...here. + * sysdeps/generic/fattach.c: Moved to... + * streams/fattach.c: ...here. + * sysdeps/generic/fchdir.c: Moved to... + * io/fchdir.c: ...here. + * sysdeps/generic/fchflags.c: Moved to... + * misc/fchflags.c: ...here. + * sysdeps/generic/fchmod.c: Moved to... + * io/fchmod.c: ...here. + * sysdeps/generic/fchown.c: Moved to... + * io/fchown.c: ...here. + * sysdeps/generic/fchownat.c: Moved to... + * io/fchownat.c: ...here. + * sysdeps/generic/fclrexcpt.c: Moved to... + * math/fclrexcpt.c: ...here. + * sysdeps/generic/fcntl.c: Moved to... + * io/fcntl.c: ...here. + * sysdeps/generic/fdatasync.c: Moved to... + * misc/fdatasync.c: ...here. + * sysdeps/generic/fdetach.c: Moved to... + * streams/fdetach.c: ...here. + * sysdeps/generic/fdopendir.c: Moved to... + * dirent/fdopendir.c: ...here. + * sysdeps/generic/fedisblxcpt.c: Moved to... + * math/fedisblxcpt.c: ...here. + * sysdeps/generic/feenablxcpt.c: Moved to... + * math/feenablxcpt.c: ...here. + * sysdeps/generic/fegetenv.c: Moved to... + * math/fegetenv.c: ...here. + * sysdeps/generic/fegetexcept.c: Moved to... + * math/fegetexcept.c: ...here. + * sysdeps/generic/fegetround.c: Moved to... + * math/fegetround.c: ...here. + * sysdeps/generic/feholdexcpt.c: Moved to... + * math/feholdexcpt.c: ...here. + * sysdeps/generic/fesetenv.c: Moved to... + * math/fesetenv.c: ...here. + * sysdeps/generic/fesetround.c: Moved to... + * math/fesetround.c: ...here. + * sysdeps/generic/feupdateenv.c: Moved to... + * math/feupdateenv.c: ...here. + * sysdeps/generic/fexecve.c: Moved to... + * posix/fexecve.c: ...here. + * sysdeps/generic/ffs.c: Moved to... + * string/ffs.c: ...here. + * sysdeps/generic/ffsll.c: Moved to... + * string/ffsll.c: ...here. + * sysdeps/generic/fgetexcptflg.c: Moved to... + * math/fgetexcptflg.c: ...here. + * sysdeps/generic/fgetxattr.c: Moved to... + * misc/fgetxattr.c: ...here. + * sysdeps/generic/flistxattr.c: Moved to... + * misc/flistxattr.c: ...here. + * sysdeps/generic/flock.c: Moved to... + * io/flock.c: ...here. + * sysdeps/generic/flockfile.c: Moved to... + * stdio-common/flockfile.c: ...here. + * sysdeps/generic/fork.c: Moved to... + * posix/fork.c: ...here. + * sysdeps/generic/fpathconf.c: Moved to... + * posix/fpathconf.c: ...here. + * sysdeps/generic/fpu_control.c: Moved to... + * math/fpu_control.c: ...here. + * sysdeps/generic/fraiseexcpt.c: Moved to... + * math/fraiseexcpt.c: ...here. + * sysdeps/generic/fremovexattr.c: Moved to... + * misc/fremovexattr.c: ...here. + * sysdeps/generic/fsetexcptflg.c: Moved to... + * math/fsetexcptflg.c: ...here. + * sysdeps/generic/fsetxattr.c: Moved to... + * misc/fsetxattr.c: ...here. + * sysdeps/generic/fstatfs.c: Moved to... + * io/fstatfs.c: ...here. + * sysdeps/generic/fstatfs64.c: Moved to... + * io/fstatfs64.c: ...here. + * sysdeps/generic/fstatvfs.c: Moved to... + * io/fstatvfs.c: ...here. + * sysdeps/generic/fstatvfs64.c: Moved to... + * io/fstatvfs64.c: ...here. + * sysdeps/generic/fsync.c: Moved to... + * misc/fsync.c: ...here. + * sysdeps/generic/ftestexcept.c: Moved to... + * math/ftestexcept.c: ...here. + * sysdeps/generic/ftime.c: Moved to... + * time/ftime.c: ...here. + * sysdeps/generic/ftruncate.c: Moved to... + * misc/ftruncate.c: ...here. + * sysdeps/generic/ftruncate64.c: Moved to... + * misc/ftruncate64.c: ...here. + * sysdeps/generic/ftrylockfile.c: Moved to... + * stdio-common/ftrylockfile.c: ...here. + * sysdeps/generic/funlockfile.c: Moved to... + * stdio-common/funlockfile.c: ...here. + * sysdeps/generic/futimes.c: Moved to... + * misc/futimes.c: ...here. + * sysdeps/generic/futimesat.c: Moved to... + * misc/futimesat.c: ...here. + * sysdeps/generic/fxstat.c: Moved to... + * io/fxstat.c: ...here. + * sysdeps/generic/fxstat64.c: Moved to... + * io/fxstat64.c: ...here. + * sysdeps/generic/fxstatat.c: Moved to... + * io/fxstatat.c: ...here. + * sysdeps/generic/fxstatat64.c: Moved to... + * io/fxstatat64.c: ...here. + * sysdeps/generic/gai_sigqueue.c: Moved to... + * resolv/gai_sigqueue.c: ...here. + * sysdeps/generic/gai_strerror.c: Moved to... + * posix/gai_strerror.c: ...here. + * sysdeps/generic/get_clockfreq.c: Moved to... + * rt/get_clockfreq.c: ...here. + * sysdeps/generic/getaddrinfo.c: Moved to... + * posix/getaddrinfo.c: ...here. + * sysdeps/generic/getclktck.c: Moved to... + * misc/getclktck.c: ...here. + * sysdeps/generic/getcontext.c: Moved to... + * stdlib/getcontext.c: ...here. + * sysdeps/generic/getcwd.c: Moved to... + * io/getcwd.c: ...here. + * sysdeps/generic/getdents.c: Moved to... + * dirent/getdents.c: ...here. + * sysdeps/generic/getdents64.c: Moved to... + * dirent/getdents64.c: ...here. + * sysdeps/generic/getdomain.c: Moved to... + * misc/getdomain.c: ...here. + * sysdeps/generic/getdtsz.c: Moved to... + * misc/getdtsz.c: ...here. + * sysdeps/generic/getegid.c: Moved to... + * posix/getegid.c: ...here. + * sysdeps/generic/getenv.c: Moved to... + * stdlib/getenv.c: ...here. + * sysdeps/generic/geteuid.c: Moved to... + * posix/geteuid.c: ...here. + * sysdeps/generic/getgid.c: Moved to... + * posix/getgid.c: ...here. + * sysdeps/generic/getgroups.c: Moved to... + * posix/getgroups.c: ...here. + * sysdeps/generic/gethostid.c: Moved to... + * misc/gethostid.c: ...here. + * sysdeps/generic/gethostname.c: Moved to... + * misc/gethostname.c: ...here. + * sysdeps/generic/getipv4sourcefilter.c: Moved to... + * inet/getipv4sourcefilter.c: ...here. + * sysdeps/generic/getitimer.c: Moved to... + * time/getitimer.c: ...here. + * sysdeps/generic/getloadavg.c: Moved to... + * misc/getloadavg.c: ...here. + * sysdeps/generic/getlogin.c: Moved to... + * posix/getlogin.c: ...here. + * sysdeps/generic/getlogin_r.c: Moved to... + * posix/getlogin_r.c: ...here. + * sysdeps/generic/getmsg.c: Moved to... + * streams/getmsg.c: ...here. + * sysdeps/generic/getpagesize.c: Moved to... + * misc/getpagesize.c: ...here. + * sysdeps/generic/getpeername.c: Moved to... + * socket/getpeername.c: ...here. + * sysdeps/generic/getpgid.c: Moved to... + * posix/getpgid.c: ...here. + * sysdeps/generic/getpgrp.c: Moved to... + * posix/getpgrp.c: ...here. + * sysdeps/generic/getpid.c: Moved to... + * posix/getpid.c: ...here. + * sysdeps/generic/getpmsg.c: Moved to... + * streams/getpmsg.c: ...here. + * sysdeps/generic/getppid.c: Moved to... + * posix/getppid.c: ...here. + * sysdeps/generic/getpriority.c: Moved to... + * resource/getpriority.c: ...here. + * sysdeps/generic/getpt.c: Moved to... + * login/getpt.c: ...here. + * sysdeps/generic/getresgid.c: Moved to... + * posix/getresgid.c: ...here. + * sysdeps/generic/getresuid.c: Moved to... + * posix/getresuid.c: ...here. + * sysdeps/generic/getrlimit.c: Moved to... + * resource/getrlimit.c: ...here. + * sysdeps/generic/getrlimit64.c: Moved to... + * resource/getrlimit64.c: ...here. + * sysdeps/generic/getrusage.c: Moved to... + * resource/getrusage.c: ...here. + * sysdeps/generic/getsid.c: Moved to... + * posix/getsid.c: ...here. + * sysdeps/generic/getsockname.c: Moved to... + * socket/getsockname.c: ...here. + * sysdeps/generic/getsockopt.c: Moved to... + * socket/getsockopt.c: ...here. + * sysdeps/generic/getsourcefilter.c: Moved to... + * inet/getsourcefilter.c: ...here. + * sysdeps/generic/getsysstats.c: Moved to... + * misc/getsysstats.c: ...here. + * sysdeps/generic/gettimeofday.c: Moved to... + * time/gettimeofday.c: ...here. + * sysdeps/generic/getuid.c: Moved to... + * posix/getuid.c: ...here. + * sysdeps/generic/getutmp.c: Moved to... + * login/getutmp.c: ...here. + * sysdeps/generic/getutmpx.c: Moved to... + * login/getutmpx.c: ...here. + * sysdeps/generic/getutxent.c: Moved to... + * login/getutxent.c: ...here. + * sysdeps/generic/getutxid.c: Moved to... + * login/getutxid.c: ...here. + * sysdeps/generic/getutxline.c: Moved to... + * login/getutxline.c: ...here. + * sysdeps/generic/getxattr.c: Moved to... + * misc/getxattr.c: ...here. + * sysdeps/generic/glob.c: Moved to... + * posix/glob.c: ...here. + * sysdeps/generic/glob64.c: Moved to... + * posix/glob64.c: ...here. + * sysdeps/generic/grantpt.c: Moved to... + * login/grantpt.c: ...here. + * sysdeps/generic/group_member.c: Moved to... + * posix/group_member.c: ...here. + * sysdeps/generic/gtty.c: Moved to... + * misc/gtty.c: ...here. + * sysdeps/generic/herrno-loc.c: Moved to... + * inet/herrno-loc.c: ...here. + * sysdeps/generic/htonl.c: Moved to... + * inet/htonl.c: ...here. + * sysdeps/generic/htons.c: Moved to... + * inet/htons.c: ...here. + * sysdeps/generic/if_index.c: Moved to... + * inet/if_index.c: ...here. + * sysdeps/generic/ifaddrs.c: Moved to... + * inet/ifaddrs.c: ...here. + * sysdeps/generic/ifreq.c: Moved to... + * inet/ifreq.c: ...here. + * sysdeps/generic/init-first.c: Moved to... + * csu/init-first.c: ...here. + * sysdeps/generic/init-posix.c: Moved to... + * posix/init-posix.c: ...here. + * sysdeps/generic/inlines.c: Moved to... + * stdlib/inlines.c: ...here. + * sysdeps/generic/ioctl.c: Moved to... + * misc/ioctl.c: ...here. + * sysdeps/generic/isastream.c: Moved to... + * streams/isastream.c: ...here. + * sysdeps/generic/isatty.c: Moved to... + * io/isatty.c: ...here. + * sysdeps/generic/isfdtype.c: Moved to... + * socket/isfdtype.c: ...here. + * sysdeps/generic/jmp-unwind.c: Moved to... + * setjmp/jmp-unwind.c: ...here. + * sysdeps/generic/k_cosl.c: Moved to... + * math/k_cosl.c: ...here. + * sysdeps/generic/k_rem_pio2l.c: Moved to... + * math/k_rem_pio2l.c: ...here. + * sysdeps/generic/k_sincosl.c: Moved to... + * math/k_sincosl.c: ...here. + * sysdeps/generic/k_sinl.c: Moved to... + * math/k_sinl.c: ...here. + * sysdeps/generic/k_tanl.c: Moved to... + * math/k_tanl.c: ...here. + * sysdeps/generic/kill.c: Moved to... + * signal/kill.c: ...here. + * sysdeps/generic/killpg.c: Moved to... + * signal/killpg.c: ...here. + * sysdeps/generic/labs.c: Moved to... + * stdlib/labs.c: ...here. + * sysdeps/generic/lchmod.c: Moved to... + * io/lchmod.c: ...here. + * sysdeps/generic/lchown.c: Moved to... + * io/lchown.c: ...here. + * sysdeps/generic/ldbl2mpn.c: Moved to... + * stdlib/ldbl2mpn.c: ...here. + * sysdeps/generic/ldiv.c: Moved to... + * stdlib/ldiv.c: ...here. + * sysdeps/generic/lgetxattr.c: Moved to... + * misc/lgetxattr.c: ...here. + * sysdeps/generic/libc-start.c: Moved to... + * csu/libc-start.c: ...here. + * sysdeps/generic/libc-tls.c: Moved to... + * csu/libc-tls.c: ...here. + * sysdeps/generic/libc_fatal.c: Moved to... + * libio/libc_fatal.c: ...here. + * sysdeps/generic/link.c: Moved to... + * io/link.c: ...here. + * sysdeps/generic/lio_listio.c: Moved to... + * rt/lio_listio.c: ...here. + * sysdeps/generic/lio_listio64.c: Moved to... + * rt/lio_listio64.c: ...here. + * sysdeps/generic/listen.c: Moved to... + * socket/listen.c: ...here. + * sysdeps/generic/listxattr.c: Moved to... + * misc/listxattr.c: ...here. + * sysdeps/generic/llabs.c: Moved to... + * stdlib/llabs.c: ...here. + * sysdeps/generic/lldiv.c: Moved to... + * stdlib/lldiv.c: ...here. + * sysdeps/generic/llistxattr.c: Moved to... + * misc/llistxattr.c: ...here. + * sysdeps/generic/lockf.c: Moved to... + * io/lockf.c: ...here. + * sysdeps/generic/lockf64.c: Moved to... + * io/lockf64.c: ...here. + * sysdeps/generic/longjmp-ts.c: Moved to... + * hurd/longjmp-ts.c: ...here. + * sysdeps/generic/longjmp.c: Moved to... + * setjmp/longjmp.c: ...here. + * sysdeps/generic/lremovexattr.c: Moved to... + * misc/lremovexattr.c: ...here. + * sysdeps/generic/lseek.c: Moved to... + * misc/lseek.c: ...here. + * sysdeps/generic/lseek64.c: Moved to... + * io/lseek64.c: ...here. + * sysdeps/generic/lsetxattr.c: Moved to... + * misc/lsetxattr.c: ...here. + * sysdeps/generic/lshift.c: Moved to... + * stdlib/lshift.c: ...here. + * sysdeps/generic/lutimes.c: Moved to... + * misc/lutimes.c: ...here. + * sysdeps/generic/lxstat.c: Moved to... + * io/lxstat.c: ...here. + * sysdeps/generic/lxstat64.c: Moved to... + * io/lxstat64.c: ...here. + * sysdeps/generic/madvise.c: Moved to... + * misc/madvise.c: ...here. + * sysdeps/generic/makecontext.c: Moved to... + * stdlib/makecontext.c: ...here. + * sysdeps/generic/memccpy.c: Moved to... + * string/memccpy.c: ...here. + * sysdeps/generic/memchr.c: Moved to... + * string/memchr.c: ...here. + * sysdeps/generic/memcmp.c: Moved to... + * string/memcmp.c: ...here. + * sysdeps/generic/memcpy.c: Moved to... + * string/memcpy.c: ...here. + * sysdeps/generic/memcpy_chk.c: Moved to... + * debug/memcpy_chk.c: ...here. + * sysdeps/generic/memmem.c: Moved to... + * string/memmem.c: ...here. + * sysdeps/generic/memmove.c: Moved to... + * string/memmove.c: ...here. + * sysdeps/generic/memmove_chk.c: Moved to... + * debug/memmove_chk.c: ...here. + * sysdeps/generic/mempcpy.c: Moved to... + * string/mempcpy.c: ...here. + * sysdeps/generic/mempcpy_chk.c: Moved to... + * debug/mempcpy_chk.c: ...here. + * sysdeps/generic/memrchr.c: Moved to... + * string/memrchr.c: ...here. + * sysdeps/generic/memset.c: Moved to... + * string/memset.c: ...here. + * sysdeps/generic/memset_chk.c: Moved to... + * debug/memset_chk.c: ...here. + * sysdeps/generic/mig-reply.c: Moved to... + * mach/mig-reply.c: ...here. + * sysdeps/generic/mincore.c: Moved to... + * misc/mincore.c: ...here. + * sysdeps/generic/mkdir.c: Moved to... + * io/mkdir.c: ...here. + * sysdeps/generic/mkdirat.c: Moved to... + * io/mkdirat.c: ...here. + * sysdeps/generic/mkfifo.c: Moved to... + * io/mkfifo.c: ...here. + * sysdeps/generic/mkfifoat.c: Moved to... + * io/mkfifoat.c: ...here. + * sysdeps/generic/mknod.c: Moved to... + * io/mknod.c: ...here. + * sysdeps/generic/mknodat.c: Moved to... + * io/mknodat.c: ...here. + * sysdeps/generic/mlock.c: Moved to... + * misc/mlock.c: ...here. + * sysdeps/generic/mlockall.c: Moved to... + * misc/mlockall.c: ...here. + * sysdeps/generic/mmap.c: Moved to... + * misc/mmap.c: ...here. + * sysdeps/generic/mmap64.c: Moved to... + * misc/mmap64.c: ...here. + * sysdeps/generic/mod_1.c: Moved to... + * stdlib/mod_1.c: ...here. + * sysdeps/generic/morecore.c: Moved to... + * malloc/morecore.c: ...here. + * sysdeps/generic/mp_clz_tab.c: Moved to... + * stdlib/mp_clz_tab.c: ...here. + * sysdeps/generic/mpn2dbl.c: Moved to... + * stdlib/mpn2dbl.c: ...here. + * sysdeps/generic/mpn2flt.c: Moved to... + * stdlib/mpn2flt.c: ...here. + * sysdeps/generic/mpn2ldbl.c: Moved to... + * stdlib/mpn2ldbl.c: ...here. + * sysdeps/generic/mprotect.c: Moved to... + * misc/mprotect.c: ...here. + * sysdeps/generic/mq_close.c: Moved to... + * rt/mq_close.c: ...here. + * sysdeps/generic/mq_getattr.c: Moved to... + * rt/mq_getattr.c: ...here. + * sysdeps/generic/mq_notify.c: Moved to... + * rt/mq_notify.c: ...here. + * sysdeps/generic/mq_open.c: Moved to... + * rt/mq_open.c: ...here. + * sysdeps/generic/mq_receive.c: Moved to... + * rt/mq_receive.c: ...here. + * sysdeps/generic/mq_send.c: Moved to... + * rt/mq_send.c: ...here. + * sysdeps/generic/mq_setattr.c: Moved to... + * rt/mq_setattr.c: ...here. + * sysdeps/generic/mq_timedreceive.c: Moved to... + * rt/mq_timedreceive.c: ...here. + * sysdeps/generic/mq_timedsend.c: Moved to... + * rt/mq_timedsend.c: ...here. + * sysdeps/generic/mq_unlink.c: Moved to... + * rt/mq_unlink.c: ...here. + * sysdeps/generic/msgctl.c: Moved to... + * sysvipc/msgctl.c: ...here. + * sysdeps/generic/msgget.c: Moved to... + * sysvipc/msgget.c: ...here. + * sysdeps/generic/msgrcv.c: Moved to... + * sysvipc/msgrcv.c: ...here. + * sysdeps/generic/msgsnd.c: Moved to... + * sysvipc/msgsnd.c: ...here. + * sysdeps/generic/msync.c: Moved to... + * misc/msync.c: ...here. + * sysdeps/generic/mul.c: Moved to... + * stdlib/mul.c: ...here. + * sysdeps/generic/mul_1.c: Moved to... + * stdlib/mul_1.c: ...here. + * sysdeps/generic/mul_n.c: Moved to... + * stdlib/mul_n.c: ...here. + * sysdeps/generic/munlock.c: Moved to... + * misc/munlock.c: ...here. + * sysdeps/generic/munlockall.c: Moved to... + * misc/munlockall.c: ...here. + * sysdeps/generic/munmap.c: Moved to... + * misc/munmap.c: ...here. + * sysdeps/generic/nanosleep.c: Moved to... + * posix/nanosleep.c: ...here. + * sysdeps/generic/nice.c: Moved to... + * resource/nice.c: ...here. + * sysdeps/generic/nscd_setup_thread.c: Moved to... + * nscd/nscd_setup_thread.c: ...here. + * sysdeps/generic/open.c: Moved to... + * io/open.c: ...here. + * sysdeps/generic/open64.c: Moved to... + * io/open64.c: ...here. + * sysdeps/generic/openat.c: Moved to... + * io/openat.c: ...here. + * sysdeps/generic/openat64.c: Moved to... + * io/openat64.c: ...here. + * sysdeps/generic/opendir.c: Moved to... + * dirent/opendir.c: ...here. + * sysdeps/generic/opensock.c: Moved to... + * socket/opensock.c: ...here. + * sysdeps/generic/pathconf.c: Moved to... + * posix/pathconf.c: ...here. + * sysdeps/generic/pause.c: Moved to... + * posix/pause.c: ...here. + * sysdeps/generic/pipe.c: Moved to... + * io/pipe.c: ...here. + * sysdeps/generic/poll.c: Moved to... + * io/poll.c: ...here. + * sysdeps/generic/posix_fadvise.c: Moved to... + * io/posix_fadvise.c: ...here. + * sysdeps/generic/posix_fadvise64.c: Moved to... + * io/posix_fadvise64.c: ...here. + * sysdeps/generic/posix_fallocate.c: Moved to... + * io/posix_fallocate.c: ...here. + * sysdeps/generic/posix_fallocate64.c: Moved to... + * io/posix_fallocate64.c: ...here. + * sysdeps/generic/posix_madvise.c: Moved to... + * posix/posix_madvise.c: ...here. + * sysdeps/generic/pread.c: Moved to... + * posix/pread.c: ...here. + * sysdeps/generic/pread64.c: Moved to... + * posix/pread64.c: ...here. + * sysdeps/generic/printf_fphex.c: Moved to... + * stdio-common/printf_fphex.c: ...here. + * sysdeps/generic/prof-freq.c: Moved to... + * gmon/prof-freq.c: ...here. + * sysdeps/generic/profil.c: Moved to... + * gmon/profil.c: ...here. + * sysdeps/generic/pselect.c: Moved to... + * misc/pselect.c: ...here. + * sysdeps/generic/ptrace.c: Moved to... + * misc/ptrace.c: ...here. + * sysdeps/generic/ptsname.c: Moved to... + * login/ptsname.c: ...here. + * sysdeps/generic/putenv.c: Moved to... + * stdlib/putenv.c: ...here. + * sysdeps/generic/putmsg.c: Moved to... + * streams/putmsg.c: ...here. + * sysdeps/generic/putpmsg.c: Moved to... + * streams/putpmsg.c: ...here. + * sysdeps/generic/pututxline.c: Moved to... + * login/pututxline.c: ...here. + * sysdeps/generic/pwrite.c: Moved to... + * posix/pwrite.c: ...here. + * sysdeps/generic/pwrite64.c: Moved to... + * posix/pwrite64.c: ...here. + * sysdeps/generic/raise.c: Moved to... + * signal/raise.c: ...here. + * sysdeps/generic/rawmemchr.c: Moved to... + * string/rawmemchr.c: ...here. + * sysdeps/generic/read.c: Moved to... + * io/read.c: ...here. + * sysdeps/generic/readdir.c: Moved to... + * dirent/readdir.c: ...here. + * sysdeps/generic/readdir64.c: Moved to... + * dirent/readdir64.c: ...here. + * sysdeps/generic/readdir64_r.c: Moved to... + * dirent/readdir64_r.c: ...here. + * sysdeps/generic/readdir_r.c: Moved to... + * dirent/readdir_r.c: ...here. + * sysdeps/generic/readelflib.c: Moved to... + * elf/readelflib.c: ...here. + * sysdeps/generic/readlink.c: Moved to... + * io/readlink.c: ...here. + * sysdeps/generic/readonly-area.c: Moved to... + * debug/readonly-area.c: ...here. + * sysdeps/generic/readv.c: Moved to... + * misc/readv.c: ...here. + * sysdeps/generic/reboot.c: Moved to... + * misc/reboot.c: ...here. + * sysdeps/generic/recv.c: Moved to... + * socket/recv.c: ...here. + * sysdeps/generic/recvfrom.c: Moved to... + * socket/recvfrom.c: ...here. + * sysdeps/generic/recvmsg.c: Moved to... + * socket/recvmsg.c: ...here. + * sysdeps/generic/remap_file_pages.c: Moved to... + * misc/remap_file_pages.c: ...here. + * sysdeps/generic/remove.c: Moved to... + * stdio-common/remove.c: ...here. + * sysdeps/generic/removexattr.c: Moved to... + * misc/removexattr.c: ...here. + * sysdeps/generic/rename.c: Moved to... + * stdio-common/rename.c: ...here. + * sysdeps/generic/renameat.c: Moved to... + * stdio-common/renameat.c: ...here. + * sysdeps/generic/res-state.c: Moved to... + * resolv/res-state.c: ...here. + * sysdeps/generic/revoke.c: Moved to... + * misc/revoke.c: ...here. + * sysdeps/generic/rewinddir.c: Moved to... + * dirent/rewinddir.c: ...here. + * sysdeps/generic/rmdir.c: Moved to... + * io/rmdir.c: ...here. + * sysdeps/generic/rshift.c: Moved to... + * stdlib/rshift.c: ...here. + * sysdeps/generic/s_asinhl.c: Moved to... + * math/s_asinhl.c: ...here. + * sysdeps/generic/s_atanl.c: Moved to... + * math/s_atanl.c: ...here. + * sysdeps/generic/s_cacos.c: Moved to... + * math/s_cacos.c: ...here. + * sysdeps/generic/s_cacosf.c: Moved to... + * math/s_cacosf.c: ...here. + * sysdeps/generic/s_cacosh.c: Moved to... + * math/s_cacosh.c: ...here. + * sysdeps/generic/s_cacoshf.c: Moved to... + * math/s_cacoshf.c: ...here. + * sysdeps/generic/s_cacoshl.c: Moved to... + * math/s_cacoshl.c: ...here. + * sysdeps/generic/s_cacosl.c: Moved to... + * math/s_cacosl.c: ...here. + * sysdeps/generic/s_casin.c: Moved to... + * math/s_casin.c: ...here. + * sysdeps/generic/s_casinf.c: Moved to... + * math/s_casinf.c: ...here. + * sysdeps/generic/s_casinh.c: Moved to... + * math/s_casinh.c: ...here. + * sysdeps/generic/s_casinhf.c: Moved to... + * math/s_casinhf.c: ...here. + * sysdeps/generic/s_casinhl.c: Moved to... + * math/s_casinhl.c: ...here. + * sysdeps/generic/s_casinl.c: Moved to... + * math/s_casinl.c: ...here. + * sysdeps/generic/s_catan.c: Moved to... + * math/s_catan.c: ...here. + * sysdeps/generic/s_catanf.c: Moved to... + * math/s_catanf.c: ...here. + * sysdeps/generic/s_catanh.c: Moved to... + * math/s_catanh.c: ...here. + * sysdeps/generic/s_catanhf.c: Moved to... + * math/s_catanhf.c: ...here. + * sysdeps/generic/s_catanhl.c: Moved to... + * math/s_catanhl.c: ...here. + * sysdeps/generic/s_catanl.c: Moved to... + * math/s_catanl.c: ...here. + * sysdeps/generic/s_cbrtl.c: Moved to... + * math/s_cbrtl.c: ...here. + * sysdeps/generic/s_ccos.c: Moved to... + * math/s_ccos.c: ...here. + * sysdeps/generic/s_ccosf.c: Moved to... + * math/s_ccosf.c: ...here. + * sysdeps/generic/s_ccosh.c: Moved to... + * math/s_ccosh.c: ...here. + * sysdeps/generic/s_ccoshf.c: Moved to... + * math/s_ccoshf.c: ...here. + * sysdeps/generic/s_ccoshl.c: Moved to... + * math/s_ccoshl.c: ...here. + * sysdeps/generic/s_ccosl.c: Moved to... + * math/s_ccosl.c: ...here. + * sysdeps/generic/s_cexp.c: Moved to... + * math/s_cexp.c: ...here. + * sysdeps/generic/s_cexpf.c: Moved to... + * math/s_cexpf.c: ...here. + * sysdeps/generic/s_cexpl.c: Moved to... + * math/s_cexpl.c: ...here. + * sysdeps/generic/s_clog.c: Moved to... + * math/s_clog.c: ...here. + * sysdeps/generic/s_clog10.c: Moved to... + * math/s_clog10.c: ...here. + * sysdeps/generic/s_clog10f.c: Moved to... + * math/s_clog10f.c: ...here. + * sysdeps/generic/s_clog10l.c: Moved to... + * math/s_clog10l.c: ...here. + * sysdeps/generic/s_clogf.c: Moved to... + * math/s_clogf.c: ...here. + * sysdeps/generic/s_clogl.c: Moved to... + * math/s_clogl.c: ...here. + * sysdeps/generic/s_cpow.c: Moved to... + * math/s_cpow.c: ...here. + * sysdeps/generic/s_cpowf.c: Moved to... + * math/s_cpowf.c: ...here. + * sysdeps/generic/s_cpowl.c: Moved to... + * math/s_cpowl.c: ...here. + * sysdeps/generic/s_cproj.c: Moved to... + * math/s_cproj.c: ...here. + * sysdeps/generic/s_cprojf.c: Moved to... + * math/s_cprojf.c: ...here. + * sysdeps/generic/s_cprojl.c: Moved to... + * math/s_cprojl.c: ...here. + * sysdeps/generic/s_csin.c: Moved to... + * math/s_csin.c: ...here. + * sysdeps/generic/s_csinf.c: Moved to... + * math/s_csinf.c: ...here. + * sysdeps/generic/s_csinh.c: Moved to... + * math/s_csinh.c: ...here. + * sysdeps/generic/s_csinhf.c: Moved to... + * math/s_csinhf.c: ...here. + * sysdeps/generic/s_csinhl.c: Moved to... + * math/s_csinhl.c: ...here. + * sysdeps/generic/s_csinl.c: Moved to... + * math/s_csinl.c: ...here. + * sysdeps/generic/s_csqrt.c: Moved to... + * math/s_csqrt.c: ...here. + * sysdeps/generic/s_csqrtf.c: Moved to... + * math/s_csqrtf.c: ...here. + * sysdeps/generic/s_csqrtl.c: Moved to... + * math/s_csqrtl.c: ...here. + * sysdeps/generic/s_ctan.c: Moved to... + * math/s_ctan.c: ...here. + * sysdeps/generic/s_ctanf.c: Moved to... + * math/s_ctanf.c: ...here. + * sysdeps/generic/s_ctanh.c: Moved to... + * math/s_ctanh.c: ...here. + * sysdeps/generic/s_ctanhf.c: Moved to... + * math/s_ctanhf.c: ...here. + * sysdeps/generic/s_ctanhl.c: Moved to... + * math/s_ctanhl.c: ...here. + * sysdeps/generic/s_ctanl.c: Moved to... + * math/s_ctanl.c: ...here. + * sysdeps/generic/s_erfl.c: Moved to... + * math/s_erfl.c: ...here. + * sysdeps/generic/s_expm1l.c: Moved to... + * math/s_expm1l.c: ...here. + * sysdeps/generic/s_fdim.c: Moved to... + * math/s_fdim.c: ...here. + * sysdeps/generic/s_fdimf.c: Moved to... + * math/s_fdimf.c: ...here. + * sysdeps/generic/s_fdiml.c: Moved to... + * math/s_fdiml.c: ...here. + * sysdeps/generic/s_fma.c: Moved to... + * math/s_fma.c: ...here. + * sysdeps/generic/s_fmaf.c: Moved to... + * math/s_fmaf.c: ...here. + * sysdeps/generic/s_fmal.c: Moved to... + * math/s_fmal.c: ...here. + * sysdeps/generic/s_fmax.c: Moved to... + * math/s_fmax.c: ...here. + * sysdeps/generic/s_fmaxf.c: Moved to... + * math/s_fmaxf.c: ...here. + * sysdeps/generic/s_fmaxl.c: Moved to... + * math/s_fmaxl.c: ...here. + * sysdeps/generic/s_fmin.c: Moved to... + * math/s_fmin.c: ...here. + * sysdeps/generic/s_fminf.c: Moved to... + * math/s_fminf.c: ...here. + * sysdeps/generic/s_fminl.c: Moved to... + * math/s_fminl.c: ...here. + * sysdeps/generic/s_ldexp.c: Moved to... + * math/s_ldexp.c: ...here. + * sysdeps/generic/s_ldexpf.c: Moved to... + * math/s_ldexpf.c: ...here. + * sysdeps/generic/s_ldexpl.c: Moved to... + * math/s_ldexpl.c: ...here. + * sysdeps/generic/s_log1pl.c: Moved to... + * math/s_log1pl.c: ...here. + * sysdeps/generic/s_nan.c: Moved to... + * math/s_nan.c: ...here. + * sysdeps/generic/s_nanf.c: Moved to... + * math/s_nanf.c: ...here. + * sysdeps/generic/s_nanl.c: Moved to... + * math/s_nanl.c: ...here. + * sysdeps/generic/s_nextafter.c: Moved to... + * math/s_nextafter.c: ...here. + * sysdeps/generic/s_nexttowardf.c: Moved to... + * math/s_nexttowardf.c: ...here. + * sysdeps/generic/s_nexttowardl.c: Moved to... + * math/s_nexttowardl.c: ...here. + * sysdeps/generic/s_significand.c: Moved to... + * math/s_significand.c: ...here. + * sysdeps/generic/s_significandf.c: Moved to... + * math/s_significandf.c: ...here. + * sysdeps/generic/s_significandl.c: Moved to... + * math/s_significandl.c: ...here. + * sysdeps/generic/s_tanhl.c: Moved to... + * math/s_tanhl.c: ...here. + * sysdeps/generic/sbrk.c: Moved to... + * misc/sbrk.c: ...here. + * sysdeps/generic/scandir64.c: Moved to... + * dirent/scandir64.c: ...here. + * sysdeps/generic/sched_getaffinity.c: Moved to... + * posix/sched_getaffinity.c: ...here. + * sysdeps/generic/sched_getp.c: Moved to... + * posix/sched_getp.c: ...here. + * sysdeps/generic/sched_gets.c: Moved to... + * posix/sched_gets.c: ...here. + * sysdeps/generic/sched_primax.c: Moved to... + * posix/sched_primax.c: ...here. + * sysdeps/generic/sched_primin.c: Moved to... + * posix/sched_primin.c: ...here. + * sysdeps/generic/sched_rr_gi.c: Moved to... + * posix/sched_rr_gi.c: ...here. + * sysdeps/generic/sched_setaffinity.c: Moved to... + * posix/sched_setaffinity.c: ...here. + * sysdeps/generic/sched_setp.c: Moved to... + * posix/sched_setp.c: ...here. + * sysdeps/generic/sched_sets.c: Moved to... + * posix/sched_sets.c: ...here. + * sysdeps/generic/sched_yield.c: Moved to... + * posix/sched_yield.c: ...here. + * sysdeps/generic/seekdir.c: Moved to... + * dirent/seekdir.c: ...here. + * sysdeps/generic/segfault.c: Moved to... + * debug/segfault.c: ...here. + * sysdeps/generic/select.c: Moved to... + * misc/select.c: ...here. + * sysdeps/generic/semctl.c: Moved to... + * sysvipc/semctl.c: ...here. + * sysdeps/generic/semget.c: Moved to... + * sysvipc/semget.c: ...here. + * sysdeps/generic/semop.c: Moved to... + * sysvipc/semop.c: ...here. + * sysdeps/generic/semtimedop.c: Moved to... + * sysvipc/semtimedop.c: ...here. + * sysdeps/generic/send.c: Moved to... + * socket/send.c: ...here. + * sysdeps/generic/sendfile.c: Moved to... + * io/sendfile.c: ...here. + * sysdeps/generic/sendfile64.c: Moved to... + * io/sendfile64.c: ...here. + * sysdeps/generic/sendmsg.c: Moved to... + * socket/sendmsg.c: ...here. + * sysdeps/generic/sendto.c: Moved to... + * socket/sendto.c: ...here. + * sysdeps/generic/setcontext.c: Moved to... + * stdlib/setcontext.c: ...here. + * sysdeps/generic/setdomain.c: Moved to... + * misc/setdomain.c: ...here. + * sysdeps/generic/setegid.c: Moved to... + * misc/setegid.c: ...here. + * sysdeps/generic/setenv.c: Moved to... + * stdlib/setenv.c: ...here. + * sysdeps/generic/seteuid.c: Moved to... + * misc/seteuid.c: ...here. + * sysdeps/generic/setfpucw.c: Moved to... + * math/setfpucw.c: ...here. + * sysdeps/generic/setgid.c: Moved to... + * posix/setgid.c: ...here. + * sysdeps/generic/setgroups.c: Moved to... + * grp/setgroups.c: ...here. + * sysdeps/generic/sethostid.c: Moved to... + * misc/sethostid.c: ...here. + * sysdeps/generic/sethostname.c: Moved to... + * misc/sethostname.c: ...here. + * sysdeps/generic/setipv4sourcefilter.c: Moved to... + * inet/setipv4sourcefilter.c: ...here. + * sysdeps/generic/setitimer.c: Moved to... + * time/setitimer.c: ...here. + * sysdeps/generic/setjmp.c: Moved to... + * setjmp/setjmp.c: ...here. + * sysdeps/generic/setlogin.c: Moved to... + * posix/setlogin.c: ...here. + * sysdeps/generic/setpgid.c: Moved to... + * posix/setpgid.c: ...here. + * sysdeps/generic/setpgrp.c: Moved to... + * posix/setpgrp.c: ...here. + * sysdeps/generic/setpriority.c: Moved to... + * resource/setpriority.c: ...here. + * sysdeps/generic/setregid.c: Moved to... + * misc/setregid.c: ...here. + * sysdeps/generic/setresgid.c: Moved to... + * posix/setresgid.c: ...here. + * sysdeps/generic/setresuid.c: Moved to... + * posix/setresuid.c: ...here. + * sysdeps/generic/setreuid.c: Moved to... + * misc/setreuid.c: ...here. + * sysdeps/generic/setrlimit.c: Moved to... + * resource/setrlimit.c: ...here. + * sysdeps/generic/setrlimit64.c: Moved to... + * resource/setrlimit64.c: ...here. + * sysdeps/generic/setsid.c: Moved to... + * posix/setsid.c: ...here. + * sysdeps/generic/setsockopt.c: Moved to... + * socket/setsockopt.c: ...here. + * sysdeps/generic/setsourcefilter.c: Moved to... + * inet/setsourcefilter.c: ...here. + * sysdeps/generic/settimeofday.c: Moved to... + * time/settimeofday.c: ...here. + * sysdeps/generic/setuid.c: Moved to... + * posix/setuid.c: ...here. + * sysdeps/generic/setutxent.c: Moved to... + * login/setutxent.c: ...here. + * sysdeps/generic/setxattr.c: Moved to... + * misc/setxattr.c: ...here. + * sysdeps/generic/shm_open.c: Moved to... + * rt/shm_open.c: ...here. + * sysdeps/generic/shm_unlink.c: Moved to... + * rt/shm_unlink.c: ...here. + * sysdeps/generic/shmat.c: Moved to... + * sysvipc/shmat.c: ...here. + * sysdeps/generic/shmctl.c: Moved to... + * sysvipc/shmctl.c: ...here. + * sysdeps/generic/shmdt.c: Moved to... + * sysvipc/shmdt.c: ...here. + * sysdeps/generic/shmget.c: Moved to... + * sysvipc/shmget.c: ...here. + * sysdeps/generic/shutdown.c: Moved to... + * socket/shutdown.c: ...here. + * sysdeps/generic/sigaction.c: Moved to... + * signal/sigaction.c: ...here. + * sysdeps/generic/sigaltstack.c: Moved to... + * signal/sigaltstack.c: ...here. + * sysdeps/generic/sigblock.c: Moved to... + * signal/sigblock.c: ...here. + * sysdeps/generic/sigfillset.c: Moved to... + * signal/sigfillset.c: ...here. + * sysdeps/generic/sigignore.c: Moved to... + * signal/sigignore.c: ...here. + * sysdeps/generic/sigintr.c: Moved to... + * signal/sigintr.c: ...here. + * sysdeps/generic/sigjmp.c: Moved to... + * setjmp/sigjmp.c: ...here. + * sysdeps/generic/siglist.c: Moved to... + * stdio-common/siglist.c: ...here. + * sysdeps/generic/signal.c: Moved to... + * signal/signal.c: ...here. + * sysdeps/generic/sigpause.c: Moved to... + * signal/sigpause.c: ...here. + * sysdeps/generic/sigpending.c: Moved to... + * signal/sigpending.c: ...here. + * sysdeps/generic/sigprocmask.c: Moved to... + * signal/sigprocmask.c: ...here. + * sysdeps/generic/sigqueue.c: Moved to... + * signal/sigqueue.c: ...here. + * sysdeps/generic/sigreturn.c: Moved to... + * signal/sigreturn.c: ...here. + * sysdeps/generic/sigset.c: Moved to... + * signal/sigset.c: ...here. + * sysdeps/generic/sigsetmask.c: Moved to... + * signal/sigsetmask.c: ...here. + * sysdeps/generic/sigstack.c: Moved to... + * signal/sigstack.c: ...here. + * sysdeps/generic/sigsuspend.c: Moved to... + * signal/sigsuspend.c: ...here. + * sysdeps/generic/sigtimedwait.c: Moved to... + * signal/sigtimedwait.c: ...here. + * sysdeps/generic/sigvec.c: Moved to... + * signal/sigvec.c: ...here. + * sysdeps/generic/sigwait.c: Moved to... + * signal/sigwait.c: ...here. + * sysdeps/generic/sigwaitinfo.c: Moved to... + * signal/sigwaitinfo.c: ...here. + * sysdeps/generic/sleep.c: Moved to... + * posix/sleep.c: ...here. + * sysdeps/generic/sockatmark.c: Moved to... + * socket/sockatmark.c: ...here. + * sysdeps/generic/socket.c: Moved to... + * socket/socket.c: ...here. + * sysdeps/generic/socketpair.c: Moved to... + * socket/socketpair.c: ...here. + * sysdeps/generic/spawni.c: Moved to... + * posix/spawni.c: ...here. + * sysdeps/generic/speed.c: Moved to... + * termios/speed.c: ...here. + * sysdeps/generic/sprofil.c: Moved to... + * gmon/sprofil.c: ...here. + * sysdeps/generic/sstk.c: Moved to... + * misc/sstk.c: ...here. + * sysdeps/generic/start.c: Moved to... + * csu/start.c: ...here. + * sysdeps/generic/statfs.c: Moved to... + * io/statfs.c: ...here. + * sysdeps/generic/statfs64.c: Moved to... + * io/statfs64.c: ...here. + * sysdeps/generic/statvfs.c: Moved to... + * io/statvfs.c: ...here. + * sysdeps/generic/statvfs64.c: Moved to... + * io/statvfs64.c: ...here. + * sysdeps/generic/stime.c: Moved to... + * time/stime.c: ...here. + * sysdeps/generic/stpcpy.c: Moved to... + * string/stpcpy.c: ...here. + * sysdeps/generic/stpcpy_chk.c: Moved to... + * debug/stpcpy_chk.c: ...here. + * sysdeps/generic/stpncpy.c: Moved to... + * string/stpncpy.c: ...here. + * sysdeps/generic/stpncpy_chk.c: Moved to... + * debug/stpncpy_chk.c: ...here. + * sysdeps/generic/strcasecmp.c: Moved to... + * string/strcasecmp.c: ...here. + * sysdeps/generic/strcasecmp_l.c: Moved to... + * string/strcasecmp_l.c: ...here. + * sysdeps/generic/strcasestr.c: Moved to... + * string/strcasestr.c: ...here. + * sysdeps/generic/strcat.c: Moved to... + * string/strcat.c: ...here. + * sysdeps/generic/strcat_chk.c: Moved to... + * debug/strcat_chk.c: ...here. + * sysdeps/generic/strchr.c: Moved to... + * string/strchr.c: ...here. + * sysdeps/generic/strchrnul.c: Moved to... + * string/strchrnul.c: ...here. + * sysdeps/generic/strcmp.c: Moved to... + * string/strcmp.c: ...here. + * sysdeps/generic/strcpy.c: Moved to... + * string/strcpy.c: ...here. + * sysdeps/generic/strcpy_chk.c: Moved to... + * debug/strcpy_chk.c: ...here. + * sysdeps/generic/strcspn.c: Moved to... + * string/strcspn.c: ...here. + * sysdeps/generic/string-inlines.c: Moved to... + * string/string-inlines.c: ...here. + * sysdeps/generic/strlen.c: Moved to... + * string/strlen.c: ...here. + * sysdeps/generic/strncase.c: Moved to... + * string/strncase.c: ...here. + * sysdeps/generic/strncase_l.c: Moved to... + * string/strncase_l.c: ...here. + * sysdeps/generic/strncat.c: Moved to... + * string/strncat.c: ...here. + * sysdeps/generic/strncat_chk.c: Moved to... + * debug/strncat_chk.c: ...here. + * sysdeps/generic/strncmp.c: Moved to... + * string/strncmp.c: ...here. + * sysdeps/generic/strncpy.c: Moved to... + * string/strncpy.c: ...here. + * sysdeps/generic/strncpy_chk.c: Moved to... + * debug/strncpy_chk.c: ...here. + * sysdeps/generic/strnlen.c: Moved to... + * string/strnlen.c: ...here. + * sysdeps/generic/strpbrk.c: Moved to... + * string/strpbrk.c: ...here. + * sysdeps/generic/strrchr.c: Moved to... + * string/strrchr.c: ...here. + * sysdeps/generic/strsep.c: Moved to... + * string/strsep.c: ...here. + * sysdeps/generic/strspn.c: Moved to... + * string/strspn.c: ...here. + * sysdeps/generic/strstr.c: Moved to... + * string/strstr.c: ...here. + * sysdeps/generic/strtoimax.c: Moved to... + * stdlib/strtoimax.c: ...here. + * sysdeps/generic/strtok.c: Moved to... + * string/strtok.c: ...here. + * sysdeps/generic/strtok_r.c: Moved to... + * string/strtok_r.c: ...here. + * sysdeps/generic/strtol.c: Moved to... + * stdlib/strtol.c: ...here. + * sysdeps/generic/strtol_l.c: Moved to... + * stdlib/strtol_l.c: ...here. + * sysdeps/generic/strtold_l.c: Moved to... + * stdlib/strtold_l.c: ...here. + * sysdeps/generic/strtoll.c: Moved to... + * stdlib/strtoll.c: ...here. + * sysdeps/generic/strtoll_l.c: Moved to... + * stdlib/strtoll_l.c: ...here. + * sysdeps/generic/strtoul.c: Moved to... + * stdlib/strtoul.c: ...here. + * sysdeps/generic/strtoul_l.c: Moved to... + * stdlib/strtoul_l.c: ...here. + * sysdeps/generic/strtoull.c: Moved to... + * stdlib/strtoull.c: ...here. + * sysdeps/generic/strtoull_l.c: Moved to... + * stdlib/strtoull_l.c: ...here. + * sysdeps/generic/strtoumax.c: Moved to... + * stdlib/strtoumax.c: ...here. + * sysdeps/generic/strtsupp.c: Moved to... + * bare/strtsupp.c: ...here. + * sysdeps/generic/stty.c: Moved to... + * misc/stty.c: ...here. + * sysdeps/generic/sub_n.c: Moved to... + * stdlib/sub_n.c: ...here. + * sysdeps/generic/submul_1.c: Moved to... + * stdlib/submul_1.c: ...here. + * sysdeps/generic/swapcontext.c: Moved to... + * stdlib/swapcontext.c: ...here. + * sysdeps/generic/swapoff.c: Moved to... + * misc/swapoff.c: ...here. + * sysdeps/generic/swapon.c: Moved to... + * misc/swapon.c: ...here. + * sysdeps/generic/symlink.c: Moved to... + * io/symlink.c: ...here. + * sysdeps/generic/sync.c: Moved to... + * misc/sync.c: ...here. + * sysdeps/generic/syscall.c: Moved to... + * misc/syscall.c: ...here. + * sysdeps/generic/sysconf.c: Moved to... + * posix/sysconf.c: ...here. + * sysdeps/generic/sysdep.c: Moved to... + * csu/sysdep.c: ...here. + * sysdeps/generic/syslog.c: Moved to... + * misc/syslog.c: ...here. + * sysdeps/generic/system.c: Moved to... + * stdlib/system.c: ...here. + * sysdeps/generic/sysv_signal.c: Moved to... + * signal/sysv_signal.c: ...here. + * sysdeps/generic/t_sincosl.c: Moved to... + * math/t_sincosl.c: ...here. + * sysdeps/generic/tcdrain.c: Moved to... + * termios/tcdrain.c: ...here. + * sysdeps/generic/tcflow.c: Moved to... + * termios/tcflow.c: ...here. + * sysdeps/generic/tcflush.c: Moved to... + * termios/tcflush.c: ...here. + * sysdeps/generic/tcgetattr.c: Moved to... + * termios/tcgetattr.c: ...here. + * sysdeps/generic/tcgetpgrp.c: Moved to... + * termios/tcgetpgrp.c: ...here. + * sysdeps/generic/tcsendbrk.c: Moved to... + * termios/tcsendbrk.c: ...here. + * sysdeps/generic/tcsetattr.c: Moved to... + * termios/tcsetattr.c: ...here. + * sysdeps/generic/tcsetpgrp.c: Moved to... + * termios/tcsetpgrp.c: ...here. + * sysdeps/generic/telldir.c: Moved to... + * dirent/telldir.c: ...here. + * sysdeps/generic/tempname.c: Moved to... + * stdio-common/tempname.c: ...here. + * sysdeps/generic/time.c: Moved to... + * time/time.c: ...here. + * sysdeps/generic/timer_create.c: Moved to... + * rt/timer_create.c: ...here. + * sysdeps/generic/timer_delete.c: Moved to... + * rt/timer_delete.c: ...here. + * sysdeps/generic/timer_getoverr.c: Moved to... + * rt/timer_getoverr.c: ...here. + * sysdeps/generic/timer_gettime.c: Moved to... + * rt/timer_gettime.c: ...here. + * sysdeps/generic/timer_settime.c: Moved to... + * rt/timer_settime.c: ...here. + * sysdeps/generic/times.c: Moved to... + * posix/times.c: ...here. + * sysdeps/generic/tmpfile.c: Moved to... + * stdio-common/tmpfile.c: ...here. + * sysdeps/generic/tmpfile64.c: Moved to... + * stdio-common/tmpfile64.c: ...here. + * sysdeps/generic/trampoline.c: Moved to... + * hurd/trampoline.c: ...here. + * sysdeps/generic/truncate.c: Moved to... + * misc/truncate.c: ...here. + * sysdeps/generic/truncate64.c: Moved to... + * misc/truncate64.c: ...here. + * sysdeps/generic/tst-timer.c: Moved to... + * rt/tst-timer.c: ...here. + * sysdeps/generic/ttyname.c: Moved to... + * io/ttyname.c: ...here. + * sysdeps/generic/ttyname_r.c: Moved to... + * io/ttyname_r.c: ...here. + * sysdeps/generic/ualarm.c: Moved to... + * misc/ualarm.c: ...here. + * sysdeps/generic/udiv_qrnnd.c: Moved to... + * stdlib/udiv_qrnnd.c: ...here. + * sysdeps/generic/ulimit.c: Moved to... + * resource/ulimit.c: ...here. + * sysdeps/generic/umask.c: Moved to... + * io/umask.c: ...here. + * sysdeps/generic/uname.c: Moved to... + * posix/uname.c: ...here. + * sysdeps/generic/unlink.c: Moved to... + * io/unlink.c: ...here. + * sysdeps/generic/unlinkat.c: Moved to... + * io/unlinkat.c: ...here. + * sysdeps/generic/unlockpt.c: Moved to... + * login/unlockpt.c: ...here. + * sysdeps/generic/updwtmp.c: Moved to... + * login/updwtmp.c: ...here. + * sysdeps/generic/updwtmpx.c: Moved to... + * login/updwtmpx.c: ...here. + * sysdeps/generic/usleep.c: Moved to... + * misc/usleep.c: ...here. + * sysdeps/generic/ustat.c: Moved to... + * misc/ustat.c: ...here. + * sysdeps/generic/utime.c: Moved to... + * io/utime.c: ...here. + * sysdeps/generic/utimes.c: Moved to... + * misc/utimes.c: ...here. + * sysdeps/generic/utmp_file.c: Moved to... + * login/utmp_file.c: ...here. + * sysdeps/generic/utmpxname.c: Moved to... + * login/utmpxname.c: ...here. + * sysdeps/generic/versionsort64.c: Moved to... + * dirent/versionsort64.c: ...here. + * sysdeps/generic/vfork.c: Moved to... + * posix/vfork.c: ...here. + * sysdeps/generic/vhangup.c: Moved to... + * misc/vhangup.c: ...here. + * sysdeps/generic/vlimit.c: Moved to... + * resource/vlimit.c: ...here. + * sysdeps/generic/vtimes.c: Moved to... + * resource/vtimes.c: ...here. + * sysdeps/generic/w_acos.c: Moved to... + * math/w_acos.c: ...here. + * sysdeps/generic/w_acosf.c: Moved to... + * math/w_acosf.c: ...here. + * sysdeps/generic/w_acosh.c: Moved to... + * math/w_acosh.c: ...here. + * sysdeps/generic/w_acoshf.c: Moved to... + * math/w_acoshf.c: ...here. + * sysdeps/generic/w_acoshl.c: Moved to... + * math/w_acoshl.c: ...here. + * sysdeps/generic/w_acosl.c: Moved to... + * math/w_acosl.c: ...here. + * sysdeps/generic/w_asin.c: Moved to... + * math/w_asin.c: ...here. + * sysdeps/generic/w_asinf.c: Moved to... + * math/w_asinf.c: ...here. + * sysdeps/generic/w_asinl.c: Moved to... + * math/w_asinl.c: ...here. + * sysdeps/generic/w_atan2.c: Moved to... + * math/w_atan2.c: ...here. + * sysdeps/generic/w_atan2f.c: Moved to... + * math/w_atan2f.c: ...here. + * sysdeps/generic/w_atan2l.c: Moved to... + * math/w_atan2l.c: ...here. + * sysdeps/generic/w_atanh.c: Moved to... + * math/w_atanh.c: ...here. + * sysdeps/generic/w_atanhf.c: Moved to... + * math/w_atanhf.c: ...here. + * sysdeps/generic/w_atanhl.c: Moved to... + * math/w_atanhl.c: ...here. + * sysdeps/generic/w_cosh.c: Moved to... + * math/w_cosh.c: ...here. + * sysdeps/generic/w_coshf.c: Moved to... + * math/w_coshf.c: ...here. + * sysdeps/generic/w_coshl.c: Moved to... + * math/w_coshl.c: ...here. + * sysdeps/generic/w_drem.c: Moved to... + * math/w_drem.c: ...here. + * sysdeps/generic/w_dremf.c: Moved to... + * math/w_dremf.c: ...here. + * sysdeps/generic/w_dreml.c: Moved to... + * math/w_dreml.c: ...here. + * sysdeps/generic/w_exp10.c: Moved to... + * math/w_exp10.c: ...here. + * sysdeps/generic/w_exp10f.c: Moved to... + * math/w_exp10f.c: ...here. + * sysdeps/generic/w_exp10l.c: Moved to... + * math/w_exp10l.c: ...here. + * sysdeps/generic/w_exp2.c: Moved to... + * math/w_exp2.c: ...here. + * sysdeps/generic/w_exp2f.c: Moved to... + * math/w_exp2f.c: ...here. + * sysdeps/generic/w_exp2l.c: Moved to... + * math/w_exp2l.c: ...here. + * sysdeps/generic/w_expl.c: Moved to... + * math/w_expl.c: ...here. + * sysdeps/generic/w_fmod.c: Moved to... + * math/w_fmod.c: ...here. + * sysdeps/generic/w_fmodf.c: Moved to... + * math/w_fmodf.c: ...here. + * sysdeps/generic/w_fmodl.c: Moved to... + * math/w_fmodl.c: ...here. + * sysdeps/generic/w_hypot.c: Moved to... + * math/w_hypot.c: ...here. + * sysdeps/generic/w_hypotf.c: Moved to... + * math/w_hypotf.c: ...here. + * sysdeps/generic/w_hypotl.c: Moved to... + * math/w_hypotl.c: ...here. + * sysdeps/generic/w_j0.c: Moved to... + * math/w_j0.c: ...here. + * sysdeps/generic/w_j0f.c: Moved to... + * math/w_j0f.c: ...here. + * sysdeps/generic/w_j0l.c: Moved to... + * math/w_j0l.c: ...here. + * sysdeps/generic/w_j1.c: Moved to... + * math/w_j1.c: ...here. + * sysdeps/generic/w_j1f.c: Moved to... + * math/w_j1f.c: ...here. + * sysdeps/generic/w_j1l.c: Moved to... + * math/w_j1l.c: ...here. + * sysdeps/generic/w_jn.c: Moved to... + * math/w_jn.c: ...here. + * sysdeps/generic/w_jnf.c: Moved to... + * math/w_jnf.c: ...here. + * sysdeps/generic/w_jnl.c: Moved to... + * math/w_jnl.c: ...here. + * sysdeps/generic/w_lgamma.c: Moved to... + * math/w_lgamma.c: ...here. + * sysdeps/generic/w_lgamma_r.c: Moved to... + * math/w_lgamma_r.c: ...here. + * sysdeps/generic/w_lgammaf.c: Moved to... + * math/w_lgammaf.c: ...here. + * sysdeps/generic/w_lgammaf_r.c: Moved to... + * math/w_lgammaf_r.c: ...here. + * sysdeps/generic/w_lgammal.c: Moved to... + * math/w_lgammal.c: ...here. + * sysdeps/generic/w_lgammal_r.c: Moved to... + * math/w_lgammal_r.c: ...here. + * sysdeps/generic/w_log.c: Moved to... + * math/w_log.c: ...here. + * sysdeps/generic/w_log10.c: Moved to... + * math/w_log10.c: ...here. + * sysdeps/generic/w_log10f.c: Moved to... + * math/w_log10f.c: ...here. + * sysdeps/generic/w_log10l.c: Moved to... + * math/w_log10l.c: ...here. + * sysdeps/generic/w_log2.c: Moved to... + * math/w_log2.c: ...here. + * sysdeps/generic/w_log2f.c: Moved to... + * math/w_log2f.c: ...here. + * sysdeps/generic/w_log2l.c: Moved to... + * math/w_log2l.c: ...here. + * sysdeps/generic/w_logf.c: Moved to... + * math/w_logf.c: ...here. + * sysdeps/generic/w_logl.c: Moved to... + * math/w_logl.c: ...here. + * sysdeps/generic/w_pow.c: Moved to... + * math/w_pow.c: ...here. + * sysdeps/generic/w_powf.c: Moved to... + * math/w_powf.c: ...here. + * sysdeps/generic/w_powl.c: Moved to... + * math/w_powl.c: ...here. + * sysdeps/generic/w_remainder.c: Moved to... + * math/w_remainder.c: ...here. + * sysdeps/generic/w_remainderf.c: Moved to... + * math/w_remainderf.c: ...here. + * sysdeps/generic/w_remainderl.c: Moved to... + * math/w_remainderl.c: ...here. + * sysdeps/generic/w_scalb.c: Moved to... + * math/w_scalb.c: ...here. + * sysdeps/generic/w_scalbf.c: Moved to... + * math/w_scalbf.c: ...here. + * sysdeps/generic/w_scalbl.c: Moved to... + * math/w_scalbl.c: ...here. + * sysdeps/generic/w_sinh.c: Moved to... + * math/w_sinh.c: ...here. + * sysdeps/generic/w_sinhf.c: Moved to... + * math/w_sinhf.c: ...here. + * sysdeps/generic/w_sinhl.c: Moved to... + * math/w_sinhl.c: ...here. + * sysdeps/generic/w_sqrt.c: Moved to... + * math/w_sqrt.c: ...here. + * sysdeps/generic/w_sqrtf.c: Moved to... + * math/w_sqrtf.c: ...here. + * sysdeps/generic/w_sqrtl.c: Moved to... + * math/w_sqrtl.c: ...here. + * sysdeps/generic/w_tgamma.c: Moved to... + * math/w_tgamma.c: ...here. + * sysdeps/generic/w_tgammaf.c: Moved to... + * math/w_tgammaf.c: ...here. + * sysdeps/generic/w_tgammal.c: Moved to... + * math/w_tgammal.c: ...here. + * sysdeps/generic/wait.c: Moved to... + * posix/wait.c: ...here. + * sysdeps/generic/wait3.c: Moved to... + * posix/wait3.c: ...here. + * sysdeps/generic/wait4.c: Moved to... + * posix/wait4.c: ...here. + * sysdeps/generic/waitid.c: Moved to... + * posix/waitid.c: ...here. + * sysdeps/generic/waitpid.c: Moved to... + * posix/waitpid.c: ...here. + * sysdeps/generic/wcstoimax.c: Moved to... + * stdlib/wcstoimax.c: ...here. + * sysdeps/generic/wcstol.c: Moved to... + * wcsmbs/wcstol.c: ...here. + * sysdeps/generic/wcstol_l.c: Moved to... + * wcsmbs/wcstol_l.c: ...here. + * sysdeps/generic/wcstoll.c: Moved to... + * wcsmbs/wcstoll.c: ...here. + * sysdeps/generic/wcstoll_l.c: Moved to... + * wcsmbs/wcstoll_l.c: ...here. + * sysdeps/generic/wcstoul.c: Moved to... + * wcsmbs/wcstoul.c: ...here. + * sysdeps/generic/wcstoul_l.c: Moved to... + * wcsmbs/wcstoul_l.c: ...here. + * sysdeps/generic/wcstoull.c: Moved to... + * wcsmbs/wcstoull.c: ...here. + * sysdeps/generic/wcstoull_l.c: Moved to... + * wcsmbs/wcstoull_l.c: ...here. + * sysdeps/generic/wcstoumax.c: Moved to... + * stdlib/wcstoumax.c: ...here. + * sysdeps/generic/wordcopy.c: Moved to... + * string/wordcopy.c: ...here. + * sysdeps/generic/wordexp.c: Moved to... + * posix/wordexp.c: ...here. + * sysdeps/generic/write.c: Moved to... + * io/write.c: ...here. + * sysdeps/generic/writev.c: Moved to... + * misc/writev.c: ...here. + * sysdeps/generic/xmknod.c: Moved to... + * io/xmknod.c: ...here. + * sysdeps/generic/xmknodat.c: Moved to... + * io/xmknodat.c: ...here. + * sysdeps/generic/xpg-strerror.c: Moved to... + * string/xpg-strerror.c: ...here. + * sysdeps/generic/xstat.c: Moved to... + * io/xstat.c: ...here. + * sysdeps/generic/xstat64.c: Moved to... + * io/xstat64.c: ...here. + * catgets/gencat.c: Use "config.h" to refer to the local config.h file. + * stdlib/stdtod_l.c: Use "..." for gmp-impl.h and longlong.h headers. + * sysdeps/ieee754/ldbl-96/printf_fphex.c: Adjust for files moving + out of sysdeps/generic. + * sysdeps/ieee754/ldbl-96/strtold_l.c: Likewise. + * sysdeps/powerpc/elf/libc-start.c: Likewise. + * sysdeps/unix/sysv/linux/dl-sbrk.c: Likewise. + * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. + * sysdeps/unix/sysv/linux/segfault.c: Likewise. + * sysdeps/unix/sysv/linux/sigreturn.c: Likewise. + * sysdeps/unix/sysv/linux/syslog.c: Likewise. + * sysdeps/unix/sysv/linux/updwtmp.c: Likewise. + * sysdeps/unix/sysv/linux/utmp_file.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getrlimit64.c: Likewise. + * sysdeps/unix/sysv/linux/i386/glob64.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h: Likewise. + * sysdeps/wordsize-32/llabs.c: Likewise. + * sysdeps/wordsize-32/lldiv.c: Likewise. + * sysdeps/wordsize-64/glob.c: Likewise. + * sysdeps/wordsize-64/labs.c: Likewise. + * sysdeps/wordsize-64/ldiv.c: Likewise. + * sysdeps/wordsize-64/strtol.c: Likewise. + * sysdeps/wordsize-64/strtol_l.c: Likewise. + * sysdeps/wordsize-64/strtoul.c: Likewise. + * sysdeps/wordsize-64/strtoul_l.c: Likewise. + * sysdeps/wordsize-64/wcstol.c: Likewise. + * sysdeps/wordsize-64/wcstol_l.c: Likewise. + * sysdeps/wordsize-64/wcstoul.c: Likewise. + * sysdeps/wordsize-64/wcstoul_l.c: Likewise. + * sysdeps/x86_64/fpu/printf_fphex.c: Likewise. + * wcsmbs/Makefile (strtox-CFLAGS): remove -I../stdlib. + (CPPFLAGS-wcstold_l.c): Add -I../stdlib. + +2005-12-13 Roland McGrath + + * sysdeps/generic/Makefile: Remove remaining bits/endian.h cruft. + +2005-12-13 Ulrich Drepper + + * sysdeps/generic/signame.c: Removed. + * sysdeps/generic/signame.h: Removed. + * sysdeps/generic/configure.in: Removed. + * sysdeps/generic/Dist: Remove these files. + + * sysdeps/generic/det_endian.c: Removed. + * sysdeps/generic/Makefile: Remove rule to build it. + * sysdeps/generic/Dist: Don't distribute it. + +2005-12-13 Roland McGrath + + * sysdeps/powerpc/dl-procinfo.c: New file. + * sysdeps/powerpc/dl-procinfo.h: New file. + +2005-12-12 Ulrich Drepper + + * io/sys/stat.h: Add restrict to fstatat declarations. + +2005-12-10 Ulrich Drepper + + * posix/regex_internal.h: Include if available. + +2005-12-06 Paolo Bonzini + + * posix/regex_internal.h (SIZE_MAX): Provide a default definition. + +2005-12-08 Ulrich Drepper + + * nis/nis_call.c (inetstr2int): Optimize. + +2005-12-08 Jakub Jelinek + + * nis/nis_call.c (__nisbind_create): Remove __nisbind_destroy, + ->clnt cannot be != NULL. + (__do_niscall): No need to use __nisbind_destroy, __nisbind_next + did it. + (__nisbind_connect): use_auth is already TRUE, otherwise we would + not be here. + + * nis/nis_lookup.c (nis_lookup): Remove unnecessary + __nisbind_destroy calls. __nisbind_next does all that. + + * nis/ypclnt.c (yp_update): Before trying default authentication, + free DES descriptor. + +2005-12-07 Jakub Jelinek + + * nis/nis_table.c (nis_list): Fix memory handling in error case. + +2005-12-07 Ulrich Drepper + + * nis/nis_table.c (nis_list): Remove have_tablepath, just use the + pointer value itself. + +2005-12-06 Ulrich Drepper + + * catgets/gencat.c: Use GPL, not LGPL. + * elf/cache.c: Likewise. + * elf/chroot_canon.c: Likewise. + * elf/ldconfig.c: Likewise. + * elf/readlib.c: Likewise. + * iconv/dummy-repertoire.c: Likewise. + * iconv/iconv_charmap.c: Likewise. + * iconv/iconv_prog.c: Likewise. + * iconv/iconvconfig.c: Likewise. + * locale/programs/3level.h: Likewise. + * locale/programs/charmap-dir.c: Likewise. + * locale/programs/charmap-dir.h: Likewise. + * locale/programs/charmap-kw.gperf: Likewise. + * locale/programs/charmap.c: Likewise. + * locale/programs/charmap.h: Likewise. + * locale/programs/config.h: Likewise. + * locale/programs/ld-address.c: Likewise. + * locale/programs/ld-collate.c: Likewise. + * locale/programs/ld-ctype.c: Likewise. + * locale/programs/ld-identification.c: Likewise. + * locale/programs/ld-measurement.c: Likewise. + * locale/programs/ld-messages.c: Likewise. + * locale/programs/ld-monetary.c: Likewise. + * locale/programs/ld-name.c: Likewise. + * locale/programs/ld-numeric.c: Likewise. + * locale/programs/ld-paper.c: Likewise. + * locale/programs/ld-telephone.c: Likewise. + * locale/programs/ld-time.c: Likewise. + * locale/programs/linereader.c: Likewise. + * locale/programs/linereader.h: Likewise. + * locale/programs/locale-spec.c: Likewise. + * locale/programs/locale.c: Likewise. + * locale/programs/localedef.c: Likewise. + * locale/programs/localedef.h: Likewise. + * locale/programs/locarchive.c: Likewise. + * locale/programs/locfile-kw.gperf: Likewise. + * locale/programs/locfile-token.h: Likewise. + * locale/programs/locfile.c: Likewise. + * locale/programs/locfile.h: Likewise. + * locale/programs/repertoire.c: Likewise. + * locale/programs/repertoire.h: Likewise. + * locale/programs/simple-hash.c: Likewise. + * locale/programs/simple-hash.h: Likewise. + * locale/programs/xmalloc.c: Likewise. + * locale/programs/xstrdup.c: Likewise. + * malloc/memusagestat.c: Likewise. + * nscd/aicache.c: Likewise. + * nscd/cache.c: Likewise. + * nscd/connections.c: Likewise. + * nscd/dbg_log.c: Likewise. + * nscd/gai.c: Likewise. + * nscd/getgrgid_r.c: Likewise. + * nscd/getgrnam_r.c: Likewise. + * nscd/gethstbyad_r.c: Likewise. + * nscd/gethstbynm2_r.c: Likewise. + * nscd/getpwnam_r.c: Likewise. + * nscd/getpwuid_r.c: Likewise. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/initgrcache.c: Likewise. + * nscd/mem.c: Likewise. + * nscd/nscd.c: Likewise. + * nscd/nscd_conf.c: Likewise. + * nscd/pwdcache.c: Likewise. + * posix/getconf.c: Likewise. + * sysdeps/generic/nscd_setup_thread.c: Likewise. + * sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise. + + * sunrpc/auth_des.c (authdes_pk_create): If conversation key + cannot be created, free memory. + Reported by rprasad@vmware.com. + +2005-11-15 Mike Frysinger + + * sysdeps/hppa/bits/setjmp.h: Add _BITS_SETJMP_H preprocessor + protection and allow pthread.h to include bits/setjmp.h as well as + setjmp.h. + * sysdeps/m68k/bits/setjmp.h: Likewise. + * sysdeps/s390/bits/setjmp.h: Make sure only setjmp.h or pthread.h + are allow to include bits/setjmp.h. + * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Cast rhs to match lhs + cast of address. + * sysdeps/sh/bits/setjmp.h: Likewise. + +2005-11-12 Jim Meyering + + * sysdeps/unix/opendir.c (__alloc_dir): Declare STATP parameter + to be pointer to const. + * include/dirent.h: Update decl. + +2005-12-05 Roland McGrath + + * hurd/hurdmalloc.c: Remove $ tag $ magic. + * mach/err_kern.sub: Likewise. + * mach/err_server.sub: Likewise. + * mach/err_us.sub: Likewise. + * mach/error_compat.c: Likewise. + * mach/errorlib.h: Likewise. + * mach/errstring.c: Likewise. + * mach/mach/error.h: Likewise. + * mach/mach_error.c: Likewise. + * mach/mach_error.h: Likewise. + * mach/msg-destroy.c: Likewise. + * mach/msgserver.c: Likewise. + * sysdeps/mach/sys/reboot.h: Likewise. + + * sysdeps/generic/dwarf2.h: Replace license text with glibc LGPL. + +2005-11-28 Jakub Jelinek + + * malloc/tst-mallocfork.c (do_test): Make sure sa_flags is + initialized. Reported by John Reiser . + +2005-12-05 Daniel Jacobowitz + + * stdlib/longlong.h: Update from GCC. + +2005-12-04 Joseph S. Myers + + * soft-fp/soft-fp.h: Include . + + * soft-fp/floatdisf.c (__floatdisf): Return float. + +2005-12-05 Roland McGrath + + * sysdeps/unix/sysv/linux/kernel-features.h + (__ASSUME_POSIX_CPU_TIMERS): New macro, for 2.6.12 and later. + +2005-12-03 Ulrich Drepper + + * nis/nis_table.c (nis_list): Optimize freeing and reallocation of + result record. + + * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r): + Better sized buffers. Correct error case handling. + * nis/nis_error.c (nis_sperror_r): Let snprintf determine whether + there is an overflow. + * nis/nss_nisplus/nisplus-service.c: Fix locking to use + _nss_create_tablename. Avoid unnecessary copying, remove + unnecessary variables, general cleanup. + * nis/nss_nisplus/nisplus-rpc.c: Likewise. + * nis/nss_nisplus/nisplus-proto.c: Likewise.. + * nis/nss_nisplus/nisplus-network.c: Fix locking to use + _nss_create_tablename. Avoid unnecessary copying, general cleanup. + * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_getipnodebyname_r): + Removed. + Fix locking to use _nss_create_tablename. Avoid unnecessary copying, + general cleanup. + * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r): + Correctly construct request. + Fix locking to use _nss_create_tablename. Avoid unnecessary copying, + general cleanup. + * nis/nss_nisplus/nisplus-alias.c: Fix locking to use + _nss_create_tablename. Avoid unnecessary copying, general cleanup. + * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_setnetgrent): + Rewrite to use snprintf. + * nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user): + Likewise. + +2005-12-02 Ulrich Drepper + + * nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename): + Renamed from _nss_create_tablename. Export from file (but not DSO). + (pwd_tablename_val): Renamed from tablename_val, mark hidden. + (pwd_tablename_len): Renamed from tablename_len, mark hidden. + Change all users. + * nis/nss_nisplus/nisplus-spwd.c (_nss_create_tablename): Removed. + Use _nss_pwd_create_tablename now. Use pwd_tablename_val and + pwd_tablename_len. Remove unnecessary variables, general cleanup. + + * nis/nss_nisplus/nisplus-pwd.c: Fix locking to use + _nss_create_tablename. Avoid unnecessary copying, remove + unnecessary variables, general cleanup. + * nis/nss_nisplus/nisplus-grp.c: Likewise. + + * io/Makefile (routines): Add mknodat, xmknodat, mkdirat, mkfifoat. + (static-only-routines): Add mknodat. + * io/Versions [GLIBC_2.4]: Add mkdirat, mkfifoat, __xmknodat. + * io/sys/stat.h: Declare mkditat, mknodat, mkfifoat, __xmknodat. + Define mknodat inline function. + * include/sys/stat.h: Add hidden proto for __xmknodat. + * sysdeps/generic/mkdirat.c: New file. + * sysdeps/generic/mkfifoat.c: New file. + * sysdeps/generic/mknodat.c: New file. + * sysdeps/generic/xmknodat.c: New file. + * sysdeps/unix/mkfifoat.c: New file. + * sysdeps/unix/sysv/linux/mkdirat.c: New file. + * sysdeps/unix/sysv/linux/xmknodat.c: New file. + + * sysdeps/generic/xmknod.c: Add one more parameter check. + +2005-11-28 Andreas Jaeger + + * sysdeps/unix/sysv/linux/mips/bits/mman.h (MREMAP_FIXED): Added, + Patch by René Rebe . + +2005-11-27 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c: Avoid RFC 3484 sorting if there are + multiple return records but only one address. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Avoid some code duplication. + +2005-11-27 Roland McGrath + + * sysdeps/unix/sysv/linux/fchownat.c: Include alloca.h, sysdep.h. + Reported by René Rebe . + +2005-11-27 Ulrich Drepper + + * sysdeps/posix/euidaccess.c [_LIBC] (euidaccess): Don't cache + euid and egid. + + * nis/nis_table.c (nis_list): Add more free calls in error cases. + +2005-11-26 Richard Henderson + + * sysdeps/alpha/strncmp.S: Don't read too much data when pointers + are co-aligned, and count is aligned with the end of the word. + +2005-11-26 Ulrich Drepper + + * nis/nis_lookup.c (nis_lookup): Mark RPCTIMEOUT as const. Pretty + printing. + + * nis/nis_table.c (__create_ib_request): Use strdupa instead of + variable size array. + (RPCTIMEOUT): Mark as const. + + * nis/ypclnt.c (yp_bind_ypbindprog): Initialize clnt_saddr by hand. + (ypdomainname): Renamed from __ypdomainname. No need for initializer. + (ypbindlist): Renamed from __ypbindlist. + (do_ypcall): Check memory allocation suceeded before calling + yp_bind_ypbindprog. + (yperr_string): Reduce size of function by using only one gettext call. + (ypbinderr_string): Likewise. + (yp_match): Free response in case memory for return value cannot be + allocated. + (yp_first): Likewise. + (yp_next): Likewise. + (do_ypcall_tr): New function which translates error codes as well. + (yp_match, yp_next, yp_master, yp_order, yp_maplist): Use it. + (yp_all): Correct test for invalid parameter. + Pretty printing. + (RPCTIMEOUT, UDPTIMEOUT): Mark as const. + +2005-11-25 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix typo. + (__fxstatat64): Alias from __fxstatat; remove other cnp errors. + * sysdeps/unix/sysv/linux/alpha/sigaction.c: Include sys/cdefs.h + and stddef.h. + * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MREMAP_FIXED): Define. + +2005-11-25 Ulrich Drepper + + * Makeconfig (+cflags): Add -fmerge-all-constants by default. + + [BZ #1912] + * nss/function.def: Add entry to use gethostbyname2 for files. + +2005-11-25 Thorsten Kukuk + + * sysdeps/unix/sysv/linux/fxstatat64.c: Include string.h. + +2005-11-25 Ulrich Drepper + + [BZ #1926] + * nss/nss_files/files-netgrp.c (_nss_files_endnetgrent): Change + return value type to match expected type. + + [BZ #1925] + * nis/ypclnt.c (yp_order): Correct test for invalid parameter. + +2005-11-24 Ulrich Drepper + + * scripts/check-c++-types.sh: Improve comments. + + * scripts/check-local-headers.sh: New file. + * Makefile (tests): Run check-local-headers.sh. + +2005-11-23 Thorsten Kukuk + + * include/sys/sendfile.h: New file. + +2005-11-24 Andreas Schwab + + * time/sys/time.h: Remove nonnull attribute from futimesat. + +2005-11-22 Ulrich Drepper + + * nscd/connections.c (sendfileall): Define. + (handle_request): Use it instead of sendfile call. + * nscd/nscd-client.h: Declare sendfileall. + * nscd/aicache.c: Use sendfileall instead of sendfile. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/initgrcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + + [BZ #1908] + * manual/install.texi (Tools for Compilation): Require gawk. + +2005-11-22 Jakub Jelinek + + * sysdeps/generic/ldsodefs.h (struct rtld_global): Remove + unused is_static field from slotinfo array. + +2005-11-21 Jakub Jelinek + + * sunrpc/bindrsvprt.c (bindresvport): Wrap around to startport + in the loop if port is bigger than endport, initially set to + ENDPORT. When changing startport, set endport and port + appropriately. + +2005-11-21 Ulrich Drepper + + * Makefile.in: Remove RCS ID line. + * config-name.in: Likewise. + * config.make.in: Likewise. + * malloc/arena.c: Likewise. + * malloc/hooks.c: Likewise. + * malloc/malloc.c: Likewise. + * manual/dir: Likewise. + * math/math_private.h: Likewise. + * resolv/gethnamaddr.c: Likewise. + * scripts/mkinstalldirs: Likewise. + * sunrpc/rpc_clntout.c: Likewise. + * sunrpc/rpc_cout.c: Likewise. + * sunrpc/rpc_hout.c: Likewise. + * sunrpc/rpc_main.c: Likewise. + * sunrpc/rpc_parse.c: Likewise. + * sunrpc/rpc_sample.c: Likewise. + * sunrpc/rpc_scan.c: Likewise. + * sunrpc/rpc_svcout.c: Likewise. + * sunrpc/rpc_tblout.c: Likewise. + * sunrpc/rpc_util.c: Likewise. + * sysdeps/unix/sysv/linux/sys/quote.h: Likewise. + + * nscd/nscd_helper.c: Pretty printing. + 2005-11-19 Roland McGrath * elf/elf.h: Revert last change. diff --git a/Makeconfig b/Makeconfig index 97f74f7e1fa..45a970402ed 100644 --- a/Makeconfig +++ b/Makeconfig @@ -557,6 +557,10 @@ else +gccwarn := -Wall -Wwrite-strings -Winline -Wstrict-prototypes endif +# We do not depend on the address of constants in different files to be +# actually different, so allow the compiler to merge them all. ++merge-constants = -fmerge-all-constants + # This is the program that generates makefile dependencies from C source files. # The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy # targets for headers so that removed headers don't break the build. @@ -611,21 +615,22 @@ ifeq "$(strip $(+cflags))" "" +cflags := $(default_cflags) endif # $(+cflags) == "" -+cflags := $(+cflags) $(addprefix -mcpu=,$(with-cpu)) $(+gccwarn) ++cflags += $(addprefix -mcpu=,$(with-cpu)) $(+gccwarn) $(+merge-constants) +gcc-nowarn := -w # Don't duplicate options if we inherited variables from the parent. +cflags := $(sort $(+cflags)) -# These are flags given to the C compiler to tell it to look for include -# files (including ones given in angle brackets) in the current directory, -# in the parent library source directory and in the include directory. +# These are flags given to the C compiler to tell it to look for +# include files (including ones given in angle brackets) in the parent +# library source directory, in the include directory, and in the +# current directory. # `+sysdep-includes' will be defined by Makerules. -+includes = -I$(..)include -I. \ - $(patsubst %/,-I%,$(objpfx)) $(patsubst %/,-I%,$(..)) \ ++includes = -I$(..)include $(patsubst %/,-I%,$(..)) \ $(libio-include) $(includes) \ - $(+sysdep-includes) $(sysincludes) + $(+sysdep-includes) $(sysincludes) -I. \ + $(patsubst %/,-I%,$(objpfx)) # Since libio has several internal header files, we use a -I instead # of many little headers in the include directory. diff --git a/Makefile b/Makefile index f2d0b1bed0b..3a20a7fc227 100644 --- a/Makefile +++ b/Makefile @@ -235,7 +235,7 @@ mostlyclean: parent-mostlyclean tests-clean: @$(MAKE) subdir_testclean no_deps=t -tests: $(objpfx)c++-types-check.out +tests: $(objpfx)c++-types-check.out $(objpfx)check-local-headers.out ifneq ($(CXX),no) check-data := $(firstword $(wildcard \ $(foreach M,$(config-machine) $(base-machine),\ @@ -250,6 +250,9 @@ $(objpfx)c++-types-check.out: endif endif +$(objpfx)check-local-headers.out: scripts/check-local-headers.sh + scripts/check-local-headers.sh "$(includedir)" "$(objpfx)" > $@ + ifneq ($(PERL),no) installed-headers = argp/argp.h assert/assert.h catgets/nl_types.h \ crypt/crypt.h ctype/ctype.h debug/execinfo.h \ diff --git a/Makefile.in b/Makefile.in index ccdfb73c86c..1c1e2c1df14 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,3 @@ -# Generated from $Id$. - srcdir = @srcdir@ # Uncomment the line below if you want to do parallel build. diff --git a/Makerules b/Makerules index 3ffff58db33..d0b1d8975d6 100644 --- a/Makerules +++ b/Makerules @@ -208,53 +208,6 @@ before-compile += $(gen-as-const-headers:%.sym=$(common-objpfx)%.h) # later directory would be chosen over a .c file in an earlier directory, # which does not preserve the desired sysdeps ordering behavior. -# It matters that this set of rules, for compiling from sources in -# the current directory (the $srcdir/$subdir) come before the -# generated sysdep rules in included from sysd-rules below. When -# compiling in the source tree, generated sources go into the current -# directory, and those should be chosen before any sources in sysdeps. -define o-iterator-doit -$(objpfx)%$o: %.S $(before-compile); $$(compile-command.S) -endef -object-suffixes-left := $(all-object-suffixes) -include $(o-iterator) - -define o-iterator-doit -$(objpfx)%$o: %.s $(before-compile); $$(compile-command.s) -endef -object-suffixes-left := $(all-object-suffixes) -include $(o-iterator) - -define o-iterator-doit -$(objpfx)%$o: %.c $(before-compile); $$(compile-command.c) -endef -object-suffixes-left := $(all-object-suffixes) -include $(o-iterator) - -# Omit the objpfx rules when building in the source tree, because -# objpfx is empty and so these rules just override the ones above. -ifdef objpfx -# Define first rules to find the source files in $(objpfx). -# Generated source files will end up there. -define o-iterator-doit -$(objpfx)%$o: $(objpfx)%.S $(before-compile); $$(compile-command.S) -endef -object-suffixes-left := $(all-object-suffixes) -include $(o-iterator) - -define o-iterator-doit -$(objpfx)%$o: $(objpfx)%.s $(before-compile); $$(compile-command.s) -endef -object-suffixes-left := $(all-object-suffixes) -include $(o-iterator) - -define o-iterator-doit -$(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c) -endef -object-suffixes-left := $(all-object-suffixes) -include $(o-iterator) -endif - # System-dependent makefiles can put in `inhibit-sysdep-asm' wildcard # patterns matching sysdep directories whose assembly source files should # be suppressed. @@ -304,6 +257,7 @@ $(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \ echo "\$$(objpfx)m_%.S: $$dir/s_%.S; \$$(+make-include-of-dep)"; \ echo "\$$(objpfx)m_%.c: $$dir/s_%.c; \$$(+make-include-of-dep)"; \ done; \ + echo "\$$(objpfx)m_%.c: s_%.c; \$$(+make-include-of-dep)"; \ echo 'sysd-rules-done = t') > $@T mv -f $@T $@ @@ -318,6 +272,53 @@ echo '#include <$<>' > $@T mv -f $@T $@ endef +# It matters that this set of rules, for compiling from sources in +# the current directory (the $srcdir/$subdir) come before the +# generated sysdep rules in included from sysd-rules below. When +# compiling in the source tree, generated sources go into the current +# directory, and those should be chosen before any sources in sysdeps. +define o-iterator-doit +$(objpfx)%$o: %.S $(before-compile); $$(compile-command.S) +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) + +define o-iterator-doit +$(objpfx)%$o: %.s $(before-compile); $$(compile-command.s) +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) + +define o-iterator-doit +$(objpfx)%$o: %.c $(before-compile); $$(compile-command.c) +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) + +# Omit the objpfx rules when building in the source tree, because +# objpfx is empty and so these rules just override the ones above. +ifdef objpfx +# Define first rules to find the source files in $(objpfx). +# Generated source files will end up there. +define o-iterator-doit +$(objpfx)%$o: $(objpfx)%.S $(before-compile); $$(compile-command.S) +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) + +define o-iterator-doit +$(objpfx)%$o: $(objpfx)%.s $(before-compile); $$(compile-command.s) +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) + +define o-iterator-doit +$(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c) +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) +endif + # Generate version maps, but wait until sysdep-subdirs is known ifeq ($(sysd-sorted-done),t) ifeq ($(versioning),yes) diff --git a/NEWS b/NEWS index 86c7b5e8333..41755c383b5 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -GNU C Library NEWS -- history of user-visible changes. 2005-11-11 +GNU C Library NEWS -- history of user-visible changes. 2005-12-15 Copyright (C) 1992-2002,2003,2004,2005 Free Software Foundation, Inc. See the end for copying conditions. @@ -28,7 +28,7 @@ Version 2.4 recommend using the stable 2.3 branch. * New interfaces: fdopendir, openat, fstatat, fchownat, futimesat, renameat, - unlinkat. + unlinkat, mkdirat, mkfifoat, mknodat, linkat, symlinkat, readlinkat. Version 2.3.6 diff --git a/sysdeps/generic/brdinit.c b/bare/brdinit.c similarity index 100% rename from sysdeps/generic/brdinit.c rename to bare/brdinit.c diff --git a/sysdeps/generic/console.c b/bare/console.c similarity index 100% rename from sysdeps/generic/console.c rename to bare/console.c diff --git a/sysdeps/generic/strtsupp.c b/bare/strtsupp.c similarity index 100% rename from sysdeps/generic/strtsupp.c rename to bare/strtsupp.c diff --git a/catgets/gencat.c b/catgets/gencat.c index 39938097d3b..2afecadcbec 100644 --- a/catgets/gencat.c +++ b/catgets/gencat.c @@ -2,23 +2,21 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/config-name.in b/config-name.in index 6380b09254e..cdac43d8606 100644 --- a/config-name.in +++ b/config-name.in @@ -1,5 +1,4 @@ /* @configure_input@ -*- C -*- - Generated from $Id$. This is used only by the generic `uname' function for systems with no real `uname' call. If this data is not correct, it does not matter much. */ diff --git a/config.make.in b/config.make.in index 748ea96b2e9..3af1e396e94 100644 --- a/config.make.in +++ b/config.make.in @@ -1,5 +1,4 @@ # @configure_input@ -# From $Id$. # Don't edit this file. Put configuration parameters in configparms instead. version = @VERSION@ diff --git a/sysdeps/generic/check_fds.c b/csu/check_fds.c similarity index 100% rename from sysdeps/generic/check_fds.c rename to csu/check_fds.c diff --git a/sysdeps/generic/errno-loc.c b/csu/errno-loc.c similarity index 100% rename from sysdeps/generic/errno-loc.c rename to csu/errno-loc.c diff --git a/sysdeps/generic/errno.c b/csu/errno.c similarity index 100% rename from sysdeps/generic/errno.c rename to csu/errno.c diff --git a/sysdeps/generic/init-first.c b/csu/init-first.c similarity index 100% rename from sysdeps/generic/init-first.c rename to csu/init-first.c diff --git a/sysdeps/generic/libc-start.c b/csu/libc-start.c similarity index 100% rename from sysdeps/generic/libc-start.c rename to csu/libc-start.c diff --git a/sysdeps/generic/libc-tls.c b/csu/libc-tls.c similarity index 100% rename from sysdeps/generic/libc-tls.c rename to csu/libc-tls.c diff --git a/sysdeps/generic/start.c b/csu/start.c similarity index 100% rename from sysdeps/generic/start.c rename to csu/start.c diff --git a/sysdeps/generic/sysdep.c b/csu/sysdep.c similarity index 100% rename from sysdeps/generic/sysdep.c rename to csu/sysdep.c diff --git a/sysdeps/generic/backtrace.c b/debug/backtrace.c similarity index 100% rename from sysdeps/generic/backtrace.c rename to debug/backtrace.c diff --git a/sysdeps/generic/backtracesyms.c b/debug/backtracesyms.c similarity index 100% rename from sysdeps/generic/backtracesyms.c rename to debug/backtracesyms.c diff --git a/sysdeps/generic/backtracesymsfd.c b/debug/backtracesymsfd.c similarity index 100% rename from sysdeps/generic/backtracesymsfd.c rename to debug/backtracesymsfd.c diff --git a/sysdeps/generic/memcpy_chk.c b/debug/memcpy_chk.c similarity index 100% rename from sysdeps/generic/memcpy_chk.c rename to debug/memcpy_chk.c diff --git a/sysdeps/generic/memmove_chk.c b/debug/memmove_chk.c similarity index 100% rename from sysdeps/generic/memmove_chk.c rename to debug/memmove_chk.c diff --git a/sysdeps/generic/mempcpy_chk.c b/debug/mempcpy_chk.c similarity index 100% rename from sysdeps/generic/mempcpy_chk.c rename to debug/mempcpy_chk.c diff --git a/sysdeps/generic/memset_chk.c b/debug/memset_chk.c similarity index 100% rename from sysdeps/generic/memset_chk.c rename to debug/memset_chk.c diff --git a/sysdeps/generic/readonly-area.c b/debug/readonly-area.c similarity index 100% rename from sysdeps/generic/readonly-area.c rename to debug/readonly-area.c diff --git a/sysdeps/generic/segfault.c b/debug/segfault.c similarity index 100% rename from sysdeps/generic/segfault.c rename to debug/segfault.c diff --git a/sysdeps/generic/stpcpy_chk.c b/debug/stpcpy_chk.c similarity index 100% rename from sysdeps/generic/stpcpy_chk.c rename to debug/stpcpy_chk.c diff --git a/sysdeps/generic/stpncpy_chk.c b/debug/stpncpy_chk.c similarity index 100% rename from sysdeps/generic/stpncpy_chk.c rename to debug/stpncpy_chk.c diff --git a/sysdeps/generic/strcat_chk.c b/debug/strcat_chk.c similarity index 100% rename from sysdeps/generic/strcat_chk.c rename to debug/strcat_chk.c diff --git a/sysdeps/generic/strcpy_chk.c b/debug/strcpy_chk.c similarity index 100% rename from sysdeps/generic/strcpy_chk.c rename to debug/strcpy_chk.c diff --git a/sysdeps/generic/strncat_chk.c b/debug/strncat_chk.c similarity index 100% rename from sysdeps/generic/strncat_chk.c rename to debug/strncat_chk.c diff --git a/sysdeps/generic/strncpy_chk.c b/debug/strncpy_chk.c similarity index 100% rename from sysdeps/generic/strncpy_chk.c rename to debug/strncpy_chk.c diff --git a/sysdeps/generic/alphasort64.c b/dirent/alphasort64.c similarity index 100% rename from sysdeps/generic/alphasort64.c rename to dirent/alphasort64.c diff --git a/sysdeps/generic/closedir.c b/dirent/closedir.c similarity index 100% rename from sysdeps/generic/closedir.c rename to dirent/closedir.c diff --git a/sysdeps/generic/dirfd.c b/dirent/dirfd.c similarity index 100% rename from sysdeps/generic/dirfd.c rename to dirent/dirfd.c diff --git a/sysdeps/generic/fdopendir.c b/dirent/fdopendir.c similarity index 100% rename from sysdeps/generic/fdopendir.c rename to dirent/fdopendir.c diff --git a/sysdeps/generic/getdents.c b/dirent/getdents.c similarity index 100% rename from sysdeps/generic/getdents.c rename to dirent/getdents.c diff --git a/sysdeps/generic/getdents64.c b/dirent/getdents64.c similarity index 100% rename from sysdeps/generic/getdents64.c rename to dirent/getdents64.c diff --git a/sysdeps/generic/opendir.c b/dirent/opendir.c similarity index 100% rename from sysdeps/generic/opendir.c rename to dirent/opendir.c diff --git a/sysdeps/generic/readdir.c b/dirent/readdir.c similarity index 100% rename from sysdeps/generic/readdir.c rename to dirent/readdir.c diff --git a/sysdeps/generic/readdir64.c b/dirent/readdir64.c similarity index 100% rename from sysdeps/generic/readdir64.c rename to dirent/readdir64.c diff --git a/sysdeps/generic/readdir64_r.c b/dirent/readdir64_r.c similarity index 100% rename from sysdeps/generic/readdir64_r.c rename to dirent/readdir64_r.c diff --git a/sysdeps/generic/readdir_r.c b/dirent/readdir_r.c similarity index 100% rename from sysdeps/generic/readdir_r.c rename to dirent/readdir_r.c diff --git a/sysdeps/generic/rewinddir.c b/dirent/rewinddir.c similarity index 100% rename from sysdeps/generic/rewinddir.c rename to dirent/rewinddir.c diff --git a/sysdeps/generic/scandir64.c b/dirent/scandir64.c similarity index 100% rename from sysdeps/generic/scandir64.c rename to dirent/scandir64.c diff --git a/sysdeps/generic/seekdir.c b/dirent/seekdir.c similarity index 100% rename from sysdeps/generic/seekdir.c rename to dirent/seekdir.c diff --git a/sysdeps/generic/telldir.c b/dirent/telldir.c similarity index 100% rename from sysdeps/generic/telldir.c rename to dirent/telldir.c diff --git a/sysdeps/generic/versionsort64.c b/dirent/versionsort64.c similarity index 100% rename from sysdeps/generic/versionsort64.c rename to dirent/versionsort64.c diff --git a/elf/Versions b/elf/Versions index 9c53f1615e8..87e27c5a7a9 100644 --- a/elf/Versions +++ b/elf/Versions @@ -60,5 +60,7 @@ ld { _dl_make_stack_executable; # Only here for gdb while a better method is developed. _dl_debug_state; + # Pointer protection. + __pointer_chk_guard; } } diff --git a/elf/cache.c b/elf/cache.c index d5f313657c0..9ce3d161a7f 100644 --- a/elf/cache.c +++ b/elf/cache.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c index d29a032163e..41d6e826258 100644 --- a/elf/chroot_canon.c +++ b/elf/chroot_canon.c @@ -1,22 +1,20 @@ /* Return the canonical absolute name of a given file inside chroot. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004 + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/generic/dl-brk.c b/elf/dl-brk.c similarity index 100% rename from sysdeps/generic/dl-brk.c rename to elf/dl-brk.c diff --git a/sysdeps/generic/dl-cache.c b/elf/dl-cache.c similarity index 100% rename from sysdeps/generic/dl-cache.c rename to elf/dl-cache.c diff --git a/sysdeps/generic/dl-environ.c b/elf/dl-environ.c similarity index 100% rename from sysdeps/generic/dl-environ.c rename to elf/dl-environ.c diff --git a/elf/dl-error.c b/elf/dl-error.c index 3a0d9bb8a7e..b5374e949ca 100644 --- a/elf/dl-error.c +++ b/elf/dl-error.c @@ -112,7 +112,8 @@ _dl_signal_error (int errcode, const char *objname, const char *occation, lcatch->errstring = _dl_out_of_memory; lcatch->malloced = false; } - longjmp (lcatch->env, errcode ?: -1); + /* We do not restore the signal mask because none was saved. */ + __longjmp (lcatch->env, errcode ?: -1); } else { @@ -169,7 +170,8 @@ _dl_catch_error (const char **objname, const char **errstring, struct catch **const catchp = &CATCH_HOOK; old = *catchp; - errcode = setjmp (c.env); + /* Do not save the signal mask. */ + errcode = __sigsetjmp (c.env, 0); if (__builtin_expect (errcode, 0) == 0) { *catchp = &c; diff --git a/sysdeps/generic/dl-execstack.c b/elf/dl-execstack.c similarity index 100% rename from sysdeps/generic/dl-execstack.c rename to elf/dl-execstack.c diff --git a/sysdeps/generic/dl-fptr.c b/elf/dl-fptr.c similarity index 100% rename from sysdeps/generic/dl-fptr.c rename to elf/dl-fptr.c diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c index adb85e6753f..868d3bd2ede 100644 --- a/elf/dl-minimal.c +++ b/elf/dl-minimal.c @@ -1,5 +1,5 @@ /* Minimal replacements for basic facilities used in the dynamic linker. - Copyright (C) 1995-1998,2000-2002,2004 Free Software Foundation, Inc. + Copyright (C) 1995-1998,2000-2002,2004,2005 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 @@ -148,12 +148,6 @@ __sigjmp_save (sigjmp_buf env, int savemask __attribute__ ((unused))) env[0].__mask_was_saved = 0; return 0; } - -void weak_function -longjmp (jmp_buf env, int val) -{ - __longjmp (env[0].__jmpbuf, val); -} /* Define our own version of the internal function used by strerror. We only provide the messages for some common errors. This avoids pulling diff --git a/sysdeps/generic/dl-origin.c b/elf/dl-origin.c similarity index 100% rename from sysdeps/generic/dl-origin.c rename to elf/dl-origin.c diff --git a/sysdeps/generic/dl-sbrk.c b/elf/dl-sbrk.c similarity index 100% rename from sysdeps/generic/dl-sbrk.c rename to elf/dl-sbrk.c diff --git a/sysdeps/generic/dl-symaddr.c b/elf/dl-symaddr.c similarity index 100% rename from sysdeps/generic/dl-symaddr.c rename to elf/dl-symaddr.c diff --git a/sysdeps/generic/dl-sysdep.c b/elf/dl-sysdep.c similarity index 100% rename from sysdeps/generic/dl-sysdep.c rename to elf/dl-sysdep.c diff --git a/sysdeps/generic/dl-tls.c b/elf/dl-tls.c similarity index 100% rename from sysdeps/generic/dl-tls.c rename to elf/dl-tls.c diff --git a/sysdeps/generic/dl-trampoline.c b/elf/dl-trampoline.c similarity index 100% rename from sysdeps/generic/dl-trampoline.c rename to elf/dl-trampoline.c diff --git a/sysdeps/generic/enbl-secure.c b/elf/enbl-secure.c similarity index 100% rename from sysdeps/generic/enbl-secure.c rename to elf/enbl-secure.c diff --git a/elf/ldconfig.c b/elf/ldconfig.c index d96295cbc13..e63b312bd0d 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -2,20 +2,18 @@ This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PROCINFO_CLASS static #include diff --git a/sysdeps/generic/readelflib.c b/elf/readelflib.c similarity index 100% rename from sysdeps/generic/readelflib.c rename to elf/readelflib.c diff --git a/elf/readlib.c b/elf/readlib.c index 4fbc3e5e4c8..65c8e9d65d5 100644 --- a/elf/readlib.c +++ b/elf/readlib.c @@ -1,22 +1,20 @@ -/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999-2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999 and Jakub Jelinek , 1999. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The code in this file and in readelflib is a heavily simplified version of the readelf program that's part of the current binutils diff --git a/elf/rtld.c b/elf/rtld.c index a89f89b3a53..aee3ea9a2a6 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -90,6 +90,15 @@ INTDEF(_dl_argv) uintptr_t __stack_chk_guard attribute_relro; #endif +/* Only exported for architectures that don't store the pointer guard + value in thread local area. */ +uintptr_t __pointer_chk_guard_local + attribute_relro attribute_hidden __attribute__ ((nocommon)); +#ifndef THREAD_SET_POINTER_GUARD +strong_alias (__pointer_chk_guard_local, __pointer_chk_guard) +#endif + + /* List of auditing DSOs. */ static struct audit_list { @@ -142,6 +151,7 @@ struct rtld_global_ro _rtld_global_ro attribute_relro = ._dl_hwcap_mask = HWCAP_IMPORTANT, ._dl_lazy = 1, ._dl_fpu_control = _FPU_DEFAULT, + ._dl_pointer_guard = 1, /* Function pointers. */ ._dl_debug_printf = _dl_debug_printf, @@ -1823,6 +1833,22 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", __stack_chk_guard = stack_chk_guard; #endif + /* Set up the pointer guard as well, if necessary. */ + if (GLRO(dl_pointer_guard)) + { + // XXX If it is cheap, we should use a separate value. + uintptr_t pointer_chk_guard = stack_chk_guard; +#ifndef HP_TIMING_NONAVAIL + hp_timing_t now; + HP_TIMING_NOW (now); + pointer_chk_guard ^= now; +#endif +#ifdef THREAD_SET_POINTER_GUARD + THREAD_SET_POINTER_GUARD (pointer_chk_guard); +#endif + __pointer_chk_guard_local = pointer_chk_guard; + } + if (__builtin_expect (mode, normal) != normal) { /* We were run just to list the shared libraries. It is @@ -2575,7 +2601,13 @@ process_envvars (enum mode *modep) #endif if (!INTUSE(__libc_enable_secure) && memcmp (envline, "USE_LOAD_BIAS", 13) == 0) - GLRO(dl_use_load_bias) = envline[14] == '1' ? -1 : 0; + { + GLRO(dl_use_load_bias) = envline[14] == '1' ? -1 : 0; + break; + } + + if (memcmp (envline, "POINTER_GUARD", 13) == 0) + GLRO(dl_pointer_guard) = envline[14] == '0'; break; case 14: diff --git a/fedora/branch.mk b/fedora/branch.mk index c65d6d075ea..991d75fc73a 100644 --- a/fedora/branch.mk +++ b/fedora/branch.mk @@ -3,5 +3,5 @@ glibc-branch := fedora glibc-base := HEAD DIST_BRANCH := devel COLLECTION := dist-fc4 -fedora-sync-date := 2005-11-19 19:59 UTC -fedora-sync-tag := fedora-glibc-20051119T1959 +fedora-sync-date := 2005-12-19 10:03 UTC +fedora-sync-tag := fedora-glibc-20051219T1003 diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in index 29ecf0e1fee..6ea4c95d97e 100644 --- a/fedora/glibc.spec.in +++ b/fedora/glibc.spec.in @@ -1,4 +1,4 @@ -%define glibcrelease 18 +%define glibcrelease 19 %define auxarches i586 i686 athlon sparcv9 alphaev6 %define prelinkarches noarch %define xenarches i686 athlon @@ -30,7 +30,7 @@ Patch1: %{name}-ppc-assume.patch Patch2: %{name}-ia64-lib64.patch Buildroot: %{_tmppath}/glibc-%{PACKAGE_VERSION}-root Obsoletes: zoneinfo, libc-static, libc-devel, libc-profile, libc-headers, -Obsoletes: gencat, locale, ldconfig, locale-ja +Obsoletes: gencat, locale, ldconfig, locale-ja, glibc-profile Provides: ldconfig Autoreq: false Requires: glibc-common = %{version}-%{release} @@ -150,24 +150,6 @@ executables. Install glibc-headers if you are going to develop programs which will use the standard C libraries. -%package profile -Summary: The GNU libc libraries, including support for gprof profiling. -Group: Development/Libraries -Obsoletes: libc-profile -Autoreq: true - -%description profile -The glibc-profile package includes the GNU libc libraries and support -for profiling using the gprof program. Profiling is analyzing a -program's functions to see how much CPU time they use and determining -which functions are calling other functions during execution. To use -gprof to profile a program, your program needs to use the GNU libc -libraries included in glibc-profile (instead of the standard GNU libc -libraries included in the glibc package). - -If you are going to use the gprof program to profile a program, you'll -need to install the glibc-profile package. - %package common Summary: Common binaries and locale data for glibc Conflicts: %{name} < %{version} @@ -503,7 +485,8 @@ CC="$GCC" CFLAGS="$build_CFLAGS" ../configure --prefix=%{_prefix} \ --enable-add-ons=nptl$AddOns --without-cvs $EnableKernel \ --with-headers=%{_prefix}/include --enable-bind-now \ --with-tls --with-__thread --build %{nptl_target_cpu}-redhat-linux \ - --host %{nptl_target_cpu}-redhat-linux + --host %{nptl_target_cpu}-redhat-linux \ + --disable-profile make %{?_smp_mflags} -r CFLAGS="$build_CFLAGS" PARALLELMFLAGS=-s cd .. @@ -512,7 +495,6 @@ cd .. build_nptl linuxnptl %if %{buildxen} -EnableKernel="$EnableKernel --disable-profile" build_nptl linuxnptl-nosegneg -mno-tls-direct-seg-refs %endif @@ -691,7 +673,6 @@ for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do chmod 755 $i; rm -f $i.tmp done -grep '%{_prefix}/%{_lib}/lib.*_p\.a' < rpm.filelist > profile.filelist || : grep '%{_infodir}' < rpm.filelist | grep -v '%{_infodir}/dir' > devel.filelist grep '%{_prefix}/include/gnu/stubs-[32164]\+\.h' < rpm.filelist >> devel.filelist || : @@ -934,7 +915,7 @@ case "$-" in *x*) save_trace=yes;; esac set +x echo Cutting down the list of unpackaged files for i in `sed '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //' \ - common.filelist devel.filelist headers.filelist profile.filelist \ + common.filelist devel.filelist headers.filelist \ utils.filelist nscd.filelist`; do [ -f "$RPM_BUILD_ROOT$i" ] && rm -f "$RPM_BUILD_ROOT$i" || : done @@ -1051,9 +1032,6 @@ rm -f *.filelist* %files -f headers.filelist headers %defattr(-,root,root) -%files -f profile.filelist profile -%defattr(-,root,root) - %files -f utils.filelist utils %defattr(-,root,root) @@ -1095,6 +1073,14 @@ rm -f *.filelist* %endif %changelog +* Mon Dec 19 2005 Jakub Jelinek 2.3.90-19 +- update from CVS + - sysdeps/generic reorg + - setjmp/longjmp jump pointer mangling +- rebuilt with GCC 4.1-RH prerelease, worked around broken _Pragma () + handling in it +- remove glibc-profile subpackage + * Sat Nov 19 2005 Jakub Jelinek 2.3.90-18 - update from CVS - change for broken apps that #define const /**/, diff --git a/sysdeps/generic/bb_init_func.c b/gmon/bb_init_func.c similarity index 100% rename from sysdeps/generic/bb_init_func.c rename to gmon/bb_init_func.c diff --git a/sysdeps/generic/prof-freq.c b/gmon/prof-freq.c similarity index 100% rename from sysdeps/generic/prof-freq.c rename to gmon/prof-freq.c diff --git a/sysdeps/generic/profil.c b/gmon/profil.c similarity index 100% rename from sysdeps/generic/profil.c rename to gmon/profil.c diff --git a/sysdeps/generic/sprofil.c b/gmon/sprofil.c similarity index 100% rename from sysdeps/generic/sprofil.c rename to gmon/sprofil.c diff --git a/sysdeps/generic/setgroups.c b/grp/setgroups.c similarity index 100% rename from sysdeps/generic/setgroups.c rename to grp/setgroups.c diff --git a/sysdeps/generic/exc2signal.c b/hurd/exc2signal.c similarity index 100% rename from sysdeps/generic/exc2signal.c rename to hurd/exc2signal.c diff --git a/hurd/hurdmalloc.c b/hurd/hurdmalloc.c index 4839d985354..12da1f2abc5 100644 --- a/hurd/hurdmalloc.c +++ b/hurd/hurdmalloc.c @@ -33,63 +33,7 @@ * the rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.15 2001/09/19 03:04:09 drepper - * (bcopy): Removed. - * (realloc): Replace bcopy with memcpy. - * - * Revision 1.14 2001/04/01 05:03:14 roland - * 2001-03-11 Roland McGrath - * - * * mach/mach_error.h: Fix ancient #endif syntax. - * * hurd/hurdmalloc.c: Likewise. - * - * Revision 1.13 1996/12/20 01:32:01 drepper - * Update from main archive 961219 - * - * Revision 1.12 1996/11/15 19:44:13 thomas - * Tue Nov 12 16:58:41 1996 Thomas Bushnell, n/BSG - * - * * mach/msg-destroy.c (mach_msg_destroy_port, - * mach_msg_destroy_memory): Use prototype syntax. - * * hurd/hurdmalloc.c (more_memory, malloc_fork_prepare, - * malloc_fork_parent, malloc_fork_child): Likewise. - * - * Revision 1.11 1996/06/06 15:13:47 miles - * Changes to bring in line with the hurd libthreads/malloc.c: - * (more_memory): Use assert_perror instead of MACH_CALL. - * "cthread_internals.h": Include removed. - * (realloc): Use LOG2_MIN_SIZE. - * (LOG2_MIN_SIZE): New macro. - * (realloc): Don't bother allocating a new block if the - * new size request fits in the old one and doesn't waste any space. - * Only free the old block if we successfully got a new one. - * [MCHECK] (struct header): New type. - * (union header): Only define if !MCHECK. - * (HEADER_SIZE, HEADER_NEXT, HEADER_FREE, HEADER_CHECK): New macros. - * [MCHECK] (MIN_SIZE): Add correct definition for this case. - * (more_memory, malloc, free, realloc): Use above macros, and add - * appropriate checks & frobs in MCHECK case. - * - * Revision 1.6 1996/03/07 21:13:08 miles - * (realloc): - * Use LOG2_MIN_SIZE. - * Don't bother allocating a new block if the new size request fits in the old - * one and doesn't waste any space. - * Only free the old block if we successfully got a new one. - * (LOG2_MIN_SIZE): New macro. - * - * Revision 1.5 1996/03/06 23:51:04 miles - * [MCHECK] (struct header): New type. - * (union header): Only define if !MCHECK. - * (HEADER_SIZE, HEADER_NEXT, HEADER_FREE, HEADER_CHECK): New macros. - * [MCHECK] (MIN_SIZE): Add correct definition for this case. - * (more_memory, malloc, free, realloc): - * Use above macros, and add appropriate checks & frobs in MCHECK case. - * - * Revision 1.4 1994/05/05 11:21:42 roland - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.7 91/05/14 17:57:34 mrt * Correcting copyright diff --git a/sysdeps/generic/longjmp-ts.c b/hurd/longjmp-ts.c similarity index 100% rename from sysdeps/generic/longjmp-ts.c rename to hurd/longjmp-ts.c diff --git a/sysdeps/generic/trampoline.c b/hurd/trampoline.c similarity index 100% rename from sysdeps/generic/trampoline.c rename to hurd/trampoline.c diff --git a/iconv/dummy-repertoire.c b/iconv/dummy-repertoire.c index a195460f9ae..a87685c5056 100644 --- a/iconv/dummy-repertoire.c +++ b/iconv/dummy-repertoire.c @@ -1,21 +1,19 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* For iconv we don't have to handle repertoire maps. Provide dummy definitions to allow the use of linereader.c unchanged. */ diff --git a/iconv/gconv.c b/iconv/gconv.c index f3f49b7db36..cd43d3d6fb6 100644 --- a/iconv/gconv.c +++ b/iconv/gconv.c @@ -1,6 +1,6 @@ /* Convert characters in input buffer using conversion descriptor to output buffer. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997-2001, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -20,10 +20,13 @@ 02111-1307 USA. */ #include -#include -#include #include #include +#include + +#include +#include + int internal_function @@ -45,9 +48,15 @@ __gconv (__gconv_t cd, const unsigned char **inbuf, cd->__data[last_step].__outbuf = outbuf != NULL ? *outbuf : NULL; cd->__data[last_step].__outbufend = outbufend; + __gconv_fct fct = cd->__steps->__fct; +#ifdef PTR_DEMANGLE + if (cd->__steps->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + if (inbuf == NULL || *inbuf == NULL) /* We just flush. */ - result = DL_CALL_FCT (cd->__steps->__fct, + result = DL_CALL_FCT (fct, (cd->__steps, cd->__data, NULL, NULL, NULL, irreversible, cd->__data[last_step].__outbuf == NULL ? 2 : 1, 0)); @@ -60,7 +69,7 @@ __gconv (__gconv_t cd, const unsigned char **inbuf, do { last_start = *inbuf; - result = DL_CALL_FCT (cd->__steps->__fct, + result = DL_CALL_FCT (fct, (cd->__steps, cd->__data, inbuf, inbufend, NULL, irreversible, 0, 0)); } diff --git a/iconv/gconv_builtin.c b/iconv/gconv_builtin.c index f653d6c7f32..d8beabd416d 100644 --- a/iconv/gconv_builtin.c +++ b/iconv/gconv_builtin.c @@ -1,5 +1,5 @@ /* Table for builtin transformation mapping. - Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1997-1999, 2000-2002, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -27,16 +28,16 @@ #include -static struct builtin_map +static const struct builtin_map { const char *name; __gconv_fct fct; __gconv_btowc_fct btowc_fct; - int min_needed_from; - int max_needed_from; - int min_needed_to; - int max_needed_to; + int8_t min_needed_from; + int8_t max_needed_from; + int8_t min_needed_to; + int8_t max_needed_to; } map[] = { diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c index 8dc6b14d258..3431ce08124 100644 --- a/iconv/gconv_db.c +++ b/iconv/gconv_db.c @@ -1,5 +1,5 @@ /* Provide access to the collection of available transformation modules. - Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1997-2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -18,6 +18,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -28,6 +29,7 @@ #include #include +#include /* Simple data structure for alias mapping. We have two names, `from' @@ -180,7 +182,15 @@ free_derivation (void *p) for (cnt = 0; cnt < deriv->nsteps; ++cnt) if (deriv->steps[cnt].__counter > 0 && deriv->steps[cnt].__end_fct != NULL) - DL_CALL_FCT (deriv->steps[cnt].__end_fct, (&deriv->steps[cnt])); + { + assert (deriv->steps[cnt].__shlib_handle != NULL); + + __gconv_end_fct end_fct = deriv->steps[cnt].__end_fct; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (end_fct); +#endif + DL_CALL_FCT (end_fct, (&deriv->steps[cnt])); + } /* Free the name strings. */ free ((char *) deriv->steps[0].__from_name); @@ -196,22 +206,30 @@ void internal_function __gconv_release_step (struct __gconv_step *step) { - if (--step->__counter == 0) + /* Skip builtin modules; they are not reference counted. */ + if (step->__shlib_handle != NULL && --step->__counter == 0) { /* Call the destructor. */ if (step->__end_fct != NULL) - DL_CALL_FCT (step->__end_fct, (step)); - -#ifndef STATIC_GCONV - /* Skip builtin modules; they are not reference counted. */ - if (step->__shlib_handle != NULL) { - /* Release the loaded module. */ - __gconv_release_shlib (step->__shlib_handle); - step->__shlib_handle = NULL; + assert (step->__shlib_handle != NULL); + + __gconv_end_fct end_fct = step->__end_fct; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (end_fct); +#endif + DL_CALL_FCT (end_fct, (step)); } + +#ifndef STATIC_GCONV + /* Release the loaded module. */ + __gconv_release_shlib (step->__shlib_handle); + step->__shlib_handle = NULL; #endif } + else + /* Builtin modules should not have end functions. */ + assert (step->__end_fct == NULL); } static int @@ -272,10 +290,15 @@ gen_steps (struct derivation_step *best, const char *toset, result[step_cnt].__btowc_fct = NULL; /* Call the init function. */ - if (result[step_cnt].__init_fct != NULL) + __gconv_init_fct init_fct = result[step_cnt].__init_fct; + if (init_fct != NULL) { - status = DL_CALL_FCT (result[step_cnt].__init_fct, - (&result[step_cnt])); + assert (result[step_cnt].__shlib_handle != NULL); + +# ifdef PTR_DEMANGLE + PTR_DEMANGLE (init_fct); +# endif + status = DL_CALL_FCT (init_fct, (&result[step_cnt])); if (__builtin_expect (status, __GCONV_OK) != __GCONV_OK) { @@ -285,6 +308,11 @@ gen_steps (struct derivation_step *best, const char *toset, result[step_cnt].__end_fct = NULL; break; } + +# ifdef PTR_MANGLE + if (result[step_cnt].__btowc_fct != NULL) + PTR_MANGLE (result[step_cnt].__btowc_fct); +# endif } } else @@ -362,8 +390,19 @@ increment_counter (struct __gconv_step *steps, size_t nsteps) } /* Call the init function. */ - if (step->__init_fct != NULL) - DL_CALL_FCT (step->__init_fct, (step)); + __gconv_init_fct init_fct = step->__init_fct; + if (init_fct != NULL) + { +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (init_fct); +#endif + DL_CALL_FCT (init_fct, (step)); + +#ifdef PTR_MANGLE + if (step->__btowc_fct != NULL) + PTR_MANGLE (step->__btowc_fct); +#endif + } } } return result; diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c index 95040172108..8217b7e5532 100644 --- a/iconv/gconv_dl.c +++ b/iconv/gconv_dl.c @@ -1,5 +1,5 @@ /* Handle loading/unloading of shared object for transformation. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -29,6 +29,7 @@ #include #include +#include #ifdef DEBUG @@ -130,6 +131,14 @@ __gconv_find_shlib (const char *name) found->init_fct = __libc_dlsym (found->handle, "gconv_init"); found->end_fct = __libc_dlsym (found->handle, "gconv_end"); +#ifdef PTR_MANGLE + PTR_MANGLE (found->fct); + if (found->init_fct != NULL) + PTR_MANGLE (found->init_fct); + if (found->end_fct != NULL) + PTR_MANGLE (found->end_fct); +#endif + /* We have succeeded in loading the shared object. */ found->counter = 1; } diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c index 03a8f5fa23f..b83081efca7 100644 --- a/iconv/iconv_charmap.c +++ b/iconv/iconv_charmap.c @@ -1,22 +1,20 @@ /* Convert using charmaps and possibly iconv(). - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index 5b3d35ecaae..a7036af99c0 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c index df66f11f080..96a86191e9a 100644 --- a/iconv/iconvconfig.c +++ b/iconv/iconvconfig.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/iconv/skeleton.c b/iconv/skeleton.c index c74935693fc..baace6b3fbb 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -144,6 +144,8 @@ # include #endif +#include + #ifndef DL_CALL_FCT # define DL_CALL_FCT(fct, args) fct args #endif @@ -393,10 +395,17 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, { struct __gconv_step *next_step = step + 1; struct __gconv_step_data *next_data = data + 1; - __gconv_fct fct; + __gconv_fct fct = NULL; int status; - fct = (data->__flags & __GCONV_IS_LAST) ? NULL : next_step->__fct; + if ((data->__flags & __GCONV_IS_LAST) == 0) + { + fct = next_step->__fct; +#ifdef PTR_DEMANGLE + if (next_step->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + } /* If the function is called with no input this means we have to reset to the initial state. The possibly partly converted input is diff --git a/include/dirent.h b/include/dirent.h index 4e95ffd6cd0..681024fd02d 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -25,6 +25,6 @@ extern int __alphasort64 (const void *a, const void *b) __attribute_pure__; extern int __versionsort64 (const void *a, const void *b) __attribute_pure__; -extern DIR *__alloc_dir (int fd, bool close_fd, struct stat64 *statp) +extern DIR *__alloc_dir (int fd, bool close_fd, const struct stat64 *statp) internal_function; #endif diff --git a/include/fcntl.h b/include/fcntl.h index 6080faba3e2..610e322cfd6 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -21,5 +21,8 @@ libc_hidden_proto (__fcntl) /* Helper functions for the various *at functions. For Linux. */ extern void __atfct_seterrno (int errval, int fd, const char *buf) attribute_hidden; +extern void __atfct_seterrno_2 (int errval, int fd1, const char *buf1, + int fd2, const char *buf2) + attribute_hidden; #endif diff --git a/include/sys/sendfile.h b/include/sys/sendfile.h new file mode 100644 index 00000000000..abe09769cca --- /dev/null +++ b/include/sys/sendfile.h @@ -0,0 +1 @@ +#include diff --git a/include/sys/stat.h b/include/sys/stat.h index 2e2566d9ef5..4a4d05d938f 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -29,6 +29,7 @@ extern __inline__ int __mknod (__const char *__path, __mode_t __mode, { return __xmknod (_MKNOD_VER, __path, __mode, &__dev); } +libc_hidden_proto (__xmknodat) /* The `stat', `fstat', `lstat' functions have to be handled special since diff --git a/sysdeps/generic/check_pf.c b/inet/check_pf.c similarity index 100% rename from sysdeps/generic/check_pf.c rename to inet/check_pf.c diff --git a/sysdeps/generic/getipv4sourcefilter.c b/inet/getipv4sourcefilter.c similarity index 100% rename from sysdeps/generic/getipv4sourcefilter.c rename to inet/getipv4sourcefilter.c diff --git a/sysdeps/generic/getsourcefilter.c b/inet/getsourcefilter.c similarity index 100% rename from sysdeps/generic/getsourcefilter.c rename to inet/getsourcefilter.c diff --git a/sysdeps/generic/herrno-loc.c b/inet/herrno-loc.c similarity index 100% rename from sysdeps/generic/herrno-loc.c rename to inet/herrno-loc.c diff --git a/sysdeps/generic/htonl.c b/inet/htonl.c similarity index 100% rename from sysdeps/generic/htonl.c rename to inet/htonl.c diff --git a/sysdeps/generic/htons.c b/inet/htons.c similarity index 100% rename from sysdeps/generic/htons.c rename to inet/htons.c diff --git a/sysdeps/generic/if_index.c b/inet/if_index.c similarity index 100% rename from sysdeps/generic/if_index.c rename to inet/if_index.c diff --git a/sysdeps/generic/ifaddrs.c b/inet/ifaddrs.c similarity index 100% rename from sysdeps/generic/ifaddrs.c rename to inet/ifaddrs.c diff --git a/sysdeps/generic/ifreq.c b/inet/ifreq.c similarity index 100% rename from sysdeps/generic/ifreq.c rename to inet/ifreq.c diff --git a/sysdeps/generic/setipv4sourcefilter.c b/inet/setipv4sourcefilter.c similarity index 100% rename from sysdeps/generic/setipv4sourcefilter.c rename to inet/setipv4sourcefilter.c diff --git a/sysdeps/generic/setsourcefilter.c b/inet/setsourcefilter.c similarity index 100% rename from sysdeps/generic/setsourcefilter.c rename to inet/setsourcefilter.c diff --git a/io/Makefile b/io/Makefile index 9339ffe699e..4731e24d247 100644 --- a/io/Makefile +++ b/io/Makefile @@ -28,13 +28,14 @@ headers := sys/stat.h bits/stat.h sys/statfs.h bits/statfs.h sys/vfs.h \ routines := \ utime \ - mkfifo \ - stat fstat lstat mknod stat64 fstat64 lstat64 fstatat fstatat64 \ - xstat fxstat lxstat xmknod xstat64 fxstat64 lxstat64 \ + mkfifo mkfifoat \ + stat fstat lstat stat64 fstat64 lstat64 fstatat fstatat64 \ + xstat fxstat lxstat xstat64 fxstat64 lxstat64 \ + mknod mknodat xmknod xmknodat \ fxstatat fxstatat64 \ statfs fstatfs statfs64 fstatfs64 \ statvfs fstatvfs statvfs64 fstatvfs64 \ - umask chmod fchmod lchmod mkdir \ + umask chmod fchmod lchmod mkdir mkdirat \ open open64 openat openat64 close \ read write lseek lseek64 access euidaccess \ fcntl flock lockf lockf64 \ @@ -44,7 +45,7 @@ routines := \ getcwd getwd getdirname \ chown fchown lchown fchownat \ ttyname ttyname_r isatty \ - link symlink readlink \ + link linkat symlink symlinkat readlink readlinkat \ unlink unlinkat rmdir \ ftw ftw64 fts poll \ posix_fadvise posix_fadvise64 \ @@ -54,8 +55,8 @@ routines := \ # These routines will be omitted from the libc shared object. # Instead the static object files will be included in a special archive # linked against when the shared library will be used. -static-only-routines = stat fstat lstat mknod stat64 fstat64 lstat64 \ - fstatat fstatat64 +static-only-routines = stat fstat lstat stat64 fstat64 lstat64 \ + fstatat fstatat64 mknod mknodat others := pwd test-srcs := ftwtest diff --git a/io/Versions b/io/Versions index 65ee77182e8..2f0f94f3bbb 100644 --- a/io/Versions +++ b/io/Versions @@ -100,7 +100,11 @@ libc { GLIBC_2.4 { fchownat; __fxstatat; __fxstatat64; + linkat; + mkdirat; mkfifoat; __xmknodat; openat; openat64; + readlinkat; + symlinkat; unlinkat; } } diff --git a/sysdeps/generic/access.c b/io/access.c similarity index 100% rename from sysdeps/generic/access.c rename to io/access.c diff --git a/sysdeps/generic/chdir.c b/io/chdir.c similarity index 100% rename from sysdeps/generic/chdir.c rename to io/chdir.c diff --git a/sysdeps/generic/chmod.c b/io/chmod.c similarity index 100% rename from sysdeps/generic/chmod.c rename to io/chmod.c diff --git a/sysdeps/generic/chown.c b/io/chown.c similarity index 100% rename from sysdeps/generic/chown.c rename to io/chown.c diff --git a/sysdeps/generic/close.c b/io/close.c similarity index 100% rename from sysdeps/generic/close.c rename to io/close.c diff --git a/sysdeps/generic/creat.c b/io/creat.c similarity index 100% rename from sysdeps/generic/creat.c rename to io/creat.c diff --git a/sysdeps/generic/creat64.c b/io/creat64.c similarity index 100% rename from sysdeps/generic/creat64.c rename to io/creat64.c diff --git a/sysdeps/generic/dup.c b/io/dup.c similarity index 100% rename from sysdeps/generic/dup.c rename to io/dup.c diff --git a/sysdeps/generic/dup2.c b/io/dup2.c similarity index 100% rename from sysdeps/generic/dup2.c rename to io/dup2.c diff --git a/sysdeps/generic/euidaccess.c b/io/euidaccess.c similarity index 100% rename from sysdeps/generic/euidaccess.c rename to io/euidaccess.c diff --git a/sysdeps/generic/fchdir.c b/io/fchdir.c similarity index 100% rename from sysdeps/generic/fchdir.c rename to io/fchdir.c diff --git a/sysdeps/generic/fchmod.c b/io/fchmod.c similarity index 100% rename from sysdeps/generic/fchmod.c rename to io/fchmod.c diff --git a/sysdeps/generic/fchown.c b/io/fchown.c similarity index 100% rename from sysdeps/generic/fchown.c rename to io/fchown.c diff --git a/sysdeps/generic/fchownat.c b/io/fchownat.c similarity index 100% rename from sysdeps/generic/fchownat.c rename to io/fchownat.c diff --git a/sysdeps/generic/fcntl.c b/io/fcntl.c similarity index 100% rename from sysdeps/generic/fcntl.c rename to io/fcntl.c diff --git a/sysdeps/generic/flock.c b/io/flock.c similarity index 100% rename from sysdeps/generic/flock.c rename to io/flock.c diff --git a/sysdeps/generic/fstatfs.c b/io/fstatfs.c similarity index 100% rename from sysdeps/generic/fstatfs.c rename to io/fstatfs.c diff --git a/sysdeps/generic/fstatfs64.c b/io/fstatfs64.c similarity index 100% rename from sysdeps/generic/fstatfs64.c rename to io/fstatfs64.c diff --git a/sysdeps/generic/fstatvfs.c b/io/fstatvfs.c similarity index 100% rename from sysdeps/generic/fstatvfs.c rename to io/fstatvfs.c diff --git a/sysdeps/generic/fstatvfs64.c b/io/fstatvfs64.c similarity index 100% rename from sysdeps/generic/fstatvfs64.c rename to io/fstatvfs64.c diff --git a/sysdeps/generic/fxstat.c b/io/fxstat.c similarity index 100% rename from sysdeps/generic/fxstat.c rename to io/fxstat.c diff --git a/sysdeps/generic/fxstat64.c b/io/fxstat64.c similarity index 100% rename from sysdeps/generic/fxstat64.c rename to io/fxstat64.c diff --git a/sysdeps/generic/fxstatat.c b/io/fxstatat.c similarity index 100% rename from sysdeps/generic/fxstatat.c rename to io/fxstatat.c diff --git a/sysdeps/generic/fxstatat64.c b/io/fxstatat64.c similarity index 100% rename from sysdeps/generic/fxstatat64.c rename to io/fxstatat64.c diff --git a/sysdeps/generic/getcwd.c b/io/getcwd.c similarity index 100% rename from sysdeps/generic/getcwd.c rename to io/getcwd.c diff --git a/sysdeps/generic/isatty.c b/io/isatty.c similarity index 100% rename from sysdeps/generic/isatty.c rename to io/isatty.c diff --git a/sysdeps/generic/lchmod.c b/io/lchmod.c similarity index 100% rename from sysdeps/generic/lchmod.c rename to io/lchmod.c diff --git a/sysdeps/generic/lchown.c b/io/lchown.c similarity index 100% rename from sysdeps/generic/lchown.c rename to io/lchown.c diff --git a/sysdeps/generic/link.c b/io/link.c similarity index 100% rename from sysdeps/generic/link.c rename to io/link.c diff --git a/io/linkat.c b/io/linkat.c new file mode 100644 index 00000000000..6420d503347 --- /dev/null +++ b/io/linkat.c @@ -0,0 +1,51 @@ +/* Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + + +/* Make a link to FROM relative to FROMFD called TO relative to TOFD. */ +int +linkat (fromfd, from, tofd, to) + int fromfd; + const char *from; + int tofd; + const char *to; +{ + if (from == NULL || to == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if ((tofd != AT_FDCWD && tofd < 0 && *to != '/') + || (fromfd != AT_FDCWD && fromfd < 0 && *from != '/')) + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (linkat) + +#include diff --git a/sysdeps/generic/lockf.c b/io/lockf.c similarity index 100% rename from sysdeps/generic/lockf.c rename to io/lockf.c diff --git a/sysdeps/generic/lockf64.c b/io/lockf64.c similarity index 100% rename from sysdeps/generic/lockf64.c rename to io/lockf64.c diff --git a/sysdeps/generic/lseek64.c b/io/lseek64.c similarity index 100% rename from sysdeps/generic/lseek64.c rename to io/lseek64.c diff --git a/sysdeps/generic/lxstat.c b/io/lxstat.c similarity index 100% rename from sysdeps/generic/lxstat.c rename to io/lxstat.c diff --git a/sysdeps/generic/lxstat64.c b/io/lxstat64.c similarity index 100% rename from sysdeps/generic/lxstat64.c rename to io/lxstat64.c diff --git a/sysdeps/generic/mkdir.c b/io/mkdir.c similarity index 100% rename from sysdeps/generic/mkdir.c rename to io/mkdir.c diff --git a/io/mkdirat.c b/io/mkdirat.c new file mode 100644 index 00000000000..ccea3aa8d8b --- /dev/null +++ b/io/mkdirat.c @@ -0,0 +1,58 @@ +/* Copyright (C) 1991, 1995, 1996, 1997, 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include + + +/* Create a directory named PATH relative to FD with protections MODE. */ +int +mkdirat (fd, path, mode) + int fd; + const char *path; + mode_t mode; +{ + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if (fd != AT_FDCWD && path[0] != '/') + { + /* Check FD is associated with a directory. */ + struct stat64 st; + if (__fxstat64 (_STAT_VER, fd, &st) != 0) + return -1; + + if (!S_ISDIR (st.st_mode)) + { + __set_errno (ENOTDIR); + return -1; + } + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (mkdirat) + +#include diff --git a/sysdeps/generic/mkfifo.c b/io/mkfifo.c similarity index 100% rename from sysdeps/generic/mkfifo.c rename to io/mkfifo.c diff --git a/io/mkfifoat.c b/io/mkfifoat.c new file mode 100644 index 00000000000..48c38c8182b --- /dev/null +++ b/io/mkfifoat.c @@ -0,0 +1,60 @@ +/* Copyright (C) 1991, 1995, 1996, 1997, 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include + + +/* Create a named pipe (FIFO) named PATH relative to FD with + protections MODE. */ +int +mkfifoat (fd, path, mode) + int fd; + const char *path; + mode_t mode; +{ + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if (fd != AT_FDCWD && path[0] != '/') + { + /* Check FD is associated with a directory. */ + struct stat64 st; + if (__fxstat64 (_STAT_VER, fd, &st) != 0) + return -1; + + if (!S_ISDIR (st.st_mode)) + { + __set_errno (ENOTDIR); + return -1; + } + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (mkfifoat) +#include diff --git a/sysdeps/generic/mknod.c b/io/mknod.c similarity index 100% rename from sysdeps/generic/mknod.c rename to io/mknod.c diff --git a/io/mknodat.c b/io/mknodat.c new file mode 100644 index 00000000000..ac515b5b483 --- /dev/null +++ b/io/mknodat.c @@ -0,0 +1,60 @@ +/* Copyright (C) 1995, 1996, 2001, 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + + +#include +#include + +/* This definition is only used if inlining fails for this function; see + the last page of . The real work is done by the `x' + function which is passed a version number argument. We arrange in the + makefile that when not inlined this function is always statically + linked; that way a dynamically-linked executable always encodes the + version number corresponding to the data structures it uses, so the `x' + functions in the shared library can adapt without needing to recompile + all callers. */ + +int +mknodat (int fd, const char *path, mode_t mode, dev_t dev) +{ + return __xmknodat (_MKNOD_VER, fd, path, mode, &dev); +} + + +/* Hide the symbol so that no definition but the one locally in the + executable or DSO is used. */ +#ifdef HAVE_DOT_HIDDEN +asm (".hidden\tmknodat"); +#endif diff --git a/sysdeps/generic/open.c b/io/open.c similarity index 100% rename from sysdeps/generic/open.c rename to io/open.c diff --git a/sysdeps/generic/open64.c b/io/open64.c similarity index 100% rename from sysdeps/generic/open64.c rename to io/open64.c diff --git a/sysdeps/generic/openat.c b/io/openat.c similarity index 100% rename from sysdeps/generic/openat.c rename to io/openat.c diff --git a/sysdeps/generic/openat64.c b/io/openat64.c similarity index 100% rename from sysdeps/generic/openat64.c rename to io/openat64.c diff --git a/sysdeps/generic/pipe.c b/io/pipe.c similarity index 100% rename from sysdeps/generic/pipe.c rename to io/pipe.c diff --git a/sysdeps/generic/poll.c b/io/poll.c similarity index 100% rename from sysdeps/generic/poll.c rename to io/poll.c diff --git a/sysdeps/generic/posix_fadvise.c b/io/posix_fadvise.c similarity index 100% rename from sysdeps/generic/posix_fadvise.c rename to io/posix_fadvise.c diff --git a/sysdeps/generic/posix_fadvise64.c b/io/posix_fadvise64.c similarity index 100% rename from sysdeps/generic/posix_fadvise64.c rename to io/posix_fadvise64.c diff --git a/sysdeps/generic/posix_fallocate.c b/io/posix_fallocate.c similarity index 100% rename from sysdeps/generic/posix_fallocate.c rename to io/posix_fallocate.c diff --git a/sysdeps/generic/posix_fallocate64.c b/io/posix_fallocate64.c similarity index 100% rename from sysdeps/generic/posix_fallocate64.c rename to io/posix_fallocate64.c diff --git a/sysdeps/generic/read.c b/io/read.c similarity index 100% rename from sysdeps/generic/read.c rename to io/read.c diff --git a/sysdeps/generic/readlink.c b/io/readlink.c similarity index 100% rename from sysdeps/generic/readlink.c rename to io/readlink.c diff --git a/io/readlinkat.c b/io/readlinkat.c new file mode 100644 index 00000000000..c6a032c4748 --- /dev/null +++ b/io/readlinkat.c @@ -0,0 +1,50 @@ +/* Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Read the contents of the symbolic link PATH relative to FD into no + more than LEN bytes of BUF. The contents are not null-terminated. + Returns the number of characters read, or -1 for errors. */ +int +readlinkat (fd, path, buf, len) + int fd; + const char *path; + char *buf; + size_t len; +{ + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if (fd != AT_FDCWD && fd < 0 && *path != '/') + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (readlinkat) + +#include diff --git a/sysdeps/generic/rmdir.c b/io/rmdir.c similarity index 100% rename from sysdeps/generic/rmdir.c rename to io/rmdir.c diff --git a/sysdeps/generic/sendfile.c b/io/sendfile.c similarity index 100% rename from sysdeps/generic/sendfile.c rename to io/sendfile.c diff --git a/sysdeps/generic/sendfile64.c b/io/sendfile64.c similarity index 100% rename from sysdeps/generic/sendfile64.c rename to io/sendfile64.c diff --git a/sysdeps/generic/statfs.c b/io/statfs.c similarity index 100% rename from sysdeps/generic/statfs.c rename to io/statfs.c diff --git a/sysdeps/generic/statfs64.c b/io/statfs64.c similarity index 100% rename from sysdeps/generic/statfs64.c rename to io/statfs64.c diff --git a/sysdeps/generic/statvfs.c b/io/statvfs.c similarity index 100% rename from sysdeps/generic/statvfs.c rename to io/statvfs.c diff --git a/sysdeps/generic/statvfs64.c b/io/statvfs64.c similarity index 100% rename from sysdeps/generic/statvfs64.c rename to io/statvfs64.c diff --git a/sysdeps/generic/symlink.c b/io/symlink.c similarity index 100% rename from sysdeps/generic/symlink.c rename to io/symlink.c diff --git a/sysdeps/generic/det_endian.c b/io/symlinkat.c similarity index 59% rename from sysdeps/generic/det_endian.c rename to io/symlinkat.c index 4c86be3a855..5c2f3f553a5 100644 --- a/sysdeps/generic/det_endian.c +++ b/io/symlinkat.c @@ -1,7 +1,5 @@ -/* Determine the "endianness" of the CPU. - Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. +/* Copyright (C) 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -18,18 +16,34 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include +#include +#include +#include -main () -{ - unsigned long int i; - - if (sizeof (i) != 4) - puts ("#error \"Not a 32-bit machine!\""); - - i = (((((('4' << 8) + '3') << 8) + '2') << 8) + '1'); - printf ("#define __BYTE_ORDER %.4s\n", (char *) &i); - - exit (0); +/* Make a link to FROM called TO relative to FD. */ +int +symlinkat (from, fd, to) + const char *from; + int fd; + const char *to; +{ + if (from == NULL || to == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if (fd != AT_FDCWD && fd < 0 && *to != '/') + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; } +stub_warning (symlinkat) + +#include diff --git a/io/sys/stat.h b/io/sys/stat.h index 03152990e76..6ce3a1be662 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -233,20 +233,23 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)); Relative path names are interpreted relative to FD unless FD is AT_FDCWD. */ # ifndef __USE_FILE_OFFSET64 -extern int fstatat (int __fd, __const char *__file, struct stat *__buf, - int __flag) __THROW __nonnull ((2, 3)); +extern int fstatat (int __fd, __const char *__restrict __file, + struct stat *__restrict __buf, int __flag) + __THROW __nonnull ((2, 3)); # else # ifdef __REDIRECT_NTH -extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__file, - struct stat *__buf, int __flag), +extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__restrict __file, + struct stat *__restrict __buf, + int __flag), fstatat64) __nonnull ((2, 3)); # else # define fstatat fstatat64 # endif # endif -extern int fstatat64 (int __fd, __const char *__file, struct stat64 *__buf, - int __flag) __THROW __nonnull ((2, 3)); +extern int fstatat64 (int __fd, __const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + __THROW __nonnull ((2, 3)); #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED @@ -305,6 +308,14 @@ extern __mode_t getumask (void) __THROW; extern int mkdir (__const char *__path, __mode_t __mode) __THROW __nonnull ((1)); +#ifdef __USE_GNU +/* Like mkdir, create a new directory with permission bits MODE. But + interpret relative PATH names relative to the directory associated + with FD. */ +extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) + __THROW __nonnull ((2)); +#endif + /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor device numbers with the `makedev' macro above). */ @@ -313,10 +324,26 @@ extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((1)); #endif +#ifdef __USE_GNU +/* Like mknod, create a new device file with permission bits MODE and + device number DEV. But interpret relative PATH names relative to + the directory associated with FD. */ +extern int mknodat (int __fd, __const char *__path, __mode_t __mode, + __dev_t __dev) __THROW __nonnull ((2)); +#endif + /* Create a new FIFO named PATH, with permission bits MODE. */ extern int mkfifo (__const char *__path, __mode_t __mode) __THROW __nonnull ((1)); + +#ifdef __USE_GNU +/* Like mkfifo, create a new FIFO with permission bits MODE. But + interpret relative PATH names relative to the directory associated + with FD. */ +extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) + __THROW __nonnull ((2)); +#endif /* To allow the `struct stat' structure and the file type `mode_t' bits to vary without changing shared library major version number, @@ -388,6 +415,10 @@ extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, __dev_t *__dev) __THROW __nonnull ((2, 4)); +extern int __xmknodat (int __ver, int __fd, __const char *__path, + __mode_t __mode, __dev_t *__dev) + __THROW __nonnull ((3, 5)); + #if defined __GNUC__ && __GNUC__ >= 2 /* Inlined versions of the real stat and mknod functions. */ @@ -428,6 +459,15 @@ __NTH (mknod (__const char *__path, __mode_t __mode, __dev_t __dev)) } # endif +# ifdef __USE_GNU +extern __inline__ int +__NTH (mknodat (int __fd, __const char *__path, __mode_t __mode, + __dev_t __dev)) +{ + return __xmknodat (_MKNOD_VER, __fd, __path, __mode, &__dev); +} +# endif + # if defined __USE_LARGEFILE64 \ && (! defined __USE_FILE_OFFSET64 \ || (defined __REDIRECT_NTH && defined __OPTIMIZE__)) diff --git a/sysdeps/generic/ttyname.c b/io/ttyname.c similarity index 100% rename from sysdeps/generic/ttyname.c rename to io/ttyname.c diff --git a/sysdeps/generic/ttyname_r.c b/io/ttyname_r.c similarity index 100% rename from sysdeps/generic/ttyname_r.c rename to io/ttyname_r.c diff --git a/sysdeps/generic/umask.c b/io/umask.c similarity index 100% rename from sysdeps/generic/umask.c rename to io/umask.c diff --git a/sysdeps/generic/unlink.c b/io/unlink.c similarity index 100% rename from sysdeps/generic/unlink.c rename to io/unlink.c diff --git a/sysdeps/generic/unlinkat.c b/io/unlinkat.c similarity index 100% rename from sysdeps/generic/unlinkat.c rename to io/unlinkat.c diff --git a/sysdeps/generic/utime.c b/io/utime.c similarity index 100% rename from sysdeps/generic/utime.c rename to io/utime.c diff --git a/sysdeps/generic/write.c b/io/write.c similarity index 100% rename from sysdeps/generic/write.c rename to io/write.c diff --git a/sysdeps/generic/xmknod.c b/io/xmknod.c similarity index 90% rename from sysdeps/generic/xmknod.c rename to io/xmknod.c index 57ed46060de..c2daa46e074 100644 --- a/sysdeps/generic/xmknod.c +++ b/io/xmknod.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1993,1995,1996,1997,2002 Free Software Foundation, Inc. +/* Copyright (C) 1991,1993,1995-1997,2002,2005 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 @@ -32,6 +32,12 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) return -1; } + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + __set_errno (ENOSYS); return -1; } diff --git a/io/xmknodat.c b/io/xmknodat.c new file mode 100644 index 00000000000..56d88c7b0f7 --- /dev/null +++ b/io/xmknodat.c @@ -0,0 +1,63 @@ +/* Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +/* Create a device file named PATH relative to FD, with permission and + special bits MODE and device number DEV (which can be constructed + from major and minor device numbers with the `makedev' macro + above). */ +int +__xmknodat (int vers, int fd, const char *path, mode_t mode, dev_t *dev) +{ + if (vers != _MKNOD_VER) + { + __set_errno (EINVAL); + return -1; + } + + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if (fd != AT_FDCWD && path[0] != '/') + { + /* Check FD is associated with a directory. */ + struct stat64 st; + if (__fxstat64 (_STAT_VER, fd, &st) != 0) + return -1; + + if (!S_ISDIR (st.st_mode)) + { + __set_errno (ENOTDIR); + return -1; + } + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (__xmknodat) + +libc_hidden_def (__xmknodat) +#include diff --git a/sysdeps/generic/xstat.c b/io/xstat.c similarity index 100% rename from sysdeps/generic/xstat.c rename to io/xstat.c diff --git a/sysdeps/generic/xstat64.c b/io/xstat64.c similarity index 100% rename from sysdeps/generic/xstat64.c rename to io/xstat64.c diff --git a/libio/iofwide.c b/libio/iofwide.c index 7af9a633f8c..a9936687ddb 100644 --- a/libio/iofwide.c +++ b/libio/iofwide.c @@ -40,6 +40,7 @@ # include # include # include +# include #endif @@ -68,7 +69,7 @@ static int do_always_noconv (struct _IO_codecvt *codecvt); /* The functions used in `codecvt' for libio are always the same. */ -struct _IO_codecvt __libio_codecvt = +const struct _IO_codecvt __libio_codecvt = { .__codecvt_destr = NULL, /* Destructor, never used. */ .__codecvt_do_out = do_out, @@ -82,7 +83,7 @@ struct _IO_codecvt __libio_codecvt = #ifdef _LIBC -struct __gconv_trans_data __libio_translit attribute_hidden = +const struct __gconv_trans_data __libio_translit attribute_hidden = { .__trans_fct = __gconv_transliterate }; @@ -126,12 +127,11 @@ _IO_fwide (fp, mode) selected locale for LC_CTYPE. */ #ifdef _LIBC { - struct gconv_fcts fcts; - /* Clear the state. We start all over again. */ memset (&fp->_wide_data->_IO_state, '\0', sizeof (__mbstate_t)); memset (&fp->_wide_data->_IO_last_state, '\0', sizeof (__mbstate_t)); + struct gconv_fcts fcts; __wcsmbs_clone_conv (&fcts); assert (fcts.towc_nsteps == 1); assert (fcts.tomb_nsteps == 1); @@ -159,7 +159,8 @@ _IO_fwide (fp, mode) cc->__cd_out.__cd.__data[0].__statep = &fp->_wide_data->_IO_state; /* And now the transliteration. */ - cc->__cd_out.__cd.__data[0].__trans = &__libio_translit; + cc->__cd_out.__cd.__data[0].__trans + = (struct __gconv_trans_data *) &__libio_translit; } #else # ifdef _GLIBCPP_USE_WCHAR_T @@ -232,7 +233,13 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep, codecvt->__cd_out.__cd.__data[0].__outbufend = (unsigned char *) to_end; codecvt->__cd_out.__cd.__data[0].__statep = statep; - status = DL_CALL_FCT (gs->__fct, + __gconv_fct fct = gs->__fct; +#ifdef PTR_DEMANGLE + if (gs->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + + status = DL_CALL_FCT (fct, (gs, codecvt->__cd_out.__cd.__data, &from_start_copy, (const unsigned char *) from_end, NULL, &dummy, 0, 0)); @@ -298,7 +305,13 @@ do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep, codecvt->__cd_out.__cd.__data[0].__outbufend = (unsigned char *) to_end; codecvt->__cd_out.__cd.__data[0].__statep = statep; - status = DL_CALL_FCT (gs->__fct, + __gconv_fct fct = gs->__fct; +#ifdef PTR_DEMANGLE + if (gs->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + + status = DL_CALL_FCT (fct, (gs, codecvt->__cd_out.__cd.__data, NULL, NULL, NULL, &dummy, 1, 0)); @@ -361,7 +374,13 @@ do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep, codecvt->__cd_in.__cd.__data[0].__outbufend = (unsigned char *) to_end; codecvt->__cd_in.__cd.__data[0].__statep = statep; - status = DL_CALL_FCT (gs->__fct, + __gconv_fct fct = gs->__fct; +#ifdef PTR_DEMANGLE + if (gs->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + + status = DL_CALL_FCT (fct, (gs, codecvt->__cd_in.__cd.__data, &from_start_copy, (const unsigned char *) from_end, NULL, &dummy, 0, 0)); @@ -459,7 +478,13 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep, codecvt->__cd_in.__cd.__data[0].__outbufend = (unsigned char *) &to_buf[max]; codecvt->__cd_in.__cd.__data[0].__statep = statep; - status = DL_CALL_FCT (gs->__fct, + __gconv_fct fct = gs->__fct; +#ifdef PTR_DEMANGLE + if (gs->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + + status = DL_CALL_FCT (fct, (gs, codecvt->__cd_in.__cd.__data, &cp, (const unsigned char *) from_end, NULL, &dummy, 0, 0)); diff --git a/sysdeps/generic/libc_fatal.c b/libio/libc_fatal.c similarity index 100% rename from sysdeps/generic/libc_fatal.c rename to libio/libc_fatal.c diff --git a/libio/libioP.h b/libio/libioP.h index 319b0fd5f30..be3b38a2e4a 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997-2003, 2004, 2005 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 @@ -469,7 +469,7 @@ extern const struct _IO_jump_t _IO_streambuf_jumps; extern const struct _IO_jump_t _IO_old_proc_jumps attribute_hidden; extern const struct _IO_jump_t _IO_str_jumps attribute_hidden; extern const struct _IO_jump_t _IO_wstr_jumps attribute_hidden; -extern struct _IO_codecvt __libio_codecvt attribute_hidden; +extern const struct _IO_codecvt __libio_codecvt attribute_hidden; extern int _IO_do_write (_IO_FILE *, const char *, _IO_size_t) __THROW; extern int _IO_new_do_write (_IO_FILE *, const char *, _IO_size_t) __THROW; extern int _IO_old_do_write (_IO_FILE *, const char *, _IO_size_t) __THROW; diff --git a/locale/programs/3level.h b/locale/programs/3level.h index fa92b11bbdb..88f1b49724e 100644 --- a/locale/programs/3level.h +++ b/locale/programs/3level.h @@ -1,21 +1,19 @@ -/* Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000-2001, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Bruno Haible , 2000. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Construction of sparse 3-level tables. See wchar-lookup.h or coll-lookup.h for their structure and the diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c index 903bd5cabc2..07d0cdcfd06 100644 --- a/locale/programs/charmap-dir.c +++ b/locale/programs/charmap-dir.c @@ -1,20 +1,18 @@ -/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2003, 2005 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/locale/programs/charmap-dir.h b/locale/programs/charmap-dir.h index 1d07c64ec10..256db8dc35d 100644 --- a/locale/programs/charmap-dir.h +++ b/locale/programs/charmap-dir.h @@ -1,20 +1,18 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2005 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _CHARMAP_DIR_H #define _CHARMAP_DIR_H 1 diff --git a/locale/programs/charmap-kw.gperf b/locale/programs/charmap-kw.gperf index 83da36aa745..64f74525009 100644 --- a/locale/programs/charmap-kw.gperf +++ b/locale/programs/charmap-kw.gperf @@ -1,22 +1,20 @@ %{ -/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include diff --git a/locale/programs/charmap-kw.h b/locale/programs/charmap-kw.h index 089f45d7d8b..25996f4346a 100644 --- a/locale/programs/charmap-kw.h +++ b/locale/programs/charmap-kw.h @@ -1,27 +1,56 @@ -/* ANSI-C code produced by gperf version 2.7.2 */ +/* ANSI-C code produced by gperf version 3.0.1 */ /* Command-line: gperf -acCgopt -k'1,2,5,9,$' -L ANSI-C -N charmap_hash programs/charmap-kw.gperf */ -/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 1 "programs/charmap-kw.gperf" + +/* Copyright (C) 1995,1996,1997,1998,1999,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "locfile-token.h" +#line 23 "programs/charmap-kw.gperf" struct keyword_t ; #define TOTAL_KEYWORDS 17 @@ -47,15 +76,15 @@ hash (register const char *str, register unsigned int len) 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 25, 10, - 15, 20, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 10, 0, 0, - 5, 36, 0, 0, 36, 36, 36, 0, 0, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 25, 20, + 15, 10, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 5, 0, 0, + 5, 36, 0, 0, 36, 36, 36, 5, 0, 36, 0, 36, 0, 36, 0, 36, 36, 0, 36, 36, - 36, 36, 36, 36, 36, 0, 36, 0, 0, 0, - 10, 0, 36, 0, 0, 0, 36, 36, 36, 0, + 36, 36, 36, 36, 36, 0, 36, 5, 0, 0, + 5, 0, 36, 5, 0, 0, 36, 36, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 36, - 25, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 0, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, @@ -75,17 +104,19 @@ hash (register const char *str, register unsigned int len) switch (hval) { default: - case 9: hval += asso_values[(unsigned char)str[8]]; + /*FALLTHROUGH*/ case 8: case 7: case 6: case 5: hval += asso_values[(unsigned char)str[4]]; + /*FALLTHROUGH*/ case 4: case 3: case 2: hval += asso_values[(unsigned char)str[1]]; + /*FALLTHROUGH*/ case 1: hval += asso_values[(unsigned char)str[0]]; break; @@ -102,29 +133,46 @@ charmap_hash (register const char *str, register unsigned int len) static const struct keyword_t wordlist[] = { {""}, {""}, {""}, +#line 38 "programs/charmap-kw.gperf" {"END", tok_end, 0}, {""}, +#line 39 "programs/charmap-kw.gperf" {"WIDTH", tok_width, 0}, +#line 34 "programs/charmap-kw.gperf" {"escseq", tok_escseq, 1}, +#line 36 "programs/charmap-kw.gperf" {"include", tok_include, 1}, {""}, {""}, +#line 27 "programs/charmap-kw.gperf" {"mb_cur_min", tok_mb_cur_min, 1}, +#line 28 "programs/charmap-kw.gperf" {"escape_char", tok_escape_char, 1}, +#line 29 "programs/charmap-kw.gperf" {"comment_char", tok_comment_char, 1}, +#line 25 "programs/charmap-kw.gperf" {"code_set_name", tok_code_set_name, 1}, +#line 40 "programs/charmap-kw.gperf" {"WIDTH_VARIABLE", tok_width_variable, 0}, - {"g1esc", tok_g1esc, 1}, +#line 26 "programs/charmap-kw.gperf" + {"mb_cur_max", tok_mb_cur_max, 1}, +#line 35 "programs/charmap-kw.gperf" {"addset", tok_addset, 1}, +#line 37 "programs/charmap-kw.gperf" {"CHARMAP", tok_charmap, 0}, +#line 41 "programs/charmap-kw.gperf" {"WIDTH_DEFAULT", tok_width_default, 0}, {""}, - {"g2esc", tok_g2esc, 1}, - {""}, {""}, {""}, {""}, +#line 33 "programs/charmap-kw.gperf" {"g3esc", tok_g3esc, 1}, {""}, {""}, {""}, {""}, - {"g0esc", tok_g0esc, 1}, +#line 32 "programs/charmap-kw.gperf" + {"g2esc", tok_g2esc, 1}, + {""}, {""}, {""}, {""}, +#line 31 "programs/charmap-kw.gperf" + {"g1esc", tok_g1esc, 1}, {""}, {""}, {""}, {""}, - {"mb_cur_max", tok_mb_cur_max, 1} +#line 30 "programs/charmap-kw.gperf" + {"g0esc", tok_g0esc, 1} }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c index b8aa1aafc46..6ac898d1610 100644 --- a/locale/programs/charmap.c +++ b/locale/programs/charmap.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1996, 1998-2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998-2004,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/charmap.h b/locale/programs/charmap.h index a4a6d3833ba..a3f31d63330 100644 --- a/locale/programs/charmap.h +++ b/locale/programs/charmap.h @@ -1,21 +1,19 @@ -/* Copyright (C) 1996-1999, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999, 2001, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _CHARMAP_H #define _CHARMAP_H diff --git a/locale/programs/config.h b/locale/programs/config.h index 12a921c1cf7..6f9bfde9038 100644 --- a/locale/programs/config.h +++ b/locale/programs/config.h @@ -1,22 +1,20 @@ /* Configuration for localedef program. - Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,2000,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LD_CONFIG_H #define _LD_CONFIG_H 1 diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c index 5a7d821de63..4d649b04563 100644 --- a/locale/programs/ld-address.c +++ b/locale/programs/ld-address.c @@ -2,20 +2,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index 00ad2ee4887..66638d50c83 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -2,20 +2,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index ed8fa919d54..b0b2e3f8053 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-identification.c b/locale/programs/ld-identification.c index ae5ea6fb16e..d050f7aaa90 100644 --- a/locale/programs/ld-identification.c +++ b/locale/programs/ld-identification.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-measurement.c b/locale/programs/ld-measurement.c index e3ec90199e9..6a9b847a1a3 100644 --- a/locale/programs/ld-measurement.c +++ b/locale/programs/ld-measurement.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-messages.c b/locale/programs/ld-messages.c index d5cc393e4b2..e98574f1306 100644 --- a/locale/programs/ld-messages.c +++ b/locale/programs/ld-messages.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c index 868ab6980ed..27636d64981 100644 --- a/locale/programs/ld-monetary.c +++ b/locale/programs/ld-monetary.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-name.c b/locale/programs/ld-name.c index 80b42f70484..c1153fd51d0 100644 --- a/locale/programs/ld-name.c +++ b/locale/programs/ld-name.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c index 594c0c8c1b7..a101a402f49 100644 --- a/locale/programs/ld-numeric.c +++ b/locale/programs/ld-numeric.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-paper.c b/locale/programs/ld-paper.c index 2910954f04d..38f9af3e60e 100644 --- a/locale/programs/ld-paper.c +++ b/locale/programs/ld-paper.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-telephone.c b/locale/programs/ld-telephone.c index 5a60c016b0c..4075a14f468 100644 --- a/locale/programs/ld-telephone.c +++ b/locale/programs/ld-telephone.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c index a7dd25c80db..2d63275d3cc 100644 --- a/locale/programs/ld-time.c +++ b/locale/programs/ld-time.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c index 5c8cf65012f..1d3e60f69f3 100644 --- a/locale/programs/linereader.c +++ b/locale/programs/linereader.c @@ -2,20 +2,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/linereader.h b/locale/programs/linereader.h index 27043b24565..d4d7e830a6e 100644 --- a/locale/programs/linereader.h +++ b/locale/programs/linereader.h @@ -1,21 +1,19 @@ -/* Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, . - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LINEREADER_H #define _LINEREADER_H 1 diff --git a/locale/programs/locale-spec.c b/locale/programs/locale-spec.c index a1a3aba47f7..6ad3d95efed 100644 --- a/locale/programs/locale-spec.c +++ b/locale/programs/locale-spec.c @@ -1,22 +1,20 @@ /* Handle special requests. - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/locale.c b/locale/programs/locale.c index d64bb0b5609..526eb2b929b 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c index 326113c1753..dfabaa9f8ac 100644 --- a/locale/programs/localedef.c +++ b/locale/programs/localedef.c @@ -2,20 +2,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/localedef.h b/locale/programs/localedef.h index 41f72860d4b..f8cc4ca9c1f 100644 --- a/locale/programs/localedef.h +++ b/locale/programs/localedef.h @@ -1,22 +1,20 @@ /* General definitions for localedef(1). - Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998,1999,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LOCALEDEF_H #define _LOCALEDEF_H 1 diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c index 1a1c7701d12..5c0d5f18ce9 100644 --- a/locale/programs/locarchive.c +++ b/locale/programs/locarchive.c @@ -1,21 +1,19 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/locfile-kw.gperf b/locale/programs/locfile-kw.gperf index 7a9285d97e1..efdb9afab98 100644 --- a/locale/programs/locfile-kw.gperf +++ b/locale/programs/locfile-kw.gperf @@ -1,22 +1,20 @@ %{ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include diff --git a/locale/programs/locfile-kw.h b/locale/programs/locfile-kw.h index da4a63e033b..8692b0936c7 100644 --- a/locale/programs/locfile-kw.h +++ b/locale/programs/locfile-kw.h @@ -1,35 +1,64 @@ -/* ANSI-C code produced by gperf version 2.7.2 */ +/* ANSI-C code produced by gperf version 3.0.1 */ /* Command-line: gperf -acCgopt -k'1,2,5,9,$' -L ANSI-C -N locfile_hash programs/locfile-kw.gperf */ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 1 "programs/locfile-kw.gperf" + +/* Copyright (C) 1996,1997,1998,1999,2000,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "locfile-token.h" +#line 23 "programs/locfile-kw.gperf" struct keyword_t ; #define TOTAL_KEYWORDS 175 #define MIN_WORD_LENGTH 3 #define MAX_WORD_LENGTH 22 #define MIN_HASH_VALUE 3 -#define MAX_HASH_VALUE 687 -/* maximum key range = 685, duplicates = 0 */ +#define MAX_HASH_VALUE 610 +/* maximum key range = 608, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -43,49 +72,51 @@ hash (register const char *str, register unsigned int len) { static const unsigned short asso_values[] = { - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 5, 0, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 15, 688, 0, 0, 0, - 5, 0, 0, 0, 688, 688, 0, 688, 0, 5, - 688, 688, 15, 0, 5, 15, 688, 688, 688, 0, - 688, 688, 688, 688, 688, 75, 688, 0, 0, 65, - 5, 0, 85, 40, 5, 155, 688, 10, 105, 120, - 125, 35, 5, 20, 5, 190, 0, 125, 35, 10, - 30, 35, 0, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688 + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 5, 0, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 5, 611, 0, 0, 0, + 0, 0, 10, 0, 611, 611, 0, 611, 0, 5, + 611, 611, 0, 0, 0, 10, 611, 611, 611, 0, + 611, 611, 611, 611, 611, 0, 611, 145, 105, 25, + 15, 0, 190, 110, 10, 35, 611, 0, 80, 65, + 5, 130, 40, 50, 5, 0, 10, 35, 50, 20, + 5, 10, 0, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611 }; register int hval = len; switch (hval) { default: - case 9: hval += asso_values[(unsigned char)str[8]]; + /*FALLTHROUGH*/ case 8: case 7: case 6: case 5: hval += asso_values[(unsigned char)str[4]]; + /*FALLTHROUGH*/ case 4: case 3: case 2: hval += asso_values[(unsigned char)str[1]]; + /*FALLTHROUGH*/ case 1: hval += asso_values[(unsigned char)str[0]]; break; @@ -102,314 +133,470 @@ locfile_hash (register const char *str, register unsigned int len) static const struct keyword_t wordlist[] = { {""}, {""}, {""}, +#line 30 "programs/locfile-kw.gperf" {"END", tok_end, 0}, - {""}, {""}, {""}, + {""}, {""}, +#line 69 "programs/locfile-kw.gperf" + {"IGNORE", tok_ignore, 0}, +#line 127 "programs/locfile-kw.gperf" {"LC_TIME", tok_lc_time, 0}, - {"era", tok_era, 0}, - {"date", tok_date, 0}, +#line 29 "programs/locfile-kw.gperf" + {"LC_CTYPE", tok_lc_ctype, 0}, + {""}, +#line 164 "programs/locfile-kw.gperf" {"LC_ADDRESS", tok_lc_address, 0}, +#line 149 "programs/locfile-kw.gperf" {"LC_MESSAGES", tok_lc_messages, 0}, - {"LC_TELEPHONE", tok_lc_telephone, 0}, - {"LC_CTYPE", tok_lc_ctype, 0}, - {"era_t_fmt", tok_era_t_fmt, 0}, - {"print", tok_print, 0}, - {"height", tok_height, 0}, +#line 157 "programs/locfile-kw.gperf" + {"LC_NAME", tok_lc_name, 0}, +#line 154 "programs/locfile-kw.gperf" + {"LC_PAPER", tok_lc_paper, 0}, +#line 182 "programs/locfile-kw.gperf" + {"LC_MEASUREMENT", tok_lc_measurement, 0}, +#line 55 "programs/locfile-kw.gperf" + {"LC_COLLATE", tok_lc_collate, 0}, + {""}, +#line 184 "programs/locfile-kw.gperf" {"LC_IDENTIFICATION", tok_lc_identification, 0}, +#line 197 "programs/locfile-kw.gperf" + {"revision", tok_revision, 0}, +#line 68 "programs/locfile-kw.gperf" + {"UNDEFINED", tok_undefined, 0}, +#line 123 "programs/locfile-kw.gperf" + {"LC_NUMERIC", tok_lc_numeric, 0}, +#line 80 "programs/locfile-kw.gperf" + {"LC_MONETARY", tok_lc_monetary, 0}, +#line 177 "programs/locfile-kw.gperf" + {"LC_TELEPHONE", tok_lc_telephone, 0}, {""}, - {"era_d_fmt", tok_era_d_fmt, 0}, - {"LC_COLLATE", tok_lc_collate, 0}, - {"IGNORE", tok_ignore, 0}, - {"LC_NAME", tok_lc_name, 0}, - {"backward", tok_backward, 0}, +#line 130 "programs/locfile-kw.gperf" {"week", tok_week, 0}, - {"LC_NUMERIC", tok_lc_numeric, 0}, + {""}, +#line 74 "programs/locfile-kw.gperf" + {"define", tok_define, 0}, +#line 150 "programs/locfile-kw.gperf" + {"yesexpr", tok_yesexpr, 0}, +#line 139 "programs/locfile-kw.gperf" + {"era_year", tok_era_year, 0}, + {""}, +#line 53 "programs/locfile-kw.gperf" + {"translit_ignore", tok_translit_ignore, 0}, +#line 152 "programs/locfile-kw.gperf" + {"yesstr", tok_yesstr, 0}, + {""}, +#line 87 "programs/locfile-kw.gperf" + {"negative_sign", tok_negative_sign, 0}, + {""}, +#line 135 "programs/locfile-kw.gperf" + {"t_fmt", tok_t_fmt, 0}, +#line 155 "programs/locfile-kw.gperf" + {"height", tok_height, 0}, + {""}, {""}, +#line 51 "programs/locfile-kw.gperf" + {"translit_start", tok_translit_start, 0}, +#line 134 "programs/locfile-kw.gperf" + {"d_fmt", tok_d_fmt, 0}, + {""}, +#line 52 "programs/locfile-kw.gperf" + {"translit_end", tok_translit_end, 0}, +#line 92 "programs/locfile-kw.gperf" + {"n_cs_precedes", tok_n_cs_precedes, 0}, +#line 142 "programs/locfile-kw.gperf" + {"era_t_fmt", tok_era_t_fmt, 0}, +#line 38 "programs/locfile-kw.gperf" + {"space", tok_space, 0}, +#line 71 "programs/locfile-kw.gperf" {"reorder-end", tok_reorder_end, 0}, +#line 72 "programs/locfile-kw.gperf" + {"reorder-sections-after", tok_reorder_sections_after, 0}, {""}, - {"reorder-after", tok_reorder_after, 0}, - {"UNDEFINED", tok_undefined, 0}, +#line 140 "programs/locfile-kw.gperf" + {"era_d_fmt", tok_era_d_fmt, 0}, +#line 185 "programs/locfile-kw.gperf" + {"title", tok_title, 0}, + {""}, {""}, +#line 147 "programs/locfile-kw.gperf" + {"timezone", tok_timezone, 0}, {""}, - {"LC_MONETARY", tok_lc_monetary, 0}, +#line 73 "programs/locfile-kw.gperf" + {"reorder-sections-end", tok_reorder_sections_end, 0}, + {""}, {""}, {""}, +#line 93 "programs/locfile-kw.gperf" + {"n_sep_by_space", tok_n_sep_by_space, 0}, + {""}, {""}, +#line 98 "programs/locfile-kw.gperf" + {"int_n_cs_precedes", tok_int_n_cs_precedes, 0}, + {""}, {""}, {""}, +#line 25 "programs/locfile-kw.gperf" + {"escape_char", tok_escape_char, 0}, {""}, +#line 27 "programs/locfile-kw.gperf" {"repertoiremap", tok_repertoiremap, 0}, - {"LC_MEASUREMENT", tok_lc_measurement, 0}, - {""}, {""}, {""}, - {"LC_PAPER", tok_lc_paper, 0}, +#line 45 "programs/locfile-kw.gperf" + {"charclass", tok_charclass, 0}, +#line 42 "programs/locfile-kw.gperf" + {"print", tok_print, 0}, +#line 43 "programs/locfile-kw.gperf" + {"xdigit", tok_xdigit, 0}, +#line 108 "programs/locfile-kw.gperf" + {"duo_n_cs_precedes", tok_duo_n_cs_precedes, 0}, +#line 125 "programs/locfile-kw.gperf" + {"thousands_sep", tok_thousands_sep, 0}, +#line 193 "programs/locfile-kw.gperf" + {"territory", tok_territory, 0}, +#line 35 "programs/locfile-kw.gperf" + {"digit", tok_digit, 0}, + {""}, {""}, +#line 90 "programs/locfile-kw.gperf" + {"p_cs_precedes", tok_p_cs_precedes, 0}, + {""}, +#line 156 "programs/locfile-kw.gperf" + {"width", tok_width, 0}, +#line 61 "programs/locfile-kw.gperf" + {"script", tok_script, 0}, +#line 28 "programs/locfile-kw.gperf" + {"include", tok_include, 0}, + {""}, +#line 77 "programs/locfile-kw.gperf" + {"else", tok_else, 0}, +#line 180 "programs/locfile-kw.gperf" + {"int_select", tok_int_select, 0}, {""}, {""}, {""}, {""}, - {"day", tok_day, 0}, +#line 32 "programs/locfile-kw.gperf" + {"upper", tok_upper, 0}, {""}, {""}, - {"yesstr", tok_yesstr, 0}, - {""}, {""}, {""}, {""}, {""}, - {"toupper", tok_toupper, 0}, - {"era_year", tok_era_year, 0}, +#line 190 "programs/locfile-kw.gperf" + {"tel", tok_tel, 0}, +#line 91 "programs/locfile-kw.gperf" + {"p_sep_by_space", tok_p_sep_by_space, 0}, {""}, {""}, - {"order_start", tok_order_start, 0}, - {"tolower", tok_tolower, 0}, +#line 96 "programs/locfile-kw.gperf" + {"int_p_cs_precedes", tok_int_p_cs_precedes, 0}, {""}, {""}, - {"graph", tok_graph, 0}, +#line 40 "programs/locfile-kw.gperf" + {"punct", tok_punct, 0}, + {""}, {""}, +#line 99 "programs/locfile-kw.gperf" + {"int_n_sep_by_space", tok_int_n_sep_by_space, 0}, {""}, {""}, {""}, - {"order_end", tok_order_end, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 106 "programs/locfile-kw.gperf" + {"duo_p_cs_precedes", tok_duo_p_cs_precedes, 0}, + {""}, {""}, +#line 46 "programs/locfile-kw.gperf" + {"class", tok_class, 0}, +#line 112 "programs/locfile-kw.gperf" + {"duo_int_n_cs_precedes", tok_duo_int_n_cs_precedes, 0}, +#line 113 "programs/locfile-kw.gperf" + {"duo_int_n_sep_by_space", tok_duo_int_n_sep_by_space, 0}, +#line 109 "programs/locfile-kw.gperf" + {"duo_n_sep_by_space", tok_duo_n_sep_by_space, 0}, +#line 117 "programs/locfile-kw.gperf" + {"duo_int_n_sign_posn", tok_duo_int_n_sign_posn, 0}, + {""}, {""}, {""}, +#line 47 "programs/locfile-kw.gperf" + {"charconv", tok_charconv, 0}, + {""}, {""}, +#line 183 "programs/locfile-kw.gperf" + {"measurement", tok_measurement, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 57 "programs/locfile-kw.gperf" + {"section-symbol", tok_section_symbol, 0}, +#line 181 "programs/locfile-kw.gperf" + {"int_prefix", tok_int_prefix, 0}, + {""}, {""}, {""}, {""}, +#line 137 "programs/locfile-kw.gperf" + {"t_fmt_ampm", tok_t_fmt_ampm, 0}, + {""}, {""}, +#line 97 "programs/locfile-kw.gperf" + {"int_p_sep_by_space", tok_int_p_sep_by_space, 0}, {""}, - {"abday", tok_abday, 0}, +#line 41 "programs/locfile-kw.gperf" + {"graph", tok_graph, 0}, + {""}, {""}, +#line 124 "programs/locfile-kw.gperf" + {"decimal_point", tok_decimal_point, 0}, + {""}, {""}, +#line 110 "programs/locfile-kw.gperf" + {"duo_int_p_cs_precedes", tok_duo_int_p_cs_precedes, 0}, +#line 111 "programs/locfile-kw.gperf" + {"duo_int_p_sep_by_space", tok_duo_int_p_sep_by_space, 0}, +#line 107 "programs/locfile-kw.gperf" + {"duo_p_sep_by_space", tok_duo_p_sep_by_space, 0}, +#line 116 "programs/locfile-kw.gperf" + {"duo_int_p_sign_posn", tok_duo_int_p_sign_posn, 0}, +#line 153 "programs/locfile-kw.gperf" + {"nostr", tok_nostr, 0}, + {""}, {""}, +#line 138 "programs/locfile-kw.gperf" + {"era", tok_era, 0}, {""}, - {"yesexpr", tok_yesexpr, 0}, +#line 82 "programs/locfile-kw.gperf" + {"currency_symbol", tok_currency_symbol, 0}, + {""}, +#line 163 "programs/locfile-kw.gperf" + {"name_ms", tok_name_ms, 0}, +#line 161 "programs/locfile-kw.gperf" + {"name_mrs", tok_name_mrs, 0}, +#line 162 "programs/locfile-kw.gperf" + {"name_miss", tok_name_miss, 0}, +#line 81 "programs/locfile-kw.gperf" + {"int_curr_symbol", tok_int_curr_symbol, 0}, +#line 186 "programs/locfile-kw.gperf" + {"source", tok_source, 0}, +#line 160 "programs/locfile-kw.gperf" + {"name_mr", tok_name_mr, 0}, +#line 159 "programs/locfile-kw.gperf" + {"name_gen", tok_name_gen, 0}, +#line 198 "programs/locfile-kw.gperf" + {"date", tok_date, 0}, {""}, {""}, - {"t_fmt", tok_t_fmt, 0}, - {""}, {""}, {""}, {""}, - {"d_fmt", tok_d_fmt, 0}, +#line 187 "programs/locfile-kw.gperf" + {"address", tok_address, 0}, +#line 158 "programs/locfile-kw.gperf" + {"name_fmt", tok_name_fmt, 0}, +#line 31 "programs/locfile-kw.gperf" + {"copy", tok_copy, 0}, {""}, {""}, +#line 49 "programs/locfile-kw.gperf" + {"tolower", tok_tolower, 0}, +#line 129 "programs/locfile-kw.gperf" + {"day", tok_day, 0}, +#line 103 "programs/locfile-kw.gperf" + {"duo_currency_symbol", tok_duo_currency_symbol, 0}, +#line 101 "programs/locfile-kw.gperf" + {"int_n_sign_posn", tok_int_n_sign_posn, 0}, + {""}, {""}, +#line 148 "programs/locfile-kw.gperf" {"date_fmt", tok_date_fmt, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"grouping", tok_grouping, 0}, +#line 63 "programs/locfile-kw.gperf" + {"order_end", tok_order_end, 0}, {""}, {""}, - {"tel_dom_fmt", tok_tel_dom_fmt, 0}, - {""}, {""}, {""}, {""}, - {"era_d_t_fmt", tok_era_d_t_fmt, 0}, - {"contact", tok_contact, 0}, - {"tel", tok_tel, 0}, - {"else", tok_else, 0}, - {"alpha", tok_alpha, 0}, - {"country_ab3", tok_country_ab3, 0}, - {""}, {""}, {""}, {""}, - {"country_ab2", tok_country_ab2, 0}, - {"country_post", tok_country_post, 0}, - {"fax", tok_fax, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"map", tok_map, 0}, - {""}, - {"blank", tok_blank, 0}, +#line 166 "programs/locfile-kw.gperf" + {"country_name", tok_country_name, 0}, +#line 70 "programs/locfile-kw.gperf" + {"reorder-after", tok_reorder_after, 0}, +#line 118 "programs/locfile-kw.gperf" + {"uno_valid_from", tok_uno_valid_from, 0}, +#line 115 "programs/locfile-kw.gperf" + {"duo_n_sign_posn", tok_duo_n_sign_posn, 0}, +#line 151 "programs/locfile-kw.gperf" + {"noexpr", tok_noexpr, 0}, {""}, - {"forward", tok_forward, 0}, +#line 194 "programs/locfile-kw.gperf" {"audience", tok_audience, 0}, {""}, - {"punct", tok_punct, 0}, - {"define", tok_define, 0}, - {"abbreviation", tok_abbreviation, 0}, - {""}, - {"copy", tok_copy, 0}, - {""}, {""}, {""}, - {"decimal_point", tok_decimal_point, 0}, +#line 44 "programs/locfile-kw.gperf" + {"blank", tok_blank, 0}, {""}, - {"upper", tok_upper, 0}, - {""}, {""}, - {"category", tok_category, 0}, +#line 48 "programs/locfile-kw.gperf" + {"toupper", tok_toupper, 0}, +#line 67 "programs/locfile-kw.gperf" + {"position", tok_position, 0}, +#line 120 "programs/locfile-kw.gperf" + {"duo_valid_from", tok_duo_valid_from, 0}, +#line 39 "programs/locfile-kw.gperf" + {"cntrl", tok_cntrl, 0}, {""}, - {"conversion_rate", tok_conversion_rate, 0}, +#line 26 "programs/locfile-kw.gperf" + {"comment_char", tok_comment_char, 0}, +#line 86 "programs/locfile-kw.gperf" + {"positive_sign", tok_positive_sign, 0}, {""}, {""}, {""}, {""}, - {"lower", tok_lower, 0}, - {""}, - {"collating-element", tok_collating_element, 0}, - {"duo_p_sep_by_space", tok_duo_p_sep_by_space, 0}, - {""}, - {"title", tok_title, 0}, +#line 132 "programs/locfile-kw.gperf" + {"mon", tok_mon, 0}, {""}, {""}, - {"timezone", tok_timezone, 0}, +#line 171 "programs/locfile-kw.gperf" + {"country_car", tok_country_car, 0}, {""}, - {"digit", tok_digit, 0}, - {""}, {""}, {""}, {""}, - {"postal_fmt", tok_postal_fmt, 0}, +#line 60 "programs/locfile-kw.gperf" + {"symbol-equivalence", tok_symbol_equivalence, 0}, +#line 102 "programs/locfile-kw.gperf" + {"duo_int_curr_symbol", tok_duo_int_curr_symbol, 0}, +#line 100 "programs/locfile-kw.gperf" + {"int_p_sign_posn", tok_int_p_sign_posn, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, +#line 172 "programs/locfile-kw.gperf" + {"country_isbn", tok_country_isbn, 0}, +#line 36 "programs/locfile-kw.gperf" + {"outdigit", tok_outdigit, 0}, + {""}, +#line 114 "programs/locfile-kw.gperf" + {"duo_p_sign_posn", tok_duo_p_sign_posn, 0}, {""}, +#line 133 "programs/locfile-kw.gperf" {"d_t_fmt", tok_d_t_fmt, 0}, - {"position", tok_position, 0}, - {"p_sep_by_space", tok_p_sep_by_space, 0}, - {"nostr", tok_nostr, 0}, - {"noexpr", tok_noexpr, 0}, + {""}, {""}, +#line 33 "programs/locfile-kw.gperf" + {"lower", tok_lower, 0}, {""}, - {"charconv", tok_charconv, 0}, +#line 167 "programs/locfile-kw.gperf" + {"country_post", tok_country_post, 0}, +#line 146 "programs/locfile-kw.gperf" + {"cal_direction", tok_cal_direction, 0}, {""}, - {"width", tok_width, 0}, - {"country_car", tok_country_car, 0}, - {"comment_char", tok_comment_char, 0}, - {""}, {""}, {""}, {""}, - {"lang_ab", tok_lang_ab, 0}, - {"lang_lib", tok_lang_lib, 0}, +#line 189 "programs/locfile-kw.gperf" + {"email", tok_email, 0}, +#line 141 "programs/locfile-kw.gperf" + {"era_d_t_fmt", tok_era_d_t_fmt, 0}, + {""}, {""}, +#line 173 "programs/locfile-kw.gperf" {"lang_name", tok_lang_name, 0}, - {""}, {""}, {""}, {""}, - {"elif", tok_elif, 0}, {""}, - {"xdigit", tok_xdigit, 0}, +#line 179 "programs/locfile-kw.gperf" + {"tel_dom_fmt", tok_tel_dom_fmt, 0}, {""}, {""}, {""}, - {"space", tok_space, 0}, - {""}, - {"address", tok_address, 0}, +#line 54 "programs/locfile-kw.gperf" + {"default_missing", tok_default_missing, 0}, +#line 89 "programs/locfile-kw.gperf" + {"frac_digits", tok_frac_digits, 0}, + {""}, {""}, {""}, +#line 88 "programs/locfile-kw.gperf" + {"int_frac_digits", tok_int_frac_digits, 0}, +#line 170 "programs/locfile-kw.gperf" + {"country_num", tok_country_num, 0}, +#line 119 "programs/locfile-kw.gperf" + {"uno_valid_to", tok_uno_valid_to, 0}, {""}, {""}, {""}, {""}, {""}, - {"name_fmt", tok_name_fmt, 0}, - {""}, - {"t_fmt_ampm", tok_t_fmt_ampm, 0}, - {""}, - {"name_mr", tok_name_mr, 0}, - {""}, - {"from", tok_from, 0}, +#line 50 "programs/locfile-kw.gperf" + {"map", tok_map, 0}, {""}, - {"escape_char", tok_escape_char, 0}, +#line 105 "programs/locfile-kw.gperf" + {"duo_frac_digits", tok_duo_frac_digits, 0}, +#line 178 "programs/locfile-kw.gperf" + {"tel_int_fmt", tok_tel_int_fmt, 0}, +#line 121 "programs/locfile-kw.gperf" {"duo_valid_to", tok_duo_valid_to, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"reorder-sections-end", tok_reorder_sections_end, 0}, +#line 144 "programs/locfile-kw.gperf" + {"first_weekday", tok_first_weekday, 0}, {""}, - {"reorder-sections-after", tok_reorder_sections_after, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"territory", tok_territory, 0}, +#line 143 "programs/locfile-kw.gperf" + {"alt_digits", tok_alt_digits, 0}, +#line 95 "programs/locfile-kw.gperf" + {"n_sign_posn", tok_n_sign_posn, 0}, +#line 84 "programs/locfile-kw.gperf" + {"mon_thousands_sep", tok_mon_thousands_sep, 0}, +#line 145 "programs/locfile-kw.gperf" + {"first_workday", tok_first_workday, 0}, +#line 64 "programs/locfile-kw.gperf" + {"from", tok_from, 0}, +#line 131 "programs/locfile-kw.gperf" + {"abmon", tok_abmon, 0}, {""}, {""}, - {"country_name", tok_country_name, 0}, +#line 192 "programs/locfile-kw.gperf" {"language", tok_language, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"tel_int_fmt", tok_tel_int_fmt, 0}, - {"mon_grouping", tok_mon_grouping, 0}, - {"positive_sign", tok_positive_sign, 0}, + {""}, {""}, +#line 195 "programs/locfile-kw.gperf" + {"application", tok_application, 0}, {""}, - {"abmon", tok_abmon, 0}, - {"measurement", tok_measurement, 0}, - {""}, {""}, {""}, +#line 126 "programs/locfile-kw.gperf" + {"grouping", tok_grouping, 0}, +#line 78 "programs/locfile-kw.gperf" + {"elif", tok_elif, 0}, +#line 128 "programs/locfile-kw.gperf" + {"abday", tok_abday, 0}, + {""}, +#line 196 "programs/locfile-kw.gperf" + {"abbreviation", tok_abbreviation, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 56 "programs/locfile-kw.gperf" {"coll_weight_max", tok_coll_weight_max, 0}, - {"collating-symbol", tok_collating_symbol, 0}, - {""}, {""}, {""}, {""}, - {"script", tok_script, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"cal_direction", tok_cal_direction, 0}, - {""}, {""}, {""}, {""}, - {"duo_n_sep_by_space", tok_duo_n_sep_by_space, 0}, - {""}, {""}, {""}, {""}, - {"mon", tok_mon, 0}, - {"translit_start", tok_translit_start, 0}, - {"translit_ignore", tok_translit_ignore, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 66 "programs/locfile-kw.gperf" + {"backward", tok_backward, 0}, +#line 104 "programs/locfile-kw.gperf" + {"duo_int_frac_digits", tok_duo_int_frac_digits, 0}, {""}, - {"translit_end", tok_translit_end, 0}, - {"first_weekday", tok_first_weekday, 0}, - {""}, {""}, +#line 94 "programs/locfile-kw.gperf" {"p_sign_posn", tok_p_sign_posn, 0}, {""}, - {"first_workday", tok_first_workday, 0}, - {"n_sep_by_space", tok_n_sep_by_space, 0}, +#line 199 "programs/locfile-kw.gperf" + {"category", tok_category, 0}, {""}, - {"source", tok_source, 0}, - {"mon_decimal_point", tok_mon_decimal_point, 0}, - {"symbol-equivalence", tok_symbol_equivalence, 0}, +#line 122 "programs/locfile-kw.gperf" + {"conversion_rate", tok_conversion_rate, 0}, {""}, - {"endif", tok_endif, 0}, +#line 83 "programs/locfile-kw.gperf" + {"mon_decimal_point", tok_mon_decimal_point, 0}, {""}, {""}, {""}, - {"duo_valid_from", tok_duo_valid_from, 0}, - {"default_missing", tok_default_missing, 0}, - {""}, {""}, - {"int_p_sep_by_space", tok_int_p_sep_by_space, 0}, - {""}, - {"alt_digits", tok_alt_digits, 0}, +#line 62 "programs/locfile-kw.gperf" + {"order_start", tok_order_start, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"duo_int_p_sep_by_space", tok_duo_int_p_sep_by_space, 0}, - {""}, {""}, - {"duo_p_sign_posn", tok_duo_p_sign_posn, 0}, - {""}, {""}, {""}, - {"duo_currency_symbol", tok_duo_currency_symbol, 0}, +#line 188 "programs/locfile-kw.gperf" + {"contact", tok_contact, 0}, {""}, {""}, {""}, - {"outdigit", tok_outdigit, 0}, - {""}, {""}, {""}, {""}, - {"revision", tok_revision, 0}, +#line 169 "programs/locfile-kw.gperf" + {"country_ab3", tok_country_ab3, 0}, {""}, {""}, {""}, {""}, - {"name_gen", tok_name_gen, 0}, - {""}, - {"email", tok_email, 0}, - {""}, - {"uno_valid_to", tok_uno_valid_to, 0}, - {"negative_sign", tok_negative_sign, 0}, +#line 168 "programs/locfile-kw.gperf" + {"country_ab2", tok_country_ab2, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"alnum", tok_alnum, 0}, - {""}, {""}, {""}, {""}, {""}, - {"country_num", tok_country_num, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"am_pm", tok_am_pm, 0}, {""}, - {"mon_thousands_sep", tok_mon_thousands_sep, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"currency_symbol", tok_currency_symbol, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"country_isbn", tok_country_isbn, 0}, - {""}, {""}, {""}, {""}, - {"name_ms", tok_name_ms, 0}, - {"name_mrs", tok_name_mrs, 0}, +#line 174 "programs/locfile-kw.gperf" + {"lang_ab", tok_lang_ab, 0}, +#line 176 "programs/locfile-kw.gperf" + {"lang_lib", tok_lang_lib, 0}, {""}, {""}, {""}, {""}, - {"thousands_sep", tok_thousands_sep, 0}, - {""}, - {"cntrl", tok_cntrl, 0}, - {""}, {""}, {""}, {""}, {""}, - {"n_sign_posn", tok_n_sign_posn, 0}, - {"include", tok_include, 0}, - {""}, {""}, - {"ifdef", tok_ifdef, 0}, +#line 191 "programs/locfile-kw.gperf" + {"fax", tok_fax, 0}, {""}, - {"duo_p_cs_precedes", tok_duo_p_cs_precedes, 0}, +#line 136 "programs/locfile-kw.gperf" + {"am_pm", tok_am_pm, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"p_cs_precedes", tok_p_cs_precedes, 0}, - {"uno_valid_from", tok_uno_valid_from, 0}, - {"undef", tok_undef, 0}, - {""}, {""}, - {"int_n_sep_by_space", tok_int_n_sep_by_space, 0}, +#line 37 "programs/locfile-kw.gperf" + {"alnum", tok_alnum, 0}, + {""}, {""}, {""}, +#line 175 "programs/locfile-kw.gperf" {"lang_term", tok_lang_term, 0}, - {""}, {""}, - {"duo_int_n_sep_by_space", tok_duo_int_n_sep_by_space, 0}, - {""}, - {"duo_int_p_sign_posn", tok_duo_int_p_sign_posn, 0}, - {"duo_n_sign_posn", tok_duo_n_sign_posn, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"application", tok_application, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"int_p_sign_posn", tok_int_p_sign_posn, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"duo_int_curr_symbol", tok_duo_int_curr_symbol, 0}, - {""}, {""}, {""}, {""}, {""}, - {"int_prefix", tok_int_prefix, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 79 "programs/locfile-kw.gperf" + {"endif", tok_endif, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"duo_frac_digits", tok_duo_frac_digits, 0}, - {""}, {""}, {""}, {""}, {""}, - {"duo_int_p_cs_precedes", tok_duo_int_p_cs_precedes, 0}, +#line 165 "programs/locfile-kw.gperf" + {"postal_fmt", tok_postal_fmt, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"frac_digits", tok_frac_digits, 0}, - {""}, {""}, - {"charclass", tok_charclass, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, +#line 75 "programs/locfile-kw.gperf" + {"undef", tok_undef, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"duo_n_cs_precedes", tok_duo_n_cs_precedes, 0}, - {""}, {""}, - {"int_curr_symbol", tok_int_curr_symbol, 0}, {""}, {""}, - {"n_cs_precedes", tok_n_cs_precedes, 0}, - {""}, - {"int_select", tok_int_select, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"duo_int_n_sign_posn", tok_duo_int_n_sign_posn, 0}, - {"class", tok_class, 0}, +#line 58 "programs/locfile-kw.gperf" + {"collating-element", tok_collating_element, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"int_p_cs_precedes", tok_int_p_cs_precedes, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"duo_int_frac_digits", tok_duo_int_frac_digits, 0}, - {""}, {""}, {""}, {""}, {""}, - {"int_n_sign_posn", tok_int_n_sign_posn, 0}, - {""}, {""}, {""}, - {"name_miss", tok_name_miss, 0}, +#line 85 "programs/locfile-kw.gperf" + {"mon_grouping", tok_mon_grouping, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, +#line 65 "programs/locfile-kw.gperf" + {"forward", tok_forward, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 59 "programs/locfile-kw.gperf" + {"collating-symbol", tok_collating_symbol, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"duo_int_n_cs_precedes", tok_duo_int_n_cs_precedes, 0}, +#line 34 "programs/locfile-kw.gperf" + {"alpha", tok_alpha, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"int_frac_digits", tok_int_frac_digits, 0}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section-symbol", tok_section_symbol, 0}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"int_n_cs_precedes", tok_int_n_cs_precedes, 0} + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 76 "programs/locfile-kw.gperf" + {"ifdef", tok_ifdef, 0} }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) diff --git a/locale/programs/locfile-token.h b/locale/programs/locfile-token.h index cada206655b..beb979c6329 100644 --- a/locale/programs/locfile-token.h +++ b/locale/programs/locfile-token.h @@ -1,21 +1,19 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _TOKEN_H #define _TOKEN_H diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c index 1d3276a6bfc..bc12fbb3324 100644 --- a/locale/programs/locfile.c +++ b/locale/programs/locfile.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h index db34f462e3b..f6290f0ee0e 100644 --- a/locale/programs/locfile.h +++ b/locale/programs/locfile.h @@ -1,21 +1,19 @@ -/* Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LOCFILE_H #define _LOCFILE_H 1 diff --git a/locale/programs/repertoire.c b/locale/programs/repertoire.c index 933b88f5cda..7f7ba713b28 100644 --- a/locale/programs/repertoire.c +++ b/locale/programs/repertoire.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1998,1999,2000,2001,2002,2004 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002,2004,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/repertoire.h b/locale/programs/repertoire.h index d463c81690a..75877044ca4 100644 --- a/locale/programs/repertoire.h +++ b/locale/programs/repertoire.h @@ -1,21 +1,19 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _REPERTOIREMAP_H #define _REPERTOIREMAP_H 1 diff --git a/locale/programs/simple-hash.c b/locale/programs/simple-hash.c index c319068677d..86bbdd5b13b 100644 --- a/locale/programs/simple-hash.c +++ b/locale/programs/simple-hash.c @@ -1,22 +1,20 @@ /* Implement simple hashing table with string based keys. - Copyright (C) 1994-1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1994-1997,2000,2001,2002,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper , October 1994. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/locale/programs/simple-hash.h b/locale/programs/simple-hash.h index 469caedc191..7261ebc396c 100644 --- a/locale/programs/simple-hash.h +++ b/locale/programs/simple-hash.h @@ -1,21 +1,19 @@ -/* Copyright (C) 1995-1999, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2001, 2002, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _SIMPLE_HASH_H #define _SIMPLE_HASH_H diff --git a/locale/programs/xmalloc.c b/locale/programs/xmalloc.c index 9f3c2c1cd12..a95dc5a40f3 100644 --- a/locale/programs/xmalloc.c +++ b/locale/programs/xmalloc.c @@ -1,21 +1,20 @@ /* xmalloc.c -- malloc with out of memory checking - Copyright (C) 1990,91,92,93,94,95,96,97,2004 Free Software Foundation, Inc. + Copyright (C) 1990,91,92,93,94,95,96,97,2004,2005 + 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include diff --git a/locale/programs/xstrdup.c b/locale/programs/xstrdup.c index 7838d201abb..12fb3a8287f 100644 --- a/locale/programs/xstrdup.c +++ b/locale/programs/xstrdup.c @@ -1,21 +1,19 @@ /* xstrdup.c -- copy a string with out of memory checking - Copyright (C) 1990, 1996, 1997, 1999, 2004 Free Software Foundation, Inc. + Copyright (C) 1990,1996,1997,1999,2004,2005 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include diff --git a/localedata/ChangeLog b/localedata/ChangeLog index ebb5f15c3a0..ad32e0bb529 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,7 @@ +2005-11-21 Ulrich Drepper + + * locales/se_NO: Remove RCS ID line. + 2005-11-16 Ulrich Drepper [BZ 1872] diff --git a/localedata/locales/se_NO b/localedata/locales/se_NO index 1c98500a2cc..d9eccf54efb 100644 --- a/localedata/locales/se_NO +++ b/localedata/locales/se_NO @@ -1,4 +1,3 @@ -# $Id$ comment_char % escape_char / % @@ -71,7 +70,7 @@ collating-symbol collating-symbol collating-symbol -% +% reorder-after @@ -267,7 +266,7 @@ am_pm "";"" t_fmt_ampm "" % Denne linjen vil gi f.eks.: -% duorasdat, borgemnu 23. b. 2001 00:47:57 CEST +% duorasdat, borgemnu 23. b. 2001 00:47:57 CEST date_fmt "/ / " diff --git a/sysdeps/generic/endutxent.c b/login/endutxent.c similarity index 100% rename from sysdeps/generic/endutxent.c rename to login/endutxent.c diff --git a/sysdeps/generic/getpt.c b/login/getpt.c similarity index 100% rename from sysdeps/generic/getpt.c rename to login/getpt.c diff --git a/sysdeps/generic/getutmp.c b/login/getutmp.c similarity index 100% rename from sysdeps/generic/getutmp.c rename to login/getutmp.c diff --git a/sysdeps/generic/getutmpx.c b/login/getutmpx.c similarity index 100% rename from sysdeps/generic/getutmpx.c rename to login/getutmpx.c diff --git a/sysdeps/generic/getutxent.c b/login/getutxent.c similarity index 100% rename from sysdeps/generic/getutxent.c rename to login/getutxent.c diff --git a/sysdeps/generic/getutxid.c b/login/getutxid.c similarity index 100% rename from sysdeps/generic/getutxid.c rename to login/getutxid.c diff --git a/sysdeps/generic/getutxline.c b/login/getutxline.c similarity index 100% rename from sysdeps/generic/getutxline.c rename to login/getutxline.c diff --git a/sysdeps/generic/grantpt.c b/login/grantpt.c similarity index 100% rename from sysdeps/generic/grantpt.c rename to login/grantpt.c diff --git a/sysdeps/generic/ptsname.c b/login/ptsname.c similarity index 100% rename from sysdeps/generic/ptsname.c rename to login/ptsname.c diff --git a/sysdeps/generic/pututxline.c b/login/pututxline.c similarity index 100% rename from sysdeps/generic/pututxline.c rename to login/pututxline.c diff --git a/sysdeps/generic/setutxent.c b/login/setutxent.c similarity index 100% rename from sysdeps/generic/setutxent.c rename to login/setutxent.c diff --git a/sysdeps/generic/unlockpt.c b/login/unlockpt.c similarity index 100% rename from sysdeps/generic/unlockpt.c rename to login/unlockpt.c diff --git a/sysdeps/generic/updwtmp.c b/login/updwtmp.c similarity index 100% rename from sysdeps/generic/updwtmp.c rename to login/updwtmp.c diff --git a/sysdeps/generic/updwtmpx.c b/login/updwtmpx.c similarity index 100% rename from sysdeps/generic/updwtmpx.c rename to login/updwtmpx.c diff --git a/sysdeps/generic/utmp_file.c b/login/utmp_file.c similarity index 100% rename from sysdeps/generic/utmp_file.c rename to login/utmp_file.c diff --git a/sysdeps/generic/utmpxname.c b/login/utmpxname.c similarity index 100% rename from sysdeps/generic/utmpxname.c rename to login/utmpxname.c diff --git a/mach/err_kern.sub b/mach/err_kern.sub index e2e498d2b72..ab00ae40f28 100644 --- a/mach/err_kern.sub +++ b/mach/err_kern.sub @@ -24,16 +24,7 @@ * rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.5 1996/12/20 01:32:34 drepper - * Update from main archive 961219 - * - * Revision 1.5 1996/12/19 20:23:39 drepper - * Spelling corrections. - * - * Revision 1.4 1993/12/17 06:14:52 mib - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.3 92/04/01 19:38:02 rpd * Added err_codes_device. diff --git a/mach/err_server.sub b/mach/err_server.sub index 1594246462f..a2f806aa092 100644 --- a/mach/err_server.sub +++ b/mach/err_server.sub @@ -1,48 +1,45 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ /* * HISTORY - * $Log$ - * Revision 1.1 1992/10/06 18:29:53 roland - * entered into RCS * * Revision 2.2 92/01/16 00:10:29 rpd * Moved from user collection to mk collection. - * + * * Revision 2.3 91/08/29 15:51:39 rpd * Fixed err_codes_netname. * [91/08/22 rpd] - * + * * Revision 2.2 91/03/27 16:05:51 mrt * First checkin - * + * * Revision 2.3 90/10/29 17:27:20 dpj * Merged-up to U25 * [90/09/02 20:00:25 dpj] - * + * */ /* * File: err_server.sub @@ -371,4 +368,3 @@ static struct error_subsystem err_server_sub[] = { }, }; - diff --git a/mach/err_us.sub b/mach/err_us.sub index 7261165d8df..184f11d369d 100644 --- a/mach/err_us.sub +++ b/mach/err_us.sub @@ -1,40 +1,37 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ /* * HISTORY - * $Log$ - * Revision 1.2 1993/11/23 21:14:05 mib - * entered into RCS * * Revision 2.2 92/01/16 00:10:45 rpd * Moved from user collection to mk collection. - * + * * Revision 2.2 91/03/27 16:06:06 mrt * First checkin - * + * */ /* * File: err_us.sub @@ -49,8 +46,3 @@ static struct error_subsystem err_us_sub[] = { {0,0,0} }; - - - - - diff --git a/mach/error_compat.c b/mach/error_compat.c index e874dd43d48..8f7bd87c0f9 100644 --- a/mach/error_compat.c +++ b/mach/error_compat.c @@ -1,54 +1,33 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ /* This file was broken out from: - $Log$ - Revision 1.2 1997/03/16 17:41:36 drepper - (__mach_error_map_compat): Give full prototype. - - Revision 1.2 1997/03/14 15:26:28 thomas - Wed Mar 5 10:40:05 1997 Thomas Bushnell, n/BSG - - * mach/mach_error.c (mach_error_string_int): Give full prototype. - * mach/errstring.c (mach_error_string_int): Likewise. - * mach/error_compat.c (__mach_error_map_compat): Likewise. - - * mach/spin-solid.c: Include . - * mach/spin-solid.c (__spin_lock_solid): Provide arg to - swtch_pri. - - * mach/mach_init.c: Include . - - * mach/mach_error.h (mach_error_string, mach_error, - mach_error_type): Always provide prototypes. - - Revision 1.1 1993/11/30 17:35:24 roland - entered into RCS Revision 2.3 92/04/01 19:38:18 rpd + The static do_compat function is renamed to be globally accessible. */ @@ -62,9 +41,9 @@ __mach_error_map_compat(mach_error_t *org_err) { mach_error_t err = *org_err; - /* - * map old error numbers to - * to new error sys & subsystem + /* + * map old error numbers to + * to new error sys & subsystem */ if ((-200 < err) && (err <= -100)) diff --git a/mach/errorlib.h b/mach/errorlib.h index 7fe6350b434..ff0c55eb364 100644 --- a/mach/errorlib.h +++ b/mach/errorlib.h @@ -1,47 +1,41 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.5 1995/03/10 23:57:44 roland - * (errors): Use const for decl. - * - * Revision 1.4 1993/12/17 21:56:16 roland - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.3 92/03/31 15:18:52 rpd * Added KERN_DEVICE_MOD for device errors. * [92/03/09 rpd] - * + * * Revision 2.2 92/01/16 00:21:17 rpd * Moved from user collection to mk collection. - * + * * Revision 2.2 91/03/27 15:37:37 mrt * First checkin - * + * */ /* * File: errorlib.h diff --git a/mach/errstring.c b/mach/errstring.c index e56fa728cc2..52cf1eb46ef 100644 --- a/mach/errstring.c +++ b/mach/errstring.c @@ -1,62 +1,40 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.2 1997/03/16 17:41:48 drepper - * (mach_error_string_int): Give full prototype. - * - * Revision 1.2 1997/03/14 15:26:29 thomas - * Wed Mar 5 10:40:05 1997 Thomas Bushnell, n/BSG - * - * * mach/mach_error.c (mach_error_string_int): Give full prototype. - * * mach/errstring.c (mach_error_string_int): Likewise. - * * mach/error_compat.c (__mach_error_map_compat): Likewise. - * - * * mach/spin-solid.c: Include . - * * mach/spin-solid.c (__spin_lock_solid): Provide arg to - * swtch_pri. - * - * * mach/mach_init.c: Include . - * - * * mach/mach_error.h (mach_error_string, mach_error, - * mach_error_type): Always provide prototypes. - * - * Revision 1.1 1993/11/30 17:35:58 roland - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.3 92/04/01 19:38:18 rpd * Updated do_compat for kernel device errors, * bootstrap file-system errors. * [92/03/09 rpd] - * + * * Revision 2.2 92/02/20 15:58:08 elf * Created from mach_error.c. * [92/02/11 rpd] - * + * */ #define EXPORT_BOOLEAN diff --git a/mach/mach/error.h b/mach/mach/error.h index 70f189f65e1..084d8afd377 100644 --- a/mach/mach/error.h +++ b/mach/mach/error.h @@ -25,28 +25,7 @@ * the rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.3 1997/03/16 17:43:08 drepper - * (mach_error_fn_t): Comment out declaration; it appears to be entirely - * unused dead code. - * - * Revision 1.3 1997/03/14 15:27:35 thomas - * Wed Mar 5 10:40:05 1997 Thomas Bushnell, n/BSG - * - * * mach/mach/mach_traps.h: Include . - * - * * mach/mach/error.h (mach_error_fn_t): Comment out declaration; it - * appears to be entirely unused dead code. - * - * Revision 1.2 1996/12/20 01:32:36 drepper - * Update from main archive 961219 - * - * Revision 1.2 1996/12/19 20:23:56 drepper - * Spelling corrections. - * - * Revision 1.1 1993/12/17 21:40:28 roland - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.6 93/01/14 17:41:31 danner * Standardized include symbol name. diff --git a/mach/mach_error.c b/mach/mach_error.c index f6f945fd73b..8bbb2ec74e8 100644 --- a/mach/mach_error.c +++ b/mach/mach_error.c @@ -1,73 +1,51 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.2 1997/03/16 17:42:02 drepper - * (mach_error_string_int): Give full prototype. - * - * Revision 1.2 1997/03/14 15:26:30 thomas - * Wed Mar 5 10:40:05 1997 Thomas Bushnell, n/BSG - * - * * mach/mach_error.c (mach_error_string_int): Give full prototype. - * * mach/errstring.c (mach_error_string_int): Likewise. - * * mach/error_compat.c (__mach_error_map_compat): Likewise. - * - * * mach/spin-solid.c: Include . - * * mach/spin-solid.c (__spin_lock_solid): Provide arg to - * swtch_pri. - * - * * mach/mach_init.c: Include . - * - * * mach/mach_error.h (mach_error_string, mach_error, - * mach_error_type): Always provide prototypes. - * - * Revision 1.1 1992/10/06 18:29:54 roland - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.4 92/02/19 15:10:52 elf * Moved mach_error_string and mach_error_type to mach_error_string.c. * [92/02/11 rpd] - * + * * Revision 2.3 92/01/23 15:22:06 rpd * Changed to . * [92/01/16 rpd] - * + * * Revision 2.2 92/01/16 00:08:03 rpd * Moved from user collection to mk collection. - * + * * Revision 2.3 91/08/29 15:51:50 rpd * Changed IPC_MIG_MOD to MACH_IPC_MIG_MOD, to get the new error strings. * [91/08/22 rpd] - * + * * Revision 2.2 91/03/27 16:06:29 mrt * Changed include of "errorlib.h" to * Added new copyright * [91/03/20 mrt] - * + * */ /* * File: mach_error.c @@ -85,7 +63,7 @@ extern char * mach_error_string_int(mach_error_t, boolean_t *); void -mach_error( str, err ) +mach_error( str, err ) char *str; mach_error_t err; { diff --git a/mach/mach_error.h b/mach/mach_error.h index 78f7c526ea8..fc4a3fed7e6 100644 --- a/mach/mach_error.h +++ b/mach/mach_error.h @@ -24,38 +24,7 @@ * rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.4 2001/04/01 05:03:14 roland - * 2001-03-11 Roland McGrath - * - * * mach/mach_error.h: Fix ancient #endif syntax. - * * hurd/hurdmalloc.c: Likewise. - * - * Revision 1.3 1997/03/16 17:42:25 drepper - * (mach_error_string, mach_error, mach_error_type): Always provide - * prototypes. - * (mach_error_fn_t): Comment out declaration; it appears to be entirely - * unused dead code. - * - * Revision 1.3 1997/03/14 15:26:31 thomas - * Wed Mar 5 10:40:05 1997 Thomas Bushnell, n/BSG - * - * * mach/mach_error.c (mach_error_string_int): Give full prototype. - * * mach/errstring.c (mach_error_string_int): Likewise. - * * mach/error_compat.c (__mach_error_map_compat): Likewise. - * - * * mach/spin-solid.c: Include . - * * mach/spin-solid.c (__spin_lock_solid): Provide arg to - * swtch_pri. - * - * * mach/mach_init.c: Include . - * - * * mach/mach_error.h (mach_error_string, mach_error, - * mach_error_type): Always provide prototypes. - * - * Revision 1.2 1993/11/23 20:39:08 mib - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.2 92/01/16 00:08:10 rpd * Moved from user collection to mk collection. diff --git a/sysdeps/generic/mig-reply.c b/mach/mig-reply.c similarity index 100% rename from sysdeps/generic/mig-reply.c rename to mach/mig-reply.c diff --git a/mach/msg-destroy.c b/mach/msg-destroy.c index 9ecbdc05120..19f96d4e218 100644 --- a/mach/msg-destroy.c +++ b/mach/msg-destroy.c @@ -24,36 +24,7 @@ * the rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.6 2002/02/17 07:13:36 roland - * 2002-02-16 Roland McGrath - * - * * mach/msg-destroy.c (__mach_msg_destroy) [MACH_MSG_PORT_DESCRIPTOR]: - * Grok the OSF flavor of message format. - * (mach_msg_destroy_port): For MAKE_SEND and - * MAKE_SEND_ONCE rights, create an destroy a right to ensure proper - * no-senders notification. - * - * Revision 1.5 1997/06/21 01:40:07 drepper - * More 64bit changes. - * - * Revision 1.4 1996/11/15 19:44:43 thomas - * Tue Nov 12 16:58:41 1996 Thomas Bushnell, n/BSG - * - * * mach/mach.h (__mach_msg_destroy, mach_msg_destroy, __mach_msg): - * Provide prototypes. - * - * * mach/msg-destroy.c (mach_msg_destroy_port, - * mach_msg_destroy_memory): Use prototype syntax. - * * hurd/hurdmalloc.c (more_memory, malloc_fork_prepare, - * malloc_fork_parent, malloc_fork_child): Likewise. - * - * Revision 1.3 1995/01/23 22:16:52 roland - * (mach_msg_destroy): Define as weak alias for __mach_msg_destroy. - * - * Revision 1.2 1993/08/03 06:13:18 roland - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.4 91/05/14 17:53:15 mrt * Correcting copyright diff --git a/mach/msgserver.c b/mach/msgserver.c index 82dc3d0c8fd..9478ae1914a 100644 --- a/mach/msgserver.c +++ b/mach/msgserver.c @@ -47,45 +47,7 @@ * the rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.9 2002/02/18 20:56:35 roland - * 2002-02-18 Roland McGrath - * - * * mach/msgserver.c (__mach_msg_server_timeout) [! MACH_RCV_LARGE]: - * Double MAX_SIZE and don't retry on MACH_RCV_TOO_LARGE. - * - * Revision 1.8 2002/02/17 07:13:32 roland - * 2002-02-16 Roland McGrath - * - * * mach/msgserver.c [NDR_CHAR_ASCII] (mig_reply_header_t): #define as - * mig_reply_error_t for OSF Mach variant. - * - * Revision 1.7 2001/07/06 04:55:34 aj - * Update to LGPL v2.1. - * - * Revision 1.6 2001/04/09 21:23:38 roland - * 2001-04-07 Roland McGrath - * - * * mach/msgserver.c (__mach_msg_server_timeout): Add an assert. - * - * Revision 1.5 1996/12/20 01:32:35 drepper - * Update from main archive 961219 - * - * Revision 1.5 1996/12/19 20:23:45 drepper - * Spelling corrections. - * - * Revision 1.4 1996/01/29 15:44:23 roland - * Declare DEMUX arg with prototype. - * - * Revision 1.3 1995/01/21 15:00:57 roland - * Converted to use weak aliases with macros from libc-symbols.h. - * - * Revision 1.2 1994/10/10 07:20:14 roland - * Increase default MAX_SIZE to two pages. - * - * Revision 1.1 1993/12/06 23:25:25 roland - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.4 91/05/14 17:53:22 mrt * Correcting copyright diff --git a/malloc/arena.c b/malloc/arena.c index abbca1f02e7..d0d223e94e4 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -18,8 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id$ */ - #include /* Compile-time constants. */ diff --git a/malloc/hooks.c b/malloc/hooks.c index 5dd2d65e620..708f0faf831 100644 --- a/malloc/hooks.c +++ b/malloc/hooks.c @@ -18,8 +18,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id$ */ - /* What to do if the standard debugging hooks are in place and a corrupt pointer is detected: do nothing (0), print an error message (1), or call abort() (2). */ diff --git a/malloc/malloc.c b/malloc/malloc.c index f9aa5b1226f..7730963637f 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -24,7 +24,6 @@ Doug Lea and adapted to multiple threads/arenas by Wolfram Gloger. * Version ptmalloc2-20011215 - $Id$ based on: VERSION 2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee) diff --git a/malloc/memusagestat.c b/malloc/memusagestat.c index b1cad9b2511..91e00af6d44 100644 --- a/malloc/memusagestat.c +++ b/malloc/memusagestat.c @@ -1,22 +1,20 @@ /* Generate graphic from memory profiling data. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define _FILE_OFFSET_BITS 64 @@ -311,7 +309,7 @@ main (int argc, char *argv[]) (maxsize_heap / heap_scale); gdImageDashedLine (im_out, 40, ysize - 20 - cnt, xsize - 40, ysize - 20 - cnt, red); - snprintf (buf, sizeof (buf), heap_format, maxsize_heap / 4 * line / + snprintf (buf, sizeof (buf), heap_format, maxsize_heap / 4 * line / heap_scale); gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6, ysize - 26 - cnt, buf, red); diff --git a/sysdeps/generic/morecore.c b/malloc/morecore.c similarity index 100% rename from sysdeps/generic/morecore.c rename to malloc/morecore.c diff --git a/malloc/tst-mallocfork.c b/malloc/tst-mallocfork.c index abbc9d83b6b..f90ce948873 100644 --- a/malloc/tst-mallocfork.c +++ b/malloc/tst-mallocfork.c @@ -22,9 +22,8 @@ do_test (void) { pid_t parent = getpid (); - struct sigaction action; + struct sigaction action = { .sa_handler = sig_handler }; sigemptyset (&action.sa_mask); - action.sa_handler = sig_handler; malloc (sizeof (int)); diff --git a/manual/dir b/manual/dir index f5920b12be3..ee98f79f59b 100644 --- a/manual/dir +++ b/manual/dir @@ -1,4 +1,3 @@ -$Id$ This is the file .../info/dir, which contains the topmost node of the Info hierarchy. The first time you invoke Info you start off looking at that node, which is (dir)Top. diff --git a/manual/install.texi b/manual/install.texi index dee5c9b6b64..b538f77fb2d 100644 --- a/manual/install.texi +++ b/manual/install.texi @@ -357,11 +357,10 @@ understand all the tags used in the document, and the installation mechanism for the info files is not present or works differently. @item -GNU @code{awk} 3.0, or some other POSIX awk +GNU @code{awk} 3.0, or higher -@code{Awk} is used in several places to generate files. The scripts -should work with any POSIX-compliant @code{awk} implementation; -@code{gawk} 3.0 and @code{mawk} 1.3 are known to work. +@code{Awk} is used in several places to generate files. +@code{gawk} 3.0 is known to work. @item Perl 5 diff --git a/manual/stdio.texi b/manual/stdio.texi index 29de41a1675..e4278b7a32f 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -4852,8 +4852,9 @@ Got r @comment GNU @deftypefun {FILE *} open_memstream (char **@var{ptr}, size_t *@var{sizeloc}) This function opens a stream for writing to a buffer. The buffer is -allocated dynamically (as with @code{malloc}; @pxref{Unconstrained -Allocation}) and grown as necessary. +allocated dynamically and grown as necessary, using @code{malloc}. +After you've closed the stream, this buffer is your responsibility to +clean up using @code{free} or @code{realloc}. @xref{Unconstrained Allocation}. When the stream is closed with @code{fclose} or flushed with @code{fflush}, the locations @var{ptr} and @var{sizeloc} are updated to diff --git a/sysdeps/generic/cabsf.c b/math/cabsf.c similarity index 100% rename from sysdeps/generic/cabsf.c rename to math/cabsf.c diff --git a/sysdeps/generic/cargf.c b/math/cargf.c similarity index 100% rename from sysdeps/generic/cargf.c rename to math/cargf.c diff --git a/sysdeps/generic/cimagf.c b/math/cimagf.c similarity index 100% rename from sysdeps/generic/cimagf.c rename to math/cimagf.c diff --git a/sysdeps/generic/conjf.c b/math/conjf.c similarity index 100% rename from sysdeps/generic/conjf.c rename to math/conjf.c diff --git a/sysdeps/generic/crealf.c b/math/crealf.c similarity index 100% rename from sysdeps/generic/crealf.c rename to math/crealf.c diff --git a/sysdeps/generic/e_acoshl.c b/math/e_acoshl.c similarity index 100% rename from sysdeps/generic/e_acoshl.c rename to math/e_acoshl.c diff --git a/sysdeps/generic/e_acosl.c b/math/e_acosl.c similarity index 100% rename from sysdeps/generic/e_acosl.c rename to math/e_acosl.c diff --git a/sysdeps/generic/e_asinl.c b/math/e_asinl.c similarity index 100% rename from sysdeps/generic/e_asinl.c rename to math/e_asinl.c diff --git a/sysdeps/generic/e_atan2l.c b/math/e_atan2l.c similarity index 100% rename from sysdeps/generic/e_atan2l.c rename to math/e_atan2l.c diff --git a/sysdeps/generic/e_atanhl.c b/math/e_atanhl.c similarity index 100% rename from sysdeps/generic/e_atanhl.c rename to math/e_atanhl.c diff --git a/sysdeps/generic/e_coshl.c b/math/e_coshl.c similarity index 100% rename from sysdeps/generic/e_coshl.c rename to math/e_coshl.c diff --git a/sysdeps/generic/e_exp10.c b/math/e_exp10.c similarity index 100% rename from sysdeps/generic/e_exp10.c rename to math/e_exp10.c diff --git a/sysdeps/generic/e_exp10f.c b/math/e_exp10f.c similarity index 100% rename from sysdeps/generic/e_exp10f.c rename to math/e_exp10f.c diff --git a/sysdeps/generic/e_exp10l.c b/math/e_exp10l.c similarity index 100% rename from sysdeps/generic/e_exp10l.c rename to math/e_exp10l.c diff --git a/sysdeps/generic/e_exp2l.c b/math/e_exp2l.c similarity index 100% rename from sysdeps/generic/e_exp2l.c rename to math/e_exp2l.c diff --git a/sysdeps/generic/e_expl.c b/math/e_expl.c similarity index 100% rename from sysdeps/generic/e_expl.c rename to math/e_expl.c diff --git a/sysdeps/generic/e_fmodl.c b/math/e_fmodl.c similarity index 100% rename from sysdeps/generic/e_fmodl.c rename to math/e_fmodl.c diff --git a/sysdeps/generic/e_gammal_r.c b/math/e_gammal_r.c similarity index 100% rename from sysdeps/generic/e_gammal_r.c rename to math/e_gammal_r.c diff --git a/sysdeps/generic/e_hypotl.c b/math/e_hypotl.c similarity index 100% rename from sysdeps/generic/e_hypotl.c rename to math/e_hypotl.c diff --git a/sysdeps/generic/e_j0l.c b/math/e_j0l.c similarity index 100% rename from sysdeps/generic/e_j0l.c rename to math/e_j0l.c diff --git a/sysdeps/generic/e_j1l.c b/math/e_j1l.c similarity index 100% rename from sysdeps/generic/e_j1l.c rename to math/e_j1l.c diff --git a/sysdeps/generic/e_jnl.c b/math/e_jnl.c similarity index 100% rename from sysdeps/generic/e_jnl.c rename to math/e_jnl.c diff --git a/sysdeps/generic/e_lgammal_r.c b/math/e_lgammal_r.c similarity index 100% rename from sysdeps/generic/e_lgammal_r.c rename to math/e_lgammal_r.c diff --git a/sysdeps/generic/e_log10l.c b/math/e_log10l.c similarity index 100% rename from sysdeps/generic/e_log10l.c rename to math/e_log10l.c diff --git a/sysdeps/generic/e_log2l.c b/math/e_log2l.c similarity index 100% rename from sysdeps/generic/e_log2l.c rename to math/e_log2l.c diff --git a/sysdeps/generic/e_logl.c b/math/e_logl.c similarity index 100% rename from sysdeps/generic/e_logl.c rename to math/e_logl.c diff --git a/sysdeps/generic/e_powl.c b/math/e_powl.c similarity index 100% rename from sysdeps/generic/e_powl.c rename to math/e_powl.c diff --git a/sysdeps/generic/e_rem_pio2l.c b/math/e_rem_pio2l.c similarity index 100% rename from sysdeps/generic/e_rem_pio2l.c rename to math/e_rem_pio2l.c diff --git a/sysdeps/generic/e_scalb.c b/math/e_scalb.c similarity index 98% rename from sysdeps/generic/e_scalb.c rename to math/e_scalb.c index a7664db5465..606af537245 100644 --- a/sysdeps/generic/e_scalb.c +++ b/math/e_scalb.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: e_scalb.c,v 1.6 1995/05/10 20:46:09 jtc Exp $"; */ #include -#include "math.h" +#include #include "math_private.h" #ifdef _SCALB_INT diff --git a/sysdeps/generic/e_scalbf.c b/math/e_scalbf.c similarity index 98% rename from sysdeps/generic/e_scalbf.c rename to math/e_scalbf.c index 5c6326bc16e..95a72eb56de 100644 --- a/sysdeps/generic/e_scalbf.c +++ b/math/e_scalbf.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: e_scalbf.c,v 1.3 1995/05/10 20:46:12 jtc Exp $"; #endif #include -#include "math.h" +#include #include "math_private.h" #ifdef _SCALB_INT diff --git a/sysdeps/generic/e_scalbl.c b/math/e_scalbl.c similarity index 98% rename from sysdeps/generic/e_scalbl.c rename to math/e_scalbl.c index a34369c0b51..1f5677d9f4f 100644 --- a/sysdeps/generic/e_scalbl.c +++ b/math/e_scalbl.c @@ -25,7 +25,7 @@ static char rcsid[] = "$NetBSD: $"; */ #include -#include "math.h" +#include #include "math_private.h" #ifdef _SCALB_INT diff --git a/sysdeps/generic/e_sinhl.c b/math/e_sinhl.c similarity index 100% rename from sysdeps/generic/e_sinhl.c rename to math/e_sinhl.c diff --git a/sysdeps/generic/e_sqrtl.c b/math/e_sqrtl.c similarity index 100% rename from sysdeps/generic/e_sqrtl.c rename to math/e_sqrtl.c diff --git a/sysdeps/generic/fclrexcpt.c b/math/fclrexcpt.c similarity index 100% rename from sysdeps/generic/fclrexcpt.c rename to math/fclrexcpt.c diff --git a/sysdeps/generic/fedisblxcpt.c b/math/fedisblxcpt.c similarity index 100% rename from sysdeps/generic/fedisblxcpt.c rename to math/fedisblxcpt.c diff --git a/sysdeps/generic/feenablxcpt.c b/math/feenablxcpt.c similarity index 100% rename from sysdeps/generic/feenablxcpt.c rename to math/feenablxcpt.c diff --git a/sysdeps/generic/fegetenv.c b/math/fegetenv.c similarity index 100% rename from sysdeps/generic/fegetenv.c rename to math/fegetenv.c diff --git a/sysdeps/generic/fegetexcept.c b/math/fegetexcept.c similarity index 100% rename from sysdeps/generic/fegetexcept.c rename to math/fegetexcept.c diff --git a/sysdeps/generic/fegetround.c b/math/fegetround.c similarity index 100% rename from sysdeps/generic/fegetround.c rename to math/fegetround.c diff --git a/sysdeps/generic/feholdexcpt.c b/math/feholdexcpt.c similarity index 100% rename from sysdeps/generic/feholdexcpt.c rename to math/feholdexcpt.c diff --git a/sysdeps/generic/fesetenv.c b/math/fesetenv.c similarity index 100% rename from sysdeps/generic/fesetenv.c rename to math/fesetenv.c diff --git a/sysdeps/generic/fesetround.c b/math/fesetround.c similarity index 100% rename from sysdeps/generic/fesetround.c rename to math/fesetround.c diff --git a/sysdeps/generic/feupdateenv.c b/math/feupdateenv.c similarity index 100% rename from sysdeps/generic/feupdateenv.c rename to math/feupdateenv.c diff --git a/sysdeps/generic/fgetexcptflg.c b/math/fgetexcptflg.c similarity index 100% rename from sysdeps/generic/fgetexcptflg.c rename to math/fgetexcptflg.c diff --git a/sysdeps/generic/fpu_control.c b/math/fpu_control.c similarity index 100% rename from sysdeps/generic/fpu_control.c rename to math/fpu_control.c diff --git a/sysdeps/generic/fraiseexcpt.c b/math/fraiseexcpt.c similarity index 100% rename from sysdeps/generic/fraiseexcpt.c rename to math/fraiseexcpt.c diff --git a/sysdeps/generic/fsetexcptflg.c b/math/fsetexcptflg.c similarity index 100% rename from sysdeps/generic/fsetexcptflg.c rename to math/fsetexcptflg.c diff --git a/sysdeps/generic/ftestexcept.c b/math/ftestexcept.c similarity index 100% rename from sysdeps/generic/ftestexcept.c rename to math/ftestexcept.c diff --git a/sysdeps/generic/k_cosl.c b/math/k_cosl.c similarity index 100% rename from sysdeps/generic/k_cosl.c rename to math/k_cosl.c diff --git a/sysdeps/generic/k_rem_pio2l.c b/math/k_rem_pio2l.c similarity index 100% rename from sysdeps/generic/k_rem_pio2l.c rename to math/k_rem_pio2l.c diff --git a/sysdeps/generic/k_sincosl.c b/math/k_sincosl.c similarity index 100% rename from sysdeps/generic/k_sincosl.c rename to math/k_sincosl.c diff --git a/sysdeps/generic/k_sinl.c b/math/k_sinl.c similarity index 100% rename from sysdeps/generic/k_sinl.c rename to math/k_sinl.c diff --git a/sysdeps/generic/k_tanl.c b/math/k_tanl.c similarity index 100% rename from sysdeps/generic/k_tanl.c rename to math/k_tanl.c diff --git a/math/math_private.h b/math/math_private.h index a6a85d3b1ec..572e5468314 100644 --- a/math/math_private.h +++ b/math/math_private.h @@ -11,7 +11,6 @@ /* * from: @(#)fdlibm.h 5.1 93/09/24 - * $Id$ */ #ifndef _MATH_PRIVATE_H_ diff --git a/sysdeps/generic/s_asinhl.c b/math/s_asinhl.c similarity index 100% rename from sysdeps/generic/s_asinhl.c rename to math/s_asinhl.c diff --git a/sysdeps/generic/s_atanl.c b/math/s_atanl.c similarity index 100% rename from sysdeps/generic/s_atanl.c rename to math/s_atanl.c diff --git a/sysdeps/generic/s_cacos.c b/math/s_cacos.c similarity index 100% rename from sysdeps/generic/s_cacos.c rename to math/s_cacos.c diff --git a/sysdeps/generic/s_cacosf.c b/math/s_cacosf.c similarity index 100% rename from sysdeps/generic/s_cacosf.c rename to math/s_cacosf.c diff --git a/sysdeps/generic/s_cacosh.c b/math/s_cacosh.c similarity index 100% rename from sysdeps/generic/s_cacosh.c rename to math/s_cacosh.c diff --git a/sysdeps/generic/s_cacoshf.c b/math/s_cacoshf.c similarity index 100% rename from sysdeps/generic/s_cacoshf.c rename to math/s_cacoshf.c diff --git a/sysdeps/generic/s_cacoshl.c b/math/s_cacoshl.c similarity index 100% rename from sysdeps/generic/s_cacoshl.c rename to math/s_cacoshl.c diff --git a/sysdeps/generic/s_cacosl.c b/math/s_cacosl.c similarity index 100% rename from sysdeps/generic/s_cacosl.c rename to math/s_cacosl.c diff --git a/sysdeps/generic/s_casin.c b/math/s_casin.c similarity index 100% rename from sysdeps/generic/s_casin.c rename to math/s_casin.c diff --git a/sysdeps/generic/s_casinf.c b/math/s_casinf.c similarity index 100% rename from sysdeps/generic/s_casinf.c rename to math/s_casinf.c diff --git a/sysdeps/generic/s_casinh.c b/math/s_casinh.c similarity index 100% rename from sysdeps/generic/s_casinh.c rename to math/s_casinh.c diff --git a/sysdeps/generic/s_casinhf.c b/math/s_casinhf.c similarity index 100% rename from sysdeps/generic/s_casinhf.c rename to math/s_casinhf.c diff --git a/sysdeps/generic/s_casinhl.c b/math/s_casinhl.c similarity index 100% rename from sysdeps/generic/s_casinhl.c rename to math/s_casinhl.c diff --git a/sysdeps/generic/s_casinl.c b/math/s_casinl.c similarity index 100% rename from sysdeps/generic/s_casinl.c rename to math/s_casinl.c diff --git a/sysdeps/generic/s_catan.c b/math/s_catan.c similarity index 100% rename from sysdeps/generic/s_catan.c rename to math/s_catan.c diff --git a/sysdeps/generic/s_catanf.c b/math/s_catanf.c similarity index 100% rename from sysdeps/generic/s_catanf.c rename to math/s_catanf.c diff --git a/sysdeps/generic/s_catanh.c b/math/s_catanh.c similarity index 100% rename from sysdeps/generic/s_catanh.c rename to math/s_catanh.c diff --git a/sysdeps/generic/s_catanhf.c b/math/s_catanhf.c similarity index 100% rename from sysdeps/generic/s_catanhf.c rename to math/s_catanhf.c diff --git a/sysdeps/generic/s_catanhl.c b/math/s_catanhl.c similarity index 100% rename from sysdeps/generic/s_catanhl.c rename to math/s_catanhl.c diff --git a/sysdeps/generic/s_catanl.c b/math/s_catanl.c similarity index 100% rename from sysdeps/generic/s_catanl.c rename to math/s_catanl.c diff --git a/sysdeps/generic/s_cbrtl.c b/math/s_cbrtl.c similarity index 100% rename from sysdeps/generic/s_cbrtl.c rename to math/s_cbrtl.c diff --git a/sysdeps/generic/s_ccos.c b/math/s_ccos.c similarity index 100% rename from sysdeps/generic/s_ccos.c rename to math/s_ccos.c diff --git a/sysdeps/generic/s_ccosf.c b/math/s_ccosf.c similarity index 100% rename from sysdeps/generic/s_ccosf.c rename to math/s_ccosf.c diff --git a/sysdeps/generic/s_ccosh.c b/math/s_ccosh.c similarity index 100% rename from sysdeps/generic/s_ccosh.c rename to math/s_ccosh.c diff --git a/sysdeps/generic/s_ccoshf.c b/math/s_ccoshf.c similarity index 100% rename from sysdeps/generic/s_ccoshf.c rename to math/s_ccoshf.c diff --git a/sysdeps/generic/s_ccoshl.c b/math/s_ccoshl.c similarity index 100% rename from sysdeps/generic/s_ccoshl.c rename to math/s_ccoshl.c diff --git a/sysdeps/generic/s_ccosl.c b/math/s_ccosl.c similarity index 100% rename from sysdeps/generic/s_ccosl.c rename to math/s_ccosl.c diff --git a/sysdeps/generic/s_cexp.c b/math/s_cexp.c similarity index 100% rename from sysdeps/generic/s_cexp.c rename to math/s_cexp.c diff --git a/sysdeps/generic/s_cexpf.c b/math/s_cexpf.c similarity index 100% rename from sysdeps/generic/s_cexpf.c rename to math/s_cexpf.c diff --git a/sysdeps/generic/s_cexpl.c b/math/s_cexpl.c similarity index 100% rename from sysdeps/generic/s_cexpl.c rename to math/s_cexpl.c diff --git a/sysdeps/generic/s_clog.c b/math/s_clog.c similarity index 100% rename from sysdeps/generic/s_clog.c rename to math/s_clog.c diff --git a/sysdeps/generic/s_clog10.c b/math/s_clog10.c similarity index 100% rename from sysdeps/generic/s_clog10.c rename to math/s_clog10.c diff --git a/sysdeps/generic/s_clog10f.c b/math/s_clog10f.c similarity index 100% rename from sysdeps/generic/s_clog10f.c rename to math/s_clog10f.c diff --git a/sysdeps/generic/s_clog10l.c b/math/s_clog10l.c similarity index 100% rename from sysdeps/generic/s_clog10l.c rename to math/s_clog10l.c diff --git a/sysdeps/generic/s_clogf.c b/math/s_clogf.c similarity index 100% rename from sysdeps/generic/s_clogf.c rename to math/s_clogf.c diff --git a/sysdeps/generic/s_clogl.c b/math/s_clogl.c similarity index 100% rename from sysdeps/generic/s_clogl.c rename to math/s_clogl.c diff --git a/sysdeps/generic/s_cpow.c b/math/s_cpow.c similarity index 100% rename from sysdeps/generic/s_cpow.c rename to math/s_cpow.c diff --git a/sysdeps/generic/s_cpowf.c b/math/s_cpowf.c similarity index 100% rename from sysdeps/generic/s_cpowf.c rename to math/s_cpowf.c diff --git a/sysdeps/generic/s_cpowl.c b/math/s_cpowl.c similarity index 100% rename from sysdeps/generic/s_cpowl.c rename to math/s_cpowl.c diff --git a/sysdeps/generic/s_cproj.c b/math/s_cproj.c similarity index 100% rename from sysdeps/generic/s_cproj.c rename to math/s_cproj.c diff --git a/sysdeps/generic/s_cprojf.c b/math/s_cprojf.c similarity index 100% rename from sysdeps/generic/s_cprojf.c rename to math/s_cprojf.c diff --git a/sysdeps/generic/s_cprojl.c b/math/s_cprojl.c similarity index 100% rename from sysdeps/generic/s_cprojl.c rename to math/s_cprojl.c diff --git a/sysdeps/generic/s_csin.c b/math/s_csin.c similarity index 100% rename from sysdeps/generic/s_csin.c rename to math/s_csin.c diff --git a/sysdeps/generic/s_csinf.c b/math/s_csinf.c similarity index 100% rename from sysdeps/generic/s_csinf.c rename to math/s_csinf.c diff --git a/sysdeps/generic/s_csinh.c b/math/s_csinh.c similarity index 100% rename from sysdeps/generic/s_csinh.c rename to math/s_csinh.c diff --git a/sysdeps/generic/s_csinhf.c b/math/s_csinhf.c similarity index 100% rename from sysdeps/generic/s_csinhf.c rename to math/s_csinhf.c diff --git a/sysdeps/generic/s_csinhl.c b/math/s_csinhl.c similarity index 100% rename from sysdeps/generic/s_csinhl.c rename to math/s_csinhl.c diff --git a/sysdeps/generic/s_csinl.c b/math/s_csinl.c similarity index 100% rename from sysdeps/generic/s_csinl.c rename to math/s_csinl.c diff --git a/sysdeps/generic/s_csqrt.c b/math/s_csqrt.c similarity index 100% rename from sysdeps/generic/s_csqrt.c rename to math/s_csqrt.c diff --git a/sysdeps/generic/s_csqrtf.c b/math/s_csqrtf.c similarity index 100% rename from sysdeps/generic/s_csqrtf.c rename to math/s_csqrtf.c diff --git a/sysdeps/generic/s_csqrtl.c b/math/s_csqrtl.c similarity index 100% rename from sysdeps/generic/s_csqrtl.c rename to math/s_csqrtl.c diff --git a/sysdeps/generic/s_ctan.c b/math/s_ctan.c similarity index 100% rename from sysdeps/generic/s_ctan.c rename to math/s_ctan.c diff --git a/sysdeps/generic/s_ctanf.c b/math/s_ctanf.c similarity index 100% rename from sysdeps/generic/s_ctanf.c rename to math/s_ctanf.c diff --git a/sysdeps/generic/s_ctanh.c b/math/s_ctanh.c similarity index 100% rename from sysdeps/generic/s_ctanh.c rename to math/s_ctanh.c diff --git a/sysdeps/generic/s_ctanhf.c b/math/s_ctanhf.c similarity index 100% rename from sysdeps/generic/s_ctanhf.c rename to math/s_ctanhf.c diff --git a/sysdeps/generic/s_ctanhl.c b/math/s_ctanhl.c similarity index 100% rename from sysdeps/generic/s_ctanhl.c rename to math/s_ctanhl.c diff --git a/sysdeps/generic/s_ctanl.c b/math/s_ctanl.c similarity index 100% rename from sysdeps/generic/s_ctanl.c rename to math/s_ctanl.c diff --git a/sysdeps/generic/s_erfl.c b/math/s_erfl.c similarity index 100% rename from sysdeps/generic/s_erfl.c rename to math/s_erfl.c diff --git a/sysdeps/generic/s_expm1l.c b/math/s_expm1l.c similarity index 100% rename from sysdeps/generic/s_expm1l.c rename to math/s_expm1l.c diff --git a/sysdeps/generic/s_fdim.c b/math/s_fdim.c similarity index 100% rename from sysdeps/generic/s_fdim.c rename to math/s_fdim.c diff --git a/sysdeps/generic/s_fdimf.c b/math/s_fdimf.c similarity index 100% rename from sysdeps/generic/s_fdimf.c rename to math/s_fdimf.c diff --git a/sysdeps/generic/s_fdiml.c b/math/s_fdiml.c similarity index 100% rename from sysdeps/generic/s_fdiml.c rename to math/s_fdiml.c diff --git a/sysdeps/generic/s_fma.c b/math/s_fma.c similarity index 100% rename from sysdeps/generic/s_fma.c rename to math/s_fma.c diff --git a/sysdeps/generic/s_fmaf.c b/math/s_fmaf.c similarity index 100% rename from sysdeps/generic/s_fmaf.c rename to math/s_fmaf.c diff --git a/sysdeps/generic/s_fmal.c b/math/s_fmal.c similarity index 100% rename from sysdeps/generic/s_fmal.c rename to math/s_fmal.c diff --git a/sysdeps/generic/s_fmax.c b/math/s_fmax.c similarity index 100% rename from sysdeps/generic/s_fmax.c rename to math/s_fmax.c diff --git a/sysdeps/generic/s_fmaxf.c b/math/s_fmaxf.c similarity index 100% rename from sysdeps/generic/s_fmaxf.c rename to math/s_fmaxf.c diff --git a/sysdeps/generic/s_fmaxl.c b/math/s_fmaxl.c similarity index 100% rename from sysdeps/generic/s_fmaxl.c rename to math/s_fmaxl.c diff --git a/sysdeps/generic/s_fmin.c b/math/s_fmin.c similarity index 100% rename from sysdeps/generic/s_fmin.c rename to math/s_fmin.c diff --git a/sysdeps/generic/s_fminf.c b/math/s_fminf.c similarity index 100% rename from sysdeps/generic/s_fminf.c rename to math/s_fminf.c diff --git a/sysdeps/generic/s_fminl.c b/math/s_fminl.c similarity index 100% rename from sysdeps/generic/s_fminl.c rename to math/s_fminl.c diff --git a/sysdeps/generic/s_ldexp.c b/math/s_ldexp.c similarity index 98% rename from sysdeps/generic/s_ldexp.c rename to math/s_ldexp.c index 12c336fad49..62e123cd01a 100644 --- a/sysdeps/generic/s_ldexp.c +++ b/math/s_ldexp.c @@ -14,7 +14,7 @@ static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $"; #endif -#include "math.h" +#include #include "math_private.h" #include diff --git a/sysdeps/generic/s_ldexpf.c b/math/s_ldexpf.c similarity index 98% rename from sysdeps/generic/s_ldexpf.c rename to math/s_ldexpf.c index 631db422a39..1ea5e09f8fd 100644 --- a/sysdeps/generic/s_ldexpf.c +++ b/math/s_ldexpf.c @@ -17,7 +17,7 @@ static char rcsid[] = "$NetBSD: s_ldexpf.c,v 1.3 1995/05/10 20:47:42 jtc Exp $"; #endif -#include "math.h" +#include #include "math_private.h" #include diff --git a/sysdeps/generic/s_ldexpl.c b/math/s_ldexpl.c similarity index 98% rename from sysdeps/generic/s_ldexpl.c rename to math/s_ldexpl.c index 123a6b3b589..df8b29f94d6 100644 --- a/sysdeps/generic/s_ldexpl.c +++ b/math/s_ldexpl.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: $"; #endif -#include "math.h" +#include #include "math_private.h" #include diff --git a/sysdeps/generic/s_log1pl.c b/math/s_log1pl.c similarity index 100% rename from sysdeps/generic/s_log1pl.c rename to math/s_log1pl.c diff --git a/sysdeps/generic/s_nan.c b/math/s_nan.c similarity index 100% rename from sysdeps/generic/s_nan.c rename to math/s_nan.c diff --git a/sysdeps/generic/s_nanf.c b/math/s_nanf.c similarity index 100% rename from sysdeps/generic/s_nanf.c rename to math/s_nanf.c diff --git a/sysdeps/generic/s_nanl.c b/math/s_nanl.c similarity index 100% rename from sysdeps/generic/s_nanl.c rename to math/s_nanl.c diff --git a/sysdeps/generic/s_nextafter.c b/math/s_nextafter.c similarity index 99% rename from sysdeps/generic/s_nextafter.c rename to math/s_nextafter.c index c2d799d5df3..9c678b79c57 100644 --- a/sysdeps/generic/s_nextafter.c +++ b/math/s_nextafter.c @@ -25,7 +25,7 @@ static char rcsid[] = "$NetBSD: s_nextafter.c,v 1.8 1995/05/10 20:47:58 jtc Exp #define __nexttoward __internal___nexttoward #define nexttoward __internal_nexttoward -#include "math.h" +#include #include "math_private.h" #include diff --git a/sysdeps/generic/s_nexttowardf.c b/math/s_nexttowardf.c similarity index 99% rename from sysdeps/generic/s_nexttowardf.c rename to math/s_nexttowardf.c index 4f502c210ea..1a1026612e2 100644 --- a/sysdeps/generic/s_nexttowardf.c +++ b/math/s_nexttowardf.c @@ -20,7 +20,7 @@ * Special cases: */ -#include "math.h" +#include #include "math_private.h" #include diff --git a/sysdeps/generic/s_nexttowardl.c b/math/s_nexttowardl.c similarity index 100% rename from sysdeps/generic/s_nexttowardl.c rename to math/s_nexttowardl.c diff --git a/sysdeps/generic/s_significand.c b/math/s_significand.c similarity index 98% rename from sysdeps/generic/s_significand.c rename to math/s_significand.c index f95b6481c25..4a02dbcba1f 100644 --- a/sysdeps/generic/s_significand.c +++ b/math/s_significand.c @@ -20,7 +20,7 @@ static char rcsid[] = "$NetBSD: s_significand.c,v 1.6 1995/05/10 20:48:11 jtc Ex * for exercising the fraction-part(F) IEEE 754-1985 test vector. */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/s_significandf.c b/math/s_significandf.c similarity index 97% rename from sysdeps/generic/s_significandf.c rename to math/s_significandf.c index cf5eb59efc8..69de1e6b0ef 100644 --- a/sysdeps/generic/s_significandf.c +++ b/math/s_significandf.c @@ -17,7 +17,7 @@ static char rcsid[] = "$NetBSD: s_significandf.c,v 1.3 1995/05/10 20:48:13 jtc Exp $"; #endif -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/s_significandl.c b/math/s_significandl.c similarity index 98% rename from sysdeps/generic/s_significandl.c rename to math/s_significandl.c index d84e806fdc2..9fa0e4ff91d 100644 --- a/sysdeps/generic/s_significandl.c +++ b/math/s_significandl.c @@ -24,7 +24,7 @@ static char rcsid[] = "$NetBSD: $"; * for exercising the fraction-part(F) IEEE 754-1985 test vector. */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/s_tanhl.c b/math/s_tanhl.c similarity index 100% rename from sysdeps/generic/s_tanhl.c rename to math/s_tanhl.c diff --git a/sysdeps/generic/setfpucw.c b/math/setfpucw.c similarity index 100% rename from sysdeps/generic/setfpucw.c rename to math/setfpucw.c diff --git a/sysdeps/generic/t_sincosl.c b/math/t_sincosl.c similarity index 100% rename from sysdeps/generic/t_sincosl.c rename to math/t_sincosl.c diff --git a/sysdeps/generic/w_acos.c b/math/w_acos.c similarity index 98% rename from sysdeps/generic/w_acos.c rename to math/w_acos.c index 5a1158ea7a8..f4e6e3c9109 100644 --- a/sysdeps/generic/w_acos.c +++ b/math/w_acos.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_acos.c,v 1.6 1995/05/10 20:48:26 jtc Exp $"; * wrap_acos(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_acosf.c b/math/w_acosf.c similarity index 98% rename from sysdeps/generic/w_acosf.c rename to math/w_acosf.c index 28260ddd3ec..a8998efb840 100644 --- a/sysdeps/generic/w_acosf.c +++ b/math/w_acosf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_acosf.c,v 1.3 1995/05/10 20:48:29 jtc Exp $"; * wrap_acosf(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_acosh.c b/math/w_acosh.c similarity index 98% rename from sysdeps/generic/w_acosh.c rename to math/w_acosh.c index 2b5d60f7ea7..e8322ec6673 100644 --- a/sysdeps/generic/w_acosh.c +++ b/math/w_acosh.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_acosh.c,v 1.6 1995/05/10 20:48:31 jtc Exp $"; * wrapper acosh(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_acoshf.c b/math/w_acoshf.c similarity index 98% rename from sysdeps/generic/w_acoshf.c rename to math/w_acoshf.c index f701983dc24..62f94b80e7a 100644 --- a/sysdeps/generic/w_acoshf.c +++ b/math/w_acoshf.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: w_acoshf.c,v 1.3 1995/05/10 20:48:33 jtc Exp $"; * wrapper acoshf(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_acoshl.c b/math/w_acoshl.c similarity index 98% rename from sysdeps/generic/w_acoshl.c rename to math/w_acoshl.c index a37d4c15d95..ae67911ae5a 100644 --- a/sysdeps/generic/w_acoshl.c +++ b/math/w_acoshl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper acoshl(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_acosl.c b/math/w_acosl.c similarity index 98% rename from sysdeps/generic/w_acosl.c rename to math/w_acosl.c index cd9cecf2f94..9ab4de899fb 100644 --- a/sysdeps/generic/w_acosl.c +++ b/math/w_acosl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrap_acosl(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_asin.c b/math/w_asin.c similarity index 98% rename from sysdeps/generic/w_asin.c rename to math/w_asin.c index a7ca4ef9fd4..d531fbd26a2 100644 --- a/sysdeps/generic/w_asin.c +++ b/math/w_asin.c @@ -19,7 +19,7 @@ static char rcsid[] = "$NetBSD: w_asin.c,v 1.6 1995/05/10 20:48:35 jtc Exp $"; */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_asinf.c b/math/w_asinf.c similarity index 98% rename from sysdeps/generic/w_asinf.c rename to math/w_asinf.c index d7f7a253b0b..b19b5c54e3d 100644 --- a/sysdeps/generic/w_asinf.c +++ b/math/w_asinf.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: w_asinf.c,v 1.3 1995/05/10 20:48:37 jtc Exp $"; */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_asinl.c b/math/w_asinl.c similarity index 98% rename from sysdeps/generic/w_asinl.c rename to math/w_asinl.c index 0ac3038e957..fb5ee35fc07 100644 --- a/sysdeps/generic/w_asinl.c +++ b/math/w_asinl.c @@ -23,7 +23,7 @@ static char rcsid[] = "$NetBSD: $"; */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_atan2.c b/math/w_atan2.c similarity index 98% rename from sysdeps/generic/w_atan2.c rename to math/w_atan2.c index 801baa23470..f0a10d4102e 100644 --- a/sysdeps/generic/w_atan2.c +++ b/math/w_atan2.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_atan2.c,v 1.6 1995/05/10 20:48:39 jtc Exp $"; * wrapper atan2(y,x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_atan2f.c b/math/w_atan2f.c similarity index 98% rename from sysdeps/generic/w_atan2f.c rename to math/w_atan2f.c index 09caa06f00c..efb08f076bf 100644 --- a/sysdeps/generic/w_atan2f.c +++ b/math/w_atan2f.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_atan2f.c,v 1.3 1995/05/10 20:48:42 jtc Exp $"; * wrapper atan2f(y,x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_atan2l.c b/math/w_atan2l.c similarity index 98% rename from sysdeps/generic/w_atan2l.c rename to math/w_atan2l.c index 2897c8c5f93..9672e9615fd 100644 --- a/sysdeps/generic/w_atan2l.c +++ b/math/w_atan2l.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper atan2l(y,x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_atanh.c b/math/w_atanh.c similarity index 98% rename from sysdeps/generic/w_atanh.c rename to math/w_atanh.c index e7995b18307..b81f65c311f 100644 --- a/sysdeps/generic/w_atanh.c +++ b/math/w_atanh.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_atanh.c,v 1.6 1995/05/10 20:48:43 jtc Exp $"; * wrapper atanh(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_atanhf.c b/math/w_atanhf.c similarity index 98% rename from sysdeps/generic/w_atanhf.c rename to math/w_atanhf.c index 0b24f2c71a7..52a144c05ac 100644 --- a/sysdeps/generic/w_atanhf.c +++ b/math/w_atanhf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_atanhf.c,v 1.3 1995/05/10 20:48:45 jtc Exp $"; * wrapper atanhf(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_atanhl.c b/math/w_atanhl.c similarity index 98% rename from sysdeps/generic/w_atanhl.c rename to math/w_atanhl.c index d675fc6fe7e..5ce53b847d7 100644 --- a/sysdeps/generic/w_atanhl.c +++ b/math/w_atanhl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper atanhl(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_cosh.c b/math/w_cosh.c similarity index 98% rename from sysdeps/generic/w_cosh.c rename to math/w_cosh.c index 709f485c6d5..033a0340591 100644 --- a/sysdeps/generic/w_cosh.c +++ b/math/w_cosh.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_cosh.c,v 1.6 1995/05/10 20:48:47 jtc Exp $"; * wrapper cosh(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_coshf.c b/math/w_coshf.c similarity index 98% rename from sysdeps/generic/w_coshf.c rename to math/w_coshf.c index c38fd1d93f9..8e24ca9adc6 100644 --- a/sysdeps/generic/w_coshf.c +++ b/math/w_coshf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_coshf.c,v 1.3 1995/05/10 20:48:49 jtc Exp $"; * wrapper coshf(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_coshl.c b/math/w_coshl.c similarity index 98% rename from sysdeps/generic/w_coshl.c rename to math/w_coshl.c index cc1929a9ec8..5f4623a81a6 100644 --- a/sysdeps/generic/w_coshl.c +++ b/math/w_coshl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper coshl(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_drem.c b/math/w_drem.c similarity index 100% rename from sysdeps/generic/w_drem.c rename to math/w_drem.c diff --git a/sysdeps/generic/w_dremf.c b/math/w_dremf.c similarity index 93% rename from sysdeps/generic/w_dremf.c rename to math/w_dremf.c index b740ea304c2..c3d391d6340 100644 --- a/sysdeps/generic/w_dremf.c +++ b/math/w_dremf.c @@ -5,7 +5,7 @@ * Placed into the Public Domain, 1994. */ -#include "math.h" +#include #include "math_private.h" float diff --git a/sysdeps/generic/w_dreml.c b/math/w_dreml.c similarity index 100% rename from sysdeps/generic/w_dreml.c rename to math/w_dreml.c diff --git a/sysdeps/generic/w_exp10.c b/math/w_exp10.c similarity index 98% rename from sysdeps/generic/w_exp10.c rename to math/w_exp10.c index 597506f22f0..9447d8fa2a6 100644 --- a/sysdeps/generic/w_exp10.c +++ b/math/w_exp10.c @@ -17,7 +17,7 @@ * wrapper exp10(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_exp10f.c b/math/w_exp10f.c similarity index 98% rename from sysdeps/generic/w_exp10f.c rename to math/w_exp10f.c index 1c510a3bfaf..78e71be0696 100644 --- a/sysdeps/generic/w_exp10f.c +++ b/math/w_exp10f.c @@ -17,7 +17,7 @@ * wrapper expf10(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_exp10l.c b/math/w_exp10l.c similarity index 98% rename from sysdeps/generic/w_exp10l.c rename to math/w_exp10l.c index aebddcb2011..368ed77304e 100644 --- a/sysdeps/generic/w_exp10l.c +++ b/math/w_exp10l.c @@ -18,7 +18,7 @@ * wrapper exp10l(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_exp2.c b/math/w_exp2.c similarity index 97% rename from sysdeps/generic/w_exp2.c rename to math/w_exp2.c index ccf6a1cd6a5..446e5ea91cb 100644 --- a/sysdeps/generic/w_exp2.c +++ b/math/w_exp2.c @@ -3,7 +3,7 @@ */ #include -#include "math.h" +#include #include "math_private.h" static const double o_threshold= (double) DBL_MAX_EXP; diff --git a/sysdeps/generic/w_exp2f.c b/math/w_exp2f.c similarity index 97% rename from sysdeps/generic/w_exp2f.c rename to math/w_exp2f.c index 13cfc9a19f7..9120c88b60e 100644 --- a/sysdeps/generic/w_exp2f.c +++ b/math/w_exp2f.c @@ -3,7 +3,7 @@ */ #include -#include "math.h" +#include #include "math_private.h" static const float o_threshold= (float) FLT_MAX_EXP; diff --git a/sysdeps/generic/w_exp2l.c b/math/w_exp2l.c similarity index 97% rename from sysdeps/generic/w_exp2l.c rename to math/w_exp2l.c index f492301223f..fea5425ac46 100644 --- a/sysdeps/generic/w_exp2l.c +++ b/math/w_exp2l.c @@ -3,7 +3,7 @@ */ #include -#include "math.h" +#include #include "math_private.h" static const long double o_threshold = (long double) LDBL_MAX_EXP; diff --git a/sysdeps/generic/w_expl.c b/math/w_expl.c similarity index 100% rename from sysdeps/generic/w_expl.c rename to math/w_expl.c diff --git a/sysdeps/generic/w_fmod.c b/math/w_fmod.c similarity index 98% rename from sysdeps/generic/w_fmod.c rename to math/w_fmod.c index 0ceeb98c558..43a1d8ef5c6 100644 --- a/sysdeps/generic/w_fmod.c +++ b/math/w_fmod.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_fmod.c,v 1.6 1995/05/10 20:48:55 jtc Exp $"; * wrapper fmod(x,y) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_fmodf.c b/math/w_fmodf.c similarity index 98% rename from sysdeps/generic/w_fmodf.c rename to math/w_fmodf.c index 9afe5ddfddf..2bd133f2d71 100644 --- a/sysdeps/generic/w_fmodf.c +++ b/math/w_fmodf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_fmodf.c,v 1.3 1995/05/10 20:48:57 jtc Exp $"; * wrapper fmodf(x,y) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_fmodl.c b/math/w_fmodl.c similarity index 98% rename from sysdeps/generic/w_fmodl.c rename to math/w_fmodl.c index 71ed4a94a4d..7b9a297cfdf 100644 --- a/sysdeps/generic/w_fmodl.c +++ b/math/w_fmodl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper fmodl(x,y) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_hypot.c b/math/w_hypot.c similarity index 98% rename from sysdeps/generic/w_hypot.c rename to math/w_hypot.c index e91db170838..ab929f78ada 100644 --- a/sysdeps/generic/w_hypot.c +++ b/math/w_hypot.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_hypot.c,v 1.6 1995/05/10 20:49:07 jtc Exp $"; * wrapper hypot(x,y) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_hypotf.c b/math/w_hypotf.c similarity index 98% rename from sysdeps/generic/w_hypotf.c rename to math/w_hypotf.c index a7e5c1fdb6d..b6be39e39fa 100644 --- a/sysdeps/generic/w_hypotf.c +++ b/math/w_hypotf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_hypotf.c,v 1.3 1995/05/10 20:49:09 jtc Exp $"; * wrapper hypotf(x,y) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_hypotl.c b/math/w_hypotl.c similarity index 98% rename from sysdeps/generic/w_hypotl.c rename to math/w_hypotl.c index 2ec215fd134..916afbd4173 100644 --- a/sysdeps/generic/w_hypotl.c +++ b/math/w_hypotl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper hypotl(x,y) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_j0.c b/math/w_j0.c similarity index 98% rename from sysdeps/generic/w_j0.c rename to math/w_j0.c index 5a018760bb9..5ab3544aa7a 100644 --- a/sysdeps/generic/w_j0.c +++ b/math/w_j0.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $"; * wrapper j0(double x), y0(double x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_j0f.c b/math/w_j0f.c similarity index 99% rename from sysdeps/generic/w_j0f.c rename to math/w_j0f.c index 32e2eebb565..bb2b82f0608 100644 --- a/sysdeps/generic/w_j0f.c +++ b/math/w_j0f.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_j0f.c,v 1.3 1995/05/10 20:49:13 jtc Exp $"; * wrapper j0f(float x), y0f(float x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_j0l.c b/math/w_j0l.c similarity index 98% rename from sysdeps/generic/w_j0l.c rename to math/w_j0l.c index b74d9ddcff2..fde0f64f89a 100644 --- a/sysdeps/generic/w_j0l.c +++ b/math/w_j0l.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper j0l(long double x), y0l(long double x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_j1.c b/math/w_j1.c similarity index 98% rename from sysdeps/generic/w_j1.c rename to math/w_j1.c index 39fe8543b1c..db8c4ce3331 100644 --- a/sysdeps/generic/w_j1.c +++ b/math/w_j1.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $"; * wrapper of j1,y1 */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_j1f.c b/math/w_j1f.c similarity index 99% rename from sysdeps/generic/w_j1f.c rename to math/w_j1f.c index 2a7c8db819c..35b186206e4 100644 --- a/sysdeps/generic/w_j1f.c +++ b/math/w_j1f.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_j1f.c,v 1.3 1995/05/10 20:49:17 jtc Exp $"; * wrapper of j1f,y1f */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_j1l.c b/math/w_j1l.c similarity index 98% rename from sysdeps/generic/w_j1l.c rename to math/w_j1l.c index 49a486cf8ed..5ecfd1ec6e5 100644 --- a/sysdeps/generic/w_j1l.c +++ b/math/w_j1l.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper of j1l,y1l */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_jn.c b/math/w_jn.c similarity index 99% rename from sysdeps/generic/w_jn.c rename to math/w_jn.c index 85fc383fb75..3a28443dcfd 100644 --- a/sysdeps/generic/w_jn.c +++ b/math/w_jn.c @@ -40,7 +40,7 @@ static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $"; * */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_jnf.c b/math/w_jnf.c similarity index 99% rename from sysdeps/generic/w_jnf.c rename to math/w_jnf.c index 63ad3355730..628701d7fa1 100644 --- a/sysdeps/generic/w_jnf.c +++ b/math/w_jnf.c @@ -17,7 +17,7 @@ static char rcsid[] = "$NetBSD: w_jnf.c,v 1.3 1995/05/10 20:49:21 jtc Exp $"; #endif -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_jnl.c b/math/w_jnl.c similarity index 99% rename from sysdeps/generic/w_jnl.c rename to math/w_jnl.c index 866e3cdb00c..021c16a1043 100644 --- a/sysdeps/generic/w_jnl.c +++ b/math/w_jnl.c @@ -44,7 +44,7 @@ static char rcsid[] = "$NetBSD: $"; * */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_lgamma.c b/math/w_lgamma.c similarity index 98% rename from sysdeps/generic/w_lgamma.c rename to math/w_lgamma.c index 7c7f34ff39d..ab75f759974 100644 --- a/sysdeps/generic/w_lgamma.c +++ b/math/w_lgamma.c @@ -20,7 +20,7 @@ static char rcsid[] = "$NetBSD: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $"; * Method: call __ieee754_lgamma_r */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_lgamma_r.c b/math/w_lgamma_r.c similarity index 98% rename from sysdeps/generic/w_lgamma_r.c rename to math/w_lgamma_r.c index f3e7d821e25..17a7d013e98 100644 --- a/sysdeps/generic/w_lgamma_r.c +++ b/math/w_lgamma_r.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_lgamma_r.c,v 1.6 1995/05/10 20:49:27 jtc Exp $ * wrapper double lgamma_r(double x, int *signgamp) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_lgammaf.c b/math/w_lgammaf.c similarity index 98% rename from sysdeps/generic/w_lgammaf.c rename to math/w_lgammaf.c index d0f6d0d17c2..7c3c058d750 100644 --- a/sysdeps/generic/w_lgammaf.c +++ b/math/w_lgammaf.c @@ -17,7 +17,7 @@ static char rcsid[] = "$NetBSD: w_lgammaf.c,v 1.3 1995/05/10 20:49:30 jtc Exp $"; #endif -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_lgammaf_r.c b/math/w_lgammaf_r.c similarity index 98% rename from sysdeps/generic/w_lgammaf_r.c rename to math/w_lgammaf_r.c index 66962acc7e0..a32c3256387 100644 --- a/sysdeps/generic/w_lgammaf_r.c +++ b/math/w_lgammaf_r.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_lgammaf_r.c,v 1.3 1995/05/10 20:49:32 jtc Exp * wrapper float lgammaf_r(float x, int *signgamp) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_lgammal.c b/math/w_lgammal.c similarity index 98% rename from sysdeps/generic/w_lgammal.c rename to math/w_lgammal.c index 1ee51a6f49d..f250e50388e 100644 --- a/sysdeps/generic/w_lgammal.c +++ b/math/w_lgammal.c @@ -24,7 +24,7 @@ static char rcsid[] = "$NetBSD: $"; * Method: call __ieee754_lgammal_r */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_lgammal_r.c b/math/w_lgammal_r.c similarity index 98% rename from sysdeps/generic/w_lgammal_r.c rename to math/w_lgammal_r.c index 71f5c005d05..2dfea8a4651 100644 --- a/sysdeps/generic/w_lgammal_r.c +++ b/math/w_lgammal_r.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper long double lgammal_r(long double x, int *signgamp) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_log.c b/math/w_log.c similarity index 98% rename from sysdeps/generic/w_log.c rename to math/w_log.c index 5f0af797314..6f6f74fd147 100644 --- a/sysdeps/generic/w_log.c +++ b/math/w_log.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_log.c,v 1.6 1995/05/10 20:49:33 jtc Exp $"; * wrapper log(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_log10.c b/math/w_log10.c similarity index 98% rename from sysdeps/generic/w_log10.c rename to math/w_log10.c index 8a0a70bdf75..9425db3ddf6 100644 --- a/sysdeps/generic/w_log10.c +++ b/math/w_log10.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_log10.c,v 1.6 1995/05/10 20:49:35 jtc Exp $"; * wrapper log10(X) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_log10f.c b/math/w_log10f.c similarity index 98% rename from sysdeps/generic/w_log10f.c rename to math/w_log10f.c index f90cb0cabcd..c63fcd1ec29 100644 --- a/sysdeps/generic/w_log10f.c +++ b/math/w_log10f.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_log10f.c,v 1.3 1995/05/10 20:49:37 jtc Exp $"; * wrapper log10f(X) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_log10l.c b/math/w_log10l.c similarity index 98% rename from sysdeps/generic/w_log10l.c rename to math/w_log10l.c index 0d0861689d3..25c051d3757 100644 --- a/sysdeps/generic/w_log10l.c +++ b/math/w_log10l.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper log10l(X) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_log2.c b/math/w_log2.c similarity index 96% rename from sysdeps/generic/w_log2.c rename to math/w_log2.c index 7966ff359f1..d56a6ee6637 100644 --- a/sysdeps/generic/w_log2.c +++ b/math/w_log2.c @@ -2,7 +2,7 @@ * wrapper log2(X) */ -#include "math.h" +#include #include "math_private.h" double diff --git a/sysdeps/generic/w_log2f.c b/math/w_log2f.c similarity index 96% rename from sysdeps/generic/w_log2f.c rename to math/w_log2f.c index 1e2eb85d7b5..ec8d2971612 100644 --- a/sysdeps/generic/w_log2f.c +++ b/math/w_log2f.c @@ -2,7 +2,7 @@ * wrapper log2(X) */ -#include "math.h" +#include #include "math_private.h" float diff --git a/sysdeps/generic/w_log2l.c b/math/w_log2l.c similarity index 96% rename from sysdeps/generic/w_log2l.c rename to math/w_log2l.c index f41757c5e46..b1d8706f2ab 100644 --- a/sysdeps/generic/w_log2l.c +++ b/math/w_log2l.c @@ -2,7 +2,7 @@ * wrapper log2l(X) */ -#include "math.h" +#include #include "math_private.h" long double diff --git a/sysdeps/generic/w_logf.c b/math/w_logf.c similarity index 98% rename from sysdeps/generic/w_logf.c rename to math/w_logf.c index 9eabe4b34cf..46d97491147 100644 --- a/sysdeps/generic/w_logf.c +++ b/math/w_logf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_logf.c,v 1.3 1995/05/10 20:49:40 jtc Exp $"; * wrapper logf(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_logl.c b/math/w_logl.c similarity index 98% rename from sysdeps/generic/w_logl.c rename to math/w_logl.c index bb979c26c35..5a38f200380 100644 --- a/sysdeps/generic/w_logl.c +++ b/math/w_logl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper logl(x) */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_pow.c b/math/w_pow.c similarity index 98% rename from sysdeps/generic/w_pow.c rename to math/w_pow.c index 5850651a1a4..707cffcc43a 100644 --- a/sysdeps/generic/w_pow.c +++ b/math/w_pow.c @@ -16,7 +16,7 @@ * wrapper pow(x,y) return x**y */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_powf.c b/math/w_powf.c similarity index 99% rename from sysdeps/generic/w_powf.c rename to math/w_powf.c index 32196fd89fa..2480fe559ee 100644 --- a/sysdeps/generic/w_powf.c +++ b/math/w_powf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_powf.c,v 1.3 1995/05/10 20:49:41 jtc Exp $"; * wrapper powf(x,y) return x**y */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_powl.c b/math/w_powl.c similarity index 98% rename from sysdeps/generic/w_powl.c rename to math/w_powl.c index 17feb9fc616..d8be7b7b03f 100644 --- a/sysdeps/generic/w_powl.c +++ b/math/w_powl.c @@ -18,7 +18,7 @@ * wrapper powl(x,y) return x**y */ -#include "math.h" +#include #include "math_private.h" diff --git a/sysdeps/generic/w_remainder.c b/math/w_remainder.c similarity index 98% rename from sysdeps/generic/w_remainder.c rename to math/w_remainder.c index d85a3febce7..9d7a7c53830 100644 --- a/sysdeps/generic/w_remainder.c +++ b/math/w_remainder.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_remainder.c,v 1.6 1995/05/10 20:49:44 jtc Exp * wrapper remainder(x,p) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_remainderf.c b/math/w_remainderf.c similarity index 98% rename from sysdeps/generic/w_remainderf.c rename to math/w_remainderf.c index 58255f5be5a..486e626c289 100644 --- a/sysdeps/generic/w_remainderf.c +++ b/math/w_remainderf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_remainderf.c,v 1.3 1995/05/10 20:49:46 jtc Exp * wrapper remainderf(x,p) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_remainderl.c b/math/w_remainderl.c similarity index 98% rename from sysdeps/generic/w_remainderl.c rename to math/w_remainderl.c index 284140174d8..7635fb93638 100644 --- a/sysdeps/generic/w_remainderl.c +++ b/math/w_remainderl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper remainderl(x,p) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_scalb.c b/math/w_scalb.c similarity index 98% rename from sysdeps/generic/w_scalb.c rename to math/w_scalb.c index c981b858a9f..0086c2adfd1 100644 --- a/sysdeps/generic/w_scalb.c +++ b/math/w_scalb.c @@ -20,7 +20,7 @@ static char rcsid[] = "$NetBSD: w_scalb.c,v 1.6 1995/05/10 20:49:48 jtc Exp $"; * should use scalbn() instead. */ -#include "math.h" +#include #include "math_private.h" #include diff --git a/sysdeps/generic/w_scalbf.c b/math/w_scalbf.c similarity index 98% rename from sysdeps/generic/w_scalbf.c rename to math/w_scalbf.c index 51056083e83..60cb5670ed7 100644 --- a/sysdeps/generic/w_scalbf.c +++ b/math/w_scalbf.c @@ -23,7 +23,7 @@ static char rcsid[] = "$NetBSD: w_scalbf.c,v 1.3 1995/05/10 20:49:50 jtc Exp $"; * should use scalbn() instead. */ -#include "math.h" +#include #include "math_private.h" #include diff --git a/sysdeps/generic/w_scalbl.c b/math/w_scalbl.c similarity index 98% rename from sysdeps/generic/w_scalbl.c rename to math/w_scalbl.c index 6a7d3071048..c8a45d460de 100644 --- a/sysdeps/generic/w_scalbl.c +++ b/math/w_scalbl.c @@ -24,7 +24,7 @@ static char rcsid[] = "$NetBSD: $"; * should use scalbnl() instead. */ -#include "math.h" +#include #include "math_private.h" #include diff --git a/sysdeps/generic/w_sinh.c b/math/w_sinh.c similarity index 98% rename from sysdeps/generic/w_sinh.c rename to math/w_sinh.c index 9b34cd1873a..5bde8a2ddd2 100644 --- a/sysdeps/generic/w_sinh.c +++ b/math/w_sinh.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $"; * wrapper sinh(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_sinhf.c b/math/w_sinhf.c similarity index 98% rename from sysdeps/generic/w_sinhf.c rename to math/w_sinhf.c index a69cf3072d7..c29c46620fc 100644 --- a/sysdeps/generic/w_sinhf.c +++ b/math/w_sinhf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_sinhf.c,v 1.3 1995/05/10 20:49:54 jtc Exp $"; * wrapper sinhf(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_sinhl.c b/math/w_sinhl.c similarity index 98% rename from sysdeps/generic/w_sinhl.c rename to math/w_sinhl.c index 3e93cc598d3..19eb774d64e 100644 --- a/sysdeps/generic/w_sinhl.c +++ b/math/w_sinhl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper sinhl(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_sqrt.c b/math/w_sqrt.c similarity index 98% rename from sysdeps/generic/w_sqrt.c rename to math/w_sqrt.c index be15d959ea8..41ab1d18b23 100644 --- a/sysdeps/generic/w_sqrt.c +++ b/math/w_sqrt.c @@ -18,7 +18,7 @@ static char rcsid[] = "$NetBSD: w_sqrt.c,v 1.6 1995/05/10 20:49:55 jtc Exp $"; * wrapper sqrt(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_sqrtf.c b/math/w_sqrtf.c similarity index 98% rename from sysdeps/generic/w_sqrtf.c rename to math/w_sqrtf.c index f5ccc73868e..21beb550f44 100644 --- a/sysdeps/generic/w_sqrtf.c +++ b/math/w_sqrtf.c @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: w_sqrtf.c,v 1.3 1995/05/10 20:49:59 jtc Exp $"; * wrapper sqrtf(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_sqrtl.c b/math/w_sqrtl.c similarity index 98% rename from sysdeps/generic/w_sqrtl.c rename to math/w_sqrtl.c index 5873ce93ab4..0b03eebe1da 100644 --- a/sysdeps/generic/w_sqrtl.c +++ b/math/w_sqrtl.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * wrapper sqrtl(x) */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_tgamma.c b/math/w_tgamma.c similarity index 98% rename from sysdeps/generic/w_tgamma.c rename to math/w_tgamma.c index 6e34b62be4a..3ce6e77b490 100644 --- a/sysdeps/generic/w_tgamma.c +++ b/math/w_tgamma.c @@ -19,7 +19,7 @@ static char rcsid[] = "$NetBSD: w_gamma.c,v 1.7 1995/11/20 22:06:43 jtc Exp $"; * depending on the library mode. */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_tgammaf.c b/math/w_tgammaf.c similarity index 98% rename from sysdeps/generic/w_tgammaf.c rename to math/w_tgammaf.c index e7b0d87ab5d..d3698059e74 100644 --- a/sysdeps/generic/w_tgammaf.c +++ b/math/w_tgammaf.c @@ -17,7 +17,7 @@ static char rcsid[] = "$NetBSD: w_gammaf.c,v 1.4 1995/11/20 22:06:48 jtc Exp $"; #endif -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/w_tgammal.c b/math/w_tgammal.c similarity index 98% rename from sysdeps/generic/w_tgammal.c rename to math/w_tgammal.c index 793fa17ac1c..75970a34d47 100644 --- a/sysdeps/generic/w_tgammal.c +++ b/math/w_tgammal.c @@ -22,7 +22,7 @@ static char rcsid[] = "$NetBSD: $"; * Return the Gamma function of x. */ -#include "math.h" +#include #include "math_private.h" #ifdef __STDC__ diff --git a/sysdeps/generic/acct.c b/misc/acct.c similarity index 100% rename from sysdeps/generic/acct.c rename to misc/acct.c diff --git a/sysdeps/generic/brk.c b/misc/brk.c similarity index 100% rename from sysdeps/generic/brk.c rename to misc/brk.c diff --git a/sysdeps/generic/chflags.c b/misc/chflags.c similarity index 100% rename from sysdeps/generic/chflags.c rename to misc/chflags.c diff --git a/sysdeps/generic/chroot.c b/misc/chroot.c similarity index 100% rename from sysdeps/generic/chroot.c rename to misc/chroot.c diff --git a/sysdeps/generic/fchflags.c b/misc/fchflags.c similarity index 100% rename from sysdeps/generic/fchflags.c rename to misc/fchflags.c diff --git a/sysdeps/generic/fdatasync.c b/misc/fdatasync.c similarity index 100% rename from sysdeps/generic/fdatasync.c rename to misc/fdatasync.c diff --git a/sysdeps/generic/fgetxattr.c b/misc/fgetxattr.c similarity index 100% rename from sysdeps/generic/fgetxattr.c rename to misc/fgetxattr.c diff --git a/sysdeps/generic/flistxattr.c b/misc/flistxattr.c similarity index 100% rename from sysdeps/generic/flistxattr.c rename to misc/flistxattr.c diff --git a/sysdeps/generic/fremovexattr.c b/misc/fremovexattr.c similarity index 100% rename from sysdeps/generic/fremovexattr.c rename to misc/fremovexattr.c diff --git a/sysdeps/generic/fsetxattr.c b/misc/fsetxattr.c similarity index 100% rename from sysdeps/generic/fsetxattr.c rename to misc/fsetxattr.c diff --git a/sysdeps/generic/fsync.c b/misc/fsync.c similarity index 100% rename from sysdeps/generic/fsync.c rename to misc/fsync.c diff --git a/sysdeps/generic/ftruncate.c b/misc/ftruncate.c similarity index 100% rename from sysdeps/generic/ftruncate.c rename to misc/ftruncate.c diff --git a/sysdeps/generic/ftruncate64.c b/misc/ftruncate64.c similarity index 100% rename from sysdeps/generic/ftruncate64.c rename to misc/ftruncate64.c diff --git a/sysdeps/generic/futimes.c b/misc/futimes.c similarity index 100% rename from sysdeps/generic/futimes.c rename to misc/futimes.c diff --git a/sysdeps/generic/futimesat.c b/misc/futimesat.c similarity index 100% rename from sysdeps/generic/futimesat.c rename to misc/futimesat.c diff --git a/sysdeps/generic/getclktck.c b/misc/getclktck.c similarity index 100% rename from sysdeps/generic/getclktck.c rename to misc/getclktck.c diff --git a/sysdeps/generic/getdomain.c b/misc/getdomain.c similarity index 100% rename from sysdeps/generic/getdomain.c rename to misc/getdomain.c diff --git a/sysdeps/generic/getdtsz.c b/misc/getdtsz.c similarity index 100% rename from sysdeps/generic/getdtsz.c rename to misc/getdtsz.c diff --git a/sysdeps/generic/gethostid.c b/misc/gethostid.c similarity index 100% rename from sysdeps/generic/gethostid.c rename to misc/gethostid.c diff --git a/sysdeps/generic/gethostname.c b/misc/gethostname.c similarity index 100% rename from sysdeps/generic/gethostname.c rename to misc/gethostname.c diff --git a/sysdeps/generic/getloadavg.c b/misc/getloadavg.c similarity index 100% rename from sysdeps/generic/getloadavg.c rename to misc/getloadavg.c diff --git a/sysdeps/generic/getpagesize.c b/misc/getpagesize.c similarity index 100% rename from sysdeps/generic/getpagesize.c rename to misc/getpagesize.c diff --git a/sysdeps/generic/getsysstats.c b/misc/getsysstats.c similarity index 100% rename from sysdeps/generic/getsysstats.c rename to misc/getsysstats.c diff --git a/sysdeps/generic/getxattr.c b/misc/getxattr.c similarity index 100% rename from sysdeps/generic/getxattr.c rename to misc/getxattr.c diff --git a/sysdeps/generic/gtty.c b/misc/gtty.c similarity index 100% rename from sysdeps/generic/gtty.c rename to misc/gtty.c diff --git a/sysdeps/generic/ioctl.c b/misc/ioctl.c similarity index 100% rename from sysdeps/generic/ioctl.c rename to misc/ioctl.c diff --git a/sysdeps/generic/lgetxattr.c b/misc/lgetxattr.c similarity index 100% rename from sysdeps/generic/lgetxattr.c rename to misc/lgetxattr.c diff --git a/sysdeps/generic/listxattr.c b/misc/listxattr.c similarity index 100% rename from sysdeps/generic/listxattr.c rename to misc/listxattr.c diff --git a/sysdeps/generic/llistxattr.c b/misc/llistxattr.c similarity index 100% rename from sysdeps/generic/llistxattr.c rename to misc/llistxattr.c diff --git a/sysdeps/generic/lremovexattr.c b/misc/lremovexattr.c similarity index 100% rename from sysdeps/generic/lremovexattr.c rename to misc/lremovexattr.c diff --git a/sysdeps/generic/lseek.c b/misc/lseek.c similarity index 100% rename from sysdeps/generic/lseek.c rename to misc/lseek.c diff --git a/sysdeps/generic/lsetxattr.c b/misc/lsetxattr.c similarity index 100% rename from sysdeps/generic/lsetxattr.c rename to misc/lsetxattr.c diff --git a/sysdeps/generic/lutimes.c b/misc/lutimes.c similarity index 100% rename from sysdeps/generic/lutimes.c rename to misc/lutimes.c diff --git a/sysdeps/generic/madvise.c b/misc/madvise.c similarity index 100% rename from sysdeps/generic/madvise.c rename to misc/madvise.c diff --git a/sysdeps/generic/mincore.c b/misc/mincore.c similarity index 100% rename from sysdeps/generic/mincore.c rename to misc/mincore.c diff --git a/sysdeps/generic/mlock.c b/misc/mlock.c similarity index 100% rename from sysdeps/generic/mlock.c rename to misc/mlock.c diff --git a/sysdeps/generic/mlockall.c b/misc/mlockall.c similarity index 100% rename from sysdeps/generic/mlockall.c rename to misc/mlockall.c diff --git a/sysdeps/generic/mmap.c b/misc/mmap.c similarity index 100% rename from sysdeps/generic/mmap.c rename to misc/mmap.c diff --git a/sysdeps/generic/mmap64.c b/misc/mmap64.c similarity index 100% rename from sysdeps/generic/mmap64.c rename to misc/mmap64.c diff --git a/sysdeps/generic/mprotect.c b/misc/mprotect.c similarity index 100% rename from sysdeps/generic/mprotect.c rename to misc/mprotect.c diff --git a/sysdeps/generic/msync.c b/misc/msync.c similarity index 100% rename from sysdeps/generic/msync.c rename to misc/msync.c diff --git a/sysdeps/generic/munlock.c b/misc/munlock.c similarity index 100% rename from sysdeps/generic/munlock.c rename to misc/munlock.c diff --git a/sysdeps/generic/munlockall.c b/misc/munlockall.c similarity index 100% rename from sysdeps/generic/munlockall.c rename to misc/munlockall.c diff --git a/sysdeps/generic/munmap.c b/misc/munmap.c similarity index 100% rename from sysdeps/generic/munmap.c rename to misc/munmap.c diff --git a/sysdeps/generic/pselect.c b/misc/pselect.c similarity index 100% rename from sysdeps/generic/pselect.c rename to misc/pselect.c diff --git a/sysdeps/generic/ptrace.c b/misc/ptrace.c similarity index 100% rename from sysdeps/generic/ptrace.c rename to misc/ptrace.c diff --git a/sysdeps/generic/readv.c b/misc/readv.c similarity index 100% rename from sysdeps/generic/readv.c rename to misc/readv.c diff --git a/sysdeps/generic/reboot.c b/misc/reboot.c similarity index 100% rename from sysdeps/generic/reboot.c rename to misc/reboot.c diff --git a/sysdeps/generic/remap_file_pages.c b/misc/remap_file_pages.c similarity index 100% rename from sysdeps/generic/remap_file_pages.c rename to misc/remap_file_pages.c diff --git a/sysdeps/generic/removexattr.c b/misc/removexattr.c similarity index 100% rename from sysdeps/generic/removexattr.c rename to misc/removexattr.c diff --git a/sysdeps/generic/revoke.c b/misc/revoke.c similarity index 100% rename from sysdeps/generic/revoke.c rename to misc/revoke.c diff --git a/sysdeps/generic/sbrk.c b/misc/sbrk.c similarity index 100% rename from sysdeps/generic/sbrk.c rename to misc/sbrk.c diff --git a/sysdeps/generic/select.c b/misc/select.c similarity index 100% rename from sysdeps/generic/select.c rename to misc/select.c diff --git a/sysdeps/generic/setdomain.c b/misc/setdomain.c similarity index 100% rename from sysdeps/generic/setdomain.c rename to misc/setdomain.c diff --git a/sysdeps/generic/setegid.c b/misc/setegid.c similarity index 100% rename from sysdeps/generic/setegid.c rename to misc/setegid.c diff --git a/sysdeps/generic/seteuid.c b/misc/seteuid.c similarity index 100% rename from sysdeps/generic/seteuid.c rename to misc/seteuid.c diff --git a/sysdeps/generic/sethostid.c b/misc/sethostid.c similarity index 100% rename from sysdeps/generic/sethostid.c rename to misc/sethostid.c diff --git a/sysdeps/generic/sethostname.c b/misc/sethostname.c similarity index 100% rename from sysdeps/generic/sethostname.c rename to misc/sethostname.c diff --git a/sysdeps/generic/setregid.c b/misc/setregid.c similarity index 100% rename from sysdeps/generic/setregid.c rename to misc/setregid.c diff --git a/sysdeps/generic/setreuid.c b/misc/setreuid.c similarity index 100% rename from sysdeps/generic/setreuid.c rename to misc/setreuid.c diff --git a/sysdeps/generic/setxattr.c b/misc/setxattr.c similarity index 100% rename from sysdeps/generic/setxattr.c rename to misc/setxattr.c diff --git a/sysdeps/generic/sstk.c b/misc/sstk.c similarity index 100% rename from sysdeps/generic/sstk.c rename to misc/sstk.c diff --git a/sysdeps/generic/stty.c b/misc/stty.c similarity index 100% rename from sysdeps/generic/stty.c rename to misc/stty.c diff --git a/sysdeps/generic/swapoff.c b/misc/swapoff.c similarity index 100% rename from sysdeps/generic/swapoff.c rename to misc/swapoff.c diff --git a/sysdeps/generic/swapon.c b/misc/swapon.c similarity index 100% rename from sysdeps/generic/swapon.c rename to misc/swapon.c diff --git a/sysdeps/generic/sync.c b/misc/sync.c similarity index 100% rename from sysdeps/generic/sync.c rename to misc/sync.c diff --git a/sysdeps/generic/syscall.c b/misc/syscall.c similarity index 100% rename from sysdeps/generic/syscall.c rename to misc/syscall.c diff --git a/sysdeps/generic/syslog.c b/misc/syslog.c similarity index 100% rename from sysdeps/generic/syslog.c rename to misc/syslog.c diff --git a/sysdeps/generic/truncate.c b/misc/truncate.c similarity index 100% rename from sysdeps/generic/truncate.c rename to misc/truncate.c diff --git a/sysdeps/generic/truncate64.c b/misc/truncate64.c similarity index 100% rename from sysdeps/generic/truncate64.c rename to misc/truncate64.c diff --git a/sysdeps/generic/ualarm.c b/misc/ualarm.c similarity index 100% rename from sysdeps/generic/ualarm.c rename to misc/ualarm.c diff --git a/sysdeps/generic/usleep.c b/misc/usleep.c similarity index 100% rename from sysdeps/generic/usleep.c rename to misc/usleep.c diff --git a/sysdeps/generic/ustat.c b/misc/ustat.c similarity index 100% rename from sysdeps/generic/ustat.c rename to misc/ustat.c diff --git a/sysdeps/generic/utimes.c b/misc/utimes.c similarity index 100% rename from sysdeps/generic/utimes.c rename to misc/utimes.c diff --git a/sysdeps/generic/vhangup.c b/misc/vhangup.c similarity index 100% rename from sysdeps/generic/vhangup.c rename to misc/vhangup.c diff --git a/sysdeps/generic/writev.c b/misc/writev.c similarity index 100% rename from sysdeps/generic/writev.c rename to misc/writev.c diff --git a/nis/nis_call.c b/nis/nis_call.c index 14041a160c4..5b432b79814 100644 --- a/nis/nis_call.c +++ b/nis/nis_call.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2001, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -40,25 +40,16 @@ extern u_short __pmap_getnisport (struct sockaddr_in *address, u_long program, unsigned long inetstr2int (const char *str) { - char buffer[strlen (str) + 3]; - size_t buflen; - size_t i, j; - - buflen = stpcpy (buffer, str) - buffer; - - j = 0; - for (i = 0; i < buflen; ++i) - if (buffer[i] == '.') + size_t j = 0; + for (size_t i = 0; str[i] != '\0'; ++i) + if (str[i] == '.' && ++j == 4) { - ++j; - if (j == 4) - { - buffer[i] = '\0'; - break; - } + char buffer[i + 1]; + buffer[i] = '\0'; + return inet_addr (memcpy (buffer, str, i)); } - return inet_addr (buffer); + return inet_addr (str); } void @@ -179,7 +170,6 @@ __nisbind_connect (dir_binding *dbp) } else dbp->clnt->cl_auth = authunix_create_default (); - dbp->use_auth = TRUE; } return NIS_SUCCESS; @@ -215,10 +205,7 @@ __nisbind_create (dir_binding *dbp, const nis_server *serv_val, dbp->class = -1; if (__nis_findfastest (dbp) < 1) - { - __nisbind_destroy (dbp); - return NIS_NAMEUNREACHABLE; - } + return NIS_NAMEUNREACHABLE; return NIS_SUCCESS; } @@ -585,7 +572,6 @@ __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs, if (__nisbind_next (&bptr) != NIS_SUCCESS) { nis_free_directory (dir); - __nisbind_destroy (&bptr); return NIS_NAMEUNREACHABLE; } } diff --git a/nis/nis_error.c b/nis/nis_error.c index 147f88ce155..7db885ef939 100644 --- a/nis/nis_error.c +++ b/nis/nis_error.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999, 2004 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -102,26 +102,21 @@ char * nis_sperror_r (const nis_error status, const char *label, char *buffer, size_t buflen) { - const char *cptr; - - cptr = nis_sperrno (status); - - if ((strlen (cptr) + strlen (label) + 3) > buflen) + if (snprintf (buffer, buflen, "%s: %s", label, nis_sperrno (status)) + >= buflen) { errno = ERANGE; return NULL; } - sprintf (buffer, "%s: %s", label, cptr); - - return buffer; + return buffer; } libnsl_hidden_def (nis_sperror_r) char * nis_sperror (const nis_error status, const char *label) { - static char buffer[NIS_MAXNAMELEN +1]; + static char buffer[NIS_MAXNAMELEN + 1]; return nis_sperror_r (status, label, buffer, sizeof (buffer)); } diff --git a/nis/nis_lookup.c b/nis/nis_lookup.c index 0b97e67a61a..4cb34dd1a85 100644 --- a/nis/nis_lookup.c +++ b/nis/nis_lookup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -81,7 +81,6 @@ nis_lookup (const_nis_name name, const unsigned int flags) { if (__nisbind_next (&bptr) != NIS_SUCCESS) { - __nisbind_destroy (&bptr); nis_free_directory (dir); NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; return res; @@ -90,7 +89,7 @@ nis_lookup (const_nis_name name, const unsigned int flags) do { - static struct timeval RPCTIMEOUT = {10, 0}; + static const struct timeval RPCTIMEOUT = {10, 0}; enum clnt_stat result; again: @@ -107,8 +106,8 @@ nis_lookup (const_nis_name name, const unsigned int flags) if (NIS_RES_STATUS (res) == NIS_SUCCESS) { - if (__type_of(NIS_RES_OBJECT (res)) == NIS_LINK_OBJ && - flags & FOLLOW_LINKS) /* We are following links */ + if (__type_of(NIS_RES_OBJECT (res)) == NIS_LINK_OBJ + && (flags & FOLLOW_LINKS)) /* We are following links */ { if (count_links) free (req.ns_name); @@ -137,16 +136,17 @@ nis_lookup (const_nis_name name, const unsigned int flags) } } else - if ((NIS_RES_STATUS (res) == NIS_SYSTEMERROR) || - (NIS_RES_STATUS (res) == NIS_NOSUCHNAME) || - (NIS_RES_STATUS (res) == NIS_NOT_ME)) + if (NIS_RES_STATUS (res) == NIS_SYSTEMERROR + || NIS_RES_STATUS (res) == NIS_NOSUCHNAME + || NIS_RES_STATUS (res) == NIS_NOT_ME) { if (link_first_try) { __nisbind_destroy (&bptr); nis_free_directory (dir); - if (__nisfind_server (req.ns_name, &dir) != NIS_SUCCESS) + if (__nisfind_server (req.ns_name, &dir) + != NIS_SUCCESS) return res; if (__nisbind_create (&bptr, @@ -166,7 +166,6 @@ nis_lookup (const_nis_name name, const unsigned int flags) { if (__nisbind_next (&bptr) != NIS_SUCCESS) { - __nisbind_destroy (&bptr); nis_free_directory (dir); return res; } diff --git a/nis/nis_table.c b/nis/nis_table.c index 2531a3fbc59..2ef28ac59b7 100644 --- a/nis/nis_table.c +++ b/nis/nis_table.c @@ -27,11 +27,9 @@ static struct ib_request * __create_ib_request (const_nis_name name, unsigned int flags) { - struct ib_request *ibreq = calloc (1, sizeof (ib_request)); - char buf[strlen (name) + 1]; + struct ib_request *ibreq = calloc (1, sizeof (struct ib_request)); nis_attr *search_val = NULL; size_t search_len = 0; - char *cptr; size_t size = 0; if (ibreq == NULL) @@ -39,7 +37,7 @@ __create_ib_request (const_nis_name name, unsigned int flags) ibreq->ibr_flags = flags; - cptr = strcpy (buf, name); + char *cptr = strdupa (name); /* Not of "[key=value,key=value,...],foo.." format? */ if (cptr[0] != '[') @@ -49,8 +47,8 @@ __create_ib_request (const_nis_name name, unsigned int flags) ibreq->ibr_name = strchr (cptr, ']'); if (ibreq->ibr_name == NULL || ibreq->ibr_name[1] != ',') { - ibreq->ibr_name = NULL; /* Or the xdr_* functions will dump */ - nis_free_request (ibreq); + /* The object has not really been built yet so we use free. */ + free (ibreq); return NULL; } @@ -120,17 +118,16 @@ __create_ib_request (const_nis_name name, unsigned int flags) return ibreq; } -static struct timeval RPCTIMEOUT = {10, 0}; +static const struct timeval RPCTIMEOUT = {10, 0}; static char * __get_tablepath (char *name, dir_binding *bptr) { enum clnt_stat result; - nis_result *res = calloc (1, sizeof (nis_result)); + nis_result res; struct ns_request req; - if (res == NULL) - return NULL; + memset (&res, '\0', sizeof (res)); req.ns_name = name; req.ns_object.ns_object_len = 0; @@ -138,20 +135,16 @@ __get_tablepath (char *name, dir_binding *bptr) result = clnt_call (bptr->clnt, NIS_LOOKUP, (xdrproc_t) _xdr_ns_request, (caddr_t) &req, (xdrproc_t) _xdr_nis_result, - (caddr_t) res, RPCTIMEOUT); + (caddr_t) &res, RPCTIMEOUT); - if (result == RPC_SUCCESS && NIS_RES_STATUS (res) == NIS_SUCCESS && - __type_of (NIS_RES_OBJECT (res)) == NIS_TABLE_OBJ) - { - char *cptr = strdup (NIS_RES_OBJECT (res)->TA_data.ta_path); - nis_freeresult (res); - return cptr; - } + const char *cptr; + if (result == RPC_SUCCESS && NIS_RES_STATUS (&res) == NIS_SUCCESS + && __type_of (NIS_RES_OBJECT (&res)) == NIS_TABLE_OBJ) + cptr = NIS_RES_OBJECT (&res)->TA_data.ta_path; else - { - nis_freeresult (res); - return strdup (""); - } + cptr = ""; + + return strdup (cptr); } nis_result * @@ -171,8 +164,8 @@ nis_list (const_nis_name name, unsigned int flags, nis_name namebuf[2] = {NULL, NULL}; int name_nr = 0; nis_cb *cb = NULL; - char *tableptr, *tablepath = NULL; - int have_tablepath = 0; + char *tableptr; + char *tablepath = NULL; int first_try = 0; /* Do we try the old binding at first ? */ if (res == NULL) @@ -205,6 +198,7 @@ nis_list (const_nis_name name, unsigned int flags, ibreq->ibr_name = strdup (names[name_nr]); if (ibreq->ibr_name == NULL) { + nis_freenames (names); nis_free_request (ibreq); NIS_RES_STATUS (res) = NIS_NOMEMORY; return res; @@ -227,30 +221,24 @@ nis_list (const_nis_name name, unsigned int flags, status = __nisfind_server (ibreq->ibr_name, &dir); if (status != NIS_SUCCESS) - { - nis_free_request (ibreq); + { NIS_RES_STATUS (res) = status; - return res; - } + goto fail3; + } status = __nisbind_create (&bptr, dir->do_servers.do_servers_val, - dir->do_servers.do_servers_len, flags); + dir->do_servers.do_servers_len, flags); if (status != NIS_SUCCESS) { - nis_free_request (ibreq); NIS_RES_STATUS (res) = status; - nis_free_directory (dir); - return res; + goto fail2; } while (__nisbind_connect (&bptr) != NIS_SUCCESS) if (__nisbind_next (&bptr) != NIS_SUCCESS) { - __nisbind_destroy (&bptr); - nis_free_directory (dir); - nis_free_request (ibreq); NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; - return res; + goto fail; } if (callback != NULL) @@ -274,8 +262,8 @@ nis_list (const_nis_name name, unsigned int flags, case NIS_PARTIAL: case NIS_SUCCESS: case NIS_S_SUCCESS: - if (__type_of (NIS_RES_OBJECT (res)) == NIS_LINK_OBJ && - flags & FOLLOW_LINKS) /* We are following links. */ + if (__type_of (NIS_RES_OBJECT (res)) == NIS_LINK_OBJ + && (flags & FOLLOW_LINKS)) /* We are following links. */ { free (ibreq->ibr_name); ibreq->ibr_name = NULL; @@ -291,8 +279,22 @@ nis_list (const_nis_name name, unsigned int flags, strdup (NIS_RES_OBJECT (res)->LI_data.li_name); if (ibreq->ibr_name == NULL) { - nis_free_request (ibreq); NIS_RES_STATUS (res) = NIS_NOMEMORY; + fail: + __nisbind_destroy (&bptr); + fail2: + nis_free_directory (dir); + fail3: + free (tablepath); + if (cb) + { + __nis_destroy_callback (cb); + ibreq->ibr_cbhost.ibr_cbhost_len = 0; + ibreq->ibr_cbhost.ibr_cbhost_val = NULL; + } + if (names != namebuf) + nis_freenames (names); + nis_free_request (ibreq); return res; } if (NIS_RES_OBJECT (res)->LI_data.li_attrs.li_attrs_len) @@ -303,27 +305,30 @@ nis_list (const_nis_name name, unsigned int flags, ibreq->ibr_srch.ibr_srch_val = NIS_RES_OBJECT (res)->LI_data.li_attrs.li_attrs_val; } + /* The following is a non-obvious optimization. A + nis_freeresult call would call xdr_free as the + following code. But it also would unnecessarily + free the result structure. We avoid this here + along with the necessary tests. */ +#if 1 + xdr_free ((xdrproc_t) _xdr_nis_result, (char *)res); + memset (res, '\0', sizeof (*res)); +#else nis_freeresult (res); res = calloc (1, sizeof (nis_result)); if (res == NULL) - { - if (have_tablepath) - free (tablepath); - __nisbind_destroy (&bptr); - nis_free_directory (dir); - return NULL; - } + goto fail; +#endif first_try = 1; /* Try at first the old binding */ goto again; } - else if ((flags & FOLLOW_PATH) && - NIS_RES_STATUS (res) == NIS_PARTIAL) + else if ((flags & FOLLOW_PATH) + && NIS_RES_STATUS (res) == NIS_PARTIAL) { - if (!have_tablepath) + if (tablepath == NULL) { tablepath = __get_tablepath (ibreq->ibr_name, &bptr); tableptr = tablepath; - have_tablepath = 1; } if (tableptr == NULL) { @@ -337,27 +342,37 @@ nis_list (const_nis_name name, unsigned int flags, ibreq->ibr_name = strdup (""); if (ibreq->ibr_name == NULL) { - nis_free_request (ibreq); NIS_RES_STATUS (res) = NIS_NOMEMORY; - return res; + goto fail; } ++done; } else { ibreq->ibr_name = strdup (ibreq->ibr_name); + /* The following is a non-obvious optimization. A + nis_freeresult call would call xdr_free as the + following code. But it also would unnecessarily + free the result structure. We avoid this here + along with the necessary tests. */ +#if 1 + xdr_free ((xdrproc_t) _xdr_nis_result, (char *)res); + memset (res, '\0', sizeof (*res)); + if (ibreq->ibr_name == NULL) + { + NIS_RES_STATUS (res) = NIS_NOMEMORY; + goto fail; + } +#else nis_freeresult (res); res = calloc (1, sizeof (nis_result)); if (res == NULL || ibreq->ibr_name == NULL) { free (res); - nis_free_request (ibreq); - if (have_tablepath) - free (tablepath); - __nisbind_destroy (&bptr); - nis_free_directory (dir); - return NULL; + res = NULL; + goto fail; } +#endif first_try = 1; goto again; } @@ -375,11 +390,10 @@ nis_list (const_nis_name name, unsigned int flags, ++done; else { - if (!have_tablepath) + if (tablepath == NULL) { tablepath = __get_tablepath (ibreq->ibr_name, &bptr); tableptr = tablepath; - have_tablepath = 1; } if (tableptr == NULL) { @@ -397,9 +411,8 @@ nis_list (const_nis_name name, unsigned int flags, ibreq->ibr_name = strdup (ibreq->ibr_name); if (ibreq->ibr_name == NULL) { - nis_free_request (ibreq); NIS_RES_STATUS (res) = NIS_NOMEMORY; - return res; + goto fail; } } } @@ -448,9 +461,8 @@ nis_list (const_nis_name name, unsigned int flags, ibreq->ibr_name = strdup (names[name_nr]); if (ibreq->ibr_name == NULL) { - nis_free_request (ibreq); NIS_RES_STATUS (res) = NIS_NOMEMORY; - return res; + goto fail; } first_try = 1; /* Try old binding at first */ goto again; @@ -464,12 +476,15 @@ nis_list (const_nis_name name, unsigned int flags, __nis_destroy_callback (cb); ibreq->ibr_cbhost.ibr_cbhost_len = 0; ibreq->ibr_cbhost.ibr_cbhost_val = NULL; + cb = NULL; } __nisbind_destroy (&bptr); nis_free_directory (dir); } + free (tablepath); + if (names != namebuf) nis_freenames (names); diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c index 152e5fc3fcc..6aa93ab3bc8 100644 --- a/nis/nss_nisplus/nisplus-alias.c +++ b/nis/nss_nisplus/nisplus-alias.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -32,7 +33,7 @@ __libc_lock_define_initialized (static, lock) static nis_result *result; static u_long next_entry; static nis_name tablename_val; -static u_long tablename_len; +static size_t tablename_len; #define NISENTRYVAL(idx,col,res) \ ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) @@ -45,19 +46,26 @@ _nss_create_tablename (int *errnop) { if (tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "mail_aliases.org_dir."; - p = __stpcpy (buf, "mail_aliases.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); + char *p = malloc (sizeof (prefix) + local_dir_len); if (tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + tablename_val = p; } + return NSS_STATUS_SUCCESS; } @@ -75,81 +83,73 @@ _nss_nisplus_parse_aliasent (nis_result *result, unsigned long entry, "mail_aliases") != 0 || result->objects.objects_val[entry].EN_data.en_cols.en_cols_len < 2) return 0; - else + + char *first_unused = buffer + NISENTRYLEN (0, 1, result) + 1; + size_t room_left = (buflen - (buflen % __alignof__ (char *)) + - NISENTRYLEN (0, 1, result) - 2); + + if (NISENTRYLEN (entry, 1, result) >= buflen) { - char *first_unused = buffer + NISENTRYLEN (0, 1, result) + 1; - size_t room_left = - buflen - (buflen % __alignof__ (char *)) - - NISENTRYLEN (0, 1, result) - 2; - char *line; - char *cp; - - if (NISENTRYLEN (entry, 1, result) >= buflen) - { - /* The line is too long for our buffer. */ - no_more_room: - *errnop = ERANGE; - return -1; - } - else - { - cp = __stpncpy (buffer, NISENTRYVAL (entry, 1, result), - NISENTRYLEN (entry, 1, result)); - *cp = '\0'; - } + /* The line is too long for our buffer. */ + no_more_room: + *errnop = ERANGE; + return -1; + } + + char *cp = __stpncpy (buffer, NISENTRYVAL (entry, 1, result), + NISENTRYLEN (entry, 1, result)); + *cp = '\0'; + + if (NISENTRYLEN(entry, 0, result) >= room_left) + goto no_more_room; + + alias->alias_local = 0; + alias->alias_members_len = 0; + *first_unused = '\0'; + ++first_unused; + cp = __stpncpy (first_unused, NISENTRYVAL (entry, 0, result), + NISENTRYLEN (entry, 0, result)); + *cp = '\0'; + alias->alias_name = first_unused; + + /* Terminate the line for any case. */ + cp = strpbrk (alias->alias_name, "#\n"); + if (cp != NULL) + *cp = '\0'; + + first_unused += strlen (alias->alias_name) +1; + /* Adjust the pointer so it is aligned for + storing pointers. */ + first_unused += __alignof__ (char *) - 1; + first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); + alias->alias_members = (char **) first_unused; + + char *line = buffer; + while (*line != '\0') + { + /* Skip leading blanks. */ + while (isspace (*line)) + ++line; + + if (*line == '\0') + break; - if (NISENTRYLEN(entry, 0, result) >= room_left) + if (room_left < sizeof (char *)) goto no_more_room; + room_left -= sizeof (char *); + alias->alias_members[alias->alias_members_len] = line; + + while (*line != '\0' && *line != ',') + ++line; - alias->alias_local = 0; - alias->alias_members_len = 0; - *first_unused = '\0'; - ++first_unused; - cp = __stpncpy (first_unused, NISENTRYVAL (entry, 0, result), - NISENTRYLEN (entry, 0, result)); - *cp = '\0'; - alias->alias_name = first_unused; - - /* Terminate the line for any case. */ - cp = strpbrk (alias->alias_name, "#\n"); - if (cp != NULL) - *cp = '\0'; - - first_unused += strlen (alias->alias_name) +1; - /* Adjust the pointer so it is aligned for - storing pointers. */ - first_unused += __alignof__ (char *) - 1; - first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); - alias->alias_members = (char **) first_unused; - - line = buffer; - - while (*line != '\0') + if (line != alias->alias_members[alias->alias_members_len]) { - /* Skip leading blanks. */ - while (isspace (*line)) - ++line; - - if (*line == '\0') - break; - - if (room_left < sizeof (char *)) - goto no_more_room; - room_left -= sizeof (char *); - alias->alias_members[alias->alias_members_len] = line; - - while (*line != '\0' && *line != ',') - ++line; - - if (line != alias->alias_members[alias->alias_members_len]) - { - *line++ = '\0'; - alias->alias_members_len++; - } + *line++ = '\0'; + alias->alias_members_len++; } - - return alias->alias_members_len == 0 ? 0 : 1; } + + return alias->alias_members_len == 0 ? 0 : 1; } static enum nss_status @@ -158,9 +158,11 @@ internal_setaliasent (void) enum nss_status status; int err; - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } if (_nss_create_tablename (&err) != NSS_STATUS_SUCCESS) return NSS_STATUS_UNAVAIL; @@ -203,9 +205,11 @@ _nss_nisplus_endaliasent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } next_entry = 0; __libc_lock_unlock (lock); @@ -240,7 +244,8 @@ internal_nisplus_getaliasent_r (struct aliasent *alias, return NSS_STATUS_TRYAGAIN; ++next_entry; - } while (!parse_res); + } + while (!parse_res); return NSS_STATUS_SUCCESS; } @@ -268,7 +273,12 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } @@ -278,35 +288,34 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias, *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - else - { - nis_result *result; - char buf[strlen (name) + 30 + tablename_len]; - int olderr = errno; - sprintf (buf, "[name=%s],%s", name, tablename_val); + char buf[strlen (name) + 9 + tablename_len]; + int olderr = errno; - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - return niserr2nss (result->status); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - parse_res = _nss_nisplus_parse_aliasent (result, 0, alias, - buffer, buflen, errnop); - if (parse_res < 1) - { - __set_errno (olderr); + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - if (parse_res == -1) - return NSS_STATUS_TRYAGAIN; - else - return NSS_STATUS_NOTFOUND; - } - return NSS_STATUS_SUCCESS; + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + return niserr2nss (result->status); + + parse_res = _nss_nisplus_parse_aliasent (result, 0, alias, + buffer, buflen, errnop); + if (__builtin_expect (parse_res < 1, 0)) + { + __set_errno (olderr); + + if (parse_res == -1) + return NSS_STATUS_TRYAGAIN; + else + return NSS_STATUS_NOTFOUND; } + + return NSS_STATUS_SUCCESS; } diff --git a/nis/nss_nisplus/nisplus-ethers.c b/nis/nss_nisplus/nisplus-ethers.c index 028309c8411..fcc550e743b 100644 --- a/nis/nss_nisplus/nisplus-ethers.c +++ b/nis/nss_nisplus/nisplus-ethers.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000-2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,15 +17,17 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include +#include #include -#include -#include +#include +#include #include +#include +#include #include -#include #include +#include +#include #include "nss-nisplus.h" @@ -70,7 +72,14 @@ _nss_nisplus_parse_etherent (nis_result *result, struct etherent *ether, room_left -= (NISENTRYLEN (0, 0, result) +1); ether->e_name = p; - ether->e_addr = *ether_aton (NISENTRYVAL (0, 1, result)); + struct ether_addr *ea = ether_aton (NISENTRYVAL (0, 1, result)); + if (ea == NULL) + { + *errnop = EINVAL; + return -2; + } + + ether->e_addr = *ea; return 1; } @@ -80,18 +89,24 @@ _nss_create_tablename (int *errnop) { if (tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "ethers.org_dir."; - p = __stpcpy (buf, "ethers.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); + char *p = malloc (sizeof (prefix) + local_dir_len); if (tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + tablename_val = p; } return NSS_STATUS_SUCCESS; } @@ -107,9 +122,11 @@ _nss_nisplus_setetherent (int stayopen) __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } if (_nss_create_tablename (&err) != NSS_STATUS_SUCCESS) status = NSS_STATUS_UNAVAIL; @@ -124,9 +141,11 @@ _nss_nisplus_endetherent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -137,8 +156,6 @@ static enum nss_status internal_nisplus_getetherent_r (struct etherent *ether, char *buffer, size_t buflen, int *errnop) { - int parse_res; - if (tablename_val == NULL) { enum nss_status status = _nss_create_tablename (errnop); @@ -148,6 +165,7 @@ internal_nisplus_getetherent_r (struct etherent *ether, char *buffer, } /* Get the next entry until we found a correct one. */ + int parse_res; do { nis_result *saved_result; @@ -161,11 +179,8 @@ internal_nisplus_getetherent_r (struct etherent *ether, char *buffer, } else { - nis_result *res2; - - res2 = nis_next_entry(tablename_val, &result->cookie); saved_result = result; - result = res2; + result = nis_next_entry (tablename_val, &result->cookie); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_result); @@ -178,17 +193,15 @@ internal_nisplus_getetherent_r (struct etherent *ether, char *buffer, if (parse_res == -1) { nis_freeresult (result); - *errnop = ERANGE; result = saved_result; return NSS_STATUS_TRYAGAIN; } - else - { - if (saved_result != NULL) - nis_freeresult (saved_result); - } - } while (!parse_res); + if (saved_result != NULL) + nis_freeresult (saved_result); + + } + while (!parse_res); return NSS_STATUS_SUCCESS; } @@ -212,8 +225,6 @@ enum nss_status _nss_nisplus_gethostton_r (const char *name, struct etherent *eth, char *buffer, size_t buflen, int *errnop) { - int parse_res; - if (tablename_val == NULL) { enum nss_status status = _nss_create_tablename (errnop); @@ -227,56 +238,57 @@ _nss_nisplus_gethostton_r (const char *name, struct etherent *eth, *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - else - { - nis_result *result; - char buf[strlen (name) + 40 + tablename_len]; - int olderr = errno; - sprintf (buf, "[name=%s],%s", name, tablename_val); + char buf[strlen (name) + 9 + tablename_len]; + int olderr = errno; - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); - nis_freeresult (result); - return status; - } + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - parse_res = _nss_nisplus_parse_etherent (result, eth, buffer, + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } + + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); + nis_freeresult (result); + return status; + } + + int parse_res = _nss_nisplus_parse_etherent (result, eth, buffer, buflen, errnop); - if (parse_res < 1) - { - __set_errno (olderr); + if (__builtin_expect (parse_res < 1, 0)) + { + __set_errno (olderr); - if (parse_res == -1) - { - nis_freeresult (result); - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - return NSS_STATUS_NOTFOUND; + if (parse_res == -1) + { + nis_freeresult (result); + return NSS_STATUS_TRYAGAIN; } - return NSS_STATUS_SUCCESS; + else + return NSS_STATUS_NOTFOUND; } + + return NSS_STATUS_SUCCESS; } enum nss_status -_nss_nisplus_getntohost_r (const struct ether_addr *addr, - struct etherent *eth, +_nss_nisplus_getntohost_r (const struct ether_addr *addr, struct etherent *eth, char *buffer, size_t buflen, int *errnop) { if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } @@ -286,44 +298,44 @@ _nss_nisplus_getntohost_r (const struct ether_addr *addr, *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - else - { - int parse_res; - nis_result *result; - char buf[255 + tablename_len]; - sprintf (buf, "[addr=%x:%x:%x:%x:%x:%x],ethers.org_dir", - addr->ether_addr_octet[0], addr->ether_addr_octet[1], - addr->ether_addr_octet[2], addr->ether_addr_octet[3], - addr->ether_addr_octet[4], addr->ether_addr_octet[5]); + char buf[26 + tablename_len]; - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + snprintf (buf, sizeof (buf), + "[addr=%" PRIx8 ":%" PRIx8 ":%" PRIx8 ":%" PRIx8 ":%" PRIx8 + ":%" PRIx8 "],%s", + addr->ether_addr_octet[0], addr->ether_addr_octet[1], + addr->ether_addr_octet[2], addr->ether_addr_octet[3], + addr->ether_addr_octet[4], addr->ether_addr_octet[5], + tablename_val); - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); - nis_freeresult (result); - return status; - } + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - parse_res = _nss_nisplus_parse_etherent (result, eth, buffer, + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } + + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); + nis_freeresult (result); + return status; + } + + int parse_res = _nss_nisplus_parse_etherent (result, eth, buffer, buflen, errnop); - if (parse_res < 1) + if (__builtin_expect (parse_res < 1, 0)) + { + if (parse_res == -1) { - if (parse_res == -1) - { - nis_freeresult (result); - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - return NSS_STATUS_NOTFOUND; + nis_freeresult (result); + return NSS_STATUS_TRYAGAIN; } - return NSS_STATUS_SUCCESS; + + return NSS_STATUS_NOTFOUND; } + + return NSS_STATUS_SUCCESS; } diff --git a/nis/nss_nisplus/nisplus-grp.c b/nis/nss_nisplus/nisplus-grp.c index daca94fc87f..423f7e72911 100644 --- a/nis/nss_nisplus/nisplus-grp.c +++ b/nis/nss_nisplus/nisplus-grp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -28,31 +29,39 @@ #include "nss-nisplus.h" #include "nisplus-parser.h" + __libc_lock_define_initialized (static, lock); static nis_result *result; static unsigned long next_entry; static nis_name tablename_val; -static u_long tablename_len; +static size_t tablename_len; static enum nss_status _nss_create_tablename (int *errnop) { if (tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "group.org_dir."; - p = __stpcpy (buf, "group.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); + char *p = malloc (sizeof (prefix) + local_dir_len); if (tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + tablename_val = p; } + return NSS_STATUS_SUCCESS; } @@ -60,16 +69,20 @@ static enum nss_status internal_setgrent (void) { enum nss_status status; - int err; - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } next_entry = 0; if (tablename_val == NULL) - if (_nss_create_tablename (&err) != NSS_STATUS_SUCCESS) - return NSS_STATUS_UNAVAIL; + { + int err; + if (_nss_create_tablename (&err) != NSS_STATUS_SUCCESS) + return NSS_STATUS_UNAVAIL; + } result = nis_list (tablename_val, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); if (result == NULL) @@ -108,9 +121,11 @@ _nss_nisplus_endgrent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -173,8 +188,12 @@ _nss_nisplus_getgrnam_r (const char *name, struct group *gr, if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } @@ -184,47 +203,46 @@ _nss_nisplus_getgrnam_r (const char *name, struct group *gr, *errnop = EINVAL; return NSS_STATUS_NOTFOUND; } - else + + nis_result *result; + char buf[strlen (name) + 9 + tablename_len]; + int olderr = errno; + + snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); + + result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + + if (result == NULL) { - nis_result *result; - char buf[strlen (name) + 24 + tablename_len]; - int olderr = errno; + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - sprintf (buf, "[name=%s],%s", name, tablename_val); + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); - result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + nis_freeresult (result); + return status; + } - if (result == NULL) + parse_res = _nss_nisplus_parse_grent (result, 0, gr, buffer, buflen, errnop); + nis_freeresult (result); + if (__builtin_expect (parse_res < 1, 0)) + { + if (parse_res == -1) { - *errnop = ENOMEM; + *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); - - nis_freeresult (result); - return status; - } - - parse_res = _nss_nisplus_parse_grent (result, 0, gr, buffer, buflen, - errnop); - nis_freeresult (result); - if (parse_res < 1) + else { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } - return NSS_STATUS_SUCCESS; } + + return NSS_STATUS_SUCCESS; } enum nss_status @@ -233,53 +251,57 @@ _nss_nisplus_getgrgid_r (const gid_t gid, struct group *gr, { if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } - { - int parse_res; - nis_result *result; - char buf[36 + tablename_len]; - int olderr = errno; + int parse_res; + nis_result *result; + char buf[8 + 3 * sizeof (unsigned long int) + tablename_len]; + int olderr = errno; - sprintf (buf, "[gid=%lu],%s", (unsigned long int) gid, tablename_val); + snprintf (buf, sizeof (buf), "[gid=%lu],%s", + (unsigned long int) gid, tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - __set_errno (olderr); + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); - nis_freeresult (result); - return status; - } - - parse_res = _nss_nisplus_parse_grent (result, 0, gr, buffer, buflen, - errnop); - - nis_freeresult (result); - if (parse_res < 1) - { - __set_errno (olderr); - - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - return NSS_STATUS_NOTFOUND; - } - return NSS_STATUS_SUCCESS; - } + __set_errno (olderr); + + nis_freeresult (result); + return status; + } + + parse_res = _nss_nisplus_parse_grent (result, 0, gr, buffer, buflen, errnop); + + nis_freeresult (result); + if (__builtin_expect (parse_res < 1, 0)) + { + __set_errno (olderr); + + if (parse_res == -1) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + return NSS_STATUS_NOTFOUND; + } + + return NSS_STATUS_SUCCESS; } diff --git a/nis/nss_nisplus/nisplus-hosts.c b/nis/nss_nisplus/nisplus-hosts.c index 540469894e0..81f8a984dcd 100644 --- a/nis/nss_nisplus/nisplus-hosts.c +++ b/nis/nss_nisplus/nisplus-hosts.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,15 +17,16 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include -#include +#include #include +#include +#include +#include #include -#include #include -#include +#include #include +#include #include "nss-nisplus.h" @@ -180,19 +181,26 @@ _nss_create_tablename (int *errnop) { if (tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "hosts.org_dir."; - p = __stpcpy (buf, "hosts.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); + char *p = malloc (sizeof (prefix) + local_dir_len); if (tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + tablename_val = p; } + return NSS_STATUS_SUCCESS; } @@ -204,9 +212,11 @@ _nss_nisplus_sethostent (int stayopen) __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } if (tablename_val == NULL) status = _nss_create_tablename (&err); @@ -221,9 +231,11 @@ _nss_nisplus_endhostent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -335,8 +347,12 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host, if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) { *herrnop = NETDB_INTERNAL; @@ -350,75 +366,81 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host, *herrnop = NETDB_INTERNAL; return NSS_STATUS_NOTFOUND; } - else - { - nis_result *result; - char buf[strlen (name) + 255 + tablename_len]; - int olderr = errno; - /* Search at first in the alias list, and use the correct name - for the next search */ - sprintf (buf, "[name=%s],%s", name, tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + nis_result *result; + char buf[strlen (name) + 10 + tablename_len]; + int olderr = errno; - if (result != NULL) - { - /* If we do not find it, try it as original name. But if the - database is correct, we should find it in the first case, too */ - if ((result->status != NIS_SUCCESS - && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val->EN_data.en_type, - "hosts_tbl") != 0 - || result->objects.objects_val->EN_data.en_cols.en_cols_len < 3) - sprintf (buf, "[cname=%s],%s", name, tablename_val); - else - sprintf (buf, "[cname=%s],%s", NISENTRYVAL(0, 0, result), - tablename_val); - - nis_freeresult (result); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - } + /* Search at first in the alias list, and use the correct name + for the next search. */ + snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); + result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (result == NULL) + if (result != NULL) + { + char *bufptr = buf; + + /* If we did not find it, try it as original name. But if the + database is correct, we should find it in the first case, too. */ + if ((result->status != NIS_SUCCESS + && result->status != NIS_S_SUCCESS) + || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ + || strcmp (result->objects.objects_val->EN_data.en_type, + "hosts_tbl") != 0 + || result->objects.objects_val->EN_data.en_cols.en_cols_len < 3) + snprintf (buf, sizeof (buf), "[cname=%s],%s", name, tablename_val); + else { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; + /* We need to allocate a new buffer since there is no + guarantee the returned name has a length limit. */ + const char *entryval = NISENTRYVAL(0, 0, result); + size_t buflen = strlen (entryval) + 10 + tablename_len; + bufptr = alloca (buflen); + snprintf (bufptr, buflen, "[cname=%s],%s", + entryval, tablename_val); } - retval = niserr2nss (result->status); - if (retval != NSS_STATUS_SUCCESS) - { - if (retval == NSS_STATUS_TRYAGAIN) - { - *errnop = errno; - *herrnop = NETDB_INTERNAL; - } - else - __set_errno (olderr); - nis_freeresult (result); - return retval; - } - - parse_res = _nss_nisplus_parse_hostent (result, af, host, buffer, - buflen, errnop, flags); nis_freeresult (result); + result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + } - if (parse_res > 0) - return NSS_STATUS_SUCCESS; + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - *herrnop = NETDB_INTERNAL; - if (parse_res == -1) + retval = niserr2nss (result->status); + if (__builtin_expect (retval != NSS_STATUS_SUCCESS, 0)) + { + if (retval == NSS_STATUS_TRYAGAIN) { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; + *errnop = errno; + *herrnop = NETDB_INTERNAL; } else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + __set_errno (olderr); + nis_freeresult (result); + return retval; } + + parse_res = _nss_nisplus_parse_hostent (result, af, host, buffer, + buflen, errnop, flags); + + nis_freeresult (result); + + if (parse_res > 0) + return NSS_STATUS_SUCCESS; + + *herrnop = NETDB_INTERNAL; + if (parse_res == -1) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } enum nss_status @@ -431,17 +453,6 @@ _nss_nisplus_gethostbyname2_r (const char *name, int af, struct hostent *host, ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0)); } -#if 0 -enum nss_status -_nss_nisplus_getipnodebyname_r (const char *name, int af, int flags, - struct hostent *result, char *buffer, - size_t buflen, int *errnop, int *herrnop) -{ - return internal_gethostbyname2_r (name, af, result, buffer, buflen, - errnop, herrnop, flags); -} -#endif - enum nss_status _nss_nisplus_gethostbyname_r (const char *name, struct hostent *host, char *buffer, size_t buflen, int *errnop, @@ -469,62 +480,63 @@ _nss_nisplus_gethostbyaddr_r (const void *addr, socklen_t addrlen, int af, { if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } if (addr == NULL) return NSS_STATUS_NOTFOUND; - else - { - nis_result *result; - char buf[255 + tablename_len]; - int retval, parse_res; - int olderr = errno; - sprintf (buf, "[addr=%s],%s", - inet_ntoa (*(const struct in_addr *) addr), tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - - if (result == NULL) - { - __set_errno (ENOMEM); - return NSS_STATUS_TRYAGAIN; - } - retval = niserr2nss (result->status); - if (retval != NSS_STATUS_SUCCESS) - { - if (retval == NSS_STATUS_TRYAGAIN) - { - *errnop = errno; - *herrnop = NETDB_INTERNAL; - } - else - __set_errno (olderr); - nis_freeresult (result); - return retval; - } + char buf[24 + tablename_len]; + int retval, parse_res; + int olderr = errno; - parse_res = _nss_nisplus_parse_hostent (result, af, host, - buffer, buflen, errnop, - ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0)); - nis_freeresult (result); + snprintf (buf, sizeof (buf), "[addr=%s],%s", + inet_ntoa (*(const struct in_addr *) addr), tablename_val); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (parse_res > 0) - return NSS_STATUS_SUCCESS; + if (result == NULL) + { + __set_errno (ENOMEM); + return NSS_STATUS_TRYAGAIN; + } - *herrnop = NETDB_INTERNAL; - if (parse_res == -1) + retval = niserr2nss (result->status); + if (__builtin_expect (retval != NSS_STATUS_SUCCESS, 0)) + { + if (retval == NSS_STATUS_TRYAGAIN) { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; + *errnop = errno; + *herrnop = NETDB_INTERNAL; } else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + __set_errno (olderr); + nis_freeresult (result); + return retval; + } + + parse_res = _nss_nisplus_parse_hostent (result, af, host, + buffer, buflen, errnop, + ((_res.options & RES_USE_INET6) + ? AI_V4MAPPED : 0)); + nis_freeresult (result); + + if (parse_res > 0) + return NSS_STATUS_SUCCESS; + + *herrnop = NETDB_INTERNAL; + if (parse_res == -1) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; } + + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } diff --git a/nis/nss_nisplus/nisplus-netgrp.c b/nis/nss_nisplus/nisplus-netgrp.c index 344d65f4c49..31a8cdf0976 100644 --- a/nis/nss_nisplus/nisplus-netgrp.c +++ b/nis/nss_nisplus/nisplus-netgrp.c @@ -150,15 +150,14 @@ internal_endnetgrent (struct __netgrent *netgrp) enum nss_status _nss_nisplus_setnetgrent (const char *group, struct __netgrent *netgrp) { - enum nss_status status; - char buf[strlen (group) + 30]; + char buf[strlen (group) + 25]; if (group == NULL || group[0] == '\0') return NSS_STATUS_UNAVAIL; - status = NSS_STATUS_SUCCESS; + enum nss_status status = NSS_STATUS_SUCCESS; - sprintf (buf, "[name=%s],netgroup.org_dir", group); + snprintf (buf, sizeof (buf), "[name=%s],netgroup.org_dir", group); netgrp->data = (char *) nis_list (buf, EXPAND_NAME, NULL, NULL); diff --git a/nis/nss_nisplus/nisplus-network.c b/nis/nss_nisplus/nisplus-network.c index 422b02b82ac..dc6b99e5051 100644 --- a/nis/nss_nisplus/nisplus-network.c +++ b/nis/nss_nisplus/nisplus-network.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000-2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,15 +17,16 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include -#include +#include #include +#include +#include +#include #include #include #include -#include #include +#include #include "nss-nisplus.h" @@ -44,12 +45,10 @@ static u_long tablename_len; static int _nss_nisplus_parse_netent (nis_result *result, struct netent *network, - char *buffer, size_t buflen, int *errnop) + char *buffer, size_t buflen, int *errnop) { char *first_unused = buffer; size_t room_left = buflen; - unsigned int i; - char *p, *line; if (result == NULL) return 0; @@ -61,7 +60,7 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network, || result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 3) return 0; - if (NISENTRYLEN(0, 0, result) >= room_left) + if (NISENTRYLEN (0, 0, result) >= room_left) { /* The line is too long for our buffer. */ no_more_room: @@ -69,7 +68,7 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network, return -1; } - strncpy (first_unused, NISENTRYVAL(0, 0, result), + strncpy (first_unused, NISENTRYVAL (0, 0, result), NISENTRYLEN (0, 0, result)); first_unused[NISENTRYLEN (0, 0, result)] = '\0'; network->n_name = first_unused; @@ -77,10 +76,10 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network, first_unused += strlen (first_unused) +1; network->n_addrtype = 0; network->n_net = inet_network (NISENTRYVAL (0, 2, result)); - p = first_unused; + char *p = first_unused; - line = p; - for (i = 0; i < result->objects.objects_len; ++i) + char *line = p; + for (unsigned int i = 0; i < result->objects.objects_len; ++i) { if (strcmp (NISENTRYVAL (i, 1, result), network->n_name) != 0) { @@ -107,12 +106,12 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network, room_left -= (2 * sizeof (char *)); network->n_aliases[0] = NULL; - i = 0; + unsigned int i = 0; while (*line != '\0') { /* Skip leading blanks. */ while (isspace (*line)) - line++; + ++line; if (*line == '\0') break; @@ -133,7 +132,7 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network, ++i; } else - network->n_aliases[i+1] = NULL; + network->n_aliases[i + 1] = NULL; } return 1; @@ -144,19 +143,26 @@ _nss_create_tablename (int *errnop) { if (tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "networks.org_dir."; - p = __stpcpy (buf, "networks.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); + char *p = malloc (sizeof (prefix) + local_dir_len); if (tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + tablename_val = p; } + return NSS_STATUS_SUCCESS; } @@ -164,16 +170,20 @@ enum nss_status _nss_nisplus_setnetent (int stayopen) { enum nss_status status = NSS_STATUS_SUCCESS; - int err; __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } if (tablename_val == NULL) - status = _nss_create_tablename (&err); + { + int err; + status = _nss_create_tablename (&err); + } __libc_lock_unlock (lock); @@ -185,9 +195,11 @@ _nss_nisplus_endnetent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -220,9 +232,7 @@ internal_nisplus_getnetent_r (struct netent *network, char *buffer, result = nis_first_entry (tablename_val); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { - int retval; - - retval = niserr2nss (result->status); + int retval = niserr2nss (result->status); nis_freeresult (result); result = NULL; if (retval == NSS_STATUS_TRYAGAIN) @@ -237,16 +247,12 @@ internal_nisplus_getnetent_r (struct netent *network, char *buffer, } else { - nis_result *res; - - res = nis_next_entry (tablename_val, &result->cookie); + nis_result *res = nis_next_entry (tablename_val, &result->cookie); saved_res = result; result = res; if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { - int retval; - - retval = niserr2nss (result->status); + int retval = niserr2nss (result->status); nis_freeresult (result); result = saved_res; if (retval == NSS_STATUS_TRYAGAIN) @@ -266,7 +272,8 @@ internal_nisplus_getnetent_r (struct netent *network, char *buffer, return NSS_STATUS_TRYAGAIN; } - } while (!parse_res); + } + while (!parse_res); return NSS_STATUS_SUCCESS; } @@ -296,8 +303,12 @@ _nss_nisplus_getnetbyname_r (const char *name, struct netent *network, if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } @@ -308,76 +319,82 @@ _nss_nisplus_getnetbyname_r (const char *name, struct netent *network, *herrnop = NETDB_INTERNAL; return NSS_STATUS_UNAVAIL; } - else - { - nis_result *result; - char buf[strlen (name) + 255 + tablename_len]; - int olderr = errno; - /* Search at first in the alias list, and use the correct name - for the next search */ - sprintf (buf, "[name=%s],%s", name, tablename_val); - result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + nis_result *result; + char buf[strlen (name) + 10 + tablename_len]; + int olderr = errno; - if (result != NULL) - { - /* If we do not find it, try it as original name. But if the - database is correct, we should find it in the first case, too */ - if ((result->status != NIS_SUCCESS - && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val[0].EN_data.en_type, - "networks_tbl") != 0 - || (result->objects.objects_val[0].EN_data.en_cols.en_cols_len - < 3)) - sprintf (buf, "[cname=%s],%s", name, tablename_val); - else - sprintf (buf, "[cname=%s],%s", NISENTRYVAL (0, 0, result), - tablename_val); - - nis_freeresult (result); - result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); - } + /* Search at first in the alias list, and use the correct name + for the next search */ + snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); + result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); - if (result == NULL) - { - __set_errno (ENOMEM); - return NSS_STATUS_TRYAGAIN; - } - retval = niserr2nss (result->status); - if (retval != NSS_STATUS_SUCCESS) + if (result != NULL) + { + char *bufptr = buf; + + /* If we do not find it, try it as original name. But if the + database is correct, we should find it in the first case, too */ + if ((result->status != NIS_SUCCESS + && result->status != NIS_S_SUCCESS) + || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ + || strcmp (result->objects.objects_val[0].EN_data.en_type, + "networks_tbl") != 0 + || (result->objects.objects_val[0].EN_data.en_cols.en_cols_len + < 3)) + snprintf (buf, sizeof (buf), "[cname=%s],%s", name, tablename_val); + else { - if (retval == NSS_STATUS_TRYAGAIN) - { - *errnop = errno; - *herrnop = NETDB_INTERNAL; - } - else - __set_errno (olderr); - nis_freeresult (result); - return retval; + /* We need to allocate a new buffer since there is no + guarantee the returned name has a length limit. */ + const char *entryval = NISENTRYVAL (0, 0, result); + size_t buflen = strlen (entryval) + 10 + tablename_len; + bufptr = alloca (buflen); + snprintf (bufptr, buflen, "[cname=%s],%s", + entryval, tablename_val); } - parse_res = _nss_nisplus_parse_netent (result, network, buffer, buflen, - errnop); - nis_freeresult (result); + result = nis_list (bufptr, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + } - if (parse_res > 0) - return NSS_STATUS_SUCCESS; + if (result == NULL) + { + __set_errno (ENOMEM); + return NSS_STATUS_TRYAGAIN; + } - *herrnop = NETDB_INTERNAL; - if (parse_res == -1) + retval = niserr2nss (result->status); + if (__builtin_expect (retval != NSS_STATUS_SUCCESS, 0)) + { + if (retval == NSS_STATUS_TRYAGAIN) { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; + *errnop = errno; + *herrnop = NETDB_INTERNAL; } else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + __set_errno (olderr); + nis_freeresult (result); + return retval; + } + + parse_res = _nss_nisplus_parse_netent (result, network, buffer, buflen, + errnop); + + nis_freeresult (result); + + if (parse_res > 0) + return NSS_STATUS_SUCCESS; + + *herrnop = NETDB_INTERNAL; + if (parse_res == -1) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; } + + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } /* XXX type is ignored, SUN's NIS+ table doesn't support it */ @@ -388,39 +405,39 @@ _nss_nisplus_getnetbyaddr_r (uint32_t addr, const int type, { if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } { - int parse_res, retval; - nis_result *result; - char buf[1024 + tablename_len]; - struct in_addr in; - char buf2[256]; - int b2len; + char buf[27 + tablename_len]; + char buf2[18]; int olderr = errno; - in = inet_makeaddr (addr, 0); + struct in_addr in = inet_makeaddr (addr, 0); strcpy (buf2, inet_ntoa (in)); - b2len = strlen (buf2); + size_t b2len = strlen (buf2); while (1) { - sprintf (buf, "[addr=%s],%s", buf2, tablename_val); - result = nis_list (buf, EXPAND_NAME, NULL, NULL); + snprintf (buf, sizeof (buf), "[addr=%s],%s", buf2, tablename_val); + nis_result *result = nis_list (buf, EXPAND_NAME, NULL, NULL); if (result == NULL) { __set_errno (ENOMEM); return NSS_STATUS_TRYAGAIN; } - retval = niserr2nss (result->status); - if (retval != NSS_STATUS_SUCCESS) + enum nss_status retval = niserr2nss (result->status); + if (__builtin_expect (retval != NSS_STATUS_SUCCESS, 0)) { - if (buf2[b2len -2] == '.' && buf2[b2len -1] == '0') + if (b2len > 2 && buf2[b2len - 2] == '.' && buf2[b2len - 1] == '0') { /* Try again, but with trailing dot(s) removed (one by one) */ @@ -428,8 +445,6 @@ _nss_nisplus_getnetbyaddr_r (uint32_t addr, const int type, b2len -= 2; continue; } - else - return NSS_STATUS_NOTFOUND; if (retval == NSS_STATUS_TRYAGAIN) { @@ -442,8 +457,8 @@ _nss_nisplus_getnetbyaddr_r (uint32_t addr, const int type, return retval; } - parse_res = _nss_nisplus_parse_netent (result, network, buffer, - buflen, errnop); + int parse_res = _nss_nisplus_parse_netent (result, network, buffer, + buflen, errnop); nis_freeresult (result); diff --git a/nis/nss_nisplus/nisplus-proto.c b/nis/nss_nisplus/nisplus-proto.c index 83456cae64d..585a4844ad5 100644 --- a/nis/nss_nisplus/nisplus-proto.c +++ b/nis/nss_nisplus/nisplus-proto.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,13 +17,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include +#include #include +#include #include +#include #include -#include #include +#include #include "nss-nisplus.h" @@ -141,19 +142,26 @@ _nss_create_tablename (int *errnop) { if (tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "protocols.org_dir."; - p = __stpcpy (buf, "protocols.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); + char *p = malloc (sizeof (prefix) + local_dir_len); if (tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + tablename_val = p; } + return NSS_STATUS_SUCCESS; } @@ -164,9 +172,11 @@ _nss_nisplus_setprotoent (int stayopen) __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } if (tablename_val == NULL) { @@ -184,9 +194,11 @@ _nss_nisplus_endprotoent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -221,11 +233,8 @@ internal_nisplus_getprotoent_r (struct protoent *proto, char *buffer, } else { - nis_result *res; - saved_res = result; - res = nis_next_entry (tablename_val, &result->cookie); - result = res; + result = nis_next_entry (tablename_val, &result->cookie); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { @@ -277,79 +286,91 @@ _nss_nisplus_getprotobyname_r (const char *name, struct protoent *proto, if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } if (name == NULL) return NSS_STATUS_NOTFOUND; - else - { - nis_result *result; - char buf[strlen (name) + 255 + tablename_len]; - int olderr = errno; - - /* Search at first in the alias list, and use the correct name - for the next search */ - sprintf (buf, "[name=%s],%s", name, tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (result != NULL) - { - /* If we do not find it, try it as original name. But if the - database is correct, we should find it in the first case, too */ - if ((result->status != NIS_SUCCESS - && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val->EN_data.en_type, - "protocols_tbl") != 0 - || result->objects.objects_val->EN_data.en_cols.en_cols_len < 3) - sprintf (buf, "[cname=%s],%s", name, tablename_val); - else - sprintf (buf, "[cname=%s],%s", NISENTRYVAL (0, 0, result), - tablename_val); + char buf[strlen (name) + 10 + tablename_len]; + int olderr = errno; - nis_freeresult (result); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - } + /* Search at first in the alias list, and use the correct name + for the next search */ + snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (result == NULL) + if (result != NULL) + { + char *bufptr = buf; + + /* If we did not find it, try it as original name. But if the + database is correct, we should find it in the first case, too */ + if ((result->status != NIS_SUCCESS + && result->status != NIS_S_SUCCESS) + || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ + || strcmp (result->objects.objects_val->EN_data.en_type, + "protocols_tbl") != 0 + || result->objects.objects_val->EN_data.en_cols.en_cols_len < 3) + snprintf (buf, sizeof (buf), "[cname=%s],%s", name, tablename_val); + else { - __set_errno (ENOMEM); - return NSS_STATUS_TRYAGAIN; + /* We need to allocate a new buffer since there is no + guarantee the returned name has a length limit. */ + const char *entryval = NISENTRYVAL (0, 0, result); + size_t buflen = strlen (entryval) + 10 + tablename_len; + bufptr = alloca (buflen); + snprintf (bufptr, buflen, "[cname=%s],%s", + entryval, tablename_val); } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); - __set_errno (olderr); + nis_freeresult (result); + result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + } - nis_freeresult (result); - return status; - } + if (result == NULL) + { + __set_errno (ENOMEM); + return NSS_STATUS_TRYAGAIN; + } - parse_res = _nss_nisplus_parse_protoent (result, proto, buffer, buflen, - errnop); + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); + + __set_errno (olderr); nis_freeresult (result); + return status; + } - if (parse_res < 1) + parse_res = _nss_nisplus_parse_protoent (result, proto, buffer, buflen, + errnop); + + nis_freeresult (result); + + if (parse_res < 1) + { + if (parse_res == -1) { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + { + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } - return NSS_STATUS_SUCCESS; } + + return NSS_STATUS_SUCCESS; } enum nss_status @@ -358,55 +379,57 @@ _nss_nisplus_getprotobynumber_r (const int number, struct protoent *proto, { if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } - { - int parse_res; - nis_result *result; - char buf[46 + tablename_len]; - int olderr = errno; + char buf[12 + 3 * sizeof (number) + tablename_len]; + int olderr = errno; - sprintf (buf, "[number=%d],%s", number, tablename_val); + snprintf (buf, sizeof (buf), "[number=%d],%s", number, tablename_val); - result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + nis_result *result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); - if (result == NULL) - { - __set_errno (ENOMEM); - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); + if (result == NULL) + { + __set_errno (ENOMEM); + return NSS_STATUS_TRYAGAIN; + } - __set_errno (olderr); + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); - nis_freeresult (result); - return status; - } - - parse_res = _nss_nisplus_parse_protoent (result, proto, buffer, buflen, - errnop); - - nis_freeresult (result); - - if (parse_res < 1) - { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } - } - return NSS_STATUS_SUCCESS; - } + __set_errno (olderr); + + nis_freeresult (result); + return status; + } + + int parse_res = _nss_nisplus_parse_protoent (result, proto, buffer, buflen, + errnop); + + nis_freeresult (result); + + if (parse_res < 1) + { + if (parse_res == -1) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + { + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; + } + } + + return NSS_STATUS_SUCCESS; } diff --git a/nis/nss_nisplus/nisplus-publickey.c b/nis/nss_nisplus/nisplus-publickey.c index 58ae7012afa..c24e898137a 100644 --- a/nis/nss_nisplus/nisplus-publickey.c +++ b/nis/nss_nisplus/nisplus-publickey.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1999, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1999, 2001, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -37,7 +37,7 @@ _nss_nisplus_getpublickey (const char *netname, char *pkey, int *errnop) { nis_result *res; enum nss_status retval; - char buf[NIS_MAXNAMELEN+2]; + char buf[NIS_MAXNAMELEN + 2]; size_t slen; char *domain, *cptr; int len; @@ -120,7 +120,7 @@ _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd, { nis_result *res; enum nss_status retval; - char buf[NIS_MAXNAMELEN+2]; + char buf[NIS_MAXNAMELEN + 2]; size_t slen; char *domain, *cptr; int len; @@ -154,7 +154,7 @@ _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd, buf[slen] = '\0'; } - res = nis_list (buf, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH, + res = nis_list (buf, USE_DGRAM | NO_AUTHINFO | FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); if (res == NULL) @@ -242,9 +242,9 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp, { char *domain; nis_result *res; - char sname[NIS_MAXNAMELEN+2]; /* search criteria + table name */ + char sname[NIS_MAXNAMELEN + 2]; /* search criteria + table name */ size_t slen; - char principal[NIS_MAXNAMELEN+1]; + char principal[NIS_MAXNAMELEN + 1]; int len; /* 1. Get home domain of user. */ @@ -255,10 +255,6 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp, ++domain; /* skip '@' */ /* 2. Get user's nisplus principal name. */ - if ((strlen (netname) + strlen (domain)+45) > - (size_t) NIS_MAXNAMELEN) - return NSS_STATUS_UNAVAIL; - slen = snprintf (sname, NIS_MAXNAMELEN, "[auth_name=%s,auth_type=DES],cred.org_dir.%s", netname, domain); @@ -339,8 +335,9 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp, return NSS_STATUS_UNAVAIL; } - slen = sprintf (sname, "[cname=%s,auth_type=LOCAL],cred.org_dir.%s", - principal, domain); + slen = snprintf (sname, sizeof (sname), + "[cname=%s,auth_type=LOCAL],cred.org_dir.%s", + principal, domain); if (sname[slen - 1] != '.') { diff --git a/nis/nss_nisplus/nisplus-pwd.c b/nis/nss_nisplus/nisplus-pwd.c index 8f3bc997b3f..97679dd3497 100644 --- a/nis/nss_nisplus/nisplus-pwd.c +++ b/nis/nss_nisplus/nisplus-pwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1999,2001,2002,2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -30,27 +31,39 @@ __libc_lock_define_initialized (static, lock) static nis_result *result; -static nis_name tablename_val; -static u_long tablename_len; +nis_name pwd_tablename_val attribute_hidden; +size_t pwd_tablename_len attribute_hidden; -static enum nss_status -_nss_create_tablename (int *errnop) +enum nss_status +_nss_pwd_create_tablename (int *errnop) { - if (tablename_val == NULL) + if (pwd_tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "passwd.org_dir."; - p = __stpcpy (buf, "passwd.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); - if (tablename_val == NULL) + char *p = malloc (sizeof (prefix) + local_dir_len); + if (pwd_tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + pwd_tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + if (atomic_compare_and_exchange_bool_acq (&pwd_tablename_val, p, NULL)) + { + /* Another thread already installed the value. */ + free (p); + pwd_tablename_len = strlen (pwd_tablename_val); + } } + return NSS_STATUS_SUCCESS; } @@ -59,16 +72,20 @@ enum nss_status _nss_nisplus_setpwent (int stayopen) { enum nss_status status = NSS_STATUS_SUCCESS; - int err; __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } - if (tablename_val == NULL) - status = _nss_create_tablename (&err); + if (pwd_tablename_val == NULL) + { + int err; + status = _nss_pwd_create_tablename (&err); + } __libc_lock_unlock (lock); @@ -80,9 +97,11 @@ _nss_nisplus_endpwent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -103,25 +122,22 @@ internal_nisplus_getpwent_r (struct passwd *pw, char *buffer, size_t buflen, if (result == NULL) { saved_res = NULL; - if (tablename_val == NULL) + if (pwd_tablename_val == NULL) { - enum nss_status status = _nss_create_tablename (errnop); + enum nss_status status = _nss_pwd_create_tablename (errnop); if (status != NSS_STATUS_SUCCESS) return status; } - result = nis_first_entry (tablename_val); + result = nis_first_entry (pwd_tablename_val); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) return niserr2nss (result->status); } else { - nis_result *res; - saved_res = result; - res = nis_next_entry (tablename_val, &result->cookie); - result = res; + result = nis_next_entry (pwd_tablename_val, &result->cookie); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_res); @@ -131,19 +147,18 @@ internal_nisplus_getpwent_r (struct passwd *pw, char *buffer, size_t buflen, parse_res = _nss_nisplus_parse_pwent (result, pw, buffer, buflen, errnop); - if (parse_res == -1) + if (__builtin_expect (parse_res == -1, 0)) { nis_freeresult (result); result = saved_res; *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - else - { - if (saved_res) - nis_freeresult (saved_res); - } - } while (!parse_res); + + if (saved_res) + nis_freeresult (saved_res); + } + while (!parse_res); return NSS_STATUS_SUCCESS; } @@ -169,9 +184,9 @@ _nss_nisplus_getpwnam_r (const char *name, struct passwd *pw, { int parse_res; - if (tablename_val == NULL) + if (pwd_tablename_val == NULL) { - enum nss_status status = _nss_create_tablename (errnop); + enum nss_status status = _nss_pwd_create_tablename (errnop); if (status != NSS_STATUS_SUCCESS) return status; @@ -182,107 +197,107 @@ _nss_nisplus_getpwnam_r (const char *name, struct passwd *pw, *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - else - { - nis_result *result; - char buf[strlen (name) + 24 + tablename_len]; - int olderr = errno; - sprintf (buf, "[name=%s],%s", name, tablename_val); + nis_result *result; + char buf[strlen (name) + 9 + pwd_tablename_len]; + int olderr = errno; - result = nis_list(buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + snprintf (buf, sizeof (buf), "[name=%s],%s", name, pwd_tablename_val); - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); + result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - __set_errno (olderr); + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - nis_freeresult (result); - return status; - } + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); - parse_res = _nss_nisplus_parse_pwent (result, pw, buffer, buflen, - errnop); + __set_errno (olderr); nis_freeresult (result); + return status; + } + + parse_res = _nss_nisplus_parse_pwent (result, pw, buffer, buflen, errnop); + + nis_freeresult (result); - if (parse_res < 1) + if (__builtin_expect (parse_res < 1, 0)) + { + if (parse_res == -1) { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + { + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } - return NSS_STATUS_SUCCESS; } + + return NSS_STATUS_SUCCESS; } enum nss_status _nss_nisplus_getpwuid_r (const uid_t uid, struct passwd *pw, char *buffer, size_t buflen, int *errnop) { - if (tablename_val == NULL) + if (pwd_tablename_val == NULL) { - enum nss_status status = _nss_create_tablename (errnop); + enum nss_status status = _nss_pwd_create_tablename (errnop); if (status != NSS_STATUS_SUCCESS) return status; } - { - int parse_res; - nis_result *result; - char buf[100 + tablename_len]; - int olderr = errno; + int parse_res; + nis_result *result; + char buf[8 + 3 * sizeof (unsigned long int) + pwd_tablename_len]; + int olderr = errno; - sprintf (buf, "[uid=%lu],%s", (unsigned long int) uid, tablename_val); + snprintf (buf, sizeof (buf), "[uid=%lu],%s", + (unsigned long int) uid, pwd_tablename_val); - result = nis_list(buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - __set_errno (olderr); + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); - nis_freeresult (result); - return status; - } - - parse_res = _nss_nisplus_parse_pwent (result, pw, buffer, buflen, errnop); - - nis_freeresult (result); - - if (parse_res < 1) - { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } - } - return NSS_STATUS_SUCCESS; - } + __set_errno (olderr); + + nis_freeresult (result); + return status; + } + + parse_res = _nss_nisplus_parse_pwent (result, pw, buffer, buflen, errnop); + + nis_freeresult (result); + + if (__builtin_expect (parse_res < 1, 0)) + { + if (parse_res == -1) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + { + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; + } + } + + return NSS_STATUS_SUCCESS; } diff --git a/nis/nss_nisplus/nisplus-rpc.c b/nis/nss_nisplus/nisplus-rpc.c index 31d48d17a37..98baa5f7fcf 100644 --- a/nis/nss_nisplus/nisplus-rpc.c +++ b/nis/nss_nisplus/nisplus-rpc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,13 +17,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include +#include #include +#include +#include #include -#include #include #include +#include #include "nss-nisplus.h" @@ -138,19 +139,26 @@ _nss_create_tablename (int *errnop) { if (tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "rpc.org_dir."; - p = __stpcpy (buf, "rpc.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); + char *p = malloc (sizeof (prefix) + local_dir_len); if (tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + tablename_val = p; } + return NSS_STATUS_SUCCESS; } @@ -159,16 +167,20 @@ enum nss_status _nss_nisplus_setrpcent (int stayopen) { enum nss_status status = NSS_STATUS_SUCCESS; - int err; __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } if (tablename_val == NULL) - status = _nss_create_tablename (&err); + { + int err; + status = _nss_create_tablename (&err); + } __libc_lock_unlock (lock); @@ -180,9 +192,11 @@ _nss_nisplus_endrpcent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -217,11 +231,8 @@ internal_nisplus_getrpcent_r (struct rpcent *rpc, char *buffer, } else { - nis_result *res; - saved_res = result; - res = nis_next_entry (tablename_val, &result->cookie); - result = res; + result = nis_next_entry (tablename_val, &result->cookie); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_res); @@ -243,7 +254,8 @@ internal_nisplus_getrpcent_r (struct rpcent *rpc, char *buffer, if (saved_res) nis_freeresult (saved_res); } - } while (!parse_res); + } + while (!parse_res); return NSS_STATUS_SUCCESS; } @@ -271,77 +283,89 @@ _nss_nisplus_getrpcbyname_r (const char *name, struct rpcent *rpc, if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } if (name == NULL) return NSS_STATUS_NOTFOUND; - else - { - nis_result *result; - char buf[strlen (name) + 255 + tablename_len]; - int olderr = errno; - - /* Search at first in the alias list, and use the correct name - for the next search */ - sprintf (buf, "[name=%s],%s", name, tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (result != NULL) - { - /* If we do not find it, try it as original name. But if the - database is correct, we should find it in the first case, too */ - if ((result->status != NIS_SUCCESS - && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val->EN_data.en_type, - "rpc_tbl") != 0 - || result->objects.objects_val->EN_data.en_cols.en_cols_len < 3) - sprintf (buf, "[cname=%s],%s", name, tablename_val); - else - sprintf (buf, "[cname=%s],%s", NISENTRYVAL (0, 0, result), - tablename_val); + char buf[strlen (name) + 10 + tablename_len]; + int olderr = errno; - nis_freeresult (result); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS , NULL, NULL); - } + /* Search at first in the alias list, and use the correct name + for the next search */ + snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (result == NULL) + if (result != NULL) + { + char *bufptr = buf; + + /* If we did not find it, try it as original name. But if the + database is correct, we should find it in the first case, too */ + if ((result->status != NIS_SUCCESS + && result->status != NIS_S_SUCCESS) + || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ + || strcmp (result->objects.objects_val->EN_data.en_type, + "rpc_tbl") != 0 + || result->objects.objects_val->EN_data.en_cols.en_cols_len < 3) + snprintf (buf, sizeof (buf), "[cname=%s],%s", name, tablename_val); + else { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; + /* We need to allocate a new buffer since there is no + guarantee the returned name has a length limit. */ + const char *entryval = NISENTRYVAL (0, 0, result); + size_t buflen = strlen (entryval) + 10 + tablename_len; + bufptr = alloca (buflen); + snprintf (bufptr, buflen, "[cname=%s],%s", + entryval, tablename_val); } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); - __set_errno (olderr); + nis_freeresult (result); + result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS , NULL, NULL); + } - nis_freeresult (result); - return status; - } + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - parse_res = _nss_nisplus_parse_rpcent (result, rpc, buffer, buflen, - errnop); + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); + + __set_errno (olderr); nis_freeresult (result); + return status; + } - if (parse_res < 1) - { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } + parse_res = _nss_nisplus_parse_rpcent (result, rpc, buffer, buflen, + errnop); - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; + nis_freeresult (result); + + if (parse_res < 1) + { + if (parse_res == -1) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; } - return NSS_STATUS_SUCCESS; + + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } + + return NSS_STATUS_SUCCESS; } enum nss_status @@ -350,55 +374,57 @@ _nss_nisplus_getrpcbynumber_r (const int number, struct rpcent *rpc, { if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } - { - int parse_res; - nis_result *result; - char buf[100 + tablename_len]; - int olderr = errno; + char buf[12 + 3 * sizeof (number) + tablename_len]; + int olderr = errno; + + snprintf (buf, sizeof (buf), "[number=%d],%s", number, tablename_val); + + nis_result *result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } + + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); - sprintf (buf, "[number=%d],%s", number, tablename_val); + __set_errno (olderr); - result = nis_list(buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); + nis_freeresult (result); + return status; + } - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); + int parse_res = _nss_nisplus_parse_rpcent (result, rpc, buffer, buflen, + errnop); - __set_errno (olderr); + nis_freeresult (result); - nis_freeresult (result); - return status; - } - - parse_res = _nss_nisplus_parse_rpcent (result, rpc, buffer, buflen, - errnop); - - nis_freeresult (result); - - if (parse_res < 1) - { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } - } - return NSS_STATUS_SUCCESS; - } + if (parse_res < 1) + { + if (parse_res == -1) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + { + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; + } + } + + return NSS_STATUS_SUCCESS; } diff --git a/nis/nss_nisplus/nisplus-service.c b/nis/nss_nisplus/nisplus-service.c index fbb6987e9ea..848e5f4dd81 100644 --- a/nis/nss_nisplus/nisplus-service.c +++ b/nis/nss_nisplus/nisplus-service.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,1999,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,13 +17,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include +#include #include +#include #include +#include #include -#include #include +#include #include "nss-nisplus.h" @@ -45,8 +46,6 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv, { char *first_unused = buffer; size_t room_left = buflen; - unsigned int i; - char *p, *line; if (result == NULL) return 0; @@ -81,10 +80,10 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv, first_unused += strlen (first_unused) + 1; serv->s_port = htons (atoi (NISENTRYVAL (0, 3, result))); - p = first_unused; + char *p = first_unused; - line = p; - for (i = 0; i < result->objects.objects_len; ++i) + char *line = p; + for (unsigned int i = 0; i < result->objects.objects_len; ++i) { if (strcmp (NISENTRYVAL (i, 1, result), serv->s_name) != 0) { @@ -110,7 +109,7 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv, room_left -= (sizeof (char *)); serv->s_aliases[0] = NULL; - i = 0; + unsigned int i = 0; while (*line != '\0') { /* Skip leading blanks. */ @@ -147,19 +146,26 @@ _nss_create_tablename (int *errnop) { if (tablename_val == NULL) { - char buf [40 + strlen (nis_local_directory ())]; - char *p; + const char *local_dir = nis_local_directory (); + size_t local_dir_len = strlen (local_dir); + static const char prefix[] = "services.org_dir."; - p = __stpcpy (buf, "services.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); + char *p = malloc (sizeof (prefix) + local_dir_len); if (tablename_val == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; } - tablename_len = strlen (tablename_val); + + memcpy (__stpcpy (p, prefix), local_dir, local_dir_len + 1); + + tablename_len = sizeof (prefix) - 1 + local_dir_len; + + atomic_write_barrier (); + + tablename_val = p; } + return NSS_STATUS_SUCCESS; } @@ -172,9 +178,11 @@ _nss_nisplus_setservent (int stayopen) __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } if (tablename_val == NULL) status = _nss_create_tablename (&err); @@ -189,9 +197,11 @@ _nss_nisplus_endservent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -226,11 +236,8 @@ internal_nisplus_getservent_r (struct servent *serv, char *buffer, } else { - nis_result *res; - saved_res = result; - res = nis_next_entry (tablename_val, &result->cookie); - result = res; + result = nis_next_entry (tablename_val, &result->cookie); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_res); @@ -240,7 +247,7 @@ internal_nisplus_getservent_r (struct servent *serv, char *buffer, parse_res = _nss_nisplus_parse_servent (result, serv, buffer, buflen, errnop); - if (parse_res == -1) + if (__builtin_expect (parse_res == -1, 0)) { nis_freeresult (result); result = saved_res; @@ -262,11 +269,9 @@ enum nss_status _nss_nisplus_getservent_r (struct servent *result, char *buffer, size_t buflen, int *errnop) { - int status; - __libc_lock_lock (lock); - status = internal_nisplus_getservent_r (result, buffer, buflen, errnop); + int status = internal_nisplus_getservent_r (result, buffer, buflen, errnop); __libc_lock_unlock (lock); @@ -278,12 +283,14 @@ _nss_nisplus_getservbyname_r (const char *name, const char *protocol, struct servent *serv, char *buffer, size_t buflen, int *errnop) { - int parse_res; - if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } @@ -293,72 +300,82 @@ _nss_nisplus_getservbyname_r (const char *name, const char *protocol, *errnop = EINVAL; return NSS_STATUS_NOTFOUND; } - else - { - nis_result *result; - char buf[strlen (name) + 255 + tablename_len]; - int olderr = errno; - /* Search at first in the alias list, and use the correct name - for the next search */ - sprintf (buf, "[name=%s,proto=%s],%s", name, protocol, - tablename_val); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + size_t protocol_len = strlen (protocol); + char buf[strlen (name) + protocol_len + 17 + tablename_len]; + int olderr = errno; - if (result != NULL) - { - /* If we do not find it, try it as original name. But if the - database is correct, we should find it in the first case, too */ - if ((result->status != NIS_SUCCESS - && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val->EN_data.en_type, - "services_tbl") != 0 - || result->objects.objects_val->EN_data.en_cols.en_cols_len < 4) - sprintf (buf, "[cname=%s,proto=%s],%s", name, protocol, - tablename_val); - else - sprintf (buf, "[cname=%s,proto=%s],%s", - NISENTRYVAL (0, 0, result), protocol, tablename_val); - - nis_freeresult (result); - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - } + /* Search at first in the alias list, and use the correct name + for the next search */ + snprintf (buf, sizeof (buf), "[name=%s,proto=%s],%s", name, protocol, + tablename_val); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - if (result == NULL) + if (result != NULL) + { + char *bufptr = buf; + + /* If we did not find it, try it as original name. But if the + database is correct, we should find it in the first case, too */ + if ((result->status != NIS_SUCCESS + && result->status != NIS_S_SUCCESS) + || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ + || strcmp (result->objects.objects_val->EN_data.en_type, + "services_tbl") != 0 + || result->objects.objects_val->EN_data.en_cols.en_cols_len < 4) + snprintf (buf, sizeof (buf), "[cname=%s,proto=%s],%s", name, protocol, + tablename_val); + else { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; + /* We need to allocate a new buffer since there is no + guarantee the returned name has a length limit. */ + const char *entryval = NISENTRYVAL(0, 0, result); + size_t buflen = (strlen (entryval) + protocol_len + 17 + + tablename_len); + bufptr = alloca (buflen); + snprintf (bufptr, buflen, "[cname=%s,proto=%s],%s", + entryval, protocol, tablename_val); } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); - __set_errno (olderr); + nis_freeresult (result); + result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + } - nis_freeresult (result); - return status; - } + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } + + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); + + __set_errno (olderr); - parse_res = _nss_nisplus_parse_servent (result, serv, buffer, buflen, - errnop); nis_freeresult (result); + return status; + } + + int parse_res = _nss_nisplus_parse_servent (result, serv, buffer, buflen, + errnop); + nis_freeresult (result); - if (parse_res < 1) + if (__builtin_expect (parse_res < 1, 0)) + { + if (parse_res == -1) { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + { + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } - return NSS_STATUS_SUCCESS; } + + return NSS_STATUS_SUCCESS; } enum nss_status @@ -368,8 +385,12 @@ _nss_nisplus_getservbyport_r (const int number, const char *protocol, { if (tablename_val == NULL) { + __libc_lock_lock (lock); + enum nss_status status = _nss_create_tablename (errnop); + __libc_lock_unlock (lock); + if (status != NSS_STATUS_SUCCESS) return status; } @@ -379,50 +400,48 @@ _nss_nisplus_getservbyport_r (const int number, const char *protocol, *errnop = EINVAL; return NSS_STATUS_NOTFOUND; } - else - { - int parse_res; - nis_result *result; - char buf[60 + strlen (protocol) + tablename_len]; - int olderr = errno; - sprintf (buf, "[port=%d,proto=%s],%s", - number, protocol, tablename_val); + char buf[17 + 3 * sizeof (int) + strlen (protocol) + tablename_len]; + int olderr = errno; - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + snprintf (buf, sizeof (buf), "[port=%d,proto=%s],%s", + number, protocol, tablename_val); - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); + nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - __set_errno (olderr); + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - nis_freeresult (result); - return status; - } + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); + + __set_errno (olderr); - parse_res = _nss_nisplus_parse_servent (result, serv, buffer, buflen, - errnop); nis_freeresult (result); + return status; + } + + int parse_res = _nss_nisplus_parse_servent (result, serv, buffer, buflen, + errnop); + nis_freeresult (result); - if (parse_res < 1) + if (__builtin_expect (parse_res < 1, 0)) + { + if (parse_res == -1) { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + { + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } - return NSS_STATUS_SUCCESS; } + + return NSS_STATUS_SUCCESS; } diff --git a/nis/nss_nisplus/nisplus-spwd.c b/nis/nss_nisplus/nisplus-spwd.c index c317469137b..8584300698a 100644 --- a/nis/nss_nisplus/nisplus-spwd.c +++ b/nis/nss_nisplus/nisplus-spwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -30,29 +30,12 @@ __libc_lock_define_initialized (static, lock) static nis_result *result; -static nis_name tablename_val; -static u_long tablename_len; -static enum nss_status -_nss_create_tablename (int *errnop) -{ - if (tablename_val == NULL) - { - char buf [40 + strlen (nis_local_directory ())]; - char *p; +/* Defined in nisplus-pwd.c. */ +extern nis_name pwd_tablename_val attribute_hidden; +extern size_t pwd_tablename_len attribute_hidden; +extern enum nss_status _nss_pwd_create_tablename (int *errnop); - p = __stpcpy (buf, "passwd.org_dir."); - p = __stpcpy (p, nis_local_directory ()); - tablename_val = __strdup (buf); - if (tablename_val == NULL) - { - *errnop = errno; - return NSS_STATUS_TRYAGAIN; - } - tablename_len = strlen (tablename_val); - } - return NSS_STATUS_SUCCESS; -} enum nss_status _nss_nisplus_setspent (int stayopen) @@ -62,12 +45,14 @@ _nss_nisplus_setspent (int stayopen) __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } - if (tablename_val == NULL) - status = _nss_create_tablename (&err); + if (pwd_tablename_val == NULL) + status = _nss_pwd_create_tablename (&err); __libc_lock_unlock (lock); @@ -79,9 +64,11 @@ _nss_nisplus_endspent (void) { __libc_lock_lock (lock); - if (result) - nis_freeresult (result); - result = NULL; + if (result != NULL) + { + nis_freeresult (result); + result = NULL; + } __libc_lock_unlock (lock); @@ -103,25 +90,22 @@ internal_nisplus_getspent_r (struct spwd *sp, char *buffer, size_t buflen, { saved_res = NULL; - if (tablename_val == NULL) + if (pwd_tablename_val == NULL) { - enum nss_status status = _nss_create_tablename (errnop); + enum nss_status status = _nss_pwd_create_tablename (errnop); if (status != NSS_STATUS_SUCCESS) return status; } - result = nis_first_entry (tablename_val); + result = nis_first_entry (pwd_tablename_val); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) return niserr2nss (result->status); } else { - nis_result *res; - saved_res = result; - res = nis_next_entry (tablename_val, &result->cookie); - result = res; + result = nis_next_entry (pwd_tablename_val, &result->cookie); if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_res); @@ -131,19 +115,18 @@ internal_nisplus_getspent_r (struct spwd *sp, char *buffer, size_t buflen, parse_res = _nss_nisplus_parse_spent (result, sp, buffer, buflen, errnop); - if (parse_res == -1) + if (__builtin_expect (parse_res == -1, 0)) { nis_freeresult (result); result = saved_res; *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - else - { - if (saved_res) - nis_freeresult (saved_res); - } - } while (!parse_res); + + if (saved_res != NULL) + nis_freeresult (saved_res); + } + while (!parse_res); return NSS_STATUS_SUCCESS; } @@ -169,9 +152,9 @@ _nss_nisplus_getspnam_r (const char *name, struct spwd *sp, { int parse_res; - if (tablename_val == NULL) + if (pwd_tablename_val == NULL) { - enum nss_status status = _nss_create_tablename (errnop); + enum nss_status status = _nss_pwd_create_tablename (errnop); if (status != NSS_STATUS_SUCCESS) return status; @@ -182,48 +165,47 @@ _nss_nisplus_getspnam_r (const char *name, struct spwd *sp, *errnop = EINVAL; return NSS_STATUS_NOTFOUND; } - else - { - nis_result *result; - char buf[strlen (name) + 24 + tablename_len]; - int olderr = errno; - sprintf (buf, "[name=%s],%s", name, tablename_val); + nis_result *result; + char buf[strlen (name) + 9 + pwd_tablename_len]; + int olderr = errno; - result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); + snprintf (buf, sizeof (buf), "[name=%s],%s", name, pwd_tablename_val); - if (result == NULL) - { - *errnop = ENOMEM; - return NSS_STATUS_TRYAGAIN; - } - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - enum nss_status status = niserr2nss (result->status); + result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL); - __set_errno (olderr); + if (result == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } - nis_freeresult (result); - return status; - } + if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) + { + enum nss_status status = niserr2nss (result->status); + + __set_errno (olderr); - parse_res = _nss_nisplus_parse_spent (result, sp, buffer, buflen, - errnop); nis_freeresult (result); + return status; + } - if (parse_res < 1) + parse_res = _nss_nisplus_parse_spent (result, sp, buffer, buflen, errnop); + nis_freeresult (result); + + if (__builtin_expect (parse_res < 1, 0)) + { + if (parse_res == -1) { - if (parse_res == -1) - { - *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; - } - else - { - __set_errno (olderr); - return NSS_STATUS_NOTFOUND; - } + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + else + { + __set_errno (olderr); + return NSS_STATUS_NOTFOUND; } - return NSS_STATUS_SUCCESS; } + + return NSS_STATUS_SUCCESS; } diff --git a/nis/ypclnt.c b/nis/ypclnt.c index 6230cb84dcb..66095667c62 100644 --- a/nis/ypclnt.c +++ b/nis/ypclnt.c @@ -46,12 +46,12 @@ struct dom_binding }; typedef struct dom_binding dom_binding; -static struct timeval RPCTIMEOUT = {25, 0}; -static struct timeval UDPTIMEOUT = {5, 0}; +static const struct timeval RPCTIMEOUT = {25, 0}; +static const struct timeval UDPTIMEOUT = {5, 0}; static int const MAXTRIES = 2; -static char __ypdomainname[NIS_MAXNAMELEN + 1] = "\0"; +static char ypdomainname[NIS_MAXNAMELEN + 1]; __libc_lock_define_initialized (static, ypbindlist_lock) -static dom_binding *__ypbindlist = NULL; +static dom_binding *ypbindlist = NULL; static void @@ -111,8 +111,8 @@ yp_bind_ypbindprog (const char *domain, dom_binding *ysd) int clnt_sock; CLIENT *client; - memset (&clnt_saddr, '\0', sizeof clnt_saddr); clnt_saddr.sin_family = AF_INET; + clnt_saddr.sin_port = 0; clnt_saddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); clnt_sock = RPC_ANYSOCK; client = clnttcp_create (&clnt_saddr, YPBINDPROG, YPBINDVERS, @@ -142,7 +142,7 @@ yp_bind_ypbindprog (const char *domain, dom_binding *ysd) if (ypbr.ypbind_status != YPBIND_SUCC_VAL) { - fprintf (stderr, _("YPBINDPROC_DOMAIN: %s\n"), + fprintf (stderr, "YPBINDPROC_DOMAIN: %s\n", ypbinderr_string (ypbr.ypbind_resp_u.ypbind_error)); return YPERR_DOMAIN; } @@ -225,7 +225,7 @@ yp_bind (const char *indomain) __libc_lock_lock (ypbindlist_lock); - status = __yp_bind (indomain, &__ypbindlist); + status = __yp_bind (indomain, &ypbindlist); __libc_lock_unlock (ypbindlist_lock); @@ -239,7 +239,7 @@ yp_unbind_locked (const char *indomain) dom_binding *ydbptr, *ydbptr2; ydbptr2 = NULL; - ydbptr = __ypbindlist; + ydbptr = ypbindlist; while (ydbptr != NULL) { @@ -249,7 +249,7 @@ yp_unbind_locked (const char *indomain) work = ydbptr; if (ydbptr2 == NULL) - __ypbindlist = __ypbindlist->dom_pnext; + ypbindlist = ypbindlist->dom_pnext; else ydbptr2 = ydbptr->dom_pnext; __yp_unbind (work); @@ -306,7 +306,7 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs, status = YPERR_YPERR; __libc_lock_lock (ypbindlist_lock); - ydb = __ypbindlist; + ydb = ypbindlist; while (ydb != NULL) { if (strcmp (domain, ydb->dom_domain) == 0) @@ -349,7 +349,7 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs, if (status != YPERR_SUCCESS) { ydb = calloc (1, sizeof (dom_binding)); - if (yp_bind_ypbindprog (domain, ydb) == YPERR_SUCCESS) + if (ydb != NULL && yp_bind_ypbindprog (domain, ydb) == YPERR_SUCCESS) { status = __ypclnt_call (domain, prog, xargs, req, xres, resp, &ydb, 1); @@ -365,6 +365,21 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs, return status; } +/* Like do_ypcall, but translate the status value if necessary. */ +static int +do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs, + caddr_t req, xdrproc_t xres, caddr_t resp) +{ + int status = do_ypcall (domain, prog, xargs, req, xres, resp); + if (status == YPERR_SUCCESS) + /* We cast to ypresp_val although the pointer could also be of + type ypresp_key_val or ypresp_master or ypresp_order or + ypresp_maplist. But the stat element is in a common prefix so + this does not matter. */ + status = ypprot_err (((struct ypresp_val *) resp)->stat); + return status; +} + __libc_lock_define_initialized (static, domainname_lock) @@ -376,21 +391,21 @@ yp_get_default_domain (char **outdomain) __libc_lock_lock (domainname_lock); - if (__ypdomainname[0] == '\0') + if (ypdomainname[0] == '\0') { - if (getdomainname (__ypdomainname, NIS_MAXNAMELEN)) + if (getdomainname (ypdomainname, NIS_MAXNAMELEN)) result = YPERR_NODOM; - else if (strcmp (__ypdomainname, "(none)") == 0) + else if (strcmp (ypdomainname, "(none)") == 0) { /* If domainname is not set, some systems will return "(none)" */ - __ypdomainname[0] = '\0'; + ypdomainname[0] = '\0'; result = YPERR_NODOM; } else - *outdomain = __ypdomainname; + *outdomain = ypdomainname; } else - *outdomain = __ypdomainname; + *outdomain = ypdomainname; __libc_lock_unlock (domainname_lock); @@ -403,14 +418,14 @@ __yp_check (char **domain) { char *unused; - if (__ypdomainname[0] == '\0') + if (ypdomainname[0] == '\0') if (yp_get_default_domain (&unused)) return 0; if (domain) - *domain = __ypdomainname; + *domain = ypdomainname; - if (yp_bind (__ypdomainname) == 0) + if (yp_bind (ypdomainname) == 0) return 1; return 0; } @@ -437,25 +452,26 @@ yp_match (const char *indomain, const char *inmap, const char *inkey, *outvallen = 0; memset (&resp, '\0', sizeof (resp)); - result = do_ypcall (indomain, YPPROC_MATCH, (xdrproc_t) xdr_ypreq_key, - (caddr_t) & req, (xdrproc_t) xdr_ypresp_val, - (caddr_t) & resp); + result = do_ypcall_tr (indomain, YPPROC_MATCH, (xdrproc_t) xdr_ypreq_key, + (caddr_t) &req, (xdrproc_t) xdr_ypresp_val, + (caddr_t) &resp); if (result != YPERR_SUCCESS) return result; - if (resp.stat != YP_TRUE) - return ypprot_err (resp.stat); *outvallen = resp.val.valdat_len; *outval = malloc (*outvallen + 1); - if (__builtin_expect (*outval == NULL, 0)) - return YPERR_RESRC; - memcpy (*outval, resp.val.valdat_val, *outvallen); - (*outval)[*outvallen] = '\0'; + int status = YPERR_RESRC; + if (__builtin_expect (*outval != NULL, 1)) + { + memcpy (*outval, resp.val.valdat_val, *outvallen); + (*outval)[*outvallen] = '\0'; + status = YPERR_SUCCESS; + } xdr_free ((xdrproc_t) xdr_ypresp_val, (char *) &resp); - return YPERR_SUCCESS; + return status; } int @@ -478,30 +494,38 @@ yp_first (const char *indomain, const char *inmap, char **outkey, memset (&resp, '\0', sizeof (resp)); result = do_ypcall (indomain, YPPROC_FIRST, (xdrproc_t) xdr_ypreq_nokey, - (caddr_t) & req, (xdrproc_t) xdr_ypresp_key_val, - (caddr_t) & resp); + (caddr_t) &req, (xdrproc_t) xdr_ypresp_key_val, + (caddr_t) &resp); if (result != RPC_SUCCESS) return YPERR_RPC; if (resp.stat != YP_TRUE) return ypprot_err (resp.stat); - *outkeylen = resp.key.keydat_len; - *outkey = malloc (*outkeylen + 1); - if (__builtin_expect (*outkey == NULL, 0)) - return YPERR_RESRC; - memcpy (*outkey, resp.key.keydat_val, *outkeylen); - (*outkey)[*outkeylen] = '\0'; - *outvallen = resp.val.valdat_len; - *outval = malloc (*outvallen + 1); - if (__builtin_expect (*outval == NULL, 0)) - return YPERR_RESRC; - memcpy (*outval, resp.val.valdat_val, *outvallen); - (*outval)[*outvallen] = '\0'; + int status; + if (__builtin_expect ((*outkey = malloc (resp.key.keydat_len + 1)) != NULL + && (*outval = malloc (resp.val.valdat_len + + 1)) != NULL, 1)) + { + *outkeylen = resp.key.keydat_len; + memcpy (*outkey, resp.key.keydat_val, *outkeylen); + (*outkey)[*outkeylen] = '\0'; + + *outvallen = resp.val.valdat_len; + memcpy (*outval, resp.val.valdat_val, *outvallen); + (*outval)[*outvallen] = '\0'; + + status = YPERR_SUCCESS; + } + else + { + free (*outkey); + status = YPERR_RESRC; + } xdr_free ((xdrproc_t) xdr_ypresp_key_val, (char *) &resp); - return YPERR_SUCCESS; + return status; } int @@ -527,31 +551,37 @@ yp_next (const char *indomain, const char *inmap, const char *inkey, *outkeylen = *outvallen = 0; memset (&resp, '\0', sizeof (resp)); - result = do_ypcall (indomain, YPPROC_NEXT, (xdrproc_t) xdr_ypreq_key, - (caddr_t) & req, (xdrproc_t) xdr_ypresp_key_val, - (caddr_t) & resp); + result = do_ypcall_tr (indomain, YPPROC_NEXT, (xdrproc_t) xdr_ypreq_key, + (caddr_t) &req, (xdrproc_t) xdr_ypresp_key_val, + (caddr_t) &resp); if (result != YPERR_SUCCESS) return result; - if (resp.stat != YP_TRUE) - return ypprot_err (resp.stat); - *outkeylen = resp.key.keydat_len; - *outkey = malloc (*outkeylen + 1); - if (__builtin_expect (*outkey == NULL, 0)) - return YPERR_RESRC; - memcpy (*outkey, resp.key.keydat_val, *outkeylen); - (*outkey)[*outkeylen] = '\0'; - *outvallen = resp.val.valdat_len; - *outval = malloc (*outvallen + 1); - if (__builtin_expect (*outval == NULL, 0)) - return YPERR_RESRC; - memcpy (*outval, resp.val.valdat_val, *outvallen); - (*outval)[*outvallen] = '\0'; + int status; + if (__builtin_expect ((*outkey = malloc (resp.key.keydat_len + 1)) != NULL + && (*outval = malloc (resp.val.valdat_len + + 1)) != NULL, 1)) + { + *outkeylen = resp.key.keydat_len; + memcpy (*outkey, resp.key.keydat_val, *outkeylen); + (*outkey)[*outkeylen] = '\0'; + + *outvallen = resp.val.valdat_len; + memcpy (*outval, resp.val.valdat_val, *outvallen); + (*outval)[*outvallen] = '\0'; + + status = YPERR_SUCCESS; + } + else + { + free (*outkey); + status = YPERR_RESRC; + } xdr_free ((xdrproc_t) xdr_ypresp_key_val, (char *) &resp); - return YPERR_SUCCESS; + return status; } int @@ -570,13 +600,12 @@ yp_master (const char *indomain, const char *inmap, char **outname) memset (&resp, '\0', sizeof (ypresp_master)); - result = do_ypcall (indomain, YPPROC_MASTER, (xdrproc_t) xdr_ypreq_nokey, - (caddr_t) & req, (xdrproc_t) xdr_ypresp_master, (caddr_t) & resp); + result = do_ypcall_tr (indomain, YPPROC_MASTER, (xdrproc_t) xdr_ypreq_nokey, + (caddr_t) &req, (xdrproc_t) xdr_ypresp_master, + (caddr_t) &resp); if (result != YPERR_SUCCESS) return result; - if (resp.stat != YP_TRUE) - return ypprot_err (resp.stat); *outname = strdup (resp.peer); xdr_free ((xdrproc_t) xdr_ypresp_master, (char *) &resp); @@ -593,7 +622,7 @@ yp_order (const char *indomain, const char *inmap, unsigned int *outorder) enum clnt_stat result; if (indomain == NULL || indomain[0] == '\0' || - inmap == NULL || inmap == '\0') + inmap == NULL || inmap[0] == '\0') return YPERR_BADARGS; req.domain = (char *) indomain; @@ -601,18 +630,17 @@ yp_order (const char *indomain, const char *inmap, unsigned int *outorder) memset (&resp, '\0', sizeof (resp)); - result = do_ypcall (indomain, YPPROC_ORDER, (xdrproc_t) xdr_ypreq_nokey, - (caddr_t) & req, (xdrproc_t) xdr_ypresp_order, (caddr_t) & resp); + result = do_ypcall_tr (indomain, YPPROC_ORDER, (xdrproc_t) xdr_ypreq_nokey, + (caddr_t) &req, (xdrproc_t) xdr_ypresp_order, + (caddr_t) &resp); - if (result != YPERR_SUCCESS) + if (result == YPERR_SUCCESS) return result; - if (resp.stat != YP_TRUE) - return ypprot_err (resp.stat); *outorder = resp.ordernum; xdr_free ((xdrproc_t) xdr_ypresp_order, (char *) &resp); - return YPERR_SUCCESS; + return result; } struct ypresp_all_data @@ -694,8 +722,8 @@ yp_all (const char *indomain, const char *inmap, int clnt_sock; int saved_errno = errno; - if (indomain == NULL || indomain[0] == '\0' || - inmap == NULL || inmap == '\0') + if (indomain == NULL || indomain[0] == '\0' + || inmap == NULL || inmap[0] == '\0') return YPERR_BADARGS; try = 0; @@ -733,9 +761,9 @@ yp_all (const char *indomain, const char *inmap, (caddr_t) &req, (xdrproc_t) __xdr_ypresp_all, (caddr_t) &data, RPCTIMEOUT); - if (result != RPC_SUCCESS) + if (__builtin_expect (result != RPC_SUCCESS, 0)) { - /* Print the error message only on the last try */ + /* Print the error message only on the last try. */ if (try == MAXTRIES - 1) clnt_perror (clnt, "yp_all: clnt_call"); res = YPERR_RPC; @@ -759,6 +787,7 @@ yp_all (const char *indomain, const char *inmap, } int + yp_maplist (const char *indomain, struct ypmaplist **outmaplist) { struct ypresp_maplist resp; @@ -769,62 +798,82 @@ yp_maplist (const char *indomain, struct ypmaplist **outmaplist) memset (&resp, '\0', sizeof (resp)); - result = do_ypcall (indomain, YPPROC_MAPLIST, (xdrproc_t) xdr_domainname, - (caddr_t) & indomain, (xdrproc_t) xdr_ypresp_maplist, (caddr_t) & resp); - - if (result != YPERR_SUCCESS) - return result; - if (resp.stat != YP_TRUE) - return ypprot_err (resp.stat); + result = do_ypcall_tr (indomain, YPPROC_MAPLIST, (xdrproc_t) xdr_domainname, + (caddr_t) &indomain, (xdrproc_t) xdr_ypresp_maplist, + (caddr_t) &resp); - *outmaplist = resp.maps; - /* We give the list not free, this will be done by ypserv - xdr_free((xdrproc_t)xdr_ypresp_maplist, (char *)&resp); */ + if (__builtin_expect (result == YPERR_SUCCESS, 1)) + { + *outmaplist = resp.maps; + /* We don't free the list, this will be done by ypserv + xdr_free((xdrproc_t)xdr_ypresp_maplist, (char *)&resp); */ + } - return YPERR_SUCCESS; + return result; } const char * yperr_string (const int error) { + const char *str; switch (error) { case YPERR_SUCCESS: - return _("Success"); + str = "Success"; + break; case YPERR_BADARGS: - return _("Request arguments bad"); + str = "Request arguments bad"; + break; case YPERR_RPC: - return _("RPC failure on NIS operation"); + str = "RPC failure on NIS operation"; + break; case YPERR_DOMAIN: - return _("Can't bind to server which serves this domain"); + str = "Can't bind to server which serves this domain"; + break; case YPERR_MAP: - return _("No such map in server's domain"); + str = "No such map in server's domain"; + break; case YPERR_KEY: - return _("No such key in map"); + str = "No such key in map"; + break; case YPERR_YPERR: - return _("Internal NIS error"); + str = "Internal NIS error"; + break; case YPERR_RESRC: - return _("Local resource allocation failure"); + str = "Local resource allocation failure"; + break; case YPERR_NOMORE: - return _("No more records in map database"); + str = "No more records in map database"; + break; case YPERR_PMAP: - return _("Can't communicate with portmapper"); + str = "Can't communicate with portmapper"; + break; case YPERR_YPBIND: - return _("Can't communicate with ypbind"); + str = "Can't communicate with ypbind"; + break; case YPERR_YPSERV: - return _("Can't communicate with ypserv"); + str = "Can't communicate with ypserv"; + break; case YPERR_NODOM: - return _("Local domain name not set"); + str = "Local domain name not set"; + break; case YPERR_BADDB: - return _("NIS map database is bad"); + str = "NIS map database is bad"; + break; case YPERR_VERS: - return _("NIS client/server version mismatch - can't supply service"); + str = "NIS client/server version mismatch - can't supply service"; + break; case YPERR_ACCESS: - return _("Permission denied"); + str = "Permission denied"; + break; case YPERR_BUSY: - return _("Database is busy"); + str = "Database is busy"; + break; + default: + str = "Unknown NIS error code"; + break; } - return _("Unknown NIS error code"); + return _(str); } static const int8_t yp_2_yperr[] = @@ -854,19 +903,26 @@ libnsl_hidden_def (ypprot_err) const char * ypbinderr_string (const int error) { + const char *str; switch (error) { case 0: - return _("Success"); + str = "Success"; + break; case YPBIND_ERR_ERR: - return _("Internal ypbind error"); + str = "Internal ypbind error"; + break; case YPBIND_ERR_NOSERV: - return _("Domain not bound"); + str = "Domain not bound"; + break; case YPBIND_ERR_RESC: - return _("System resource allocation failure"); + str = "System resource allocation failure"; + break; default: - return _("Unknown ypbind error"); + str = "Unknown ypbind error"; + break; } + return _(str); } libnsl_hidden_def (ypbinderr_string) @@ -948,6 +1004,7 @@ again: { if (clnt->cl_auth->ah_cred.oa_flavor == AUTH_DES) { + auth_destroy (clnt->cl_auth); clnt->cl_auth = authunix_create_default (); goto again; } diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 1f9cbc71392..875fceaf337 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,51 @@ +2005-12-17 Ulrich Drepper + + * pthread_create.c (__pthread_create_2_1): Use + THREAD_COPY_POINTER_GUARD if available. + * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD. + * sysdeps/x86_64/tcb-offsets.sym: Likewise. + * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard. + Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD. + * sysdeps/x86_64/tls.h: Likewise. + +2005-12-15 Roland McGrath + + * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic. + +2005-12-13 Ulrich Drepper + + * sysdeps/pthread/sigfillset.c: Adjust for files moved out of + sysdeps/generic. + * errno-loc.c: New file. + +2005-12-12 Roland McGrath + + * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size + adjustments before choosing stack size. Update minimum stack size + calculation to match allocate_stack change. + +2005-12-12 Ulrich Drepper + + * allocatestack.c (allocate_stack): Don't demand that there is an + additional full page available on the stack beside guard, TLS, the + minimum stack. + +2005-11-24 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h + (__cleanup_fct_attribute): Use __regparm__ not regparm. + + * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When + compiling 32-bit code we must define __cleanup_fct_attribute. + +005-11-24 Jakub Jelinek + + [BZ #1920] + * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use + __attribute__ instead of __attribute. + * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h + (__cleanup_fct_attribute): Likewise. + 2005-11-17 Jakub Jelinek * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 255129a1df4..e6bcc2170f7 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -407,8 +407,9 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, /* Make sure the size of the stack is enough for the guard and eventually the thread descriptor. */ guardsize = (attr->guardsize + pagesize_m1) & ~pagesize_m1; - if (__builtin_expect (size < (guardsize + __static_tls_size - + MINIMAL_REST_STACK + pagesize_m1 + 1), + if (__builtin_expect (size < ((guardsize + __static_tls_size + + MINIMAL_REST_STACK + pagesize_m1) + & ~pagesize_m1), 0)) /* The stack is too small (or the guard too large). */ return EINVAL; diff --git a/nptl/errno-loc.c b/nptl/errno-loc.c new file mode 100644 index 00000000000..712b2b119ce --- /dev/null +++ b/nptl/errno-loc.c @@ -0,0 +1 @@ +#include "../csu/errno-loc.c" diff --git a/nptl/init.c b/nptl/init.c index 6a7fff99599..1f79eba62a6 100644 --- a/nptl/init.c +++ b/nptl/init.c @@ -289,6 +289,17 @@ __pthread_initialize_minimal_internal (void) (void) INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_UNBLOCK, &sa.sa_mask, NULL, _NSIG / 8); + /* Get the size of the static and alignment requirements for the TLS + block. */ + size_t static_tls_align; + _dl_get_tls_static_info (&__static_tls_size, &static_tls_align); + + /* Make sure the size takes all the alignments into account. */ + if (STACK_ALIGN > static_tls_align) + static_tls_align = STACK_ALIGN; + __static_tls_align_m1 = static_tls_align - 1; + + __static_tls_size = roundup (__static_tls_size, static_tls_align); /* Determine the default allowed stack size. This is the size used in case the user does not specify one. */ @@ -306,7 +317,7 @@ __pthread_initialize_minimal_internal (void) /* Make sure it meets the minimum size that allocate_stack (allocatestack.c) will demand, which depends on the page size. */ const uintptr_t pagesz = __sysconf (_SC_PAGESIZE); - const size_t minstack = pagesz * 2 + __static_tls_size + MINIMAL_REST_STACK; + const size_t minstack = pagesz + __static_tls_size + MINIMAL_REST_STACK; if (limit.rlim_cur < minstack) limit.rlim_cur = minstack; @@ -314,18 +325,6 @@ __pthread_initialize_minimal_internal (void) limit.rlim_cur = (limit.rlim_cur + pagesz - 1) & -pagesz; __default_stacksize = limit.rlim_cur; - /* Get the size of the static and alignment requirements for the TLS - block. */ - size_t static_tls_align; - _dl_get_tls_static_info (&__static_tls_size, &static_tls_align); - - /* Make sure the size takes all the alignments into account. */ - if (STACK_ALIGN > static_tls_align) - static_tls_align = STACK_ALIGN; - __static_tls_align_m1 = static_tls_align - 1; - - __static_tls_size = roundup (__static_tls_size, static_tls_align); - #ifdef SHARED /* Transfer the old value from the dynamic linker's internal location. */ *__libc_dl_error_tsd () = *(*GL(dl_error_catch_tsd)) (); diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index f2f206be5a7..c11d9725721 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -415,6 +415,11 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg) THREAD_COPY_STACK_GUARD (pd); #endif + /* Copy the pointer guard value. */ +#ifdef THREAD_COPY_POINTER_GUARD + THREAD_COPY_POINTER_GUARD (pd); +#endif + /* Determine scheduling parameters for the thread. */ if (attr != NULL && __builtin_expect ((iattr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0, 0) diff --git a/nptl/sysdeps/i386/tcb-offsets.sym b/nptl/sysdeps/i386/tcb-offsets.sym index 4e0444ba384..7c8d9a5ca50 100644 --- a/nptl/sysdeps/i386/tcb-offsets.sym +++ b/nptl/sysdeps/i386/tcb-offsets.sym @@ -11,3 +11,4 @@ SYSINFO_OFFSET offsetof (tcbhead_t, sysinfo) CLEANUP offsetof (struct pthread, cleanup) CLEANUP_PREV offsetof (struct _pthread_cleanup_buffer, __prev) MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock) +POINTER_GUARD offsetof (tcbhead_t, pointer_guard) diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h index 65566ff7a7a..a870a848cf4 100644 --- a/nptl/sysdeps/i386/tls.h +++ b/nptl/sysdeps/i386/tls.h @@ -50,6 +50,7 @@ typedef struct int multiple_threads; uintptr_t sysinfo; uintptr_t stack_guard; + uintptr_t pointer_guard; } tcbhead_t; # define TLS_MULTIPLE_THREADS_IN_TCB 1 @@ -425,6 +426,14 @@ union user_desc_init = THREAD_GETMEM (THREAD_SELF, header.stack_guard)) +/* Set the pointer guard field in the TCB head. */ +#define THREAD_SET_POINTER_GUARD(value) \ + THREAD_SETMEM (THREAD_SELF, header.pointer_guard, value) +#define THREAD_COPY_POINTER_GUARD(descr) \ + ((descr)->header.pointer_guard \ + = THREAD_GETMEM (THREAD_SELF, header.pointer_guard)) + + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h index 92e66f7c72d..badadae169b 100644 --- a/nptl/sysdeps/pthread/pthread.h +++ b/nptl/sysdeps/pthread/pthread.h @@ -657,9 +657,9 @@ extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) /* Internal interface to initiate cleanup. */ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) - __cleanup_fct_attribute __attribute ((__noreturn__)) + __cleanup_fct_attribute __attribute__ ((__noreturn__)) # ifndef SHARED - __attribute ((__weak__)) + __attribute__ ((__weak__)) # endif ; #endif diff --git a/nptl/sysdeps/pthread/sigfillset.c b/nptl/sysdeps/pthread/sigfillset.c index fe58ccd53ee..180607c77b0 100644 --- a/nptl/sysdeps/pthread/sigfillset.c +++ b/nptl/sysdeps/pthread/sigfillset.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005 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 @@ -18,4 +18,4 @@ #include -#include +#include diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h index 4d1c9450b58..ddb3574aaa1 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 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 @@ -155,6 +155,6 @@ typedef union /* Extra attributes for the cleanup functions. */ -#define __cleanup_fct_attribute __attribute ((regparm (1))) +#define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) #endif /* bits/pthreadtypes.h */ diff --git a/nptl/sysdeps/unix/sysv/linux/mq_notify.c b/nptl/sysdeps/unix/sysv/linux/mq_notify.c index e9c2b6e79a4..2ec11bf686e 100644 --- a/nptl/sysdeps/unix/sysv/linux/mq_notify.c +++ b/nptl/sysdeps/unix/sysv/linux/mq_notify.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contribute by Ulrich Drepper , 2004. @@ -283,5 +283,5 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) } #else -# include +# include #endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h index 92fb08c951c..7f1ace693cb 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -192,4 +192,9 @@ typedef union #endif +#if __WORDSIZE == 32 +/* Extra attributes for the cleanup functions. */ +# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) +#endif + #endif /* bits/pthreadtypes.h */ diff --git a/nptl/sysdeps/x86_64/tcb-offsets.sym b/nptl/sysdeps/x86_64/tcb-offsets.sym index 8118d2df8b7..a9ede75c96e 100644 --- a/nptl/sysdeps/x86_64/tcb-offsets.sym +++ b/nptl/sysdeps/x86_64/tcb-offsets.sym @@ -10,3 +10,4 @@ CLEANUP offsetof (struct pthread, cleanup) CLEANUP_PREV offsetof (struct _pthread_cleanup_buffer, __prev) MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock) MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads) +POINTER_GUARD offsetof (tcbhead_t, pointer_guard) diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index 516827b8e15..13cf6fb3f50 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h @@ -49,6 +49,7 @@ typedef struct int multiple_threads; uintptr_t sysinfo; uintptr_t stack_guard; + uintptr_t pointer_guard; } tcbhead_t; #else /* __ASSEMBLER__ */ @@ -329,6 +330,15 @@ typedef struct ((descr)->header.stack_guard \ = THREAD_GETMEM (THREAD_SELF, header.stack_guard)) + +/* Set the pointer guard field in the TCB head. */ +#define THREAD_SET_POINTER_GUARD(value) \ + THREAD_SETMEM (THREAD_SELF, header.pointer_guard, value) +#define THREAD_COPY_POINTER_GUARD(descr) \ + ((descr)->header.pointer_guard \ + = THREAD_GETMEM (THREAD_SELF, header.pointer_guard)) + + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff --git a/nscd/Makefile b/nscd/Makefile index b7d5f3400b6..e91c289a4f9 100644 --- a/nscd/Makefile +++ b/nscd/Makefile @@ -36,13 +36,12 @@ nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \ ifeq ($(have-thread-library),yes) -others := nscd_nischeck ifneq (yesyes,$(have-fpie)$(build-shared)) others += nscd endif -install-sbin := nscd nscd_nischeck +install-sbin := nscd -extra-objs := $(nscd-modules:=.o) nscd_nischeck.o +extra-objs := $(nscd-modules:=.o) endif @@ -73,8 +72,7 @@ $(objpfx)selinux.o: sysincludes = # nothing distribute := nscd.h nscd-client.h dbg_log.h \ $(addsuffix .c, $(filter-out xmalloc,$(all-nscd-modules))) \ - nscd_nischeck.c nscd.conf nscd.init nscd_proto.h \ - nscd-types.h + nscd.conf nscd.init nscd_proto.h nscd-types.h include ../Rules @@ -137,14 +135,11 @@ lib := nonlib include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o) -$(objpfx)nscd_nischeck: $(objpfx)nscd_nischeck.o ifeq ($(build-shared),yes) $(objpfx)nscd: $(common-objpfx)rt/librt.so $(shared-thread-library) \ $(common-objpfx)nis/libnsl.so -$(objpfx)nscd_nischeck: $(common-objpfx)nis/libnsl.so else $(objpfx)nscd: $(common-objpfx)rt/librt.a $(static-thread-library) \ $(common-objpfx)nis/libnsl.a -$(objpfx)nscd_nischeck: $(common-objpfx)nis/libnsl.a endif diff --git a/nscd/aicache.c b/nscd/aicache.c index 9b8a4e50f23..6f24daabecb 100644 --- a/nscd/aicache.c +++ b/nscd/aicache.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include @@ -26,9 +24,6 @@ #include #include #include -#ifdef HAVE_SENDFILE -# include -#endif #include "dbg_log.h" #include "nscd.h" @@ -382,9 +377,10 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req, <= (sizeof (struct database_pers_head) + db->head->module * sizeof (ref_t) + db->head->data_size)); - off_t off = (char *) &dataset->resp - (char *) db->head; ssize_t written; - written = sendfile (fd, db->wr_fd, &off, total); + written = sendfileall (fd, db->wr_fd, + (char *) &dataset->resp + - (char *) db->head, total); # ifndef __ASSUME_SENDFILE if (written == -1 && errno == ENOSYS) goto use_write; diff --git a/nscd/cache.c b/nscd/cache.c index a3f669bf8c8..787f8b46f59 100644 --- a/nscd/cache.c +++ b/nscd/cache.c @@ -2,20 +2,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/nscd/connections.c b/nscd/connections.c index f055642dcc5..632635845b2 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include @@ -204,6 +202,26 @@ writeall (int fd, const void *buf, size_t len) } +#ifdef HAVE_SENDFILE +ssize_t +sendfileall (int tofd, int fromfd, off_t off, size_t len) +{ + ssize_t n = len; + ssize_t ret; + + do + { + ret = TEMP_FAILURE_RETRY (sendfile (tofd, fromfd, &off, n)); + if (ret <= 0) + break; + n -= ret; + } + while (n > 0); + return ret < 0 ? ret : len - n; +} +#endif + + enum usekey { use_not = 0, @@ -957,8 +975,9 @@ cannot handle old request version %d; current version is %d"), <= (sizeof (struct database_pers_head) + db->head->module * sizeof (ref_t) + db->head->data_size)); - off_t off = (char *) cached->data - (char *) db->head; - nwritten = sendfile (fd, db->wr_fd, &off, cached->recsize); + nwritten = sendfileall (fd, db->wr_fd, + (char *) cached->data + - (char *) db->head, cached->recsize); # ifndef __ASSUME_SENDFILE if (nwritten == -1 && errno == ENOSYS) goto use_write; diff --git a/nscd/dbg_log.c b/nscd/dbg_log.c index 4b8843037b2..d64afc7e8de 100644 --- a/nscd/dbg_log.c +++ b/nscd/dbg_log.c @@ -1,21 +1,19 @@ -/* Copyright (c) 1998, 2000, 2004 Free Software Foundation, Inc. +/* Copyright (c) 1998, 2000, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/nscd/gai.c b/nscd/gai.c index 722c7e415d1..18fc62e7a09 100644 --- a/nscd/gai.c +++ b/nscd/gai.c @@ -1,3 +1,20 @@ +/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2004. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /* This file uses the getaddrinfo code but it compiles it without NSCD support. We just need a few symbol renames. */ #define __getservbyname_r getservbyname_r diff --git a/nscd/getgrgid_r.c b/nscd/getgrgid_r.c index d46fb0fcac3..037509d8aaa 100644 --- a/nscd/getgrgid_r.c +++ b/nscd/getgrgid_r.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include diff --git a/nscd/getgrnam_r.c b/nscd/getgrnam_r.c index 42daa161773..8fc74dcbafa 100644 --- a/nscd/getgrnam_r.c +++ b/nscd/getgrnam_r.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include diff --git a/nscd/gethstbyad_r.c b/nscd/gethstbyad_r.c index 47ed3e22e73..4c02492101d 100644 --- a/nscd/gethstbyad_r.c +++ b/nscd/gethstbyad_r.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include diff --git a/nscd/gethstbynm2_r.c b/nscd/gethstbynm2_r.c index b0cc713a84a..416b5ceafa1 100644 --- a/nscd/gethstbynm2_r.c +++ b/nscd/gethstbynm2_r.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/nscd/getpwnam_r.c b/nscd/getpwnam_r.c index df73b99e4a9..c92209a0cf5 100644 --- a/nscd/getpwnam_r.c +++ b/nscd/getpwnam_r.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include diff --git a/nscd/getpwuid_r.c b/nscd/getpwuid_r.c index 015a521bbe4..f68951511e4 100644 --- a/nscd/getpwuid_r.c +++ b/nscd/getpwuid_r.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include diff --git a/nscd/grpcache.c b/nscd/grpcache.c index fb043152c61..d38a92809e9 100644 --- a/nscd/grpcache.c +++ b/nscd/grpcache.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include @@ -32,9 +30,6 @@ #include #include #include -#ifdef HAVE_SENDFILE -# include -#endif #include #include @@ -310,8 +305,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req, <= (sizeof (struct database_pers_head) + db->head->module * sizeof (ref_t) + db->head->data_size)); - off_t off = (char *) &dataset->resp - (char *) db->head; - written = sendfile (fd, db->wr_fd, &off, total); + written = sendfileall (fd, db->wr_fd, + (char *) &dataset->resp + - (char *) db->head, total); # ifndef __ASSUME_SENDFILE if (written == -1 && errno == ENOSYS) goto use_write; diff --git a/nscd/hstcache.c b/nscd/hstcache.c index 29f14af66be..a7d981ad316 100644 --- a/nscd/hstcache.c +++ b/nscd/hstcache.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include @@ -34,9 +32,6 @@ #include #include #include -#ifdef HAVE_SENDFILE -# include -#endif #include #include "nscd.h" @@ -344,8 +339,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req, <= (sizeof (struct database_pers_head) + db->head->module * sizeof (ref_t) + db->head->data_size)); - off_t off = (char *) &dataset->resp - (char *) db->head; - written = sendfile (fd, db->wr_fd, &off, total); + written = sendfileall (fd, db->wr_fd, + (char *) &dataset->resp + - (char *) db->head, total); # ifndef __ASSUME_SENDFILE if (written == -1 && errno == ENOSYS) goto use_write; diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index eb03fc7a5d0..423dbbe4d3a 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include @@ -26,9 +24,6 @@ #include #include #include -#ifdef HAVE_SENDFILE -# include -#endif #include "dbg_log.h" #include "nscd.h" @@ -361,8 +356,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, <= (sizeof (struct database_pers_head) + db->head->module * sizeof (ref_t) + db->head->data_size)); - off_t off = (char *) &dataset->resp - (char *) db->head; - written = sendfile (fd, db->wr_fd, &off, total); + written = sendfileall (fd, db->wr_fd, + (char *) &dataset->resp + - (char *) db->head, total); # ifndef __ASSUME_SENDFILE if (written == -1 && errno == ENOSYS) goto use_write; diff --git a/nscd/mem.c b/nscd/mem.c index 96f0170c6ca..a41c0bdb074 100644 --- a/nscd/mem.c +++ b/nscd/mem.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 1389f2da19f..98c167eb622 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -319,5 +319,7 @@ extern ssize_t __readvall (int fd, const struct iovec *iov, int iovcnt) attribute_hidden; extern ssize_t writeall (int fd, const void *buf, size_t len) attribute_hidden; +extern ssize_t sendfileall (int tofd, int fromfd, off_t off, size_t len) + attribute_hidden; #endif /* nscd.h */ diff --git a/nscd/nscd.c b/nscd/nscd.c index 8f299a3aa4d..3c65e20a602 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -2,20 +2,18 @@ This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* nscd - Name Service Cache Daemon. Caches passwd, group, and hosts. */ diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c index 1039250f48d..579ddd402fe 100644 --- a/nscd/nscd_conf.c +++ b/nscd/nscd_conf.c @@ -2,20 +2,18 @@ This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 65e78a11746..827d3a97ab6 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -230,9 +230,9 @@ get_mapping (request_type type, const char *key, if (wait_on_socket (sock) <= 0) goto out_close2; -#ifndef MSG_NOSIGNAL -# define MSG_NOSIGNAL 0 -#endif +# ifndef MSG_NOSIGNAL +# define MSG_NOSIGNAL 0 +# endif if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, MSG_NOSIGNAL)) != keylen, 0)) diff --git a/nscd/nscd_nischeck.c b/nscd/nscd_nischeck.c deleted file mode 100644 index 20f7bb06207..00000000000 --- a/nscd/nscd_nischeck.c +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 1999, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Thorsten Kukuk , 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* nscd_nischeck: Check, if everybody has read permissions for NIS+ table. - Return value: - 0: Everybody can read the NIS+ table - 1: Only authenticated users could read the NIS+ table */ - -#include -#include -#include -#include -#include -#include - -/* Get libc version number. */ -#include - -#define PACKAGE _libc_intl_domainname - -/* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; - -/* Data structure to communicate with argp functions. */ -static struct argp argp = -{ - NULL, NULL, NULL, NULL, -}; - -int -main (int argc, char **argv) -{ - int remaining; - nis_result *res; - char *tablename, *cp; - - /* Set locale via LC_ALL. */ - setlocale (LC_ALL, ""); - /* Set the text message domain. */ - textdomain (PACKAGE); - - /* Parse and process arguments. */ - argp_parse (&argp, argc, argv, 0, &remaining, NULL); - - if (remaining + 1 != argc) - { - error (0, 0, gettext ("wrong number of arguments")); - argp_help (&argp, stdout, ARGP_HELP_SEE, program_invocation_short_name); - exit (EXIT_FAILURE); - } - - tablename = alloca (strlen (argv[1]) + 10); - cp = stpcpy (tablename, argv[1]); - strcpy (cp, ".org_dir"); - - res = nis_lookup (tablename, EXPAND_NAME|FOLLOW_LINKS); - - if (res == NULL || - (res->status != NIS_SUCCESS && res->status != NIS_S_SUCCESS)) - return 0; - - if (NIS_NOBODY(NIS_RES_OBJECT(res)->zo_access, NIS_READ_ACC)) - return 0; - else - return 1; -} - -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state) -{ - fprintf (stream, "nscd_nischeck (GNU %s) %s\n", PACKAGE, VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Free Software Foundation, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2005"); - fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); -} diff --git a/nscd/nscd_setup_thread.c b/nscd/nscd_setup_thread.c new file mode 100644 index 00000000000..32bfe070003 --- /dev/null +++ b/nscd/nscd_setup_thread.c @@ -0,0 +1,26 @@ +/* Setup of nscd worker threads. Stub verison. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2004. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include + + +void +setup_thread (struct database_dyn *db) +{ + /* Nothing. */ +} diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index 6f4b032d108..529c707de8c 100644 --- a/nscd/pwdcache.c +++ b/nscd/pwdcache.c @@ -3,20 +3,18 @@ This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include @@ -32,9 +30,6 @@ #include #include #include -#ifdef HAVE_SENDFILE -# include -#endif #include #include @@ -305,8 +300,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req, <= (sizeof (struct database_pers_head) + db->head->module * sizeof (ref_t) + db->head->data_size)); - off_t off = (char *) &dataset->resp - (char *) db->head; - written = sendfile (fd, db->wr_fd, &off, total); + written = sendfileall (fd, db->wr_fd, + (char *) &dataset->resp + - (char *) db->head, total); # ifndef __ASSUME_SENDFILE if (written == -1 && errno == ENOSYS) goto use_write; diff --git a/nss/function.def b/nss/function.def index 59a06a2d316..505fb9307f0 100644 --- a/nss/function.def +++ b/nss/function.def @@ -1,5 +1,5 @@ /* List of functions defined for static NSS in GNU C Library. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2005 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 @@ -37,6 +37,7 @@ DEFINE_GET (files, grnam) DEFINE_ENT (files, host) DEFINE_GETBY (files, host, addr) DEFINE_GETBY (files, host, name) +DEFINE_GETBY (files, host, name2) DEFINE_GET (files, hostton) DEFINE_GET (files, ntohost) DEFINE_GETBY (dns, host, addr) diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c index 45f3b8ac422..4b5d774fdd2 100644 --- a/nss/nss_files/files-netgrp.c +++ b/nss/nss_files/files-netgrp.c @@ -153,7 +153,7 @@ _nss_files_setnetgrent (const char *group, struct __netgrent *result) } -int +enum nss_status _nss_files_endnetgrent (struct __netgrent *result) { /* Free allocated memory for data if some is present. */ diff --git a/sysdeps/generic/_exit.c b/posix/_exit.c similarity index 100% rename from sysdeps/generic/_exit.c rename to posix/_exit.c diff --git a/sysdeps/generic/alarm.c b/posix/alarm.c similarity index 100% rename from sysdeps/generic/alarm.c rename to posix/alarm.c diff --git a/sysdeps/generic/environ.c b/posix/environ.c similarity index 100% rename from sysdeps/generic/environ.c rename to posix/environ.c diff --git a/sysdeps/generic/execve.c b/posix/execve.c similarity index 100% rename from sysdeps/generic/execve.c rename to posix/execve.c diff --git a/sysdeps/generic/fexecve.c b/posix/fexecve.c similarity index 100% rename from sysdeps/generic/fexecve.c rename to posix/fexecve.c diff --git a/sysdeps/generic/fork.c b/posix/fork.c similarity index 100% rename from sysdeps/generic/fork.c rename to posix/fork.c diff --git a/sysdeps/generic/fpathconf.c b/posix/fpathconf.c similarity index 100% rename from sysdeps/generic/fpathconf.c rename to posix/fpathconf.c diff --git a/sysdeps/generic/gai_strerror.c b/posix/gai_strerror.c similarity index 100% rename from sysdeps/generic/gai_strerror.c rename to posix/gai_strerror.c diff --git a/sysdeps/generic/getaddrinfo.c b/posix/getaddrinfo.c similarity index 100% rename from sysdeps/generic/getaddrinfo.c rename to posix/getaddrinfo.c diff --git a/posix/getconf.c b/posix/getconf.c index da8e538ad33..57c1d6a5d6c 100644 --- a/posix/getconf.c +++ b/posix/getconf.c @@ -1,20 +1,18 @@ /* Copyright (C) 1991, 92, 1995-2004, 2005 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/generic/getegid.c b/posix/getegid.c similarity index 100% rename from sysdeps/generic/getegid.c rename to posix/getegid.c diff --git a/sysdeps/generic/geteuid.c b/posix/geteuid.c similarity index 100% rename from sysdeps/generic/geteuid.c rename to posix/geteuid.c diff --git a/sysdeps/generic/getgid.c b/posix/getgid.c similarity index 100% rename from sysdeps/generic/getgid.c rename to posix/getgid.c diff --git a/sysdeps/generic/getgroups.c b/posix/getgroups.c similarity index 100% rename from sysdeps/generic/getgroups.c rename to posix/getgroups.c diff --git a/sysdeps/generic/getlogin.c b/posix/getlogin.c similarity index 100% rename from sysdeps/generic/getlogin.c rename to posix/getlogin.c diff --git a/sysdeps/generic/getlogin_r.c b/posix/getlogin_r.c similarity index 100% rename from sysdeps/generic/getlogin_r.c rename to posix/getlogin_r.c diff --git a/sysdeps/generic/getpgid.c b/posix/getpgid.c similarity index 100% rename from sysdeps/generic/getpgid.c rename to posix/getpgid.c diff --git a/sysdeps/generic/getpgrp.c b/posix/getpgrp.c similarity index 100% rename from sysdeps/generic/getpgrp.c rename to posix/getpgrp.c diff --git a/sysdeps/generic/getpid.c b/posix/getpid.c similarity index 100% rename from sysdeps/generic/getpid.c rename to posix/getpid.c diff --git a/sysdeps/generic/getppid.c b/posix/getppid.c similarity index 100% rename from sysdeps/generic/getppid.c rename to posix/getppid.c diff --git a/sysdeps/generic/getresgid.c b/posix/getresgid.c similarity index 100% rename from sysdeps/generic/getresgid.c rename to posix/getresgid.c diff --git a/sysdeps/generic/getresuid.c b/posix/getresuid.c similarity index 100% rename from sysdeps/generic/getresuid.c rename to posix/getresuid.c diff --git a/sysdeps/generic/getsid.c b/posix/getsid.c similarity index 100% rename from sysdeps/generic/getsid.c rename to posix/getsid.c diff --git a/sysdeps/generic/getuid.c b/posix/getuid.c similarity index 100% rename from sysdeps/generic/getuid.c rename to posix/getuid.c diff --git a/sysdeps/generic/glob.c b/posix/glob.c similarity index 100% rename from sysdeps/generic/glob.c rename to posix/glob.c diff --git a/sysdeps/generic/glob64.c b/posix/glob64.c similarity index 100% rename from sysdeps/generic/glob64.c rename to posix/glob64.c diff --git a/sysdeps/generic/group_member.c b/posix/group_member.c similarity index 100% rename from sysdeps/generic/group_member.c rename to posix/group_member.c diff --git a/sysdeps/generic/init-posix.c b/posix/init-posix.c similarity index 100% rename from sysdeps/generic/init-posix.c rename to posix/init-posix.c diff --git a/sysdeps/generic/nanosleep.c b/posix/nanosleep.c similarity index 100% rename from sysdeps/generic/nanosleep.c rename to posix/nanosleep.c diff --git a/sysdeps/generic/pathconf.c b/posix/pathconf.c similarity index 100% rename from sysdeps/generic/pathconf.c rename to posix/pathconf.c diff --git a/sysdeps/generic/pause.c b/posix/pause.c similarity index 100% rename from sysdeps/generic/pause.c rename to posix/pause.c diff --git a/sysdeps/generic/posix_madvise.c b/posix/posix_madvise.c similarity index 100% rename from sysdeps/generic/posix_madvise.c rename to posix/posix_madvise.c diff --git a/sysdeps/generic/pread.c b/posix/pread.c similarity index 100% rename from sysdeps/generic/pread.c rename to posix/pread.c diff --git a/sysdeps/generic/pread64.c b/posix/pread64.c similarity index 100% rename from sysdeps/generic/pread64.c rename to posix/pread64.c diff --git a/sysdeps/generic/pwrite.c b/posix/pwrite.c similarity index 100% rename from sysdeps/generic/pwrite.c rename to posix/pwrite.c diff --git a/sysdeps/generic/pwrite64.c b/posix/pwrite64.c similarity index 100% rename from sysdeps/generic/pwrite64.c rename to posix/pwrite64.c diff --git a/posix/regex_internal.h b/posix/regex_internal.h index d1447a4d5e6..3b575c3c48d 100644 --- a/posix/regex_internal.h +++ b/posix/regex_internal.h @@ -42,6 +42,9 @@ #if defined HAVE_STDBOOL_H || defined _LIBC # include #endif /* HAVE_STDBOOL_H || _LIBC */ +#if defined HAVE_STDINT_H || defined _LIBC +# include +#endif /* HAVE_STDINT_H || _LIBC */ #if defined _LIBC # include #else @@ -83,6 +86,11 @@ # define gettext_noop(String) String #endif +/* For loser systems without the definition. */ +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + #if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC # define RE_ENABLE_I18N #endif diff --git a/sysdeps/generic/sched_getaffinity.c b/posix/sched_getaffinity.c similarity index 100% rename from sysdeps/generic/sched_getaffinity.c rename to posix/sched_getaffinity.c diff --git a/sysdeps/generic/sched_getp.c b/posix/sched_getp.c similarity index 100% rename from sysdeps/generic/sched_getp.c rename to posix/sched_getp.c diff --git a/sysdeps/generic/sched_gets.c b/posix/sched_gets.c similarity index 100% rename from sysdeps/generic/sched_gets.c rename to posix/sched_gets.c diff --git a/sysdeps/generic/sched_primax.c b/posix/sched_primax.c similarity index 100% rename from sysdeps/generic/sched_primax.c rename to posix/sched_primax.c diff --git a/sysdeps/generic/sched_primin.c b/posix/sched_primin.c similarity index 100% rename from sysdeps/generic/sched_primin.c rename to posix/sched_primin.c diff --git a/sysdeps/generic/sched_rr_gi.c b/posix/sched_rr_gi.c similarity index 100% rename from sysdeps/generic/sched_rr_gi.c rename to posix/sched_rr_gi.c diff --git a/sysdeps/generic/sched_setaffinity.c b/posix/sched_setaffinity.c similarity index 100% rename from sysdeps/generic/sched_setaffinity.c rename to posix/sched_setaffinity.c diff --git a/sysdeps/generic/sched_setp.c b/posix/sched_setp.c similarity index 100% rename from sysdeps/generic/sched_setp.c rename to posix/sched_setp.c diff --git a/sysdeps/generic/sched_sets.c b/posix/sched_sets.c similarity index 100% rename from sysdeps/generic/sched_sets.c rename to posix/sched_sets.c diff --git a/sysdeps/generic/sched_yield.c b/posix/sched_yield.c similarity index 100% rename from sysdeps/generic/sched_yield.c rename to posix/sched_yield.c diff --git a/sysdeps/generic/setgid.c b/posix/setgid.c similarity index 100% rename from sysdeps/generic/setgid.c rename to posix/setgid.c diff --git a/sysdeps/generic/setlogin.c b/posix/setlogin.c similarity index 100% rename from sysdeps/generic/setlogin.c rename to posix/setlogin.c diff --git a/sysdeps/generic/setpgid.c b/posix/setpgid.c similarity index 100% rename from sysdeps/generic/setpgid.c rename to posix/setpgid.c diff --git a/sysdeps/generic/setpgrp.c b/posix/setpgrp.c similarity index 100% rename from sysdeps/generic/setpgrp.c rename to posix/setpgrp.c diff --git a/sysdeps/generic/setresgid.c b/posix/setresgid.c similarity index 100% rename from sysdeps/generic/setresgid.c rename to posix/setresgid.c diff --git a/sysdeps/generic/setresuid.c b/posix/setresuid.c similarity index 100% rename from sysdeps/generic/setresuid.c rename to posix/setresuid.c diff --git a/sysdeps/generic/setsid.c b/posix/setsid.c similarity index 100% rename from sysdeps/generic/setsid.c rename to posix/setsid.c diff --git a/sysdeps/generic/setuid.c b/posix/setuid.c similarity index 100% rename from sysdeps/generic/setuid.c rename to posix/setuid.c diff --git a/sysdeps/generic/sleep.c b/posix/sleep.c similarity index 100% rename from sysdeps/generic/sleep.c rename to posix/sleep.c diff --git a/sysdeps/generic/spawni.c b/posix/spawni.c similarity index 100% rename from sysdeps/generic/spawni.c rename to posix/spawni.c diff --git a/sysdeps/generic/sysconf.c b/posix/sysconf.c similarity index 100% rename from sysdeps/generic/sysconf.c rename to posix/sysconf.c diff --git a/sysdeps/generic/times.c b/posix/times.c similarity index 100% rename from sysdeps/generic/times.c rename to posix/times.c diff --git a/sysdeps/generic/uname.c b/posix/uname.c similarity index 100% rename from sysdeps/generic/uname.c rename to posix/uname.c diff --git a/posix/unistd.h b/posix/unistd.h index 86e0e9e659d..9684126eaad 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -742,6 +742,13 @@ extern int ttyslot (void) __THROW; extern int link (__const char *__from, __const char *__to) __THROW __nonnull ((1, 2)) __wur; +#ifdef __USE_GNU +/* Like link but relative paths in TO and FROM are interpreted relative + to FROMFD and TOFD respectively. */ +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to) __THROW __nonnull ((2, 4)) __wur; +#endif + #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K /* Make a symbolic link to FROM named TO. */ extern int symlink (__const char *__from, __const char *__to) @@ -754,6 +761,17 @@ extern int readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) __THROW __nonnull ((1, 2)) __wur; #endif /* Use BSD. */ +#ifdef __USE_GNU +/* Like symlink but a relative path in TO is interpreted relative to TOFD. */ +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) __THROW __nonnull ((1, 3)) __wur; + +/* Like readlink but a relative PATH is interpreted relative to FD. */ +extern int readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + __THROW __nonnull ((2, 3)) __wur; +#endif + /* Remove the link NAME. */ extern int unlink (__const char *__name) __THROW __nonnull ((1)); diff --git a/sysdeps/generic/vfork.c b/posix/vfork.c similarity index 100% rename from sysdeps/generic/vfork.c rename to posix/vfork.c diff --git a/sysdeps/generic/wait.c b/posix/wait.c similarity index 100% rename from sysdeps/generic/wait.c rename to posix/wait.c diff --git a/sysdeps/generic/wait3.c b/posix/wait3.c similarity index 100% rename from sysdeps/generic/wait3.c rename to posix/wait3.c diff --git a/sysdeps/generic/wait4.c b/posix/wait4.c similarity index 100% rename from sysdeps/generic/wait4.c rename to posix/wait4.c diff --git a/sysdeps/generic/waitid.c b/posix/waitid.c similarity index 100% rename from sysdeps/generic/waitid.c rename to posix/waitid.c diff --git a/sysdeps/generic/waitpid.c b/posix/waitpid.c similarity index 100% rename from sysdeps/generic/waitpid.c rename to posix/waitpid.c diff --git a/sysdeps/generic/wordexp.c b/posix/wordexp.c similarity index 100% rename from sysdeps/generic/wordexp.c rename to posix/wordexp.c diff --git a/sysdeps/generic/gai_sigqueue.c b/resolv/gai_sigqueue.c similarity index 100% rename from sysdeps/generic/gai_sigqueue.c rename to resolv/gai_sigqueue.c diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index 3698e4b8412..bab2535ceba 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -51,7 +51,6 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$Id$"; #endif /* LIBC_SCCS and not lint */ #include diff --git a/sysdeps/generic/res-state.c b/resolv/res-state.c similarity index 100% rename from sysdeps/generic/res-state.c rename to resolv/res-state.c diff --git a/sysdeps/generic/getpriority.c b/resource/getpriority.c similarity index 100% rename from sysdeps/generic/getpriority.c rename to resource/getpriority.c diff --git a/sysdeps/generic/getrlimit.c b/resource/getrlimit.c similarity index 100% rename from sysdeps/generic/getrlimit.c rename to resource/getrlimit.c diff --git a/sysdeps/generic/getrlimit64.c b/resource/getrlimit64.c similarity index 100% rename from sysdeps/generic/getrlimit64.c rename to resource/getrlimit64.c diff --git a/sysdeps/generic/getrusage.c b/resource/getrusage.c similarity index 100% rename from sysdeps/generic/getrusage.c rename to resource/getrusage.c diff --git a/sysdeps/generic/nice.c b/resource/nice.c similarity index 100% rename from sysdeps/generic/nice.c rename to resource/nice.c diff --git a/sysdeps/generic/setpriority.c b/resource/setpriority.c similarity index 100% rename from sysdeps/generic/setpriority.c rename to resource/setpriority.c diff --git a/sysdeps/generic/setrlimit.c b/resource/setrlimit.c similarity index 100% rename from sysdeps/generic/setrlimit.c rename to resource/setrlimit.c diff --git a/sysdeps/generic/setrlimit64.c b/resource/setrlimit64.c similarity index 100% rename from sysdeps/generic/setrlimit64.c rename to resource/setrlimit64.c diff --git a/sysdeps/generic/ulimit.c b/resource/ulimit.c similarity index 100% rename from sysdeps/generic/ulimit.c rename to resource/ulimit.c diff --git a/sysdeps/generic/vlimit.c b/resource/vlimit.c similarity index 100% rename from sysdeps/generic/vlimit.c rename to resource/vlimit.c diff --git a/sysdeps/generic/vtimes.c b/resource/vtimes.c similarity index 100% rename from sysdeps/generic/vtimes.c rename to resource/vtimes.c diff --git a/sysdeps/generic/aio_cancel.c b/rt/aio_cancel.c similarity index 100% rename from sysdeps/generic/aio_cancel.c rename to rt/aio_cancel.c diff --git a/sysdeps/generic/aio_fsync.c b/rt/aio_fsync.c similarity index 100% rename from sysdeps/generic/aio_fsync.c rename to rt/aio_fsync.c diff --git a/sysdeps/generic/aio_misc.c b/rt/aio_misc.c similarity index 100% rename from sysdeps/generic/aio_misc.c rename to rt/aio_misc.c diff --git a/sysdeps/generic/aio_notify.c b/rt/aio_notify.c similarity index 100% rename from sysdeps/generic/aio_notify.c rename to rt/aio_notify.c diff --git a/sysdeps/generic/aio_read.c b/rt/aio_read.c similarity index 100% rename from sysdeps/generic/aio_read.c rename to rt/aio_read.c diff --git a/sysdeps/generic/aio_read64.c b/rt/aio_read64.c similarity index 100% rename from sysdeps/generic/aio_read64.c rename to rt/aio_read64.c diff --git a/sysdeps/generic/aio_sigqueue.c b/rt/aio_sigqueue.c similarity index 100% rename from sysdeps/generic/aio_sigqueue.c rename to rt/aio_sigqueue.c diff --git a/sysdeps/generic/aio_suspend.c b/rt/aio_suspend.c similarity index 100% rename from sysdeps/generic/aio_suspend.c rename to rt/aio_suspend.c diff --git a/sysdeps/generic/aio_write.c b/rt/aio_write.c similarity index 100% rename from sysdeps/generic/aio_write.c rename to rt/aio_write.c diff --git a/sysdeps/generic/aio_write64.c b/rt/aio_write64.c similarity index 100% rename from sysdeps/generic/aio_write64.c rename to rt/aio_write64.c diff --git a/sysdeps/generic/clock_getcpuclockid.c b/rt/clock_getcpuclockid.c similarity index 100% rename from sysdeps/generic/clock_getcpuclockid.c rename to rt/clock_getcpuclockid.c diff --git a/sysdeps/generic/clock_getres.c b/rt/clock_getres.c similarity index 100% rename from sysdeps/generic/clock_getres.c rename to rt/clock_getres.c diff --git a/sysdeps/generic/clock_gettime.c b/rt/clock_gettime.c similarity index 100% rename from sysdeps/generic/clock_gettime.c rename to rt/clock_gettime.c diff --git a/sysdeps/generic/clock_nanosleep.c b/rt/clock_nanosleep.c similarity index 100% rename from sysdeps/generic/clock_nanosleep.c rename to rt/clock_nanosleep.c diff --git a/sysdeps/generic/clock_settime.c b/rt/clock_settime.c similarity index 100% rename from sysdeps/generic/clock_settime.c rename to rt/clock_settime.c diff --git a/sysdeps/generic/get_clockfreq.c b/rt/get_clockfreq.c similarity index 100% rename from sysdeps/generic/get_clockfreq.c rename to rt/get_clockfreq.c diff --git a/sysdeps/generic/lio_listio.c b/rt/lio_listio.c similarity index 100% rename from sysdeps/generic/lio_listio.c rename to rt/lio_listio.c diff --git a/rt/lio_listio64.c b/rt/lio_listio64.c new file mode 100644 index 00000000000..35a571c6850 --- /dev/null +++ b/rt/lio_listio64.c @@ -0,0 +1,2 @@ +#define BE_AIO64 +#include diff --git a/sysdeps/generic/mq_close.c b/rt/mq_close.c similarity index 100% rename from sysdeps/generic/mq_close.c rename to rt/mq_close.c diff --git a/sysdeps/generic/mq_getattr.c b/rt/mq_getattr.c similarity index 100% rename from sysdeps/generic/mq_getattr.c rename to rt/mq_getattr.c diff --git a/sysdeps/generic/mq_notify.c b/rt/mq_notify.c similarity index 100% rename from sysdeps/generic/mq_notify.c rename to rt/mq_notify.c diff --git a/sysdeps/generic/mq_open.c b/rt/mq_open.c similarity index 100% rename from sysdeps/generic/mq_open.c rename to rt/mq_open.c diff --git a/sysdeps/generic/mq_receive.c b/rt/mq_receive.c similarity index 100% rename from sysdeps/generic/mq_receive.c rename to rt/mq_receive.c diff --git a/sysdeps/generic/mq_send.c b/rt/mq_send.c similarity index 100% rename from sysdeps/generic/mq_send.c rename to rt/mq_send.c diff --git a/sysdeps/generic/mq_setattr.c b/rt/mq_setattr.c similarity index 100% rename from sysdeps/generic/mq_setattr.c rename to rt/mq_setattr.c diff --git a/sysdeps/generic/mq_timedreceive.c b/rt/mq_timedreceive.c similarity index 100% rename from sysdeps/generic/mq_timedreceive.c rename to rt/mq_timedreceive.c diff --git a/sysdeps/generic/mq_timedsend.c b/rt/mq_timedsend.c similarity index 100% rename from sysdeps/generic/mq_timedsend.c rename to rt/mq_timedsend.c diff --git a/sysdeps/generic/mq_unlink.c b/rt/mq_unlink.c similarity index 100% rename from sysdeps/generic/mq_unlink.c rename to rt/mq_unlink.c diff --git a/sysdeps/generic/shm_open.c b/rt/shm_open.c similarity index 100% rename from sysdeps/generic/shm_open.c rename to rt/shm_open.c diff --git a/sysdeps/generic/shm_unlink.c b/rt/shm_unlink.c similarity index 100% rename from sysdeps/generic/shm_unlink.c rename to rt/shm_unlink.c diff --git a/sysdeps/generic/timer_create.c b/rt/timer_create.c similarity index 100% rename from sysdeps/generic/timer_create.c rename to rt/timer_create.c diff --git a/sysdeps/generic/timer_delete.c b/rt/timer_delete.c similarity index 100% rename from sysdeps/generic/timer_delete.c rename to rt/timer_delete.c diff --git a/sysdeps/generic/timer_getoverr.c b/rt/timer_getoverr.c similarity index 100% rename from sysdeps/generic/timer_getoverr.c rename to rt/timer_getoverr.c diff --git a/sysdeps/generic/timer_gettime.c b/rt/timer_gettime.c similarity index 100% rename from sysdeps/generic/timer_gettime.c rename to rt/timer_gettime.c diff --git a/sysdeps/generic/timer_settime.c b/rt/timer_settime.c similarity index 100% rename from sysdeps/generic/timer_settime.c rename to rt/timer_settime.c diff --git a/sysdeps/generic/tst-timer.c b/rt/tst-timer.c similarity index 100% rename from sysdeps/generic/tst-timer.c rename to rt/tst-timer.c diff --git a/scripts/check-c++-types.sh b/scripts/check-c++-types.sh index 1992705e0f2..f0ea0b5a842 100755 --- a/scripts/check-c++-types.sh +++ b/scripts/check-c++-types.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 2003, 2005 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 @@ -28,7 +28,7 @@ # egrep '^typedef.*;$' | # sed 's/^typedef[[:space:]]*//;s/\([[:space:]]\{1,\}__attribute__.*\);/;/;s/.*[[:space:]]\([*]\|\)\(.*\);/\2/' | # egrep -v '^_' | -# sort -u +# LC_ALL=C sort -u # data=$1 shift diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh new file mode 100755 index 00000000000..88c85f71069 --- /dev/null +++ b/scripts/check-local-headers.sh @@ -0,0 +1,38 @@ +#! /bin/bash +# Copyright (C) 2005 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 Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 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 +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. +# +includedir="$1" +objpfx="$2" + +# To avoid long paths. +cd "$objpfx" + + +# Search all dependency files for file names in the include directory. +# There are a few system headers we are known to use. +if fgrep "$includedir" */*.d | +fgrep -v "$includedir/asm" | +fgrep -v "$includedir/linux" | +fgrep -v "$includedir/selinux" | +fgrep -v "$includedir/gd"; then + # If we found a match something is wrong. + exit 1 +fi + +exit 0 diff --git a/scripts/mkinstalldirs b/scripts/mkinstalldirs index d0fd194fd6c..f945dbf2bce 100755 --- a/scripts/mkinstalldirs +++ b/scripts/mkinstalldirs @@ -4,8 +4,6 @@ # Created: 1993-05-16 # Public domain -# $Id$ - errstatus=0 for file diff --git a/sysdeps/generic/__longjmp.c b/setjmp/__longjmp.c similarity index 100% rename from sysdeps/generic/__longjmp.c rename to setjmp/__longjmp.c diff --git a/sysdeps/generic/bsd-_setjmp.c b/setjmp/bsd-_setjmp.c similarity index 100% rename from sysdeps/generic/bsd-_setjmp.c rename to setjmp/bsd-_setjmp.c diff --git a/sysdeps/generic/bsd-setjmp.c b/setjmp/bsd-setjmp.c similarity index 100% rename from sysdeps/generic/bsd-setjmp.c rename to setjmp/bsd-setjmp.c diff --git a/sysdeps/generic/jmp-unwind.c b/setjmp/jmp-unwind.c similarity index 100% rename from sysdeps/generic/jmp-unwind.c rename to setjmp/jmp-unwind.c diff --git a/sysdeps/generic/longjmp.c b/setjmp/longjmp.c similarity index 100% rename from sysdeps/generic/longjmp.c rename to setjmp/longjmp.c diff --git a/sysdeps/generic/setjmp.c b/setjmp/setjmp.c similarity index 100% rename from sysdeps/generic/setjmp.c rename to setjmp/setjmp.c diff --git a/sysdeps/generic/sigjmp.c b/setjmp/sigjmp.c similarity index 100% rename from sysdeps/generic/sigjmp.c rename to setjmp/sigjmp.c diff --git a/sysdeps/generic/allocrtsig.c b/signal/allocrtsig.c similarity index 100% rename from sysdeps/generic/allocrtsig.c rename to signal/allocrtsig.c diff --git a/sysdeps/generic/kill.c b/signal/kill.c similarity index 100% rename from sysdeps/generic/kill.c rename to signal/kill.c diff --git a/sysdeps/generic/killpg.c b/signal/killpg.c similarity index 100% rename from sysdeps/generic/killpg.c rename to signal/killpg.c diff --git a/sysdeps/generic/raise.c b/signal/raise.c similarity index 100% rename from sysdeps/generic/raise.c rename to signal/raise.c diff --git a/sysdeps/generic/sigaction.c b/signal/sigaction.c similarity index 100% rename from sysdeps/generic/sigaction.c rename to signal/sigaction.c diff --git a/sysdeps/generic/sigaltstack.c b/signal/sigaltstack.c similarity index 100% rename from sysdeps/generic/sigaltstack.c rename to signal/sigaltstack.c diff --git a/sysdeps/generic/sigblock.c b/signal/sigblock.c similarity index 100% rename from sysdeps/generic/sigblock.c rename to signal/sigblock.c diff --git a/sysdeps/generic/sigfillset.c b/signal/sigfillset.c similarity index 100% rename from sysdeps/generic/sigfillset.c rename to signal/sigfillset.c diff --git a/sysdeps/generic/sigignore.c b/signal/sigignore.c similarity index 100% rename from sysdeps/generic/sigignore.c rename to signal/sigignore.c diff --git a/sysdeps/generic/sigintr.c b/signal/sigintr.c similarity index 100% rename from sysdeps/generic/sigintr.c rename to signal/sigintr.c diff --git a/sysdeps/generic/signal.c b/signal/signal.c similarity index 100% rename from sysdeps/generic/signal.c rename to signal/signal.c diff --git a/sysdeps/generic/sigpause.c b/signal/sigpause.c similarity index 100% rename from sysdeps/generic/sigpause.c rename to signal/sigpause.c diff --git a/sysdeps/generic/sigpending.c b/signal/sigpending.c similarity index 100% rename from sysdeps/generic/sigpending.c rename to signal/sigpending.c diff --git a/sysdeps/generic/sigprocmask.c b/signal/sigprocmask.c similarity index 100% rename from sysdeps/generic/sigprocmask.c rename to signal/sigprocmask.c diff --git a/sysdeps/generic/sigqueue.c b/signal/sigqueue.c similarity index 100% rename from sysdeps/generic/sigqueue.c rename to signal/sigqueue.c diff --git a/sysdeps/generic/sigreturn.c b/signal/sigreturn.c similarity index 100% rename from sysdeps/generic/sigreturn.c rename to signal/sigreturn.c diff --git a/sysdeps/generic/sigset.c b/signal/sigset.c similarity index 100% rename from sysdeps/generic/sigset.c rename to signal/sigset.c diff --git a/sysdeps/generic/sigsetmask.c b/signal/sigsetmask.c similarity index 100% rename from sysdeps/generic/sigsetmask.c rename to signal/sigsetmask.c diff --git a/sysdeps/generic/sigstack.c b/signal/sigstack.c similarity index 100% rename from sysdeps/generic/sigstack.c rename to signal/sigstack.c diff --git a/sysdeps/generic/sigsuspend.c b/signal/sigsuspend.c similarity index 100% rename from sysdeps/generic/sigsuspend.c rename to signal/sigsuspend.c diff --git a/sysdeps/generic/sigtimedwait.c b/signal/sigtimedwait.c similarity index 100% rename from sysdeps/generic/sigtimedwait.c rename to signal/sigtimedwait.c diff --git a/sysdeps/generic/sigvec.c b/signal/sigvec.c similarity index 100% rename from sysdeps/generic/sigvec.c rename to signal/sigvec.c diff --git a/sysdeps/generic/sigwait.c b/signal/sigwait.c similarity index 100% rename from sysdeps/generic/sigwait.c rename to signal/sigwait.c diff --git a/sysdeps/generic/sigwaitinfo.c b/signal/sigwaitinfo.c similarity index 100% rename from sysdeps/generic/sigwaitinfo.c rename to signal/sigwaitinfo.c diff --git a/sysdeps/generic/sysv_signal.c b/signal/sysv_signal.c similarity index 100% rename from sysdeps/generic/sysv_signal.c rename to signal/sysv_signal.c diff --git a/sysdeps/generic/accept.c b/socket/accept.c similarity index 100% rename from sysdeps/generic/accept.c rename to socket/accept.c diff --git a/sysdeps/generic/bind.c b/socket/bind.c similarity index 100% rename from sysdeps/generic/bind.c rename to socket/bind.c diff --git a/sysdeps/generic/connect.c b/socket/connect.c similarity index 100% rename from sysdeps/generic/connect.c rename to socket/connect.c diff --git a/sysdeps/generic/getpeername.c b/socket/getpeername.c similarity index 100% rename from sysdeps/generic/getpeername.c rename to socket/getpeername.c diff --git a/sysdeps/generic/getsockname.c b/socket/getsockname.c similarity index 100% rename from sysdeps/generic/getsockname.c rename to socket/getsockname.c diff --git a/sysdeps/generic/getsockopt.c b/socket/getsockopt.c similarity index 100% rename from sysdeps/generic/getsockopt.c rename to socket/getsockopt.c diff --git a/sysdeps/generic/isfdtype.c b/socket/isfdtype.c similarity index 100% rename from sysdeps/generic/isfdtype.c rename to socket/isfdtype.c diff --git a/sysdeps/generic/listen.c b/socket/listen.c similarity index 100% rename from sysdeps/generic/listen.c rename to socket/listen.c diff --git a/sysdeps/generic/opensock.c b/socket/opensock.c similarity index 100% rename from sysdeps/generic/opensock.c rename to socket/opensock.c diff --git a/sysdeps/generic/recv.c b/socket/recv.c similarity index 100% rename from sysdeps/generic/recv.c rename to socket/recv.c diff --git a/sysdeps/generic/recvfrom.c b/socket/recvfrom.c similarity index 100% rename from sysdeps/generic/recvfrom.c rename to socket/recvfrom.c diff --git a/sysdeps/generic/recvmsg.c b/socket/recvmsg.c similarity index 100% rename from sysdeps/generic/recvmsg.c rename to socket/recvmsg.c diff --git a/sysdeps/generic/send.c b/socket/send.c similarity index 100% rename from sysdeps/generic/send.c rename to socket/send.c diff --git a/sysdeps/generic/sendmsg.c b/socket/sendmsg.c similarity index 100% rename from sysdeps/generic/sendmsg.c rename to socket/sendmsg.c diff --git a/sysdeps/generic/sendto.c b/socket/sendto.c similarity index 100% rename from sysdeps/generic/sendto.c rename to socket/sendto.c diff --git a/sysdeps/generic/setsockopt.c b/socket/setsockopt.c similarity index 100% rename from sysdeps/generic/setsockopt.c rename to socket/setsockopt.c diff --git a/sysdeps/generic/shutdown.c b/socket/shutdown.c similarity index 100% rename from sysdeps/generic/shutdown.c rename to socket/shutdown.c diff --git a/sysdeps/generic/sockatmark.c b/socket/sockatmark.c similarity index 100% rename from sysdeps/generic/sockatmark.c rename to socket/sockatmark.c diff --git a/sysdeps/generic/socket.c b/socket/socket.c similarity index 100% rename from sysdeps/generic/socket.c rename to socket/socket.c diff --git a/sysdeps/generic/socketpair.c b/socket/socketpair.c similarity index 100% rename from sysdeps/generic/socketpair.c rename to socket/socketpair.c diff --git a/soft-fp/floatdisf.c b/soft-fp/floatdisf.c index c7933a85ffd..d2a2af09476 100644 --- a/soft-fp/floatdisf.c +++ b/soft-fp/floatdisf.c @@ -23,7 +23,7 @@ #include "soft-fp.h" #include "single.h" -double __floatdisf(DItype i) +float __floatdisf(DItype i) { FP_DECL_EX; FP_DECL_S(A); diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h index 18779f88d89..2dc66c1ba31 100644 --- a/soft-fp/soft-fp.h +++ b/soft-fp/soft-fp.h @@ -175,4 +175,6 @@ typedef USItype UHWtype; #include #endif +#include + #endif diff --git a/sysdeps/generic/ctermid.c b/stdio-common/ctermid.c similarity index 100% rename from sysdeps/generic/ctermid.c rename to stdio-common/ctermid.c diff --git a/sysdeps/generic/cuserid.c b/stdio-common/cuserid.c similarity index 100% rename from sysdeps/generic/cuserid.c rename to stdio-common/cuserid.c diff --git a/sysdeps/generic/errlist.c b/stdio-common/errlist.c similarity index 100% rename from sysdeps/generic/errlist.c rename to stdio-common/errlist.c diff --git a/sysdeps/generic/flockfile.c b/stdio-common/flockfile.c similarity index 100% rename from sysdeps/generic/flockfile.c rename to stdio-common/flockfile.c diff --git a/sysdeps/generic/ftrylockfile.c b/stdio-common/ftrylockfile.c similarity index 100% rename from sysdeps/generic/ftrylockfile.c rename to stdio-common/ftrylockfile.c diff --git a/sysdeps/generic/funlockfile.c b/stdio-common/funlockfile.c similarity index 100% rename from sysdeps/generic/funlockfile.c rename to stdio-common/funlockfile.c diff --git a/sysdeps/generic/printf_fphex.c b/stdio-common/printf_fphex.c similarity index 100% rename from sysdeps/generic/printf_fphex.c rename to stdio-common/printf_fphex.c diff --git a/sysdeps/generic/remove.c b/stdio-common/remove.c similarity index 100% rename from sysdeps/generic/remove.c rename to stdio-common/remove.c diff --git a/sysdeps/generic/rename.c b/stdio-common/rename.c similarity index 100% rename from sysdeps/generic/rename.c rename to stdio-common/rename.c diff --git a/sysdeps/generic/renameat.c b/stdio-common/renameat.c similarity index 100% rename from sysdeps/generic/renameat.c rename to stdio-common/renameat.c diff --git a/sysdeps/generic/siglist.c b/stdio-common/siglist.c similarity index 100% rename from sysdeps/generic/siglist.c rename to stdio-common/siglist.c diff --git a/sysdeps/generic/tempname.c b/stdio-common/tempname.c similarity index 100% rename from sysdeps/generic/tempname.c rename to stdio-common/tempname.c diff --git a/sysdeps/generic/tmpfile.c b/stdio-common/tmpfile.c similarity index 100% rename from sysdeps/generic/tmpfile.c rename to stdio-common/tmpfile.c diff --git a/sysdeps/generic/tmpfile64.c b/stdio-common/tmpfile64.c similarity index 100% rename from sysdeps/generic/tmpfile64.c rename to stdio-common/tmpfile64.c diff --git a/sysdeps/generic/abort.c b/stdlib/abort.c similarity index 100% rename from sysdeps/generic/abort.c rename to stdlib/abort.c diff --git a/sysdeps/generic/add_n.c b/stdlib/add_n.c similarity index 99% rename from sysdeps/generic/add_n.c rename to stdlib/add_n.c index 5fcb7e48352..280e30545ab 100644 --- a/sysdeps/generic/add_n.c +++ b/stdlib/add_n.c @@ -19,7 +19,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" mp_limb_t diff --git a/sysdeps/generic/addmul_1.c b/stdlib/addmul_1.c similarity index 99% rename from sysdeps/generic/addmul_1.c rename to stdlib/addmul_1.c index 746ae313071..6ae1e57ad98 100644 --- a/sysdeps/generic/addmul_1.c +++ b/stdlib/addmul_1.c @@ -22,7 +22,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" #include "longlong.h" diff --git a/sysdeps/generic/cmp.c b/stdlib/cmp.c similarity index 99% rename from sysdeps/generic/cmp.c rename to stdlib/cmp.c index 8e9792f54e4..e7661702b60 100644 --- a/sysdeps/generic/cmp.c +++ b/stdlib/cmp.c @@ -19,7 +19,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" /* Compare OP1_PTR/OP1_SIZE with OP2_PTR/OP2_SIZE. diff --git a/stdlib/cxa_atexit.c b/stdlib/cxa_atexit.c index 490776105f6..9b7a932b850 100644 --- a/stdlib/cxa_atexit.c +++ b/stdlib/cxa_atexit.c @@ -21,6 +21,8 @@ #include #include "exit.h" +#include +#include #undef __cxa_atexit @@ -35,10 +37,14 @@ __cxa_atexit (void (*func) (void *), void *arg, void *d) if (new == NULL) return -1; - new->flavor = ef_cxa; +#ifdef PTR_MANGLE + PTR_MANGLE (func); +#endif new->func.cxa.fn = (void (*) (void *, int)) func; new->func.cxa.arg = arg; new->func.cxa.dso_handle = d; + atomic_write_barrier (); + new->flavor = ef_cxa; return 0; } INTDEF(__cxa_atexit) diff --git a/stdlib/cxa_finalize.c b/stdlib/cxa_finalize.c index 2339c7b5bd5..43fcbc484f4 100644 --- a/stdlib/cxa_finalize.c +++ b/stdlib/cxa_finalize.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #include #include "exit.h" #include +#include /* If D is non-NULL, call all functions registered with `__cxa_atexit' with the same dso handle. Otherwise, if D is NULL, call all of the @@ -39,7 +40,13 @@ __cxa_finalize (void *d) /* We don't want to run this cleanup more than once. */ && ! atomic_compare_and_exchange_bool_acq (&f->flavor, ef_free, ef_cxa)) - (*f->func.cxa.fn) (f->func.cxa.arg, 0); + { + void (*cxafn) (void *arg, int status) = f->func.cxa.fn; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (cxafn); +#endif + cxafn (f->func.cxa.arg, 0); + } } /* Remove the registered fork handlers. We do not have to diff --git a/sysdeps/generic/dbl2mpn.c b/stdlib/dbl2mpn.c similarity index 98% rename from sysdeps/generic/dbl2mpn.c rename to stdlib/dbl2mpn.c index 773ca4fd6a7..4444467946b 100644 --- a/sysdeps/generic/dbl2mpn.c +++ b/stdlib/dbl2mpn.c @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include "gmp.h" +#include #include "gmp-impl.h" /* Convert a `double' to a multi-precision integer representing the diff --git a/sysdeps/generic/div.c b/stdlib/div.c similarity index 100% rename from sysdeps/generic/div.c rename to stdlib/div.c diff --git a/sysdeps/generic/divmod_1.c b/stdlib/divmod_1.c similarity index 99% rename from sysdeps/generic/divmod_1.c rename to stdlib/divmod_1.c index 50b97db72ff..51a47d85d36 100644 --- a/sysdeps/generic/divmod_1.c +++ b/stdlib/divmod_1.c @@ -25,7 +25,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" #include "longlong.h" diff --git a/sysdeps/generic/divrem.c b/stdlib/divrem.c similarity index 99% rename from sysdeps/generic/divrem.c rename to stdlib/divrem.c index 609f3d789c3..c97d01ec171 100644 --- a/sysdeps/generic/divrem.c +++ b/stdlib/divrem.c @@ -20,7 +20,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" #include "longlong.h" diff --git a/stdlib/exit.c b/stdlib/exit.c index e5e25960b1e..bc4cb0fd085 100644 --- a/stdlib/exit.c +++ b/stdlib/exit.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "exit.h" #include "set-hooks.h" @@ -45,17 +46,33 @@ exit (int status) &__exit_funcs->fns[--__exit_funcs->idx]; switch (f->flavor) { + void (*atfct) (void); + void (*onfct) (int status, void *arg); + void (*cxafct) (void *arg, int status); + case ef_free: case ef_us: break; case ef_on: - (*f->func.on.fn) (status, f->func.on.arg); + onfct = f->func.on.fn; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (onfct); +#endif + onfct (status, f->func.on.arg); break; case ef_at: - (*f->func.at) (); + atfct = f->func.at; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (atfct); +#endif + atfct (); break; case ef_cxa: - (*f->func.cxa.fn) (f->func.cxa.arg, status); + cxafct = f->func.cxa.fn; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (cxafct); +#endif + cxafct (f->func.cxa.arg, status); break; } } diff --git a/sysdeps/generic/getcontext.c b/stdlib/getcontext.c similarity index 100% rename from sysdeps/generic/getcontext.c rename to stdlib/getcontext.c diff --git a/sysdeps/generic/getenv.c b/stdlib/getenv.c similarity index 100% rename from sysdeps/generic/getenv.c rename to stdlib/getenv.c diff --git a/sysdeps/generic/inlines.c b/stdlib/inlines.c similarity index 77% rename from sysdeps/generic/inlines.c rename to stdlib/inlines.c index dca305e6e49..5f1065ea13a 100644 --- a/sysdeps/generic/inlines.c +++ b/stdlib/inlines.c @@ -1,3 +1,3 @@ #define _FORCE_INLINES #define _EXTERN_INLINE /* empty */ -#include "gmp.h" +#include diff --git a/sysdeps/generic/labs.c b/stdlib/labs.c similarity index 100% rename from sysdeps/generic/labs.c rename to stdlib/labs.c diff --git a/sysdeps/generic/ldbl2mpn.c b/stdlib/ldbl2mpn.c similarity index 100% rename from sysdeps/generic/ldbl2mpn.c rename to stdlib/ldbl2mpn.c diff --git a/sysdeps/generic/ldiv.c b/stdlib/ldiv.c similarity index 100% rename from sysdeps/generic/ldiv.c rename to stdlib/ldiv.c diff --git a/sysdeps/generic/llabs.c b/stdlib/llabs.c similarity index 100% rename from sysdeps/generic/llabs.c rename to stdlib/llabs.c diff --git a/sysdeps/generic/lldiv.c b/stdlib/lldiv.c similarity index 100% rename from sysdeps/generic/lldiv.c rename to stdlib/lldiv.c diff --git a/stdlib/longlong.h b/stdlib/longlong.h index f89ae27a671..4e1931d8234 100644 --- a/stdlib/longlong.h +++ b/stdlib/longlong.h @@ -1,5 +1,6 @@ /* longlong.h -- definitions for mixed size 32/64 bit arithmetic. - Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -31,8 +32,7 @@ DItype, UDItype -- Signed and unsigned 64 bit types. On a 32 bit machine UWtype should typically be USItype; - on a 64 bit machine, UWtype should typically be UDItype. -*/ + on a 64 bit machine, UWtype should typically be UDItype. */ #define __BITS4 (W_TYPE_SIZE / 4) #define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2)) @@ -46,10 +46,12 @@ #define UDWtype UDItype #endif +extern const UQItype __clz_tab[256]; + /* Define auxiliary asm macros. - 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) multiplies two - UWtype integers MULTIPLER and MULTIPLICAND, and generates a two UWtype + 1) umul_ppmm(high_prod, low_prod, multiplier, multiplicand) multiplies two + UWtype integers MULTIPLIER and MULTIPLICAND, and generates a two UWtype word product in HIGH_PROD and LOW_PROD. 2) __umulsidi3(a,b) multiplies two UWtype integers A and B, and returns a @@ -113,10 +115,7 @@ #define umul_ppmm(ph, pl, m0, m1) \ do { \ UDItype __m0 = (m0), __m1 = (m1); \ - __asm__ ("umulh %r1,%2,%0" \ - : "=r" ((UDItype) ph) \ - : "%rJ" (__m0), \ - "rI" (__m1)); \ + (ph) = __builtin_alpha_umulh (__m0, __m1); \ (pl) = __m0 * __m1; \ } while (0) #define UMUL_TIME 46 @@ -130,30 +129,27 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype); #define UDIV_TIME 220 #endif /* LONGLONG_STANDALONE */ #ifdef __alpha_cix__ -#define count_leading_zeros(COUNT,X) \ - __asm__("ctlz %1,%0" : "=r"(COUNT) : "r"(X)) -#define count_trailing_zeros(COUNT,X) \ - __asm__("cttz %1,%0" : "=r"(COUNT) : "r"(X)) +#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clzl (X)) +#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzl (X)) #define COUNT_LEADING_ZEROS_0 64 #else -extern const UQItype __clz_tab[]; #define count_leading_zeros(COUNT,X) \ do { \ UDItype __xr = (X), __t, __a; \ - __asm__("cmpbge $31,%1,%0" : "=r"(__t) : "r"(__xr)); \ + __t = __builtin_alpha_cmpbge (0, __xr); \ __a = __clz_tab[__t ^ 0xff] - 1; \ - __asm__("extbl %1,%2,%0" : "=r"(__t) : "r"(__xr), "r"(__a)); \ + __t = __builtin_alpha_extbl (__xr, __a); \ (COUNT) = 64 - (__clz_tab[__t] + __a*8); \ } while (0) #define count_trailing_zeros(COUNT,X) \ do { \ UDItype __xr = (X), __t, __a; \ - __asm__("cmpbge $31,%1,%0" : "=r"(__t) : "r"(__xr)); \ + __t = __builtin_alpha_cmpbge (0, __xr); \ __t = ~__t & -~__t; \ __a = ((__t & 0xCC) != 0) * 2; \ __a += ((__t & 0xF0) != 0) * 4; \ __a += ((__t & 0xAA) != 0); \ - __asm__("extbl %1,%2,%0" : "=r"(__t) : "r"(__xr), "r"(__a)); \ + __t = __builtin_alpha_extbl (__xr, __a); \ __a <<= 3; \ __t &= -__t; \ __a += ((__t & 0xCC) != 0) * 2; \ @@ -193,7 +189,7 @@ do { \ UDItype __umulsidi3 (USItype, USItype); #endif -#if defined (__arm__) && W_TYPE_SIZE == 32 +#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("adds %1, %4, %5\n\tadc %0, %2, %3" \ : "=r" ((USItype) (sh)), \ @@ -201,7 +197,7 @@ UDItype __umulsidi3 (USItype, USItype); : "%r" ((USItype) (ah)), \ "rI" ((USItype) (bh)), \ "%r" ((USItype) (al)), \ - "rI" ((USItype) (bl))) + "rI" ((USItype) (bl)) __CLOBBER_CC) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ __asm__ ("subs %1, %4, %5\n\tsbc %0, %2, %3" \ : "=r" ((USItype) (sh)), \ @@ -209,7 +205,7 @@ UDItype __umulsidi3 (USItype, USItype); : "r" ((USItype) (ah)), \ "rI" ((USItype) (bh)), \ "r" ((USItype) (al)), \ - "rI" ((USItype) (bl))) + "rI" ((USItype) (bl)) __CLOBBER_CC) #define umul_ppmm(xh, xl, a, b) \ {register USItype __t0, __t1, __t2; \ __asm__ ("%@ Inlined umul_ppmm\n" \ @@ -229,7 +225,7 @@ UDItype __umulsidi3 (USItype, USItype); "=r" ((USItype) (xl)), \ "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ : "r" ((USItype) (a)), \ - "r" ((USItype) (b)));} + "r" ((USItype) (b)) __CLOBBER_CC );} #define UMUL_TIME 20 #define UDIV_TIME 100 #endif /* __arm__ */ @@ -294,44 +290,27 @@ UDItype __umulsidi3 (USItype, USItype); } while (0) #endif -#if (defined (__i370__) || defined (__mvs__)) && W_TYPE_SIZE == 32 -#define umul_ppmm(xh, xl, m0, m1) \ - do { \ - union {UDItype __ll; \ - struct {USItype __h, __l;} __i; \ - } __xx; \ - USItype __m0 = (m0), __m1 = (m1); \ - __asm__ ("mr %0,%3" \ - : "=r" (__xx.__i.__h), \ - "=r" (__xx.__i.__l) \ - : "%1" (__m0), \ - "r" (__m1)); \ - (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ - (xh) += ((((SItype) __m0 >> 31) & __m1) \ - + (((SItype) __m1 >> 31) & __m0)); \ - } while (0) +#if (defined (__i370__) || defined (__s390__) || defined (__mvs__)) && W_TYPE_SIZE == 32 #define smul_ppmm(xh, xl, m0, m1) \ do { \ union {DItype __ll; \ struct {USItype __h, __l;} __i; \ - } __xx; \ - __asm__ ("mr %0,%3" \ - : "=r" (__xx.__i.__h), \ - "=r" (__xx.__i.__l) \ - : "%1" (m0), \ - "r" (m1)); \ - (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ + } __x; \ + __asm__ ("lr %N0,%1\n\tmr %0,%2" \ + : "=&r" (__x.__ll) \ + : "r" (m0), "r" (m1)); \ + (xh) = __x.__i.__h; (xl) = __x.__i.__l; \ } while (0) #define sdiv_qrnnd(q, r, n1, n0, d) \ do { \ union {DItype __ll; \ struct {USItype __h, __l;} __i; \ - } __xx; \ - __xx.__i.__h = n1; __xx.__i.__l = n0; \ + } __x; \ + __x.__i.__h = n1; __x.__i.__l = n0; \ __asm__ ("dr %0,%2" \ - : "=r" (__xx.__ll) \ - : "0" (__xx.__ll), "r" (d)); \ - (q) = __xx.__i.__l; (r) = __xx.__i.__h; \ + : "=r" (__x.__ll) \ + : "0" (__x.__ll), "r" (d)); \ + (q) = __x.__i.__l; (r) = __x.__i.__h; \ } while (0) #endif @@ -438,11 +417,8 @@ UDItype __umulsidi3 (USItype, USItype); "1" ((USItype) (al)), \ "g" ((USItype) (bl))) -/* The '020, '030, '040 and CPU32 have 32x32->64 and 64/32->32q-32r. */ -#if defined (__mc68020__) || defined(mc68020) \ - || defined(__mc68030__) || defined(mc68030) \ - || defined(__mc68040__) || defined(mc68040) \ - || defined(__mcpu32__) || defined(mcpu32) +/* The '020, '030, '040, '060 and CPU32 have 32x32->64 and 64/32->32q-32r. */ +#if (defined (__mc68020__) && !defined (__mc68060__)) #define umul_ppmm(w1, w0, u, v) \ __asm__ ("mulu%.l %3,%1:%0" \ : "=d" ((USItype) (w0)), \ @@ -466,8 +442,43 @@ UDItype __umulsidi3 (USItype, USItype); "1" ((USItype) (n1)), \ "dmi" ((USItype) (d))) -#else /* not mc68020 */ -#if !defined(__mcf5200__) +#elif defined (__mcoldfire__) /* not mc68020 */ + +#define umul_ppmm(xh, xl, a, b) \ + __asm__ ("| Inlined umul_ppmm\n" \ + " move%.l %2,%/d0\n" \ + " move%.l %3,%/d1\n" \ + " move%.l %/d0,%/d2\n" \ + " swap %/d0\n" \ + " move%.l %/d1,%/d3\n" \ + " swap %/d1\n" \ + " move%.w %/d2,%/d4\n" \ + " mulu %/d3,%/d4\n" \ + " mulu %/d1,%/d2\n" \ + " mulu %/d0,%/d3\n" \ + " mulu %/d0,%/d1\n" \ + " move%.l %/d4,%/d0\n" \ + " clr%.w %/d0\n" \ + " swap %/d0\n" \ + " add%.l %/d0,%/d2\n" \ + " add%.l %/d3,%/d2\n" \ + " jcc 1f\n" \ + " add%.l %#65536,%/d1\n" \ + "1: swap %/d2\n" \ + " moveq %#0,%/d0\n" \ + " move%.w %/d2,%/d0\n" \ + " move%.w %/d4,%/d2\n" \ + " move%.l %/d2,%1\n" \ + " add%.l %/d1,%/d0\n" \ + " move%.l %/d0,%0" \ + : "=g" ((USItype) (xh)), \ + "=g" ((USItype) (xl)) \ + : "g" ((USItype) (a)), \ + "g" ((USItype) (b)) \ + : "d0", "d1", "d2", "d3", "d4") +#define UMUL_TIME 100 +#define UDIV_TIME 400 +#else /* not ColdFire */ /* %/ inserts REGISTER_PREFIX, %# inserts IMMEDIATE_PREFIX. */ #define umul_ppmm(xh, xl, a, b) \ __asm__ ("| Inlined umul_ppmm\n" \ @@ -503,14 +514,12 @@ UDItype __umulsidi3 (USItype, USItype); : "d0", "d1", "d2", "d3", "d4") #define UMUL_TIME 100 #define UDIV_TIME 400 -#endif /* not mcf5200 */ + #endif /* not mc68020 */ -/* The '020, '030, '040 and '060 have bitfield insns. */ -#if defined (__mc68020__) || defined(mc68020) \ - || defined(__mc68030__) || defined(mc68030) \ - || defined(__mc68040__) || defined(mc68040) \ - || defined(__mc68060__) || defined(mc68060) +/* The '020, '030, '040 and '060 have bitfield insns. + cpu32 disguises as a 68020, but lacks them. */ +#if defined (__mc68020__) && !defined (__mcpu32__) #define count_leading_zeros(count, x) \ __asm__ ("bfffo %1{%b2:%b2},%0" \ : "=d" ((USItype) (count)) \ @@ -671,7 +680,7 @@ UDItype __umulsidi3 (USItype, USItype); __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x)) #define COUNT_LEADING_ZEROS_0 32 #if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \ - || defined (__ppc__) || defined (PPC) || defined (__vxworks__) + || defined (__ppc__) || defined (PPC) #define umul_ppmm(ph, pl, m0, m1) \ do { \ USItype __m0 = (m0), __m1 = (m1); \ @@ -1203,6 +1212,20 @@ UDItype __umulsidi3 (USItype, USItype); } while (0) #endif +/* If we lack umul_ppmm but have smul_ppmm, define umul_ppmm in terms of + smul_ppmm. */ +#if !defined (umul_ppmm) && defined (smul_ppmm) +#define umul_ppmm(w1, w0, u, v) \ + do { \ + UWtype __w1; \ + UWtype __xm0 = (u), __xm1 = (v); \ + smul_ppmm (__w1, w0, __xm0, __xm1); \ + (w1) = __w1 + (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \ + + (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \ + } while (0) +#endif + +/* If we still don't have umul_ppmm, define it using plain C. */ #if !defined (umul_ppmm) #define umul_ppmm(w1, w0, u, v) \ do { \ @@ -1292,7 +1315,6 @@ UDItype __umulsidi3 (USItype, USItype); #endif #if !defined (count_leading_zeros) -extern const UQItype __clz_tab[]; #define count_leading_zeros(count, x) \ do { \ UWtype __xr = (x); \ diff --git a/sysdeps/generic/lshift.c b/stdlib/lshift.c similarity index 99% rename from sysdeps/generic/lshift.c rename to stdlib/lshift.c index 0b58389658e..bedf44229fc 100644 --- a/sysdeps/generic/lshift.c +++ b/stdlib/lshift.c @@ -19,7 +19,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" /* Shift U (pointed to by UP and USIZE digits long) CNT bits to the left diff --git a/sysdeps/generic/makecontext.c b/stdlib/makecontext.c similarity index 100% rename from sysdeps/generic/makecontext.c rename to stdlib/makecontext.c diff --git a/sysdeps/generic/mod_1.c b/stdlib/mod_1.c similarity index 99% rename from sysdeps/generic/mod_1.c rename to stdlib/mod_1.c index 90385d1e6a0..3273c9222da 100644 --- a/sysdeps/generic/mod_1.c +++ b/stdlib/mod_1.c @@ -22,7 +22,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" #include "longlong.h" diff --git a/sysdeps/generic/mp_clz_tab.c b/stdlib/mp_clz_tab.c similarity index 98% rename from sysdeps/generic/mp_clz_tab.c rename to stdlib/mp_clz_tab.c index 520ea319301..2220299e7c1 100644 --- a/sysdeps/generic/mp_clz_tab.c +++ b/stdlib/mp_clz_tab.c @@ -19,7 +19,7 @@ 02111-1307 USA. */ #if 0 -#include "gmp.h" +#include #include "gmp-impl.h" #endif diff --git a/sysdeps/generic/mpn2dbl.c b/stdlib/mpn2dbl.c similarity index 98% rename from sysdeps/generic/mpn2dbl.c rename to stdlib/mpn2dbl.c index ea1b7dc27f4..178edbf8166 100644 --- a/sysdeps/generic/mpn2dbl.c +++ b/stdlib/mpn2dbl.c @@ -16,7 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include "gmp.h" +#include #include "gmp-impl.h" #include diff --git a/sysdeps/generic/mpn2flt.c b/stdlib/mpn2flt.c similarity index 100% rename from sysdeps/generic/mpn2flt.c rename to stdlib/mpn2flt.c diff --git a/sysdeps/generic/mpn2ldbl.c b/stdlib/mpn2ldbl.c similarity index 100% rename from sysdeps/generic/mpn2ldbl.c rename to stdlib/mpn2ldbl.c diff --git a/sysdeps/generic/mul.c b/stdlib/mul.c similarity index 99% rename from sysdeps/generic/mul.c rename to stdlib/mul.c index 7678e72a0ac..fe0cbf3d7f5 100644 --- a/sysdeps/generic/mul.c +++ b/stdlib/mul.c @@ -19,7 +19,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" /* Multiply the natural numbers u (pointed to by UP, with USIZE limbs) diff --git a/sysdeps/generic/mul_1.c b/stdlib/mul_1.c similarity index 99% rename from sysdeps/generic/mul_1.c rename to stdlib/mul_1.c index 1c36b5fb1f0..686e6c5efe1 100644 --- a/sysdeps/generic/mul_1.c +++ b/stdlib/mul_1.c @@ -20,7 +20,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" #include "longlong.h" diff --git a/sysdeps/generic/mul_n.c b/stdlib/mul_n.c similarity index 99% rename from sysdeps/generic/mul_n.c rename to stdlib/mul_n.c index 2120cd4f59c..b478c76aba7 100644 --- a/sysdeps/generic/mul_n.c +++ b/stdlib/mul_n.c @@ -19,7 +19,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" /* Multiply the natural numbers u (pointed to by UP) and v (pointed to by VP), diff --git a/stdlib/on_exit.c b/stdlib/on_exit.c index d98fbb3a86b..e777604084a 100644 --- a/stdlib/on_exit.c +++ b/stdlib/on_exit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1996, 2005 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 @@ -18,6 +18,8 @@ #include #include "exit.h" +#include +#include /* Register a function to be called by exit. */ int @@ -28,9 +30,13 @@ __on_exit (void (*func) (int status, void *arg), void *arg) if (new == NULL) return -1; - new->flavor = ef_on; +#ifdef PTR_MANGLE + PTR_MANGLE (func); +#endif new->func.on.fn = func; new->func.on.arg = arg; + atomic_write_barrier (); + new->flavor = ef_on; return 0; } weak_alias (__on_exit, on_exit) diff --git a/sysdeps/generic/putenv.c b/stdlib/putenv.c similarity index 100% rename from sysdeps/generic/putenv.c rename to stdlib/putenv.c diff --git a/sysdeps/generic/rshift.c b/stdlib/rshift.c similarity index 99% rename from sysdeps/generic/rshift.c rename to stdlib/rshift.c index 59caf735299..9d0a9c4c0ef 100644 --- a/sysdeps/generic/rshift.c +++ b/stdlib/rshift.c @@ -19,7 +19,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" /* Shift U (pointed to by UP and USIZE limbs long) CNT bits to the right diff --git a/sysdeps/generic/setcontext.c b/stdlib/setcontext.c similarity index 100% rename from sysdeps/generic/setcontext.c rename to stdlib/setcontext.c diff --git a/sysdeps/generic/setenv.c b/stdlib/setenv.c similarity index 100% rename from sysdeps/generic/setenv.c rename to stdlib/setenv.c diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c index 3a1c1ebd4b6..c7901c29fee 100644 --- a/stdlib/strtod_l.c +++ b/stdlib/strtod_l.c @@ -68,8 +68,8 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **, and _LONG_LONG_LIMB in it can take effect into gmp.h. */ #include #include -#include -#include +#include "gmp-impl.h" +#include "longlong.h" #include "fpioconst.h" #define NDEBUG 1 diff --git a/sysdeps/generic/strtoimax.c b/stdlib/strtoimax.c similarity index 100% rename from sysdeps/generic/strtoimax.c rename to stdlib/strtoimax.c diff --git a/sysdeps/generic/strtol.c b/stdlib/strtol.c similarity index 100% rename from sysdeps/generic/strtol.c rename to stdlib/strtol.c diff --git a/sysdeps/generic/strtol_l.c b/stdlib/strtol_l.c similarity index 100% rename from sysdeps/generic/strtol_l.c rename to stdlib/strtol_l.c diff --git a/sysdeps/generic/strtold_l.c b/stdlib/strtold_l.c similarity index 100% rename from sysdeps/generic/strtold_l.c rename to stdlib/strtold_l.c diff --git a/sysdeps/generic/strtoll.c b/stdlib/strtoll.c similarity index 100% rename from sysdeps/generic/strtoll.c rename to stdlib/strtoll.c diff --git a/sysdeps/generic/strtoll_l.c b/stdlib/strtoll_l.c similarity index 100% rename from sysdeps/generic/strtoll_l.c rename to stdlib/strtoll_l.c diff --git a/sysdeps/generic/strtoul.c b/stdlib/strtoul.c similarity index 100% rename from sysdeps/generic/strtoul.c rename to stdlib/strtoul.c diff --git a/sysdeps/generic/strtoul_l.c b/stdlib/strtoul_l.c similarity index 100% rename from sysdeps/generic/strtoul_l.c rename to stdlib/strtoul_l.c diff --git a/sysdeps/generic/strtoull.c b/stdlib/strtoull.c similarity index 100% rename from sysdeps/generic/strtoull.c rename to stdlib/strtoull.c diff --git a/sysdeps/generic/strtoull_l.c b/stdlib/strtoull_l.c similarity index 100% rename from sysdeps/generic/strtoull_l.c rename to stdlib/strtoull_l.c diff --git a/sysdeps/generic/strtoumax.c b/stdlib/strtoumax.c similarity index 100% rename from sysdeps/generic/strtoumax.c rename to stdlib/strtoumax.c diff --git a/sysdeps/generic/sub_n.c b/stdlib/sub_n.c similarity index 99% rename from sysdeps/generic/sub_n.c rename to stdlib/sub_n.c index 4f2f06099c8..987ad91eb17 100644 --- a/sysdeps/generic/sub_n.c +++ b/stdlib/sub_n.c @@ -19,7 +19,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" mp_limb_t diff --git a/sysdeps/generic/submul_1.c b/stdlib/submul_1.c similarity index 95% rename from sysdeps/generic/submul_1.c rename to stdlib/submul_1.c index c7c08ee4af8..3e7163a2a3b 100644 --- a/sysdeps/generic/submul_1.c +++ b/stdlib/submul_1.c @@ -3,7 +3,7 @@ from the limb vector pointed to by RES_PTR. Return the most significant limb of the product, adjusted for carry-out from the subtraction. -Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1996, 2005 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -22,7 +22,7 @@ along with the GNU MP 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 "gmp.h" +#include #include "gmp-impl.h" #include "longlong.h" diff --git a/sysdeps/generic/swapcontext.c b/stdlib/swapcontext.c similarity index 100% rename from sysdeps/generic/swapcontext.c rename to stdlib/swapcontext.c diff --git a/sysdeps/generic/system.c b/stdlib/system.c similarity index 100% rename from sysdeps/generic/system.c rename to stdlib/system.c diff --git a/sysdeps/generic/udiv_qrnnd.c b/stdlib/udiv_qrnnd.c similarity index 100% rename from sysdeps/generic/udiv_qrnnd.c rename to stdlib/udiv_qrnnd.c diff --git a/sysdeps/generic/wcstoimax.c b/stdlib/wcstoimax.c similarity index 100% rename from sysdeps/generic/wcstoimax.c rename to stdlib/wcstoimax.c diff --git a/sysdeps/generic/wcstoumax.c b/stdlib/wcstoumax.c similarity index 100% rename from sysdeps/generic/wcstoumax.c rename to stdlib/wcstoumax.c diff --git a/sysdeps/generic/fattach.c b/streams/fattach.c similarity index 100% rename from sysdeps/generic/fattach.c rename to streams/fattach.c diff --git a/sysdeps/generic/fdetach.c b/streams/fdetach.c similarity index 100% rename from sysdeps/generic/fdetach.c rename to streams/fdetach.c diff --git a/sysdeps/generic/getmsg.c b/streams/getmsg.c similarity index 100% rename from sysdeps/generic/getmsg.c rename to streams/getmsg.c diff --git a/sysdeps/generic/getpmsg.c b/streams/getpmsg.c similarity index 100% rename from sysdeps/generic/getpmsg.c rename to streams/getpmsg.c diff --git a/sysdeps/generic/isastream.c b/streams/isastream.c similarity index 100% rename from sysdeps/generic/isastream.c rename to streams/isastream.c diff --git a/sysdeps/generic/putmsg.c b/streams/putmsg.c similarity index 100% rename from sysdeps/generic/putmsg.c rename to streams/putmsg.c diff --git a/sysdeps/generic/putpmsg.c b/streams/putpmsg.c similarity index 100% rename from sysdeps/generic/putpmsg.c rename to streams/putpmsg.c diff --git a/sysdeps/generic/_strerror.c b/string/_strerror.c similarity index 100% rename from sysdeps/generic/_strerror.c rename to string/_strerror.c diff --git a/sysdeps/generic/bcopy.c b/string/bcopy.c similarity index 100% rename from sysdeps/generic/bcopy.c rename to string/bcopy.c diff --git a/sysdeps/generic/bzero.c b/string/bzero.c similarity index 100% rename from sysdeps/generic/bzero.c rename to string/bzero.c diff --git a/sysdeps/generic/ffs.c b/string/ffs.c similarity index 100% rename from sysdeps/generic/ffs.c rename to string/ffs.c diff --git a/sysdeps/generic/ffsll.c b/string/ffsll.c similarity index 100% rename from sysdeps/generic/ffsll.c rename to string/ffsll.c diff --git a/sysdeps/generic/memccpy.c b/string/memccpy.c similarity index 100% rename from sysdeps/generic/memccpy.c rename to string/memccpy.c diff --git a/sysdeps/generic/memchr.c b/string/memchr.c similarity index 100% rename from sysdeps/generic/memchr.c rename to string/memchr.c diff --git a/sysdeps/generic/memcmp.c b/string/memcmp.c similarity index 100% rename from sysdeps/generic/memcmp.c rename to string/memcmp.c diff --git a/sysdeps/generic/memcpy.c b/string/memcpy.c similarity index 100% rename from sysdeps/generic/memcpy.c rename to string/memcpy.c diff --git a/sysdeps/generic/memmem.c b/string/memmem.c similarity index 100% rename from sysdeps/generic/memmem.c rename to string/memmem.c diff --git a/sysdeps/generic/memmove.c b/string/memmove.c similarity index 100% rename from sysdeps/generic/memmove.c rename to string/memmove.c diff --git a/sysdeps/generic/mempcpy.c b/string/mempcpy.c similarity index 100% rename from sysdeps/generic/mempcpy.c rename to string/mempcpy.c diff --git a/sysdeps/generic/memrchr.c b/string/memrchr.c similarity index 100% rename from sysdeps/generic/memrchr.c rename to string/memrchr.c diff --git a/sysdeps/generic/memset.c b/string/memset.c similarity index 100% rename from sysdeps/generic/memset.c rename to string/memset.c diff --git a/sysdeps/generic/rawmemchr.c b/string/rawmemchr.c similarity index 100% rename from sysdeps/generic/rawmemchr.c rename to string/rawmemchr.c diff --git a/sysdeps/generic/stpcpy.c b/string/stpcpy.c similarity index 100% rename from sysdeps/generic/stpcpy.c rename to string/stpcpy.c diff --git a/sysdeps/generic/stpncpy.c b/string/stpncpy.c similarity index 100% rename from sysdeps/generic/stpncpy.c rename to string/stpncpy.c diff --git a/sysdeps/generic/strcasecmp.c b/string/strcasecmp.c similarity index 100% rename from sysdeps/generic/strcasecmp.c rename to string/strcasecmp.c diff --git a/sysdeps/generic/strcasecmp_l.c b/string/strcasecmp_l.c similarity index 90% rename from sysdeps/generic/strcasecmp_l.c rename to string/strcasecmp_l.c index 1cd3fe14c5b..498a27d975b 100644 --- a/sysdeps/generic/strcasecmp_l.c +++ b/string/strcasecmp_l.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2002, 2005 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 @@ -17,7 +17,7 @@ 02111-1307 USA. */ #define USE_IN_EXTENDED_LOCALE_MODEL 1 -#include +#include "strcasecmp.c" libc_hidden_def (__strcasecmp_l) weak_alias (__strcasecmp_l, strcasecmp_l) diff --git a/sysdeps/generic/strcasestr.c b/string/strcasestr.c similarity index 100% rename from sysdeps/generic/strcasestr.c rename to string/strcasestr.c diff --git a/sysdeps/generic/strcat.c b/string/strcat.c similarity index 100% rename from sysdeps/generic/strcat.c rename to string/strcat.c diff --git a/sysdeps/generic/strchr.c b/string/strchr.c similarity index 100% rename from sysdeps/generic/strchr.c rename to string/strchr.c diff --git a/sysdeps/generic/strchrnul.c b/string/strchrnul.c similarity index 100% rename from sysdeps/generic/strchrnul.c rename to string/strchrnul.c diff --git a/sysdeps/generic/strcmp.c b/string/strcmp.c similarity index 100% rename from sysdeps/generic/strcmp.c rename to string/strcmp.c diff --git a/sysdeps/generic/strcpy.c b/string/strcpy.c similarity index 100% rename from sysdeps/generic/strcpy.c rename to string/strcpy.c diff --git a/sysdeps/generic/strcspn.c b/string/strcspn.c similarity index 100% rename from sysdeps/generic/strcspn.c rename to string/strcspn.c diff --git a/sysdeps/generic/string-inlines.c b/string/string-inlines.c similarity index 100% rename from sysdeps/generic/string-inlines.c rename to string/string-inlines.c diff --git a/sysdeps/generic/strlen.c b/string/strlen.c similarity index 100% rename from sysdeps/generic/strlen.c rename to string/strlen.c diff --git a/sysdeps/generic/strncase.c b/string/strncase.c similarity index 100% rename from sysdeps/generic/strncase.c rename to string/strncase.c diff --git a/sysdeps/generic/strncase_l.c b/string/strncase_l.c similarity index 91% rename from sysdeps/generic/strncase_l.c rename to string/strncase_l.c index 0e61ebec7d2..0f22b46de1d 100644 --- a/sysdeps/generic/strncase_l.c +++ b/string/strncase_l.c @@ -1,6 +1,6 @@ /* Compare at most N characters of two strings without taking care for the case using given locale. - Copyright (C) 1997, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 2002, 2005 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 @@ -19,7 +19,7 @@ 02111-1307 USA. */ #define USE_IN_EXTENDED_LOCALE_MODEL 1 -#include +#include "strncase.c" libc_hidden_def (__strncasecmp_l) weak_alias (__strncasecmp_l, strncasecmp_l) diff --git a/sysdeps/generic/strncat.c b/string/strncat.c similarity index 100% rename from sysdeps/generic/strncat.c rename to string/strncat.c diff --git a/sysdeps/generic/strncmp.c b/string/strncmp.c similarity index 100% rename from sysdeps/generic/strncmp.c rename to string/strncmp.c diff --git a/sysdeps/generic/strncpy.c b/string/strncpy.c similarity index 100% rename from sysdeps/generic/strncpy.c rename to string/strncpy.c diff --git a/sysdeps/generic/strnlen.c b/string/strnlen.c similarity index 100% rename from sysdeps/generic/strnlen.c rename to string/strnlen.c diff --git a/sysdeps/generic/strpbrk.c b/string/strpbrk.c similarity index 100% rename from sysdeps/generic/strpbrk.c rename to string/strpbrk.c diff --git a/sysdeps/generic/strrchr.c b/string/strrchr.c similarity index 100% rename from sysdeps/generic/strrchr.c rename to string/strrchr.c diff --git a/sysdeps/generic/strsep.c b/string/strsep.c similarity index 100% rename from sysdeps/generic/strsep.c rename to string/strsep.c diff --git a/sysdeps/generic/strspn.c b/string/strspn.c similarity index 100% rename from sysdeps/generic/strspn.c rename to string/strspn.c diff --git a/sysdeps/generic/strstr.c b/string/strstr.c similarity index 100% rename from sysdeps/generic/strstr.c rename to string/strstr.c diff --git a/sysdeps/generic/strtok.c b/string/strtok.c similarity index 100% rename from sysdeps/generic/strtok.c rename to string/strtok.c diff --git a/sysdeps/generic/strtok_r.c b/string/strtok_r.c similarity index 100% rename from sysdeps/generic/strtok_r.c rename to string/strtok_r.c diff --git a/sysdeps/generic/wordcopy.c b/string/wordcopy.c similarity index 100% rename from sysdeps/generic/wordcopy.c rename to string/wordcopy.c diff --git a/sysdeps/generic/xpg-strerror.c b/string/xpg-strerror.c similarity index 100% rename from sysdeps/generic/xpg-strerror.c rename to string/xpg-strerror.c diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c index 7fe96ca765f..dbd12e5aad6 100644 --- a/sunrpc/auth_des.c +++ b/sunrpc/auth_des.c @@ -174,7 +174,7 @@ authdes_pk_create (const char *servername, netobj *pkey, u_int window, if (key_gendes (&auth->ah_key) < 0) { debug ("authdes_create: unable to gen conversation key"); - return NULL; + goto failed; } } else diff --git a/sunrpc/bindrsvprt.c b/sunrpc/bindrsvprt.c index f58d3b2a8b2..023ae1723bc 100644 --- a/sunrpc/bindrsvprt.c +++ b/sunrpc/bindrsvprt.c @@ -74,14 +74,13 @@ bindresvport (int sd, struct sockaddr_in *sin) int res = -1; int nports = ENDPORT - startport + 1; + int endport = ENDPORT; again: for (i = 0; i < nports; ++i) { sin->sin_port = htons (port++); - if (port > ENDPORT) - { - port = startport; - } + if (port > endport) + port = startport; res = __bind (sd, sin, sizeof (struct sockaddr_in)); if (res >= 0 || errno != EADDRINUSE) break; @@ -90,7 +89,9 @@ bindresvport (int sd, struct sockaddr_in *sin) if (i == nports && startport != LOWPORT) { startport = LOWPORT; + endport = STARTPORT - 1; nports = STARTPORT - LOWPORT; + port = LOWPORT + port % (STARTPORT - LOWPORT); goto again; } diff --git a/sunrpc/rpc_clntout.c b/sunrpc/rpc_clntout.c index 4e2832ff565..08d96012123 100644 --- a/sunrpc/rpc_clntout.c +++ b/sunrpc/rpc_clntout.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char clntout_rcsid[] = - "$Id$"; -#endif /* * rpc_clntout.c, Client-stub outputter for the RPC protocol compiler diff --git a/sunrpc/rpc_cout.c b/sunrpc/rpc_cout.c index a803feb65a7..dfc57fd277b 100644 --- a/sunrpc/rpc_cout.c +++ b/sunrpc/rpc_cout.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char cout_rcsid[] = -"$Id$"; -#endif /* * rpc_cout.c, XDR routine outputter for the RPC protocol compiler diff --git a/sunrpc/rpc_hout.c b/sunrpc/rpc_hout.c index 38cb4195274..270d149a6ef 100644 --- a/sunrpc/rpc_hout.c +++ b/sunrpc/rpc_hout.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char hout_rcsid[] = - "$Id$"; -#endif /* * rpc_hout.c, Header file outputter for the RPC protocol compiler diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c index acc0132603a..2679720a7f7 100644 --- a/sunrpc/rpc_main.c +++ b/sunrpc/rpc_main.c @@ -31,10 +31,6 @@ /* * From @(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI; */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char main_rcsid[] = - "$Id$"; -#endif /* * rpc_main.c, Top level of the RPC protocol compiler. diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c index 7115cbdd083..2a29878d6ae 100644 --- a/sunrpc/rpc_parse.c +++ b/sunrpc/rpc_parse.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char parse_rcsid[] = - "$Id$"; -#endif /* * rpc_parse.c, Parser for the RPC protocol compiler diff --git a/sunrpc/rpc_sample.c b/sunrpc/rpc_sample.c index 50c3d5554ba..00b58d5bc2a 100644 --- a/sunrpc/rpc_sample.c +++ b/sunrpc/rpc_sample.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_sample.c 1.1 90/08/30 (C) 1987 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char sample_rcsid[] = - "$Id$"; -#endif /* * rpc_sample.c, Sample client-server code outputter for the RPC protocol compiler diff --git a/sunrpc/rpc_scan.c b/sunrpc/rpc_scan.c index d6211e91053..42ab2bae8b1 100644 --- a/sunrpc/rpc_scan.c +++ b/sunrpc/rpc_scan.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char scan_rcsid[] = - "$Id$"; -#endif /* * rpc_scan.c, Scanner for the RPC protocol compiler diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c index 9a807c40963..6774cc8c0fa 100644 --- a/sunrpc/rpc_svcout.c +++ b/sunrpc/rpc_svcout.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char svcout_rcsid[] = - "$Id$"; -#endif /* * rpc_svcout.c, Server-skeleton outputter for the RPC protocol compiler diff --git a/sunrpc/rpc_tblout.c b/sunrpc/rpc_tblout.c index bf4037fc37e..8fd2b1267d0 100644 --- a/sunrpc/rpc_tblout.c +++ b/sunrpc/rpc_tblout.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char tblout_rcsid[] = - "$Id$"; -#endif /* * rpc_tblout.c, Dispatch table outputter for the RPC protocol compiler diff --git a/sunrpc/rpc_util.c b/sunrpc/rpc_util.c index 31e1d3143c1..b910401a313 100644 --- a/sunrpc/rpc_util.c +++ b/sunrpc/rpc_util.c @@ -31,10 +31,6 @@ /* * From: @(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char util_rcsid[] = - "$Id$"; -#endif /* * rpc_util.c, Utility routines for the RPC protocol compiler diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/sysdeps/alpha/fpu/s_cacosf.c index 20e67f4ac96..46dca5aeb8a 100644 --- a/sysdeps/alpha/fpu/s_cacosf.c +++ b/sysdeps/alpha/fpu/s_cacosf.c @@ -1,5 +1,5 @@ /* Return arc cosine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_cacosf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __cacosf diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/sysdeps/alpha/fpu/s_cacoshf.c index 86cb4fbcaa4..6b61d1ddaa0 100644 --- a/sysdeps/alpha/fpu/s_cacoshf.c +++ b/sysdeps/alpha/fpu/s_cacoshf.c @@ -1,5 +1,5 @@ /* Return arc hyperbole cosine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_cacoshf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __cacoshf diff --git a/sysdeps/alpha/fpu/s_casinf.c b/sysdeps/alpha/fpu/s_casinf.c index 3d0d4eadf2d..fd41042ec98 100644 --- a/sysdeps/alpha/fpu/s_casinf.c +++ b/sysdeps/alpha/fpu/s_casinf.c @@ -1,5 +1,5 @@ /* Return arc sine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_casinf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __casinf diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/sysdeps/alpha/fpu/s_casinhf.c index 698ce10c04a..0b72a24d5a9 100644 --- a/sysdeps/alpha/fpu/s_casinhf.c +++ b/sysdeps/alpha/fpu/s_casinhf.c @@ -1,5 +1,5 @@ /* Return arc hyperbole sine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_casinhf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __casinhf diff --git a/sysdeps/alpha/fpu/s_catanf.c b/sysdeps/alpha/fpu/s_catanf.c index 221a461c1b0..8f40616617a 100644 --- a/sysdeps/alpha/fpu/s_catanf.c +++ b/sysdeps/alpha/fpu/s_catanf.c @@ -1,5 +1,5 @@ /* Return arc tangent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_catanf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __catanf diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/sysdeps/alpha/fpu/s_catanhf.c index 7465a43cac2..ac11945727e 100644 --- a/sysdeps/alpha/fpu/s_catanhf.c +++ b/sysdeps/alpha/fpu/s_catanhf.c @@ -1,5 +1,5 @@ /* Return arc hyperbole tangent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_catanhf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __catanhf diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/sysdeps/alpha/fpu/s_ccosf.c index fd775903f0a..04036f46132 100644 --- a/sysdeps/alpha/fpu/s_ccosf.c +++ b/sysdeps/alpha/fpu/s_ccosf.c @@ -1,5 +1,5 @@ /* Return cosine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_ccosf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __ccosf diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/sysdeps/alpha/fpu/s_ccoshf.c index 0e8eab288f8..e9fb34ce478 100644 --- a/sysdeps/alpha/fpu/s_ccoshf.c +++ b/sysdeps/alpha/fpu/s_ccoshf.c @@ -1,5 +1,5 @@ /* Return hyperbole cosine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_ccoshf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __ccoshf diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c index 2cf6db4b559..4a28dcd9bf1 100644 --- a/sysdeps/alpha/fpu/s_cexpf.c +++ b/sysdeps/alpha/fpu/s_cexpf.c @@ -1,5 +1,5 @@ /* Return exponent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_cexpf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __cexpf diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c index 12ecdea9573..e7dc7bb23f5 100644 --- a/sysdeps/alpha/fpu/s_clog10f.c +++ b/sysdeps/alpha/fpu/s_clog10f.c @@ -1,5 +1,5 @@ /* Return base 10 logarithm of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_clog10f (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __clog10f diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c index 9eefe9fa308..364dcec8835 100644 --- a/sysdeps/alpha/fpu/s_clogf.c +++ b/sysdeps/alpha/fpu/s_clogf.c @@ -1,5 +1,5 @@ /* Return natural logarithm of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_clogf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __clogf diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c index f4cb3547f68..cc61b1895e0 100644 --- a/sysdeps/alpha/fpu/s_cpowf.c +++ b/sysdeps/alpha/fpu/s_cpowf.c @@ -1,5 +1,5 @@ /* Return power of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_cpowf (_Complex float x, _Complex float c); -#include +#include #include "cfloat-compat.h" #undef __cpowf diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c index eac8687707e..5cfb526679c 100644 --- a/sysdeps/alpha/fpu/s_cprojf.c +++ b/sysdeps/alpha/fpu/s_cprojf.c @@ -1,5 +1,5 @@ /* Return projection of complex float value to Riemann sphere. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_cprojf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __cprojf diff --git a/sysdeps/alpha/fpu/s_csinf.c b/sysdeps/alpha/fpu/s_csinf.c index eba70e9930a..8eb9a1019d8 100644 --- a/sysdeps/alpha/fpu/s_csinf.c +++ b/sysdeps/alpha/fpu/s_csinf.c @@ -1,5 +1,5 @@ /* Return sine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_csinf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __csinf diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/sysdeps/alpha/fpu/s_csinhf.c index 9db81a81e4d..0e2c1867401 100644 --- a/sysdeps/alpha/fpu/s_csinhf.c +++ b/sysdeps/alpha/fpu/s_csinhf.c @@ -1,5 +1,5 @@ /* Return hyperbole sine of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_csinhf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __csinhf diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c index cc4a8e02458..ebf23a828e7 100644 --- a/sysdeps/alpha/fpu/s_csqrtf.c +++ b/sysdeps/alpha/fpu/s_csqrtf.c @@ -1,5 +1,5 @@ /* Return square root of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_csqrtf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __csqrtf diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/sysdeps/alpha/fpu/s_ctanf.c index 843ee53717d..e26db963e40 100644 --- a/sysdeps/alpha/fpu/s_ctanf.c +++ b/sysdeps/alpha/fpu/s_ctanf.c @@ -1,5 +1,5 @@ /* Return tangent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_ctanf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __ctanf diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/sysdeps/alpha/fpu/s_ctanhf.c index f1f74ab12d8..5d047bd4606 100644 --- a/sysdeps/alpha/fpu/s_ctanhf.c +++ b/sysdeps/alpha/fpu/s_ctanhf.c @@ -1,5 +1,5 @@ /* Return hyperbole tangent of complex float value. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ static _Complex float internal_ctanhf (_Complex float x); -#include +#include #include "cfloat-compat.h" #undef __ctanhf diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c index a3b68e928f3..24629e9aca3 100644 --- a/sysdeps/alpha/libc-tls.c +++ b/sysdeps/alpha/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. Alpha version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2005 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 @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #if USE_TLS diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S index e2b4ebf857f..ff199eb743a 100644 --- a/sysdeps/alpha/strncmp.S +++ b/sysdeps/alpha/strncmp.S @@ -61,8 +61,10 @@ $aligned: ornot t0, t3, t0 # .. e1 : cmpbge zero, t1, t7 # e0 : bits set iff null found beq a2, $eoc # .. e1 : check end of count - subq a2, 1, a2 # e0 : + unop # e0 : bne t7, $eos # .. e1 : + unop # e0 : + beq t10, $ant_loop # .. e1 : /* Aligned compare main loop. On entry to this basic block: @@ -74,13 +76,30 @@ $a_loop: bne t2, $wordcmp # .. e1 (zdb) ldq_u t1, 8(a1) # e0 : ldq_u t0, 8(a0) # .. e1 : + subq a2, 1, a2 # e0 : + addq a1, 8, a1 # .. e1 : + addq a0, 8, a0 # e0 : + beq a2, $eoc # .. e1 : + cmpbge zero, t1, t7 # e0 : + beq t7, $a_loop # .. e1 : + unop # e0 : + br $eos # .. e1 : + + /* Alternate aligned compare loop, for when there's no trailing + bytes on the count. We have to avoid reading too much data. */ +$ant_loop: + xor t0, t1, t2 # e0 : + bne t2, $wordcmp # .. e1 (zdb) + subq a2, 1, a2 # e0 : + beq a2, $zerolength # .. e1 : + ldq_u t1, 8(a1) # e0 : + ldq_u t0, 8(a0) # .. e1 : addq a1, 8, a1 # e0 : addq a0, 8, a0 # .. e1 : cmpbge zero, t1, t7 # e0 : - beq a2, $eoc # .. e1 : - subq a2, 1, a2 # e0 : - beq t7, $a_loop # .. e1 : - br $eos # e1 : + beq t7, $ant_loop # .. e1 : + unop # e0 : + br $eos # .. e1 : /* The two strings are not co-aligned. Align s1 and cope. */ $unaligned: @@ -184,6 +203,8 @@ $u_final: $eoc: mskql t0, t10, t0 mskql t1, t10, t1 + unop + cmpbge zero, t1, t7 /* We've found a zero somewhere in a word we just read. On entry to this basic block: @@ -203,6 +224,7 @@ $eos: /* Here we have two differing co-aligned words in t0 & t1. Bytewise compare them and return (t0 > t1 ? 1 : -1). */ + .align 3 $wordcmp: cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge cmpbge t1, t0, t3 # .. e1 : @@ -216,6 +238,7 @@ $wordcmp: $done: ret # e1 : + .align 3 $zerolength: clr v0 ret diff --git a/sysdeps/generic/Dist b/sysdeps/generic/Dist index 549b616fb50..e93e7b30b13 100644 --- a/sysdeps/generic/Dist +++ b/sysdeps/generic/Dist @@ -1,6 +1,3 @@ -signame.c -signame.h -det_endian.c dl-brk.c dl-sbrk.c entry.h diff --git a/sysdeps/generic/Makefile b/sysdeps/generic/Makefile index d741864b9c3..972d4697379 100644 --- a/sysdeps/generic/Makefile +++ b/sysdeps/generic/Makefile @@ -1,4 +1,5 @@ -# Copyright (C) 1992,93,94,95,96,97,99,2002 Free Software Foundation, Inc. +# Copyright (C) 1992,93,94,95,96,97,99,2002,2005 +# 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 @@ -16,21 +17,6 @@ # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA. -ifeq (,$(filter-out $(sysdep_dir)/generic/bits $(common-objpfx)/bits,\ - $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/bits/endian.h)))))) - -$(common-objpfx)bytesex.h: $(common-objpfx)det_endian - $(dir $<)$(notdir $<) > $@-tmp - mv $@-tmp $@ - -$(common-objpfx)det_endian: $(sysdep_dir)/generic/det_endian.c - $(common-objdir-compile) - -before-compile := $(before-compile) $(common-objpfx)bits/endian.h -common-generated := $(common-generated) bits/endian.h det_endian - -endif - ifeq ($(subdir),string) CFLAGS-wordcopy.c += -Wno-uninitialized endif diff --git a/sysdeps/generic/configure b/sysdeps/generic/configure deleted file mode 100755 index 47f9ec0d5e7..00000000000 --- a/sysdeps/generic/configure +++ /dev/null @@ -1,108 +0,0 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - -if test -z "$inhibit_glue"; then -# For signame.c, used in make_siglist. - - -for ac_func in psignal -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -fi diff --git a/sysdeps/generic/configure.in b/sysdeps/generic/configure.in deleted file mode 100644 index 393bc307e86..00000000000 --- a/sysdeps/generic/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -if test -z "$inhibit_glue"; then -# For signame.c, used in make_siglist. -AC_CHECK_FUNCS(psignal) -fi diff --git a/sysdeps/generic/dwarf2.h b/sysdeps/generic/dwarf2.h index 800bda2dc01..9fca4c00e01 100644 --- a/sysdeps/generic/dwarf2.h +++ b/sysdeps/generic/dwarf2.h @@ -1,26 +1,26 @@ /* Declarations and definitions of codes relating to the DWARF2 symbolic debugging information format. - Copyright (C) 1992, 1993, 1995, 1996, 1997, 2000 - Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 1995, 1996, 1997, 2000 + Free Software Foundation, Inc. Contributed by Gary Funck (gary@intrepid.com). Derived from the DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com). -This file is part of GNU CC. + This file is part of the GNU C Library. -GNU CC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. -GNU CC 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 General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. -You should have received a copy of the GNU General Public License -along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ /* This file is derived from the DWARF specification (a public document) Revision 2.0.0 (July 27, 1993) developed by the UNIX International @@ -508,7 +508,7 @@ enum dwarf_call_frame_info /* SGI/MIPS specific */ DW_CFA_MIPS_advance_loc8 = 0x1d, - + /* GNU extensions */ DW_CFA_GNU_window_save = 0x2d, DW_CFA_GNU_args_size = 0x2e, diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index b8333ed79c3..b5f7c3cae57 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -508,7 +508,6 @@ struct rtld_global struct dtv_slotinfo { size_t gen; - bool is_static; struct link_map *map; } slotinfo[0]; } *_dl_tls_dtv_slotinfo_list; @@ -624,6 +623,9 @@ struct rtld_global_ro /* Expected cache ID. */ EXTERN int _dl_correct_cache_id; + /* 0 if internal pointer values should not be guarded, 1 if they should. */ + EXTERN int _dl_pointer_guard; + /* Mask for hardware capabilities that are available. */ EXTERN uint64_t _dl_hwcap; diff --git a/sysdeps/generic/lio_listio64.c b/sysdeps/generic/lio_listio64.c deleted file mode 100644 index 2e72c46b0b1..00000000000 --- a/sysdeps/generic/lio_listio64.c +++ /dev/null @@ -1,2 +0,0 @@ -#define BE_AIO64 -#include "lio_listio.c" diff --git a/sysdeps/generic/signame.c b/sysdeps/generic/signame.c deleted file mode 100644 index 6085532e28f..00000000000 --- a/sysdeps/generic/signame.c +++ /dev/null @@ -1,312 +0,0 @@ -/* Convert between signal names and numbers. - Copyright (C) 1990, 92, 93, 95, 96, 97 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include /* Some systems need this for . */ -#include - -#ifdef HAVE_STRING_H -#include -#endif - -/* Some systems declare `sys_siglist in ; if - configure defined SYS_SIGLIST_DECLARED, it may expect - to find the declaration there. */ -#ifdef HAVE_UNISTD_H -#include -#endif - - -/* Some systems do not define NSIG in . */ -#ifndef NSIG -#ifdef _NSIG -#define NSIG _NSIG -#else -#define NSIG 32 -#endif -#endif - -#if !__STDC__ -#define const -#endif - -#include "signame.h" - -#ifndef HAVE_SYS_SIGLIST -/* There is too much variation in Sys V signal numbers and names, so - we must initialize them at runtime. */ - -static const char undoc[] = "unknown signal"; - -const char *sys_siglist[NSIG]; - -#else /* HAVE_SYS_SIGLIST. */ - -#ifndef SYS_SIGLIST_DECLARED -extern char *sys_siglist[]; -#endif /* Not SYS_SIGLIST_DECLARED. */ - -#endif /* Not HAVE_SYS_SIGLIST. */ - -/* Table of abbreviations for signals. Note: A given number can - appear more than once with different abbreviations. */ -typedef struct - { - int number; - const char *abbrev; - } num_abbrev; -static num_abbrev sig_table[NSIG*2]; -/* Number of elements of sig_table used. */ -static int sig_table_nelts = 0; - -/* Enter signal number NUMBER into the tables with ABBREV and NAME. */ - -static void -init_sig (number, abbrev, name) - int number; - const char *abbrev; - const char *name; -{ -#ifndef HAVE_SYS_SIGLIST - sys_siglist[number] = name; -#endif - sig_table[sig_table_nelts].number = number; - sig_table[sig_table_nelts++].abbrev = abbrev; -} - -void -signame_init () -{ -#ifndef HAVE_SYS_SIGLIST - int i; - /* Initialize signal names. */ - for (i = 0; i < NSIG; i++) - sys_siglist[i] = undoc; -#endif /* !HAVE_SYS_SIGLIST */ - - /* Initialize signal names. */ -#if defined (SIGHUP) - init_sig (SIGHUP, "HUP", "Hangup"); -#endif -#if defined (SIGINT) - init_sig (SIGINT, "INT", "Interrupt"); -#endif -#if defined (SIGQUIT) - init_sig (SIGQUIT, "QUIT", "Quit"); -#endif -#if defined (SIGILL) - init_sig (SIGILL, "ILL", "Illegal Instruction"); -#endif -#if defined (SIGTRAP) - init_sig (SIGTRAP, "TRAP", "Trace/breakpoint trap"); -#endif - /* If SIGIOT == SIGABRT, we want to print it as SIGABRT because - SIGABRT is in ANSI and POSIX.1 and SIGIOT isn't. */ -#if defined (SIGABRT) - init_sig (SIGABRT, "ABRT", "Aborted"); -#endif -#if defined (SIGIOT) - init_sig (SIGIOT, "IOT", "IOT trap"); -#endif -#if defined (SIGEMT) - init_sig (SIGEMT, "EMT", "EMT trap"); -#endif -#if defined (SIGFPE) - init_sig (SIGFPE, "FPE", "Floating point exception"); -#endif -#if defined (SIGKILL) - init_sig (SIGKILL, "KILL", "Killed"); -#endif -#if defined (SIGBUS) - init_sig (SIGBUS, "BUS", "Bus error"); -#endif -#if defined (SIGSEGV) - init_sig (SIGSEGV, "SEGV", "Segmentation fault"); -#endif -#if defined (SIGSYS) - init_sig (SIGSYS, "SYS", "Bad system call"); -#endif -#if defined (SIGPIPE) - init_sig (SIGPIPE, "PIPE", "Broken pipe"); -#endif -#if defined (SIGALRM) - init_sig (SIGALRM, "ALRM", "Alarm clock"); -#endif -#if defined (SIGTERM) - init_sig (SIGTERM, "TERM", "Terminated"); -#endif -#if defined (SIGUSR1) - init_sig (SIGUSR1, "USR1", "User defined signal 1"); -#endif -#if defined (SIGUSR2) - init_sig (SIGUSR2, "USR2", "User defined signal 2"); -#endif - /* If SIGCLD == SIGCHLD, we want to print it as SIGCHLD because that - is what is in POSIX.1. */ -#if defined (SIGCHLD) - init_sig (SIGCHLD, "CHLD", "Child exited"); -#endif -#if defined (SIGCLD) - init_sig (SIGCLD, "CLD", "Child exited"); -#endif -#if defined (SIGPWR) - init_sig (SIGPWR, "PWR", "Power failure"); -#endif -#if defined (SIGTSTP) - init_sig (SIGTSTP, "TSTP", "Stopped"); -#endif -#if defined (SIGTTIN) - init_sig (SIGTTIN, "TTIN", "Stopped (tty input)"); -#endif -#if defined (SIGTTOU) - init_sig (SIGTTOU, "TTOU", "Stopped (tty output)"); -#endif -#if defined (SIGSTOP) - init_sig (SIGSTOP, "STOP", "Stopped (signal)"); -#endif -#if defined (SIGXCPU) - init_sig (SIGXCPU, "XCPU", "CPU time limit exceeded"); -#endif -#if defined (SIGXFSZ) - init_sig (SIGXFSZ, "XFSZ", "File size limit exceeded"); -#endif -#if defined (SIGVTALRM) - init_sig (SIGVTALRM, "VTALRM", "Virtual timer expired"); -#endif -#if defined (SIGPROF) - init_sig (SIGPROF, "PROF", "Profiling timer expired"); -#endif -#if defined (SIGWINCH) - /* "Window size changed" might be more accurate, but even if that - is all that it means now, perhaps in the future it will be - extended to cover other kinds of window changes. */ - init_sig (SIGWINCH, "WINCH", "Window changed"); -#endif -#if defined (SIGCONT) - init_sig (SIGCONT, "CONT", "Continued"); -#endif -#if defined (SIGURG) - init_sig (SIGURG, "URG", "Urgent I/O condition"); -#endif -#if defined (SIGIO) - /* "I/O pending" has also been suggested. A disadvantage is - that signal only happens when the process has - asked for it, not everytime I/O is pending. Another disadvantage - is the confusion from giving it a different name than under Unix. */ - init_sig (SIGIO, "IO", "I/O possible"); -#endif -#if defined (SIGWIND) - init_sig (SIGWIND, "WIND", "SIGWIND"); -#endif -#if defined (SIGPHONE) - init_sig (SIGPHONE, "PHONE", "SIGPHONE"); -#endif -#if defined (SIGPOLL) - init_sig (SIGPOLL, "POLL", "I/O possible"); -#endif -#if defined (SIGLOST) - init_sig (SIGLOST, "LOST", "Resource lost"); -#endif -#if defined (SIGDANGER) - init_sig (SIGDANGER, "DANGER", "Danger signal"); -#endif -#if defined (SIGINFO) - init_sig (SIGINFO, "INFO", "Information request"); -#endif -#if defined (SIGNOFP) - init_sig (SIGNOFP, "NOFP", "Floating point co-processor not available"); -#endif -} - -/* Return the abbreviation for signal NUMBER. */ - -char * -sig_abbrev (number) - int number; -{ - int i; - - if (sig_table_nelts == 0) - signame_init (); - - for (i = 0; i < sig_table_nelts; i++) - if (sig_table[i].number == number) - return (char *)sig_table[i].abbrev; - return NULL; -} - -/* Return the signal number for an ABBREV, or -1 if there is no - signal by that name. */ - -int -sig_number (abbrev) - const char *abbrev; -{ - int i; - - if (sig_table_nelts == 0) - signame_init (); - - /* Skip over "SIG" if present. */ - if (abbrev[0] == 'S' && abbrev[1] == 'I' && abbrev[2] == 'G') - abbrev += 3; - - for (i = 0; i < sig_table_nelts; i++) - if (abbrev[0] == sig_table[i].abbrev[0] - && strcmp (abbrev, sig_table[i].abbrev) == 0) - return sig_table[i].number; - return -1; -} - -#ifndef HAVE_PSIGNAL -/* Print to standard error the name of SIGNAL, preceded by MESSAGE and - a colon, and followed by a newline. */ - -void -psignal (signal, message) - int signal; - const char *message; -{ - if (signal <= 0 || signal >= NSIG) - fprintf (stderr, "%s: unknown signal", message); - else - fprintf (stderr, "%s: %s\n", message, sys_siglist[signal]); -} -#endif - -#ifndef HAVE_STRSIGNAL -/* Return the string associated with the signal number. */ - -char * -strsignal (signal) - int signal; -{ - static char buf[] = "Signal 12345678901234567890"; - - if (signal > 0 || signal < NSIG) - return (char *) sys_siglist[signal]; - - sprintf (buf, "Signal %d", signal); - return buf; -} -#endif diff --git a/sysdeps/generic/signame.h b/sysdeps/generic/signame.h deleted file mode 100644 index d829e860b4b..00000000000 --- a/sysdeps/generic/signame.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Convert between signal names and numbers. - Copyright (C) 1990, 1992, 1993, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if defined (__STDC__) && __STDC__ - -/* Initialize `sys_siglist'. */ -void signame_init (void); - -/* Return the abbreviation (e.g. ABRT, FPE, etc.) for signal NUMBER. - Do not return this as a const char *. The caller might want to - assign it to a char *. */ -char *sig_abbrev (int number); - -/* Return the signal number for an ABBREV, or -1 if there is no - signal by that name. */ -int sig_number (const char *abbrev); - -/* Avoid conflicts with a system header file that might define these three. */ - -#ifndef HAVE_PSIGNAL -/* Print to standard error the name of SIGNAL, preceded by MESSAGE and - a colon, and followed by a newline. */ -void psignal (int signal, const char *message); -#endif - -#ifndef HAVE_STRSIGNAL -/* Return the name of SIGNAL. */ -char *strsignal (int signal); -#endif - -#if !defined (HAVE_SYS_SIGLIST) -/* Names for signals from 0 to NSIG-1. */ -extern const char *sys_siglist[]; -#endif - -#else - -void signame_init (); -char *sig_abbrev (); -int sig_number (); -#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_PSIGNAL) -void psignal (); -#endif -#ifndef HAVE_STRSIGNAL -char *strsignal (); -#endif -#if !defined (HAVE_SYS_SIGLIST) -extern char *sys_siglist[]; -#endif - -#endif diff --git a/sysdeps/gnu/glob64.c b/sysdeps/gnu/glob64.c index 210c9c25538..d1e4e6f0d55 100644 --- a/sysdeps/gnu/glob64.c +++ b/sysdeps/gnu/glob64.c @@ -19,7 +19,7 @@ #define COMPILE_GLOB64 1 -#include +#include libc_hidden_def (glob64) libc_hidden_def (globfree64) diff --git a/sysdeps/gnu/updwtmp.c b/sysdeps/gnu/updwtmp.c index 71a3003c96c..e4f63088a9b 100644 --- a/sysdeps/gnu/updwtmp.c +++ b/sysdeps/gnu/updwtmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Mark Kettenis , 1998. @@ -27,4 +27,4 @@ && __access (_PATH_WTMP "x", F_OK) != 0) ? _PATH_WTMP : \ file_name)) -#include +#include diff --git a/sysdeps/gnu/utmp_file.c b/sysdeps/gnu/utmp_file.c index 2fc925017c3..5ef6f306cd0 100644 --- a/sysdeps/gnu/utmp_file.c +++ b/sysdeps/gnu/utmp_file.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Mark Kettenis , 1998. @@ -27,4 +27,4 @@ && __access (_PATH_WTMP "x", F_OK) != 0) ? _PATH_WTMP : \ file_name)) -#include +#include diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h index 7fb2af77d08..4395b8f5626 100644 --- a/sysdeps/hppa/bits/setjmp.h +++ b/sysdeps/hppa/bits/setjmp.h @@ -17,8 +17,10 @@ 02111-1307 USA. */ /* Define the machine-dependent type `jmp_buf'. HPPA version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 -#ifndef _SETJMP_H +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif @@ -39,3 +41,5 @@ typedef double __jmp_buf[21]; variable at ADDRESS. */ #define _JMPBUF_UNWINDS(_jmpbuf, _address) \ ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP])) + +#endif /* bits/setjmp.h */ diff --git a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S index 6b590f7f041..aced5f42c90 100644 --- a/sysdeps/i386/__longjmp.S +++ b/sysdeps/i386/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for i386. - Copyright (C) 1995,1996,1997,1998,2000,2002 Free Software Foundation, Inc. + Copyright (C) 1995-1998,2000,2002,2005 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 @@ -44,6 +44,9 @@ ENTRY (BP_SYM (__longjmp)) movl (JB_DI*4)(%ecx), %edi movl (JB_BP*4)(%ecx), %ebp movl (JB_SP*4)(%ecx), %esp +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (%edx) +#endif /* Jump to saved PC. */ jmp *%edx END (BP_SYM (__longjmp)) diff --git a/sysdeps/i386/bsd-_setjmp.S b/sysdeps/i386/bsd-_setjmp.S index aa8df167d00..f80d2393235 100644 --- a/sysdeps/i386/bsd-_setjmp.S +++ b/sysdeps/i386/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. i386 version. - Copyright (C) 1994-1997,2000,2001,2002 Free Software Foundation, Inc. + Copyright (C) 1994-1997,2000-2002,2005 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 @@ -46,6 +46,9 @@ ENTRY (BP_SYM (_setjmp)) leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ movl %ecx, (JB_SP*4)(%edx) movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ +#ifdef PTR_MANGLE + PTR_MANGLE (%ecx) +#endif movl %ecx, (JB_PC*4)(%edx) LEAVE movl %ebp, (JB_BP*4)(%edx) /* Save caller's frame pointer. */ diff --git a/sysdeps/i386/bsd-setjmp.S b/sysdeps/i386/bsd-setjmp.S index b6934dc5489..f4257a0dc5f 100644 --- a/sysdeps/i386/bsd-setjmp.S +++ b/sysdeps/i386/bsd-setjmp.S @@ -28,6 +28,10 @@ #include "bp-sym.h" #include "bp-asm.h" +#define PARMS LINKAGE /* no space for saved regs */ +#define JMPBUF PARMS +#define SIGMSK JMPBUF+PTR_SIZE + ENTRY (BP_SYM (setjmp)) /* Note that we have to use a non-exported symbol in the next jump since otherwise gas will emit it as a jump through the @@ -44,6 +48,9 @@ ENTRY (BP_SYM (setjmp)) leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ movl %ecx, (JB_SP*4)(%eax) movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ +#ifdef PTR_MANGLE + PTR_MANGLE (%ecx) +#endif movl %ecx, (JB_PC*4)(%eax) LEAVE /* pop frame pointer to prepare for tail-call. */ movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */ diff --git a/sysdeps/i386/bzero.c b/sysdeps/i386/bzero.c index c2b135cb886..a1cfe36ba1b 100644 --- a/sysdeps/i386/bzero.c +++ b/sysdeps/i386/bzero.c @@ -1,6 +1,6 @@ /* bzero -- set a block of memory to zero. For Intel 80x86, x>=3. This file is part of the GNU C Library. - Copyright (C) 1991,92,93,97,98,99 Free Software Foundation, Inc. + Copyright (C) 1991,92,93,97,98,99, 05 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -79,5 +79,5 @@ __bzero (dstpp, len) weak_alias (__bzero, bzero) #else -#include +#include #endif diff --git a/sysdeps/i386/elf/bsd-setjmp.S b/sysdeps/i386/elf/bsd-setjmp.S deleted file mode 100644 index c421791fe07..00000000000 --- a/sysdeps/i386/elf/bsd-setjmp.S +++ /dev/null @@ -1,82 +0,0 @@ -/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. i386 version. - Copyright (C) 1995-1997,2000-2003,2005 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ASM -#define _SETJMP_H -#include -#include "bp-sym.h" -#include "bp-asm.h" - -#define PARMS LINKAGE /* no space for saved regs */ -#define JMPBUF PARMS -#define SIGMSK JMPBUF+PTR_SIZE - -ENTRY (BP_SYM (setjmp)) - /* Note that we have to use a non-exported symbol in the next - jump since otherwise gas will emit it as a jump through the - PLT which is what we cannot use here. */ - ENTER - - movl JMPBUF(%esp), %eax - CHECK_BOUNDS_BOTH_WIDE (%eax, JMPBUF(%esp), $JB_SIZE) - - /* Save registers. */ - movl %ebx, (JB_BX*4)(%eax) - movl %esi, (JB_SI*4)(%eax) - movl %edi, (JB_DI*4)(%eax) - leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ - movl %ecx, (JB_SP*4)(%eax) - movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ - movl %ecx, (JB_PC*4)(%eax) - LEAVE /* pop frame pointer to prepare for tail-call. */ - movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */ - - /* Call __sigjmp_save. */ - pushl $1 - cfi_adjust_cfa_offset (4) - pushl 8(%esp) - cfi_adjust_cfa_offset (4) -#ifdef PIC - /* We cannot use the PLT, because it requires that %ebx be set, but - we can't save and restore our caller's value. Instead, we do an - indirect jump through the GOT, using for the temporary register - %ecx, which is call-clobbered. */ - call __i686.get_pc_thunk.cx - addl $_GLOBAL_OFFSET_TABLE_, %ecx - leal C_SYMBOL_NAME (BP_SYM (__sigjmp_save)@GOTOFF)(%ecx), %ecx - call *%ecx -#else - call BP_SYM (__sigjmp_save) -#endif - popl %ecx - cfi_adjust_cfa_offset (-4) - popl %edx - cfi_adjust_cfa_offset (-4) - ret -END (BP_SYM (setjmp)) - - .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits - .globl __i686.get_pc_thunk.cx - .hidden __i686.get_pc_thunk.cx - .type __i686.get_pc_thunk.cx,@function -__i686.get_pc_thunk.cx: - movl (%esp), %ecx - ret - .size __i686.get_pc_thunk.cx, . - __i686.get_pc_thunk.cx diff --git a/sysdeps/i386/elf/setjmp.S b/sysdeps/i386/elf/setjmp.S deleted file mode 100644 index d6ae98b8b4c..00000000000 --- a/sysdeps/i386/elf/setjmp.S +++ /dev/null @@ -1,70 +0,0 @@ -/* setjmp for i386, ELF version. - Copyright (C) 1995-1997,2000,2001,2002,2003 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#define _ASM -#define _SETJMP_H -#include -#include "bp-sym.h" -#include "bp-asm.h" - -#define PARMS LINKAGE /* no space for saved regs */ -#define JMPBUF PARMS -#define SIGMSK JMPBUF+PTR_SIZE - -ENTRY (BP_SYM (__sigsetjmp)) - ENTER - - movl JMPBUF(%esp), %eax - CHECK_BOUNDS_BOTH_WIDE (%eax, JMPBUF(%esp), $JB_SIZE) - - /* Save registers. */ - movl %ebx, (JB_BX*4)(%eax) - movl %esi, (JB_SI*4)(%eax) - movl %edi, (JB_DI*4)(%eax) - leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ - movl %ecx, (JB_SP*4)(%eax) - movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ - movl %ecx, (JB_PC*4)(%eax) - LEAVE /* pop frame pointer to prepare for tail-call. */ - movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */ - - /* Make a tail call to __sigjmp_save; it takes the same args. */ -#ifdef PIC - /* We cannot use the PLT, because it requires that %ebx be set, but - we can't save and restore our caller's value. Instead, we do an - indirect jump through the GOT, using for the temporary register - %ecx, which is call-clobbered. */ - call __i686.get_pc_thunk.cx - addl $_GLOBAL_OFFSET_TABLE_, %ecx - leal C_SYMBOL_NAME (BP_SYM (__sigjmp_save)@GOTOFF)(%ecx), %ecx - jmp *%ecx -#else - jmp BP_SYM (__sigjmp_save) -#endif -END (BP_SYM (__sigsetjmp)) - - .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits - .globl __i686.get_pc_thunk.cx - .hidden __i686.get_pc_thunk.cx - .type __i686.get_pc_thunk.cx,@function -__i686.get_pc_thunk.cx: - movl (%esp), %ecx - ret - .size __i686.get_pc_thunk.cx, . - __i686.get_pc_thunk.cx diff --git a/sysdeps/i386/ffs.c b/sysdeps/i386/ffs.c index 695d48be563..b6aac64dd84 100644 --- a/sysdeps/i386/ffs.c +++ b/sysdeps/i386/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Intel 80x86, x>=3. This file is part of the GNU C Library. - Copyright (C) 1991, 92, 93, 94, 97, 98, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 97, 98, 2004, 2005 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -47,5 +47,5 @@ libc_hidden_builtin_def (ffs) weak_alias (__ffs, ffsl) #else -#include +#include #endif diff --git a/sysdeps/i386/i686/ffs.c b/sysdeps/i386/i686/ffs.c index fd7ef1a3d64..684ae218275 100644 --- a/sysdeps/i386/i686/ffs.c +++ b/sysdeps/i386/i686/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Intel 80x86, x>=6. This file is part of the GNU C Library. - Copyright (C) 1991, 92, 93, 94, 97, 98, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 97, 98, 2004, 2005 Free Software Foundation, Inc. Contributed by Ulrich Drepper . The GNU C Library is free software; you can redistribute it and/or @@ -45,5 +45,5 @@ libc_hidden_builtin_def (ffs) weak_alias (__ffs, ffsl) #else -#include +#include #endif diff --git a/sysdeps/i386/memset.c b/sysdeps/i386/memset.c index 6a7fff87470..120df94d632 100644 --- a/sysdeps/i386/memset.c +++ b/sysdeps/i386/memset.c @@ -1,6 +1,6 @@ /* Set a block of memory to some byte value. For Intel 80x86, x>=3. - Copyright (C) 1991,1992,1993,1997,1998,2003 Free Software Foundation, Inc. + Copyright (C) 1991,1992,1993,1997,1998,2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -82,5 +82,5 @@ memset (void *dstpp, int c, size_t len) libc_hidden_builtin_def (memset) #else -#include +#include #endif diff --git a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S index e01d32b66cd..747499adc2a 100644 --- a/sysdeps/i386/setjmp.S +++ b/sysdeps/i386/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for i386. - Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,2000,2001,2005 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 @@ -42,10 +42,19 @@ ENTRY (BP_SYM (__sigsetjmp)) leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ movl %ecx, (JB_SP*4)(%eax) movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ +#ifdef PTR_MANGLE + PTR_MANGLE (%ecx) +#endif movl %ecx, (JB_PC*4)(%eax) LEAVE /* pop frame pointer to prepare for tail-call. */ movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */ +#if defined NOT_IN_libc && defined IS_IN_rtld + /* In ld.so we never save the signal mask. */ + xorl %eax, %eax + ret +#else /* Make a tail call to __sigjmp_save; it takes the same args. */ - jmp BP_SYM (__sigjmp_save) + jmp __sigjmp_save +#endif END (BP_SYM (__sigsetjmp)) diff --git a/sysdeps/ia64/fpu/printf_fphex.c b/sysdeps/ia64/fpu/printf_fphex.c index 42f64b2ab22..5def1905d82 100644 --- a/sysdeps/ia64/fpu/printf_fphex.c +++ b/sysdeps/ia64/fpu/printf_fphex.c @@ -1,5 +1,5 @@ /* Print floating point number in hexadecimal notation according to ISO C99. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2005 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 @@ -78,4 +78,4 @@ do { \ } \ } while (0) -#include +#include diff --git a/sysdeps/ia64/libc-tls.c b/sysdeps/ia64/libc-tls.c index 3a6b8e5532f..2c0eeae86fc 100644 --- a/sysdeps/ia64/libc-tls.c +++ b/sysdeps/ia64/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. IA-64 version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2005 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 @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #if USE_TLS @@ -34,4 +34,3 @@ __tls_get_addr (size_t m, size_t offset) } #endif - diff --git a/sysdeps/ieee754/ldbl-128/printf_fphex.c b/sysdeps/ieee754/ldbl-128/printf_fphex.c index 0cb6b293e03..361a9baa056 100644 --- a/sysdeps/ieee754/ldbl-128/printf_fphex.c +++ b/sysdeps/ieee754/ldbl-128/printf_fphex.c @@ -1,6 +1,6 @@ /* Print floating point number in hexadecimal notation according to ISO C99. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2005 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 @@ -103,4 +103,4 @@ do { \ } \ } while (0) -#include +#include diff --git a/sysdeps/ieee754/ldbl-96/printf_fphex.c b/sysdeps/ieee754/ldbl-96/printf_fphex.c index 3c8183df2e0..ba9f4c29608 100644 --- a/sysdeps/ieee754/ldbl-96/printf_fphex.c +++ b/sysdeps/ieee754/ldbl-96/printf_fphex.c @@ -1,5 +1,5 @@ /* Print floating point number in hexadecimal notation according to ISO C99. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2005 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 @@ -90,4 +90,4 @@ do { \ } \ } while (0) -#include +#include diff --git a/sysdeps/ieee754/ldbl-96/strtold_l.c b/sysdeps/ieee754/ldbl-96/strtold_l.c index 32bf18084b5..52335c227ff 100644 --- a/sysdeps/ieee754/ldbl-96/strtold_l.c +++ b/sysdeps/ieee754/ldbl-96/strtold_l.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2004, 2005 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 @@ -42,4 +42,4 @@ (flt) = u.d; \ } while (0) -#include +#include diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 2c2b3ee15a2..193eec35094 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -17,8 +17,10 @@ 02111-1307 USA. */ /* Define the machine-dependent type `jmp_buf'. m68k version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 -#ifndef _SETJMP_H +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif @@ -44,3 +46,5 @@ typedef struct containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((void *) (address) < (void *) (jmpbuf)->__sp) + +#endif /* bits/setjmp.h */ diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c index 189936b94f8..2032e8662ca 100644 --- a/sysdeps/m68k/ffs.c +++ b/sysdeps/m68k/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For mc68020, mc68030, mc68040. This file is part of the GNU C Library. - Copyright (C) 1991, 1992, 1997, 1998, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 1998, 2004, 2005 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -43,6 +43,6 @@ weak_alias (__ffs, ffsl) #else -#include +#include #endif diff --git a/sysdeps/mach/hurd/getdents.c b/sysdeps/mach/hurd/getdents.c index 4775f983b49..d15be3b8f34 100644 --- a/sysdeps/mach/hurd/getdents.c +++ b/sysdeps/mach/hurd/getdents.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/mach/hurd/init-posix.c b/sysdeps/mach/hurd/init-posix.c index 3eecf627690..eaf6332fe19 100644 --- a/sysdeps/mach/hurd/init-posix.c +++ b/sysdeps/mach/hurd/init-posix.c @@ -1,2 +1,2 @@ /* We don't need the unix/bsd version. */ -#include +#include diff --git a/sysdeps/mach/msync.c b/sysdeps/mach/msync.c index cf62960b4fe..567143f7284 100644 --- a/sysdeps/mach/msync.c +++ b/sysdeps/mach/msync.c @@ -1,5 +1,5 @@ /* msync -- Synchronize mapped memory to external storage. Mach version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2005 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 @@ -26,7 +26,7 @@ define the VM_SYNC_* bits when we include . */ #ifndef VM_SYNC_SYNCHRONOUS -# include +# include #else /* Synchronize the region starting at ADDR and extending LEN bytes with the diff --git a/sysdeps/mach/sys/reboot.h b/sysdeps/mach/sys/reboot.h index 5e49f7fa871..fc7308929b1 100644 --- a/sysdeps/mach/sys/reboot.h +++ b/sysdeps/mach/sys/reboot.h @@ -24,137 +24,7 @@ * the rights to redistribute these changes. */ /* - * HISTORY - * $Log$ - * Revision 1.4 2002/07/06 06:36:00 aj - * * sysdeps/ia64/fpu/e_acos.S: Added text of Intel license. - * * sysdeps/ia64/fpu/e_acosf.S: Likewise. - * * sysdeps/ia64/fpu/e_acosl.S: Likewise. - * * sysdeps/ia64/fpu/e_asin.S: Likewise. - * * sysdeps/ia64/fpu/e_asinf.S: Likewise. - * * sysdeps/ia64/fpu/e_asinl.S: Likewise. - * * sysdeps/ia64/fpu/e_atan2.S: Likewise. - * * sysdeps/ia64/fpu/e_atan2f.S: Likewise. - * * sysdeps/ia64/fpu/e_cosh.S: Likewise. - * * sysdeps/ia64/fpu/e_coshf.S: Likewise. - * * sysdeps/ia64/fpu/e_coshl.S: Likewise. - * * sysdeps/ia64/fpu/e_exp.S: Likewise. - * * sysdeps/ia64/fpu/e_expf.S: Likewise. - * * sysdeps/ia64/fpu/e_fmod.S: Likewise. - * * sysdeps/ia64/fpu/e_fmodf.S: Likewise. - * * sysdeps/ia64/fpu/e_fmodl.S: Likewise. - * * sysdeps/ia64/fpu/e_hypot.S: Likewise. - * * sysdeps/ia64/fpu/e_hypotf.S: Likewise. - * * sysdeps/ia64/fpu/e_hypotl.S: Likewise. - * * sysdeps/ia64/fpu/e_log.S: Likewise. - * * sysdeps/ia64/fpu/e_logf.S: Likewise. - * * sysdeps/ia64/fpu/e_pow.S: Likewise. - * * sysdeps/ia64/fpu/e_powf.S: Likewise. - * * sysdeps/ia64/fpu/e_powl.S: Likewise. - * * sysdeps/ia64/fpu/e_remainder.S: Likewise. - * * sysdeps/ia64/fpu/e_remainderf.S: Likewise. - * * sysdeps/ia64/fpu/e_remainderl.S: Likewise. - * * sysdeps/ia64/fpu/e_scalb.S: Likewise. - * * sysdeps/ia64/fpu/e_scalbf.S: Likewise. - * * sysdeps/ia64/fpu/e_scalbl.S: Likewise. - * * sysdeps/ia64/fpu/e_sinh.S: Likewise. - * * sysdeps/ia64/fpu/e_sinhf.S: Likewise. - * * sysdeps/ia64/fpu/e_sinhl.S: Likewise. - * * sysdeps/ia64/fpu/e_sqrt.S: Likewise. - * * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. - * * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. - * * sysdeps/ia64/fpu/libm_atan2_req.S: Likewise. - * * sysdeps/ia64/fpu/libm_error.c: Likewise. - * * sysdeps/ia64/fpu/libm_frexp4.S: Likewise. - * * sysdeps/ia64/fpu/libm_frexp4f.S: Likewise. - * * sysdeps/ia64/fpu/s_frexpl.c: Likewise. - * * sysdeps/ia64/fpu/s_ilogb.S: Likewise. - * * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. - * * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. - * * sysdeps/ia64/fpu/s_ldexp.S: Likewise. - * * sysdeps/ia64/fpu/s_ldexpf.S: Likewise. - * * sysdeps/ia64/fpu/s_ldexpl.S: Likewise. - * * sysdeps/ia64/fpu/s_log1p.S: Likewise. - * * sysdeps/ia64/fpu/s_log1pf.S: Likewise. - * * sysdeps/ia64/fpu/s_log1pl.S: Likewise. - * * sysdeps/ia64/fpu/s_logb.S: Likewise. - * * sysdeps/ia64/fpu/s_logbf.S: Likewise. - * * sysdeps/ia64/fpu/s_logbl.S: Likewise. - * * sysdeps/ia64/fpu/s_modf.S: Likewise. - * * sysdeps/ia64/fpu/s_modff.S: Likewise. - * * sysdeps/ia64/fpu/s_modfl.S: Likewise. - * * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. - * * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. - * * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. - * * sysdeps/ia64/fpu/s_rint.S: Likewise. - * * sysdeps/ia64/fpu/s_rintf.S: Likewise. - * * sysdeps/ia64/fpu/s_rintl.S: Likewise. - * * sysdeps/ia64/fpu/s_round.S: Likewise. - * * sysdeps/ia64/fpu/s_roundf.S: Likewise. - * * sysdeps/ia64/fpu/s_roundl.S: Likewise. - * * sysdeps/ia64/fpu/s_scalbn.S: Likewise. - * * sysdeps/ia64/fpu/s_scalbnf.S: Likewise. - * * sysdeps/ia64/fpu/s_scalbnl.S: Likewise. - * * sysdeps/ia64/fpu/s_significand.S: Likewise. - * * sysdeps/ia64/fpu/s_significandf.S: Likewise. - * * sysdeps/ia64/fpu/s_significandl.S: Likewise. - * * sysdeps/ia64/fpu/s_tan.S: Likewise. - * * sysdeps/ia64/fpu/s_tanf.S: Likewise. - * * sysdeps/ia64/fpu/s_tanl.S: Likewise. - * * sysdeps/ia64/fpu/s_trunc.S: Likewise. - * * sysdeps/ia64/fpu/s_truncf.S: Likewise. - * * sysdeps/ia64/fpu/s_truncl.S: Likewise. - * * sysdeps/ieee754/dbl-64/doasin.c: changed copyright notice to - * reflect IBM donation of math library to FSF - * * sysdeps/ieee754/dbl-64/dosincos.c: Likewise. - * * sysdeps/ieee754/dbl-64/e_asin.c: Likewise. - * * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise. - * * sysdeps/ieee754/dbl-64/e_exp.c: Likewise. - * * sysdeps/ieee754/dbl-64/e_log.c: Likewise. - * * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. - * * sysdeps/ieee754/dbl-64/e_remainder.c: Likewise. - * * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise. - * * sysdeps/ieee754/dbl-64/halfulp.c: Likewise. - * * sysdeps/ieee754/dbl-64/mpa.c: Likewise. - * * sysdeps/ieee754/dbl-64/mpatan.c: Likewise. - * * sysdeps/ieee754/dbl-64/mpatan2.c: Likewise. - * * sysdeps/ieee754/dbl-64/mpexp.c: Likewise. - * * sysdeps/ieee754/dbl-64/mplog.c: Likewise. - * * sysdeps/ieee754/dbl-64/mpsqrt.c: Likewise. - * * sysdeps/ieee754/dbl-64/mptan.c: Likewise. - * * sysdeps/ieee754/dbl-64/s_atan.c: Likewise. - * * sysdeps/ieee754/dbl-64/s_sin.c: Likewise. - * * sysdeps/ieee754/dbl-64/s_tan.c: Likewise. - * * sysdeps/ieee754/dbl-64/sincos32.c: Likewise. - * * sysdeps/ieee754/dbl-64/slowexp.c: Likewise. - * * sysdeps/ieee754/dbl-64/slowpow.c: Likewise. - * * sysdeps/gnu/netinet/udp.h: Added BSD copying permission notice - * * sysdeps/vax/__longjmp.c: Likewise. - * * sysdeps/vax/setjmp.c: Likewise. - * * libio/filedoalloc.c: Fixed BSD copying permission notice to remove - * advertising clause - * * sysdeps/vax/htonl.s: Likewise. - * * sysdeps/vax/htons.s: Likewise. - * * libio/wfiledoalloc.c: Likewise. - * * stdlib/random.c: Likewise. - * * stdlib/random_r.c: Likewise. - * * sysdeps/mach/sys/reboot.h: Likewise. - * * inet/getnameinfo.c: Deleted advertising clause from Inner Net License - * * sysdeps/posix/getaddrinfo.c: Likewise. - * * sunrpc/des_impl.c: Updated license permission notice to Lesser GPL - * and corrected pointer to point to the correct license. - * - * Revision 1.3 2000/03/27 04:09:08 roland - * 2000-03-26 Roland McGrath - * - * * sysdeps/mach/sys/reboot.h: Include . - * (reboot): Declare it. - * - * Revision 1.2 1998/05/29 10:19:59 drepper - * Use __ASSEMBLER__ test macro not ASSEMBLER. - * - * Revision 1.1 1993/08/03 22:25:15 roland - * entered into RCS + * (pre-GNU) HISTORY * * Revision 2.8 93/03/11 13:46:40 danner * u_long -> u_int. @@ -188,7 +58,7 @@ /* Copyright (C) 1982, 1986, 1988 Regents of the University of California. All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -201,7 +71,7 @@ 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 2b42b22ba4f..74caae8cba2 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -81,6 +81,6 @@ typedef struct /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (jmpbuf)[0].__sp) + ((void *) (address) < (void *) (jmpbuf)[0].__sp) #endif /* _MIPS_BITS_SETJMP_H */ diff --git a/sysdeps/mips/libc-tls.c b/sysdeps/mips/libc-tls.c index 157ba3389ab..a3d6301d1d5 100644 --- a/sysdeps/mips/libc-tls.c +++ b/sysdeps/mips/libc-tls.c @@ -17,7 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include #include #if USE_TLS diff --git a/sysdeps/posix/euidaccess.c b/sysdeps/posix/euidaccess.c index 8a2d826e95b..5464bfb374d 100644 --- a/sysdeps/posix/euidaccess.c +++ b/sysdeps/posix/euidaccess.c @@ -1,5 +1,5 @@ /* Check if effective user id can access file - Copyright (C) 1990,91,95,96,97,98,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1990,1991,1995-2001,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,26 +21,26 @@ Adapted for GNU C library by Roland McGrath. */ #ifdef HAVE_CONFIG_H -#include +# include #endif #include #include #ifdef S_IEXEC -#ifndef S_IXUSR -#define S_IXUSR S_IEXEC -#endif -#ifndef S_IXGRP -#define S_IXGRP (S_IEXEC >> 3) -#endif -#ifndef S_IXOTH -#define S_IXOTH (S_IEXEC >> 6) -#endif +# ifndef S_IXUSR +# define S_IXUSR S_IEXEC +# endif +# ifndef S_IXGRP +# define S_IXGRP (S_IEXEC >> 3) +# endif +# ifndef S_IXOTH +# define S_IXOTH (S_IEXEC >> 6) +# endif #endif /* S_IEXEC */ -#if defined (HAVE_UNISTD_H) || defined (_LIBC) -#include +#if defined HAVE_UNISTD_H || defined _LIBC +# include #endif #ifndef _POSIX_VERSION @@ -55,35 +55,35 @@ gid_t getegid (); extern int errno; #endif #ifndef __set_errno -#define __set_errno(val) errno = (val) +# define __set_errno(val) errno = (val) #endif -#if defined(EACCES) && !defined(EACCESS) -#define EACCESS EACCES +#if defined EACCES && !defined EACCESS +# define EACCESS EACCES #endif #ifndef F_OK -#define F_OK 0 -#define X_OK 1 -#define W_OK 2 -#define R_OK 4 +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 #endif -#if !defined (S_IROTH) && defined (R_OK) +#if !defined S_IROTH && defined R_OK # define S_IROTH R_OK #endif -#if !defined (S_IWOTH) && defined (W_OK) +#if !defined S_IWOTH && defined W_OK # define S_IWOTH W_OK #endif -#if !defined (S_IXOTH) && defined (X_OK) +#if !defined S_IXOTH && defined X_OK # define S_IXOTH X_OK #endif #ifdef _LIBC -#define group_member __group_member -#define euidaccess __euidaccess +# define group_member __group_member +# define euidaccess __euidaccess #else @@ -93,14 +93,6 @@ static uid_t uid; /* The user's real group id. */ static gid_t gid; -#ifdef HAVE_GETGROUPS -int group_member (); -#else -#define group_member(gid) 0 -#endif - -#endif - /* The user's effective user id. */ static uid_t euid; @@ -110,6 +102,14 @@ static gid_t egid; /* Nonzero if UID, GID, EUID, and EGID have valid values. */ static int have_ids; +# ifdef HAVE_GETGROUPS +int group_member (); +# else +# define group_member(gid) 0 +# endif + +#endif + /* Return 0 if the user has permission of type MODE on file PATH; otherwise, return -1 and set `errno' to EACCESS. @@ -126,6 +126,9 @@ euidaccess (path, mode) int granted; #ifdef _LIBC + uid_t euid; + gid_t egid; + if (! __libc_enable_secure) /* If we are not set-uid or set-gid, access does the same. */ return __access (path, mode); @@ -157,12 +160,8 @@ euidaccess (path, mode) #ifdef _LIBC /* Now we need the IDs. */ - if (have_ids == 0) - { - have_ids = 1; - euid = __geteuid (); - egid = __getegid (); - } + euid = __geteuid (); + egid = __getegid (); #endif /* The super-user can read and write any file, and execute any file @@ -172,11 +171,12 @@ euidaccess (path, mode) return 0; if (euid == stats.st_uid) - granted = (unsigned) (stats.st_mode & (mode << 6)) >> 6; + granted = (unsigned int) (stats.st_mode & (mode << 6)) >> 6; else if (egid == stats.st_gid || group_member (stats.st_gid)) - granted = (unsigned) (stats.st_mode & (mode << 3)) >> 3; + granted = (unsigned int) (stats.st_mode & (mode << 3)) >> 3; else granted = (stats.st_mode & mode); + /* XXX Add support for ACLs. */ if (granted == mode) return 0; __set_errno (EACCESS); @@ -188,9 +188,9 @@ weak_alias (__euidaccess, euidaccess) #endif #ifdef TEST -#include -#include -#include "error.h" +# include +# include +# include "error.h" char *program_name; diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 81a56a07945..b9819bfc0a2 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -121,7 +121,8 @@ struct gaih { int family; int (*gaih)(const char *name, const struct gaih_service *service, - const struct addrinfo *req, struct addrinfo **pai); + const struct addrinfo *req, struct addrinfo **pai, + unsigned int *naddrs); }; static const struct addrinfo default_hints = @@ -363,7 +364,8 @@ extern service_user *__nss_hosts_database attribute_hidden; static int gaih_inet (const char *name, const struct gaih_service *service, - const struct addrinfo *req, struct addrinfo **pai) + const struct addrinfo *req, struct addrinfo **pai, + unsigned int *naddrs) { const struct gaih_typeproto *tp = gaih_inet_typeproto; struct gaih_servtuple *st = (struct gaih_servtuple *) &nullserv; @@ -393,6 +395,7 @@ gaih_inet (const char *name, const struct gaih_service *service, } } + int port = 0; if (service != NULL) { if ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0) @@ -445,63 +448,41 @@ gaih_inet (const char *name, const struct gaih_service *service, } else { - if (req->ai_socktype || req->ai_protocol) - { - st = __alloca (sizeof (struct gaih_servtuple)); - st->next = NULL; - st->socktype = tp->socktype; - st->protocol = ((tp->protoflag & GAI_PROTO_PROTOANY) - ? req->ai_protocol : tp->protocol); - st->port = htons (service->num); - } - else - { - /* Neither socket type nor protocol is set. Return all - socket types we know about. */ - struct gaih_servtuple **lastp = &st; - for (tp = gaih_inet_typeproto + 1; tp->name[0]; ++tp) - if ((tp->protoflag & GAI_PROTO_NOSERVICE) == 0) - { - struct gaih_servtuple *newp; - - newp = __alloca (sizeof (struct gaih_servtuple)); - newp->next = NULL; - newp->socktype = tp->socktype; - newp->protocol = tp->protocol; - newp->port = htons (service->num); - - *lastp = newp; - lastp = &newp->next; - } - } + port = htons (service->num); + goto got_port; } } - else if (req->ai_socktype || req->ai_protocol) - { - st = __alloca (sizeof (struct gaih_servtuple)); - st->next = NULL; - st->socktype = tp->socktype; - st->protocol = ((tp->protoflag & GAI_PROTO_PROTOANY) - ? req->ai_protocol : tp->protocol); - st->port = 0; - } else { - /* Neither socket type nor protocol is set. Return all socket types - we know about. */ - struct gaih_servtuple **lastp = &st; - for (++tp; tp->name[0]; ++tp) + got_port: + + if (req->ai_socktype || req->ai_protocol) { - struct gaih_servtuple *newp; + st = __alloca (sizeof (struct gaih_servtuple)); + st->next = NULL; + st->socktype = tp->socktype; + st->protocol = ((tp->protoflag & GAI_PROTO_PROTOANY) + ? req->ai_protocol : tp->protocol); + st->port = port; + } + else + { + /* Neither socket type nor protocol is set. Return all socket types + we know about. */ + struct gaih_servtuple **lastp = &st; + for (++tp; tp->name[0]; ++tp) + { + struct gaih_servtuple *newp; - newp = __alloca (sizeof (struct gaih_servtuple)); - newp->next = NULL; - newp->socktype = tp->socktype; - newp->protocol = tp->protocol; - newp->port = 0; + newp = __alloca (sizeof (struct gaih_servtuple)); + newp->next = NULL; + newp->socktype = tp->socktype; + newp->protocol = tp->protocol; + newp->port = port; - *lastp = newp; - lastp = &newp->next; + *lastp = newp; + lastp = &newp->next; + } } } @@ -1108,6 +1089,8 @@ gaih_inet (const char *name, const struct gaih_service *service, } *pai = NULL; + ++*naddrs; + ignore: at2 = at2->next; } @@ -1556,6 +1539,7 @@ getaddrinfo (const char *name, const char *service, else end = NULL; + unsigned int naddrs = 0; while (g->gaih) { if (hints->ai_family == g->family || hints->ai_family == AF_UNSPEC) @@ -1564,7 +1548,7 @@ getaddrinfo (const char *name, const char *service, if (pg == NULL || pg->gaih != g->gaih) { pg = g; - i = g->gaih (name, pservice, hints, end); + i = g->gaih (name, pservice, hints, end, &naddrs); if (i != 0) { /* EAI_NODATA is a more specific result as it says that @@ -1596,7 +1580,7 @@ getaddrinfo (const char *name, const char *service, if (j == 0) return EAI_FAMILY; - if (nresults > 1) + if (naddrs > 1) { /* Sort results according to RFC 3484. */ struct sort_result results[nresults]; diff --git a/sysdeps/posix/profil.c b/sysdeps/posix/profil.c index 3c2e1dfa07f..f40faee33d1 100644 --- a/sysdeps/posix/profil.c +++ b/sysdeps/posix/profil.c @@ -1,5 +1,5 @@ /* Low-level statistical profiling support function. Mostly POSIX.1 version. - Copyright (C) 1996,97,98,2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1996,97,98,2002, 2004, 2005 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 @@ -25,7 +25,7 @@ #ifndef SIGPROF -#include +#include #else diff --git a/sysdeps/posix/shm_open.c b/sysdeps/posix/shm_open.c index b773d40db03..0a657fadfa0 100644 --- a/sysdeps/posix/shm_open.c +++ b/sysdeps/posix/shm_open.c @@ -1,5 +1,5 @@ /* shm_open -- open a POSIX shared memory object. Generic POSIX file version. - Copyright (C) 2001,02 Free Software Foundation, Inc. + Copyright (C) 2001,2002,2005 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 @@ -20,7 +20,7 @@ #include #if ! _POSIX_MAPPED_FILES -#include +#include #else diff --git a/sysdeps/posix/shm_unlink.c b/sysdeps/posix/shm_unlink.c index b67240f8386..18ca416e16b 100644 --- a/sysdeps/posix/shm_unlink.c +++ b/sysdeps/posix/shm_unlink.c @@ -1,5 +1,5 @@ /* shm_unlink -- remove a POSIX shared memory object. Generic POSIX version. - Copyright (C) 2001,02 Free Software Foundation, Inc. + Copyright (C) 2001,2002,2005 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 @@ -20,7 +20,7 @@ #include #if ! _POSIX_MAPPED_FILES -#include +#include #else diff --git a/sysdeps/posix/sprofil.c b/sysdeps/posix/sprofil.c index 19787fa3643..04ca1688ec3 100644 --- a/sysdeps/posix/sprofil.c +++ b/sysdeps/posix/sprofil.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. Contributed by David Mosberger-Tang . This file is part of the GNU C Library. @@ -27,7 +27,7 @@ #include #ifndef SIGPROF -# include +# include #else #include diff --git a/sysdeps/powerpc/dl-procinfo.c b/sysdeps/powerpc/dl-procinfo.c new file mode 100644 index 00000000000..7c1ab7bad7c --- /dev/null +++ b/sysdeps/powerpc/dl-procinfo.c @@ -0,0 +1,66 @@ +/* Data for processor capability information. PowerPC version. + Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This information must be kept in sync with the _DL_HWCAP_COUNT and + _DL_PLATFORM_COUNT definitions in procinfo.h. + + If anything should be added here check whether the size of each string + is still ok with the given array size. + + All the #ifdefs in the definitions are quite irritating but + necessary if we want to avoid duplicating the information. There + are three different modes: + + - PROCINFO_DECL is defined. This means we are only interested in + declarations. + + - PROCINFO_DECL is not defined: + + + if SHARED is defined the file is included in an array + initializer. The .element = { ... } syntax is needed. + + + if SHARED is not defined a normal array initialization is + needed. + */ + +#ifndef PROCINFO_CLASS +# define PROCINFO_CLASS +#endif + +#if !defined PROCINFO_DECL && defined SHARED + ._dl_powerpc_cap_flags +#else +PROCINFO_CLASS const char _dl_powerpc_cap_flags[16][10] +#endif +#ifndef PROCINFO_DECL += { + "cell", "power5+", "power5", "power4", + "notb", "efpdouble", "efpsingle", "spe", + "ucache", "4xxmac", "mmu", "fpu", + "altivec", "ppc601", "ppc64", "ppc32", + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif + +#undef PROCINFO_DECL +#undef PROCINFO_CLASS diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h new file mode 100644 index 00000000000..8edc5e539a7 --- /dev/null +++ b/sysdeps/powerpc/dl-procinfo.h @@ -0,0 +1,75 @@ +/* Processor capability information handling macros. PowerPC version. + Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _DL_PROCINFO_H +#define _DL_PROCINFO_H 1 + +#include +#include /* This defines the PPC_FEATURE_* macros. */ + +/* There are 16 bits used, but they are bits 16..31. */ +#define _DL_HWCAP_FIRST 16 +#define _DL_HWCAP_COUNT 32 + +/* These bits influence library search. */ +#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ + | PPC_FEATURE_POWER4 \ + | PPC_FEATURE_POWER5 \ + | PPC_FEATURE_POWER5_PLUS \ + | PPC_FEATURE_CELL) + +/* We don't use AT_PLATFORM. */ +#define _DL_HWCAP_PLATFORM 0 +#define _dl_string_platform(str) (-1) + +static inline const char * +__attribute__ ((unused)) +_dl_hwcap_string (int idx) +{ + return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST]; +}; + +static inline int +__attribute__ ((unused)) +_dl_string_hwcap (const char *str) +{ + for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i) + if (strcmp (str, _dl_hwcap_string (i)) == 0) + return i; + return -1; +}; + +#ifdef IS_IN_rtld +static inline int +__attribute__ ((unused)) +_dl_procinfo (int word) +{ + _dl_printf ("AT_HWCAP: "); + + for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i) + if (word & (1 << i)) + _dl_printf (" %s", _dl_hwcap_string (i)); + + _dl_printf ("\n"); + + return 0; +} +#endif + +#endif /* dl-procinfo.h */ diff --git a/sysdeps/powerpc/elf/libc-start.c b/sysdeps/powerpc/elf/libc-start.c index af67a39a293..8a60af8d71a 100644 --- a/sysdeps/powerpc/elf/libc-start.c +++ b/sysdeps/powerpc/elf/libc-start.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,2000,2001,2002,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1998,2000-2004,2005 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 @@ -30,7 +30,7 @@ weak_extern (__cache_line_size) #define LIBC_START_DISABLE_INLINE #define LIBC_START_MAIN_AUXVEC_ARG #define MAIN_AUXVEC_ARG -#include +#include struct startup_info diff --git a/sysdeps/powerpc/ffs.c b/sysdeps/powerpc/ffs.c index f45b5ea8e2f..61d79c4c2f1 100644 --- a/sysdeps/powerpc/ffs.c +++ b/sysdeps/powerpc/ffs.c @@ -1,6 +1,6 @@ /* Find first set bit in a word, counted from least significant end. For PowerPC. - Copyright (C) 1991, 1992, 1997, 1998, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 1998, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -43,5 +43,5 @@ weak_alias (__ffs, ffsl) #endif #else -#include +#include #endif diff --git a/sysdeps/powerpc/powerpc32/setjmp-common.S b/sysdeps/powerpc/powerpc32/setjmp-common.S index ad7113f461e..ae21284e034 100644 --- a/sysdeps/powerpc/powerpc32/setjmp-common.S +++ b/sysdeps/powerpc/powerpc32/setjmp-common.S @@ -1,5 +1,6 @@ /* setjmp for PowerPC. - Copyright (C) 1995-1997,1999-2001,2003,2004 Free Software Foundation, Inc. + Copyright (C) 1995-1997,1999-2001,2003,2004,2005 + 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 @@ -55,5 +56,10 @@ ENTRY (BP_SYM (__sigsetjmp)) stw r29,((JB_GPRS+15)*4)(3) stw r30,((JB_GPRS+16)*4)(3) stw r31,((JB_GPRS+17)*4)(3) +#if defined NOT_IN_libc && defined IS_IN_rtld + li r3,0 + blr +#else b BP_SYM (__sigjmp_save@local) +#endif END (BP_SYM (__sigsetjmp)) diff --git a/sysdeps/powerpc/powerpc64/setjmp-common.S b/sysdeps/powerpc/powerpc64/setjmp-common.S index 0de07a82d3f..c1926ecd688 100644 --- a/sysdeps/powerpc/powerpc64/setjmp-common.S +++ b/sysdeps/powerpc/powerpc64/setjmp-common.S @@ -1,5 +1,5 @@ /* setjmp for PowerPC64. - Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1995-2003, 2004, 2005 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 @@ -177,5 +177,10 @@ L(aligned_save_vmx): stvx 31,0,r6 L(no_vmx): #endif +#if defined NOT_IN_libc && defined IS_IN_rtld + li r3,0 + blr +#else b JUMPTARGET (BP_SYM (__sigjmp_save)) +#endif END (BP_SYM (__sigsetjmp)) diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index 4d017270447..619412cb508 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For IBM rs6000. - Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -38,5 +38,5 @@ weak_alias (__ffs, ffs) libc_hidden_builtin_def (ffs) #else -#include +#include #endif diff --git a/sysdeps/s390/bits/setjmp.h b/sysdeps/s390/bits/setjmp.h index 35bc9a53f38..40095147638 100644 --- a/sysdeps/s390/bits/setjmp.h +++ b/sysdeps/s390/bits/setjmp.h @@ -21,6 +21,10 @@ #ifndef __S390_SETJMP_H__ #define __S390_SETJMP_H__ +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + #include #define __JB_GPR6 0 diff --git a/sysdeps/s390/libc-tls.c b/sysdeps/s390/libc-tls.c index 7362dbf8f8a..f177f436e93 100644 --- a/sysdeps/s390/libc-tls.c +++ b/sysdeps/s390/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. S390 version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2005 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 @@ -18,7 +18,7 @@ 02111-1307 USA. */ #include -#include +#include #if USE_TLS diff --git a/sysdeps/sh/bits/setjmp.h b/sysdeps/sh/bits/setjmp.h index d92feea2142..242720ca53c 100644 --- a/sysdeps/sh/bits/setjmp.h +++ b/sysdeps/sh/bits/setjmp.h @@ -51,6 +51,6 @@ typedef struct /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (jmpbuf)[0].__regs[7]) + ((void *) (address) < (void *) (jmpbuf)[0].__regs[7]) #endif /* bits/setjmp.h */ diff --git a/sysdeps/generic/nscd_setup_thread.c b/sysdeps/unix/mkfifoat.c similarity index 68% rename from sysdeps/generic/nscd_setup_thread.c rename to sysdeps/unix/mkfifoat.c index 8ebc050b4a2..5c4da2a982f 100644 --- a/sysdeps/generic/nscd_setup_thread.c +++ b/sysdeps/unix/mkfifoat.c @@ -1,7 +1,5 @@ -/* Setup of nscd worker threads. Stub verison. - Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2004. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -18,11 +16,17 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include -void -setup_thread (struct database_dyn *db) +/* Create a new FIFO with permission bits MODE. But interpret + relative PATH names relative to the directory associated with FD. */ +int +mkfifoat (fd, file, mode) + int fd; + const char *file; + mode_t mode; { - /* Nothing. */ + dev_t dev = 0; + return __xmknodat (_MKNOD_VER, fd, file, mode | S_IFIFO, &dev); } diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c index 98fb4ca5c8a..6aa738fb691 100644 --- a/sysdeps/unix/opendir.c +++ b/sysdeps/unix/opendir.c @@ -139,7 +139,7 @@ weak_alias (__opendir, opendir) DIR * internal_function -__alloc_dir (int fd, bool close_fd, struct stat64 *statp) +__alloc_dir (int fd, bool close_fd, const struct stat64 *statp) { if (__builtin_expect (__fcntl (fd, F_SETFD, FD_CLOEXEC), 0) < 0) goto lose; diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index b2bbbc0b281..812cd97c808 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -107,11 +107,6 @@ ifeq ($(subdir),termios) sysdep_headers += termio.h endif -ifeq ($(subdir),stdio-common) -# Just disable the auto generation in sysdeps/generic -inhibit-siglist := yes -endif - ifeq ($(subdir),posix) sysdep_headers += bits/initspin.h diff --git a/sysdeps/unix/sysv/linux/aio_sigqueue.c b/sysdeps/unix/sysv/linux/aio_sigqueue.c index 44ff22ea7d4..a6dbfb4eb11 100644 --- a/sysdeps/unix/sysv/linux/aio_sigqueue.c +++ b/sysdeps/unix/sysv/linux/aio_sigqueue.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2003, 2005 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 @@ -52,5 +52,5 @@ __aio_sigqueue (sig, val, caller_pid) sig, __ptrvalue (&info)); } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index bb41887479d..59574266a49 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -86,6 +86,7 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif /* Advice to `madvise'. */ diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 65b7ad97a32..127f7f3c576 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -67,7 +67,7 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) { - if (flags & AT_SYMLINK_NOFOLLOW) + if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); else result = INTERNAL_SYSCALL (stat64, err, 2, file, st); @@ -94,7 +94,4 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) return -1; } -hidden_def (__xstat) -weak_alias (__xstat, _xstat); -strong_alias (__xstat, __xstat64); -hidden_ver (__xstat, __xstat64) +strong_alias (__fxstatat, __fxstatat64); diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c index a51020d51f4..84573899d6d 100644 --- a/sysdeps/unix/sysv/linux/alpha/glob.c +++ b/sysdeps/unix/sysv/linux/alpha/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002, 2005 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 @@ -35,7 +35,7 @@ extern int __new_glob (const char *__pattern, int __flags, glob_t *__pglob); extern void __new_globfree (glob_t *__pglob); -#include +#include #undef glob #undef globfree diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c index 21a2063c30b..26b081d9a37 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c @@ -17,6 +17,8 @@ 02111-1307 USA. */ #include +#include +#include /* * In order to get the hidden arguments for rt_sigaction set up diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c index 1921a03388a..c2972e40c26 100644 --- a/sysdeps/unix/sysv/linux/alpha/wordexp.c +++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,7 @@ #define wordexp(words, pwordexp, flags) \ __new_wordexp (words, pwordexp, flags) -#include +#include versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2); diff --git a/sysdeps/unix/sysv/linux/dl-sbrk.c b/sysdeps/unix/sysv/linux/dl-sbrk.c index 4713a92694e..1ce5cb188cd 100644 --- a/sysdeps/unix/sysv/linux/dl-sbrk.c +++ b/sysdeps/unix/sysv/linux/dl-sbrk.c @@ -2,4 +2,4 @@ from ld.so. */ extern void *__curbrk attribute_hidden; -#include +#include diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c index 79f95df0a22..acc24410514 100644 --- a/sysdeps/unix/sysv/linux/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/dl-sysdep.c @@ -1,5 +1,5 @@ /* Dynamic linker system dependencies for Linux. - Copyright (C) 1995, 1997, 2001, 2004 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2001, 2004, 2005 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 @@ -53,4 +53,4 @@ frob_brk (void) #endif } -#include +#include diff --git a/sysdeps/unix/sysv/linux/fchownat.c b/sysdeps/unix/sysv/linux/fchownat.c index f8bc5e3033a..10d87e87fc0 100644 --- a/sysdeps/unix/sysv/linux/fchownat.c +++ b/sysdeps/unix/sysv/linux/fchownat.c @@ -23,6 +23,8 @@ #include #include #include +#include +#include /* Change the owner and group of FILE. */ int diff --git a/sysdeps/unix/sysv/linux/ftruncate64.c b/sysdeps/unix/sysv/linux/ftruncate64.c index 26caee2f466..4c60a1f19ac 100644 --- a/sysdeps/unix/sysv/linux/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2001,2003, 2005 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 @@ -72,5 +72,5 @@ weak_alias (__ftruncate64, ftruncate64) #else /* Use the generic implementation. */ -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c index 2360f50d98e..31113d5db50 100644 --- a/sysdeps/unix/sysv/linux/fxstatat64.c +++ b/sysdeps/unix/sysv/linux/fxstatat64.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/sysdeps/unix/sysv/linux/gai_sigqueue.c b/sysdeps/unix/sysv/linux/gai_sigqueue.c index 3e67add0d73..0c6654a3861 100644 --- a/sysdeps/unix/sysv/linux/gai_sigqueue.c +++ b/sysdeps/unix/sysv/linux/gai_sigqueue.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2003, 2005 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 @@ -52,5 +52,5 @@ __gai_sigqueue (sig, val, caller_pid) sig, __ptrvalue (&info)); } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/i386/getmsg.c b/sysdeps/unix/sysv/linux/i386/getmsg.c index e6ca88d1369..c0efd56369d 100644 --- a/sysdeps/unix/sysv/linux/i386/getmsg.c +++ b/sysdeps/unix/sysv/linux/i386/getmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2003, 2005 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,5 +34,5 @@ getmsg (fildes, ctlptr, dataptr, flagsp) return INLINE_SYSCALL (getpmsg, 5, fildes, ctlptr, dataptr, NULL, flagsp); } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/i386/getresgid.c b/sysdeps/unix/sysv/linux/i386/getresgid.c index 8028dec3f94..ea3318e7f51 100644 --- a/sysdeps/unix/sysv/linux/i386/getresgid.c +++ b/sysdeps/unix/sysv/linux/i386/getresgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002, 2003, 2005 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 @@ -81,5 +81,5 @@ libc_hidden_def (__getresgid) weak_alias (__getresgid, getresgid) #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/i386/getresuid.c b/sysdeps/unix/sysv/linux/i386/getresuid.c index 6b94bbb66c2..b2783d075c1 100644 --- a/sysdeps/unix/sysv/linux/i386/getresuid.c +++ b/sysdeps/unix/sysv/linux/i386/getresuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002, 2003, 2005 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 @@ -80,5 +80,5 @@ libc_hidden_def (__getresuid) weak_alias (__getresuid, getresuid) #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/i386/getrlimit64.c b/sysdeps/unix/sysv/linux/i386/getrlimit64.c index d6ab86f3e49..2ff175393c7 100644 --- a/sysdeps/unix/sysv/linux/i386/getrlimit64.c +++ b/sysdeps/unix/sysv/linux/i386/getrlimit64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2005 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 @@ -18,7 +18,7 @@ #define getrlimit64 __new_getrlimit64 -#include +#include #undef getrlimit64 #include diff --git a/sysdeps/unix/sysv/linux/i386/glob64.c b/sysdeps/unix/sysv/linux/i386/glob64.c index d3d1212f05a..18b7f21ae8b 100644 --- a/sysdeps/unix/sysv/linux/i386/glob64.c +++ b/sysdeps/unix/sysv/linux/i386/glob64.c @@ -19,7 +19,7 @@ #define COMPILE_GLOB64 1 -#include +#include #include "shlib-compat.h" @@ -48,7 +48,7 @@ int __old_glob64 (__const char *__pattern, int __flags, #define GLOB_ONLY_P 1 -#include +#include compat_symbol (libc, __old_glob64, glob64, GLIBC_2_1); #endif diff --git a/sysdeps/unix/sysv/linux/i386/lchown.c b/sysdeps/unix/sysv/linux/i386/lchown.c index 1b217a94512..57226277c1d 100644 --- a/sysdeps/unix/sysv/linux/i386/lchown.c +++ b/sysdeps/unix/sysv/linux/i386/lchown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003, 2005 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 @@ -70,5 +70,5 @@ __lchown (const char *file, uid_t owner, gid_t group) weak_alias (__lchown, lchown) #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/i386/putmsg.c b/sysdeps/unix/sysv/linux/i386/putmsg.c index e7b7a08b557..04fd159b7c1 100644 --- a/sysdeps/unix/sysv/linux/i386/putmsg.c +++ b/sysdeps/unix/sysv/linux/i386/putmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2003, 2005 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,5 +34,5 @@ putmsg (fildes, ctlptr, dataptr, flags) return INLINE_SYSCALL (putpmsg, 5, fildes, ctlptr, dataptr, -1, flags); } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/i386/readelflib.c b/sysdeps/unix/sysv/linux/i386/readelflib.c index 6852f2a9a99..a6374e61d2d 100644 --- a/sysdeps/unix/sysv/linux/i386/readelflib.c +++ b/sysdeps/unix/sysv/linux/i386/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999 and Jakub Jelinek , 2000. @@ -73,10 +73,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag, #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/i386/setresgid.c b/sysdeps/unix/sysv/linux/i386/setresgid.c index d4093afb0f3..fd0dfb342a2 100644 --- a/sysdeps/unix/sysv/linux/i386/setresgid.c +++ b/sysdeps/unix/sysv/linux/i386/setresgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002, 2003, 2004, 2005 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 @@ -80,6 +80,6 @@ weak_alias (__setresgid, setresgid) #else -#include +#include #endif diff --git a/sysdeps/unix/sysv/linux/i386/setresuid.c b/sysdeps/unix/sysv/linux/i386/setresuid.c index 540b954e086..c5651bf85a5 100644 --- a/sysdeps/unix/sysv/linux/i386/setresuid.c +++ b/sysdeps/unix/sysv/linux/i386/setresuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2002, 2003, 2004, 2005 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 @@ -80,6 +80,6 @@ weak_alias (__setresuid, setresuid) #else -#include +#include #endif diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 99f9bf1edf0..cb5767955ce 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -558,4 +558,24 @@ asm (".L__X'%ebx = 1\n\t" #endif /* __ASSEMBLER__ */ + +/* Pointer mangling support. */ +#if defined NOT_IN_libc && defined IS_IN_rtld +/* We cannot use the thread descriptor because in ld.so we use setjmp + earlier than the descriptor is initialized. Using a global variable + is too complicated here since we have no PC-relative addressing mode. */ +#else +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(reg) xorl %gs:POINTER_GUARD, reg +# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# else +# define PTR_MANGLE(var) asm ("xorl %%gs:%c2, %0" \ + : "=r" (var) \ + : "0" (var), \ + "i" (offsetof (tcbhead_t, \ + pointer_guard))) +# define PTR_DEMANGLE(var) PTR_MANGLE (var) +# endif +#endif + #endif /* linux/i386/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/readelflib.c b/sysdeps/unix/sysv/linux/ia64/readelflib.c index 9b1a645d34b..7a10d23c905 100644 --- a/sysdeps/unix/sysv/linux/ia64/readelflib.c +++ b/sysdeps/unix/sysv/linux/ia64/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2005 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 @@ -51,10 +51,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag, #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 44ac727820c..9bbd97e6d21 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -318,6 +318,11 @@ # define __ASSUME_POSIX_TIMERS 1 #endif +/* Beginning with 2.6.12 the clock and timer supports CPU clocks. */ +#if __LINUX_KERNEL_VERSION >= 0x2060c +# define __ASSUME_POSIX_CPU_TIMERS 1 +#endif + /* The late 2.5 kernels saw a lot of new CLONE_* flags. Summarize their availability with one define. The changes were made first for i386 and the have to be done separately for the other archs. diff --git a/sysdeps/unix/sysv/linux/linkat.c b/sysdeps/unix/sysv/linux/linkat.c new file mode 100644 index 00000000000..8ebff742152 --- /dev/null +++ b/sysdeps/unix/sysv/linux/linkat.c @@ -0,0 +1,87 @@ +/* Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include + + +/* Make a link to FROM named TO but relative paths in TO and FROM are + interpreted relative to FROMFD and TOFD respectively. */ +int +linkat (fromfd, from, tofd, to) + int fromfd; + const char *from; + int tofd; + const char *to; +{ + static const char procfd[] = "/proc/self/fd/%d/%s"; + char *buffrom = NULL; + + if (fromfd != AT_FDCWD && from[0] != '/') + { + size_t filelen = strlen (from); + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; + buffrom = alloca (buflen); + + __snprintf (buffrom, buflen, procfd, fromfd, from); + from = buffrom; + } + + char *bufto = NULL; + + if (tofd != AT_FDCWD && to[0] != '/') + { + size_t filelen = strlen (to); + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; + bufto = alloca (buflen); + + __snprintf (bufto, buflen, procfd, tofd, to); + to = bufto; + } + + INTERNAL_SYSCALL_DECL (err); + + int result = INTERNAL_SYSCALL (link, err, 2, from, to); + + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) + { + __atfct_seterrno_2 (INTERNAL_SYSCALL_ERRNO (result, err), tofd, bufto, + fromfd, buffrom); + result = -1; + } + + return result; +} diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index 154501fba2d..92d4b8a3406 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - Copyright (C) 1997, 2000, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003, 2004, 2005 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 @@ -89,4 +89,5 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c index cdb2d56840e..11e242570d4 100644 --- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 +/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -72,5 +72,5 @@ weak_alias (__ftruncate64, ftruncate64) #else /* Use the generic implementation. */ -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c index 73fd43f46fa..baa92fe57c0 100644 --- a/sysdeps/unix/sysv/linux/mips/readelflib.c +++ b/sysdeps/unix/sysv/linux/mips/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Alexandre Oliva Based on work ../x86_64/readelflib.c, @@ -62,10 +62,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag, #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c index e955f18ea36..d01d25b0779 100644 --- a/sysdeps/unix/sysv/linux/mips/truncate64.c +++ b/sysdeps/unix/sysv/linux/mips/truncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003 +/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -72,5 +72,5 @@ truncate64 (const char *path, off64_t length) #else /* Use the generic implementation. */ -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mkdirat.c b/sysdeps/unix/sysv/linux/mkdirat.c new file mode 100644 index 00000000000..367441b05b5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mkdirat.c @@ -0,0 +1,66 @@ +/* Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include + + +/* Create a new directory with permission bits MODE. But interpret + relative PATH names relative to the directory associated with FD. */ +int +mkdirat (fd, file, mode) + int fd; + const char *file; + mode_t mode; +{ + char *buf = NULL; + + if (fd != AT_FDCWD && file[0] != '/') + { + size_t filelen = strlen (file); + static const char procfd[] = "/proc/self/fd/%d/%s"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; + buf = alloca (buflen); + + __snprintf (buf, buflen, procfd, fd, file); + file = buf; + } + + INTERNAL_SYSCALL_DECL (err); + int res = INTERNAL_SYSCALL (mkdir, err, 2, file, mode); + + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (res, err), 0)) + { + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (res, err), fd, buf); + res = -1; + } + + return res; +} diff --git a/sysdeps/unix/sysv/linux/mq_close.c b/sysdeps/unix/sysv/linux/mq_close.c index 65522d5adc5..008e8eeb95a 100644 --- a/sysdeps/unix/sysv/linux/mq_close.c +++ b/sysdeps/unix/sysv/linux/mq_close.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 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 @@ -31,5 +31,5 @@ mq_close (mqd_t mqdes) } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mq_getattr.c b/sysdeps/unix/sysv/linux/mq_getattr.c index a61722e2372..d25df7bcfde 100644 --- a/sysdeps/unix/sysv/linux/mq_getattr.c +++ b/sysdeps/unix/sysv/linux/mq_getattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 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 @@ -31,5 +31,5 @@ mq_getattr (mqd_t mqdes, struct mq_attr *mqstat) } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c index 14db27da709..4eba28a3018 100644 --- a/sysdeps/unix/sysv/linux/mq_notify.c +++ b/sysdeps/unix/sysv/linux/mq_notify.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 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 @@ -40,5 +40,5 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mq_open.c b/sysdeps/unix/sysv/linux/mq_open.c index d8926a73a78..eac6e012386 100644 --- a/sysdeps/unix/sysv/linux/mq_open.c +++ b/sysdeps/unix/sysv/linux/mq_open.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 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 @@ -56,5 +56,5 @@ mq_open (const char *name, int oflag, ...) } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mq_receive.c b/sysdeps/unix/sysv/linux/mq_receive.c index 891663c66a7..2186508029b 100644 --- a/sysdeps/unix/sysv/linux/mq_receive.c +++ b/sysdeps/unix/sysv/linux/mq_receive.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 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 @@ -33,5 +33,5 @@ mq_receive (mqd_t mqdes, char *msg_ptr, size_t msg_len, } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mq_send.c b/sysdeps/unix/sysv/linux/mq_send.c index cb9cbc2a696..83b9f8df4a6 100644 --- a/sysdeps/unix/sysv/linux/mq_send.c +++ b/sysdeps/unix/sysv/linux/mq_send.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 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 @@ -32,5 +32,5 @@ mq_send (mqd_t mqdes, const char *msg_ptr, size_t msg_len, } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/mq_unlink.c b/sysdeps/unix/sysv/linux/mq_unlink.c index 8d87ffadf46..bef39a4ae23 100644 --- a/sysdeps/unix/sysv/linux/mq_unlink.c +++ b/sysdeps/unix/sysv/linux/mq_unlink.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 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 @@ -50,5 +50,5 @@ mq_unlink (const char *name) } #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/nscd_setup_thread.c b/sysdeps/unix/sysv/linux/nscd_setup_thread.c index 7d1bfd8dd17..1589c24ea96 100644 --- a/sysdeps/unix/sysv/linux/nscd_setup_thread.c +++ b/sysdeps/unix/sysv/linux/nscd_setup_thread.c @@ -1,22 +1,20 @@ /* Setup of nscd worker threads. Linux verison. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c index 069f94bd9d1..cf61b01a54e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c @@ -74,5 +74,5 @@ weak_alias (__ftruncate64, ftruncate64) #else /* Use the generic implementation. */ -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c index ee1b50c04bf..af6fa548dd8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c @@ -74,5 +74,5 @@ truncate64 (path, length) #else /* Use the generic implementation. */ -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/readelflib.c b/sysdeps/unix/sysv/linux/powerpc/readelflib.c index b4a449cdff9..3c6b2daf813 100644 --- a/sysdeps/unix/sysv/linux/powerpc/readelflib.c +++ b/sysdeps/unix/sysv/linux/powerpc/readelflib.c @@ -1,5 +1,5 @@ /* Special checks on libraries for ldconfig. Linux/PowerPC version. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2005 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 @@ -52,10 +52,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag, #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/readlinkat.c b/sysdeps/unix/sysv/linux/readlinkat.c new file mode 100644 index 00000000000..42c3877bd72 --- /dev/null +++ b/sysdeps/unix/sysv/linux/readlinkat.c @@ -0,0 +1,69 @@ +/* Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Read the contents of the symbolic link PATH relative to FD into no + more than LEN bytes of BUF. */ +int +readlinkat (fd, path, buf, len) + int fd; + const char *path; + char *buf; + size_t len; +{ + char *pathbuf = NULL; + + if (fd != AT_FDCWD && path[0] != '/') + { + size_t pathlen = strlen (path); + static const char procfd[] = "/proc/self/fd/%d/%s"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + pathlen; + pathbuf = __alloca (buflen); + + __snprintf (pathbuf, buflen, procfd, fd, path); + path = pathbuf; + } + + INTERNAL_SYSCALL_DECL (err); + + int result = INTERNAL_SYSCALL (readlink, err, 3, path, buf, len); + + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) + { + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, pathbuf); + result = -1; + } + + return result; +} diff --git a/sysdeps/unix/sysv/linux/renameat.c b/sysdeps/unix/sysv/linux/renameat.c index 9d94d5f86cb..849c67b5d6b 100644 --- a/sysdeps/unix/sysv/linux/renameat.c +++ b/sysdeps/unix/sysv/linux/renameat.c @@ -23,6 +23,52 @@ #include +void +attribute_hidden +__atfct_seterrno_2 (int errval, int fd1, const char *buf1, int fd2, + const char *buf2) +{ + if (errval == ENOTDIR && (buf1 != NULL || buf2 != NULL)) + { + /* This can mean either the file descriptor is invalid or + /proc is not mounted. */ + struct stat64 st; + + if (buf1 != NULL) + { + if (__fxstat64 (_STAT_VER, fd1, &st) != 0) + /* errno is already set correctly. */ + return; + + /* If /proc is not mounted there is nothing we can do. */ + if (S_ISDIR (st.st_mode) + && (__xstat64 (_STAT_VER, "/proc/self/fd", &st) != 0 + || !S_ISDIR (st.st_mode))) + { + errval = ENOSYS; + goto out; + } + } + + if (buf2 != NULL) + { + if (__fxstat64 (_STAT_VER, fd2, &st) != 0) + /* errno is already set correctly. */ + return; + + /* If /proc is not mounted there is nothing we can do. */ + if (S_ISDIR (st.st_mode) + && (__xstat64 (_STAT_VER, "/proc/self/fd", &st) != 0 + || !S_ISDIR (st.st_mode))) + errval = ENOSYS; + } + } + + out: + __set_errno (errval); +} + + /* Rename the file OLD relative to OLDFD to NEW relative to NEWFD. */ int renameat (oldfd, old, newfd, new) @@ -76,45 +122,8 @@ renameat (oldfd, old, newfd, new) if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { - int errval = INTERNAL_SYSCALL_ERRNO (result, err); - if (errval == ENOTDIR && (bufnew != NULL || bufold != NULL)) - { - /* This can mean either the file descriptor is invalid or - /proc is not mounted. */ - struct stat64 st; - - if (bufnew != NULL) - { - if (__fxstat64 (_STAT_VER, newfd, &st) != 0) - /* errno is already set correctly. */ - return -1; - - /* If /proc is not mounted there is nothing we can do. */ - if (S_ISDIR (st.st_mode) - && (__xstat64 (_STAT_VER, "/proc/self/fd", &st) != 0 - || !S_ISDIR (st.st_mode))) - { - errval = ENOSYS; - goto out; - } - } - - if (bufold != NULL) - { - if (__fxstat64 (_STAT_VER, oldfd, &st) != 0) - /* errno is already set correctly. */ - return -1; - - /* If /proc is not mounted there is nothing we can do. */ - if (S_ISDIR (st.st_mode) - && (__xstat64 (_STAT_VER, "/proc/self/fd", &st) != 0 - || !S_ISDIR (st.st_mode))) - errval = ENOSYS; - } - } - - out: - __set_errno (errval); + __atfct_seterrno_2 (INTERNAL_SYSCALL_ERRNO (result, err), newfd, bufnew, + oldfd, bufold); result = -1; } diff --git a/sysdeps/unix/sysv/linux/s390/readelflib.c b/sysdeps/unix/sysv/linux/s390/readelflib.c index c8efcbf7ac6..2782bc1e01d 100644 --- a/sysdeps/unix/sysv/linux/s390/readelflib.c +++ b/sysdeps/unix/sysv/linux/s390/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2005 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 @@ -51,10 +51,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag, #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/sched_getaffinity.c b/sysdeps/unix/sysv/linux/sched_getaffinity.c index 50443c64827..c0a6eb81b9b 100644 --- a/sysdeps/unix/sysv/linux/sched_getaffinity.c +++ b/sysdeps/unix/sysv/linux/sched_getaffinity.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 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 @@ -54,5 +54,5 @@ __sched_getaffinity_old (pid_t pid, cpu_set_t *cpuset) compat_symbol (libc, __sched_getaffinity_old, sched_getaffinity, GLIBC_2_3_3); # endif #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/sched_setaffinity.c b/sysdeps/unix/sysv/linux/sched_setaffinity.c index 5b1b8ee8787..ccd3c8f5143 100644 --- a/sysdeps/unix/sysv/linux/sched_setaffinity.c +++ b/sysdeps/unix/sysv/linux/sched_setaffinity.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 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 @@ -84,5 +84,5 @@ __sched_setaffinity_old (pid_t pid, const cpu_set_t *cpuset) compat_symbol (libc, __sched_setaffinity_old, sched_setaffinity, GLIBC_2_3_3); # endif #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/segfault.c b/sysdeps/unix/sysv/linux/segfault.c index 088c329b7fc..a417df9c41b 100644 --- a/sysdeps/unix/sysv/linux/segfault.c +++ b/sysdeps/unix/sysv/linux/segfault.c @@ -1,2 +1,2 @@ #define HAVE_PROC_SELF 1 -#include +#include diff --git a/sysdeps/unix/sysv/linux/sigqueue.c b/sysdeps/unix/sysv/linux/sigqueue.c index 337f8862570..22a8036b646 100644 --- a/sysdeps/unix/sysv/linux/sigqueue.c +++ b/sysdeps/unix/sysv/linux/sigqueue.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2003, 2005 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 @@ -48,5 +48,5 @@ __sigqueue (pid, sig, val) } weak_alias (__sigqueue, sigqueue) #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/sigreturn.c b/sysdeps/unix/sysv/linux/sigreturn.c index 6b3116fef21..626b1eb8af2 100644 --- a/sysdeps/unix/sysv/linux/sigreturn.c +++ b/sysdeps/unix/sysv/linux/sigreturn.c @@ -1,3 +1,3 @@ /* The sigreturn syscall cannot be explicitly called on Linux, only implicitly by returning from a signal handler. */ -#include +#include diff --git a/sysdeps/unix/sysv/linux/sigstack.c b/sysdeps/unix/sysv/linux/sigstack.c index 4faf4424fe1..76d2126986b 100644 --- a/sysdeps/unix/sysv/linux/sigstack.c +++ b/sysdeps/unix/sysv/linux/sigstack.c @@ -1,5 +1,5 @@ /* Emulate sigstack function using sigaltstack. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -65,5 +65,5 @@ sigstack (ss, oss) link_warning (sigstack, "the `sigstack' function is dangerous. `sigaltstack' should be used instead.") #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c index adeadc1587c..8795652766d 100644 --- a/sysdeps/unix/sysv/linux/sigtimedwait.c +++ b/sysdeps/unix/sysv/linux/sigtimedwait.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000,2002,2003,2004, 2005 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 @@ -89,5 +89,5 @@ __sigtimedwait (set, info, timeout) libc_hidden_def (__sigtimedwait) weak_alias (__sigtimedwait, sigtimedwait) #else -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/sigwaitinfo.c b/sysdeps/unix/sysv/linux/sigwaitinfo.c index a51a01f20bd..80790df9eb0 100644 --- a/sysdeps/unix/sysv/linux/sigwaitinfo.c +++ b/sysdeps/unix/sysv/linux/sigwaitinfo.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000,2002,2003,2004, 2005 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 @@ -89,6 +89,6 @@ __sigwaitinfo (set, info) libc_hidden_def (__sigwaitinfo) weak_alias (__sigwaitinfo, sigwaitinfo) #else -# include +# include #endif strong_alias (__sigwaitinfo, __libc_sigwaitinfo) diff --git a/sysdeps/unix/sysv/linux/sparc/readelflib.c b/sysdeps/unix/sysv/linux/sparc/readelflib.c index ef5fa0e2cd2..e12fbc7824e 100644 --- a/sysdeps/unix/sysv/linux/sparc/readelflib.c +++ b/sysdeps/unix/sysv/linux/sparc/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999 and Jakub Jelinek , 1999. @@ -53,10 +53,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag, #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/symlinkat.c b/sysdeps/unix/sysv/linux/symlinkat.c new file mode 100644 index 00000000000..211b49c299e --- /dev/null +++ b/sysdeps/unix/sysv/linux/symlinkat.c @@ -0,0 +1,67 @@ +/* Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Make a symbolic link to FROM named TO relative to TOFD. */ +int +symlinkat (from, tofd, to) + const char *from; + int tofd; + const char *to; +{ + char *buf = NULL; + + if (tofd != AT_FDCWD && to[0] != '/') + { + size_t tolen = strlen (to); + static const char procfd[] = "/proc/self/fd/%d/%s"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + tolen; + buf = __alloca (buflen); + + __snprintf (buf, buflen, procfd, tofd, to); + to = buf; + } + + INTERNAL_SYSCALL_DECL (err); + + int result = INTERNAL_SYSCALL (symlink, err, 2, from, to); + + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) + { + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), tofd, buf); + result = -1; + } + + return result; +} diff --git a/sysdeps/unix/sysv/linux/sys/quota.h b/sysdeps/unix/sysv/linux/sys/quota.h index be2810e0c74..5aa0ec07d21 100644 --- a/sysdeps/unix/sysv/linux/sys/quota.h +++ b/sysdeps/unix/sysv/linux/sys/quota.h @@ -30,8 +30,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * Version: $Id$ */ #ifndef _SYS_QUOTA_H diff --git a/sysdeps/unix/sysv/linux/syslog.c b/sysdeps/unix/sysv/linux/syslog.c index eaaa9839dca..56828b24e38 100644 --- a/sysdeps/unix/sysv/linux/syslog.c +++ b/sysdeps/unix/sysv/linux/syslog.c @@ -7,4 +7,4 @@ # define send_flags 0 #endif -#include +#include diff --git a/sysdeps/unix/sysv/linux/truncate64.c b/sysdeps/unix/sysv/linux/truncate64.c index e6af2c4b04e..b2ef13eaf8c 100644 --- a/sysdeps/unix/sysv/linux/truncate64.c +++ b/sysdeps/unix/sysv/linux/truncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2000, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1997-2000, 2003, 2004, 2005 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 @@ -71,5 +71,5 @@ truncate64 (const char *path, off64_t length) #else /* Use the generic implementation. */ -# include +# include #endif diff --git a/sysdeps/unix/sysv/linux/updwtmp.c b/sysdeps/unix/sysv/linux/updwtmp.c index 63dd87e418f..d4d3f2cb7ac 100644 --- a/sysdeps/unix/sysv/linux/updwtmp.c +++ b/sysdeps/unix/sysv/linux/updwtmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Mark Kettenis , 1998. @@ -31,4 +31,4 @@ && __access (_PATH_WTMP "x", F_OK) != 0) ? _PATH_WTMP : \ file_name)))) -#include +#include diff --git a/sysdeps/unix/sysv/linux/utmp_file.c b/sysdeps/unix/sysv/linux/utmp_file.c index 3a27802b110..958619a0326 100644 --- a/sysdeps/unix/sysv/linux/utmp_file.c +++ b/sysdeps/unix/sysv/linux/utmp_file.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Mark Kettenis , 1998. @@ -31,4 +31,4 @@ && __access (_PATH_WTMP "x", F_OK) != 0) ? _PATH_WTMP : \ file_name)))) -#include +#include diff --git a/sysdeps/unix/sysv/linux/vfork.c b/sysdeps/unix/sysv/linux/vfork.c index 9b4dd5f121e..c8c13d0fd5f 100644 --- a/sysdeps/unix/sysv/linux/vfork.c +++ b/sysdeps/unix/sysv/linux/vfork.c @@ -1 +1 @@ -#include +#include diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c index 7e26fecb3a2..6662a94d093 100644 --- a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c @@ -1,5 +1,5 @@ #ifdef IS_IN_ldconfig -#include +# include #else -#include +# include #endif diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h index b360b4288a2..31455204c34 100644 --- a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h @@ -1,5 +1,5 @@ #ifdef IS_IN_ldconfig -#include +# include #else -#include +# include #endif diff --git a/sysdeps/unix/sysv/linux/x86_64/readelflib.c b/sysdeps/unix/sysv/linux/x86_64/readelflib.c index c672f1df5a6..5a49af3fa61 100644 --- a/sysdeps/unix/sysv/linux/x86_64/readelflib.c +++ b/sysdeps/unix/sysv/linux/x86_64/readelflib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999 and Jakub Jelinek , 1999. @@ -53,10 +53,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag, #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 -#include "sysdeps/generic/readelflib.c" +#include "elf/readelflib.c" diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h index 0dc2f2750e8..5dfffca455a 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h @@ -311,4 +311,31 @@ #endif /* __ASSEMBLER__ */ + +/* Pointer mangling support. */ +#if defined NOT_IN_libc && defined IS_IN_rtld +/* We cannot use the thread descriptor because in ld.so we use setjmp + earlier than the descriptor is initialized. */ +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg +# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# else +# define PTR_MANGLE(reg) asm ("xorq __pointer_chk_guard_local(%%rip), %0"\ + : "=r" (reg) : "0" (reg)) +# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# endif +#else +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg +# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# else +# define PTR_MANGLE(var) asm ("xorq %%fs:%c2, %0" \ + : "=r" (var) \ + : "0" (var), \ + "i" (offsetof (tcbhead_t, \ + pointer_guard))) +# define PTR_DEMANGLE(var) PTR_MANGLE (var) +# endif +#endif + #endif /* linux/x86_64/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/xmknodat.c b/sysdeps/unix/sysv/linux/xmknodat.c new file mode 100644 index 00000000000..9332ae683e3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/xmknodat.c @@ -0,0 +1,75 @@ +/* Copyright (C) 2005 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/* Create a device file named PATH relative to FD, with permission and + special bits MODE and device number DEV (which can be constructed + from major and minor device numbers with the `makedev' macro above). */ +int +__xmknodat (int vers, int fd, const char *file, mode_t mode, dev_t *dev) +{ + if (vers != _MKNOD_VER) + { + __set_errno (EINVAL); + return -1; + } + + char *buf = NULL; + + if (fd != AT_FDCWD && file[0] != '/') + { + size_t filelen = strlen (file); + static const char procfd[] = "/proc/self/fd/%d/%s"; + /* Buffer for the path name we are going to use. It consists of + - the string /proc/self/fd/ + - the file descriptor number + - the file name provided. + The final NUL is included in the sizeof. A bit of overhead + due to the format elements compensates for possible negative + numbers. */ + size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; + buf = alloca (buflen); + + __snprintf (buf, buflen, procfd, fd, file); + file = buf; + } + + /* We must convert the value to dev_t type used by the kernel. */ + unsigned long long int k_dev = (*dev) & ((1ULL << 32) - 1); + if (k_dev != *dev) + { + __set_errno (EINVAL); + return -1; + } + + return INLINE_SYSCALL (mknod, 3, CHECK_STRING (file), mode, + (unsigned int) k_dev); +} + +libc_hidden_def (__xmknodat) diff --git a/sysdeps/wordsize-32/llabs.c b/sysdeps/wordsize-32/llabs.c index 3087fd6b718..04a93f4eafe 100644 --- a/sysdeps/wordsize-32/llabs.c +++ b/sysdeps/wordsize-32/llabs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2005 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 @@ -18,6 +18,6 @@ #include -#include +#include weak_alias (llabs, imaxabs) diff --git a/sysdeps/wordsize-32/lldiv.c b/sysdeps/wordsize-32/lldiv.c index 5cefd35c22b..1d543ba0ffd 100644 --- a/sysdeps/wordsize-32/lldiv.c +++ b/sysdeps/wordsize-32/lldiv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ #include -#include +#include #undef imaxdiv weak_alias (lldiv, imaxdiv) diff --git a/sysdeps/wordsize-64/glob.c b/sysdeps/wordsize-64/glob.c index 7ee2eb2727d..082faf1c70b 100644 --- a/sysdeps/wordsize-64/glob.c +++ b/sysdeps/wordsize-64/glob.c @@ -1,6 +1,6 @@ #define glob64 __no_glob64_decl #define globfree64 __no_globfree64_decl -#include +#include #undef glob64 #undef globfree64 weak_alias (glob, glob64) diff --git a/sysdeps/wordsize-64/labs.c b/sysdeps/wordsize-64/labs.c index 75b41b11453..5162ec5b17b 100644 --- a/sysdeps/wordsize-64/labs.c +++ b/sysdeps/wordsize-64/labs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2005 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 @@ -18,6 +18,6 @@ #include -#include +#include weak_alias (labs, imaxabs) diff --git a/sysdeps/wordsize-64/ldiv.c b/sysdeps/wordsize-64/ldiv.c index ff213914ecf..e4681a3b8ee 100644 --- a/sysdeps/wordsize-64/ldiv.c +++ b/sysdeps/wordsize-64/ldiv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ #include -#include +#include #undef imaxdiv weak_alias (ldiv, imaxdiv) diff --git a/sysdeps/wordsize-64/strtol.c b/sysdeps/wordsize-64/strtol.c index ec07ea72616..2e1b2293494 100644 --- a/sysdeps/wordsize-64/strtol.c +++ b/sysdeps/wordsize-64/strtol.c @@ -3,7 +3,7 @@ #define strtoll strtoll_XXX #define strtoq strtoq_XXX -#include +#include #undef __strtoll_internal #undef strtoll diff --git a/sysdeps/wordsize-64/strtol_l.c b/sysdeps/wordsize-64/strtol_l.c index 5a5cd8d0b7e..b2cd102add1 100644 --- a/sysdeps/wordsize-64/strtol_l.c +++ b/sysdeps/wordsize-64/strtol_l.c @@ -3,7 +3,7 @@ #define __strtoll_l __strtoll_l_XXX #define strtoll_l strtoll_l_XXX -#include +#include #undef ____strtoll_l_internal #undef __strtoll_l diff --git a/sysdeps/wordsize-64/strtoul.c b/sysdeps/wordsize-64/strtoul.c index ac3ca711168..401882ce0d1 100644 --- a/sysdeps/wordsize-64/strtoul.c +++ b/sysdeps/wordsize-64/strtoul.c @@ -3,7 +3,7 @@ #define strtoull strtoull_XXX #define strtouq strtouq_XXX -#include +#include #undef __strtoull_internal #undef strtoull diff --git a/sysdeps/wordsize-64/strtoul_l.c b/sysdeps/wordsize-64/strtoul_l.c index 9ee00a379af..80cca332b19 100644 --- a/sysdeps/wordsize-64/strtoul_l.c +++ b/sysdeps/wordsize-64/strtoul_l.c @@ -3,7 +3,7 @@ #define __strtoull_l __strtoull_l_XXX #define strtoull_l strtoull_l_XXX -#include +#include #undef ____strtoull_l_internal #undef __strtoull_l diff --git a/sysdeps/wordsize-64/wcstol.c b/sysdeps/wordsize-64/wcstol.c index 96870cbd3c7..b10895a82ba 100644 --- a/sysdeps/wordsize-64/wcstol.c +++ b/sysdeps/wordsize-64/wcstol.c @@ -3,7 +3,7 @@ #define wcstoll wcstoll_XXX #define wcstoq wcstoq_XXX -#include +#include #undef __wcstoll_internal #undef wcstoll diff --git a/sysdeps/wordsize-64/wcstol_l.c b/sysdeps/wordsize-64/wcstol_l.c index fe81147fe27..4f48f60c659 100644 --- a/sysdeps/wordsize-64/wcstol_l.c +++ b/sysdeps/wordsize-64/wcstol_l.c @@ -3,7 +3,7 @@ #define __wcstoll_l ___wcstoll_l_XXX #define wcstoll_l __wcstoll_l_XX -#include +#include #undef ____wcstoll_l_internal #undef __wcstoll_l diff --git a/sysdeps/wordsize-64/wcstoul.c b/sysdeps/wordsize-64/wcstoul.c index b6f5d9ac076..2becb807449 100644 --- a/sysdeps/wordsize-64/wcstoul.c +++ b/sysdeps/wordsize-64/wcstoul.c @@ -3,7 +3,7 @@ #define wcstoull wcstoull_XXX #define wcstouq wcstouq_XXX -#include +#include #undef __wcstoull_internal #undef wcstoull diff --git a/sysdeps/wordsize-64/wcstoul_l.c b/sysdeps/wordsize-64/wcstoul_l.c index d13bd5b16ae..c376fa0e819 100644 --- a/sysdeps/wordsize-64/wcstoul_l.c +++ b/sysdeps/wordsize-64/wcstoul_l.c @@ -3,7 +3,7 @@ #define __wcstoull_l ___wcstoull_l_XXX #define wcstoull_l __wcstoull_l_XXX -#include +#include #undef ____wcstoull_l_internal #undef __wcstoull_l diff --git a/sysdeps/x86_64/__longjmp.S b/sysdeps/x86_64/__longjmp.S index 9ed480c540a..becfb4f79dc 100644 --- a/sysdeps/x86_64/__longjmp.S +++ b/sysdeps/x86_64/__longjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2004, 2005 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 @@ -50,5 +50,8 @@ ENTRY(__longjmp) mov %esi, %eax movq (JB_PC*8)(%rdi),%rdx movq (JB_RSP*8)(%rdi),%rsp +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (%rdx) +#endif jmpq *%rdx END (BP_SYM (__longjmp)) diff --git a/sysdeps/x86_64/bsd-setjmp.S b/sysdeps/x86_64/bsd-setjmp.S index fdf4833dc6e..216c503ccb5 100644 --- a/sysdeps/x86_64/bsd-setjmp.S +++ b/sysdeps/x86_64/bsd-setjmp.S @@ -33,6 +33,7 @@ ENTRY (BP_SYM (setjmp)) /* Set up arguments, we only need to set the 2nd arg. */ movl $1, %esi #ifdef PIC + jmp HIDDEN_JUMPTARGET (__sigsetjmp) #else jmp BP_SYM (__sigsetjmp) #endif diff --git a/sysdeps/x86_64/fpu/printf_fphex.c b/sysdeps/x86_64/fpu/printf_fphex.c index d6ca102a88b..b701b20b872 100644 --- a/sysdeps/x86_64/fpu/printf_fphex.c +++ b/sysdeps/x86_64/fpu/printf_fphex.c @@ -1,5 +1,5 @@ /* Print floating point number in hexadecimal notation according to ISO C99. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2000,2001,2005 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 @@ -89,4 +89,4 @@ do { \ } \ } while (0) -#include +#include diff --git a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S index 811ab1d913f..8af5502042e 100644 --- a/sysdeps/x86_64/setjmp.S +++ b/sysdeps/x86_64/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for x86-64. - Copyright (C) 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005 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,13 +34,22 @@ ENTRY (__sigsetjmp) leaq 8(%rsp), %rdx /* Save SP as it will be after we return. */ movq %rdx, (JB_RSP*8)(%rdi) movq (%rsp), %rax /* Save PC we are returning to now. */ +#ifdef PTR_MANGLE + PTR_MANGLE (%rax) +#endif movq %rax, (JB_PC*8)(%rdi) +#if defined NOT_IN_libc && defined IS_IN_rtld + /* In ld.so we never save the signal mask. */ + xorl %eax, %eax + retq +#else /* Make a tail call to __sigjmp_save; it takes the same args. */ -#ifdef PIC +# ifdef PIC jmp C_SYMBOL_NAME (BP_SYM (__sigjmp_save))@PLT -#else +# else jmp BP_SYM (__sigjmp_save) +# endif #endif END (BP_SYM (__sigsetjmp)) hidden_def (__sigsetjmp) diff --git a/sysdeps/generic/msgctl.c b/sysvipc/msgctl.c similarity index 100% rename from sysdeps/generic/msgctl.c rename to sysvipc/msgctl.c diff --git a/sysdeps/generic/msgget.c b/sysvipc/msgget.c similarity index 100% rename from sysdeps/generic/msgget.c rename to sysvipc/msgget.c diff --git a/sysdeps/generic/msgrcv.c b/sysvipc/msgrcv.c similarity index 100% rename from sysdeps/generic/msgrcv.c rename to sysvipc/msgrcv.c diff --git a/sysdeps/generic/msgsnd.c b/sysvipc/msgsnd.c similarity index 100% rename from sysdeps/generic/msgsnd.c rename to sysvipc/msgsnd.c diff --git a/sysdeps/generic/semctl.c b/sysvipc/semctl.c similarity index 100% rename from sysdeps/generic/semctl.c rename to sysvipc/semctl.c diff --git a/sysdeps/generic/semget.c b/sysvipc/semget.c similarity index 100% rename from sysdeps/generic/semget.c rename to sysvipc/semget.c diff --git a/sysdeps/generic/semop.c b/sysvipc/semop.c similarity index 100% rename from sysdeps/generic/semop.c rename to sysvipc/semop.c diff --git a/sysdeps/generic/semtimedop.c b/sysvipc/semtimedop.c similarity index 100% rename from sysdeps/generic/semtimedop.c rename to sysvipc/semtimedop.c diff --git a/sysdeps/generic/shmat.c b/sysvipc/shmat.c similarity index 100% rename from sysdeps/generic/shmat.c rename to sysvipc/shmat.c diff --git a/sysdeps/generic/shmctl.c b/sysvipc/shmctl.c similarity index 100% rename from sysdeps/generic/shmctl.c rename to sysvipc/shmctl.c diff --git a/sysdeps/generic/shmdt.c b/sysvipc/shmdt.c similarity index 100% rename from sysdeps/generic/shmdt.c rename to sysvipc/shmdt.c diff --git a/sysdeps/generic/shmget.c b/sysvipc/shmget.c similarity index 100% rename from sysdeps/generic/shmget.c rename to sysvipc/shmget.c diff --git a/sysdeps/generic/speed.c b/termios/speed.c similarity index 100% rename from sysdeps/generic/speed.c rename to termios/speed.c diff --git a/sysdeps/generic/tcdrain.c b/termios/tcdrain.c similarity index 100% rename from sysdeps/generic/tcdrain.c rename to termios/tcdrain.c diff --git a/sysdeps/generic/tcflow.c b/termios/tcflow.c similarity index 100% rename from sysdeps/generic/tcflow.c rename to termios/tcflow.c diff --git a/sysdeps/generic/tcflush.c b/termios/tcflush.c similarity index 100% rename from sysdeps/generic/tcflush.c rename to termios/tcflush.c diff --git a/sysdeps/generic/tcgetattr.c b/termios/tcgetattr.c similarity index 100% rename from sysdeps/generic/tcgetattr.c rename to termios/tcgetattr.c diff --git a/sysdeps/generic/tcgetpgrp.c b/termios/tcgetpgrp.c similarity index 100% rename from sysdeps/generic/tcgetpgrp.c rename to termios/tcgetpgrp.c diff --git a/sysdeps/generic/tcsendbrk.c b/termios/tcsendbrk.c similarity index 100% rename from sysdeps/generic/tcsendbrk.c rename to termios/tcsendbrk.c diff --git a/sysdeps/generic/tcsetattr.c b/termios/tcsetattr.c similarity index 100% rename from sysdeps/generic/tcsetattr.c rename to termios/tcsetattr.c diff --git a/sysdeps/generic/tcsetpgrp.c b/termios/tcsetpgrp.c similarity index 100% rename from sysdeps/generic/tcsetpgrp.c rename to termios/tcsetpgrp.c diff --git a/sysdeps/generic/adjtime.c b/time/adjtime.c similarity index 100% rename from sysdeps/generic/adjtime.c rename to time/adjtime.c diff --git a/sysdeps/generic/clock.c b/time/clock.c similarity index 100% rename from sysdeps/generic/clock.c rename to time/clock.c diff --git a/sysdeps/generic/ftime.c b/time/ftime.c similarity index 100% rename from sysdeps/generic/ftime.c rename to time/ftime.c diff --git a/sysdeps/generic/getitimer.c b/time/getitimer.c similarity index 100% rename from sysdeps/generic/getitimer.c rename to time/getitimer.c diff --git a/sysdeps/generic/gettimeofday.c b/time/gettimeofday.c similarity index 100% rename from sysdeps/generic/gettimeofday.c rename to time/gettimeofday.c diff --git a/sysdeps/generic/setitimer.c b/time/setitimer.c similarity index 100% rename from sysdeps/generic/setitimer.c rename to time/setitimer.c diff --git a/sysdeps/generic/settimeofday.c b/time/settimeofday.c similarity index 100% rename from sysdeps/generic/settimeofday.c rename to time/settimeofday.c diff --git a/sysdeps/generic/stime.c b/time/stime.c similarity index 100% rename from sysdeps/generic/stime.c rename to time/stime.c diff --git a/time/sys/time.h b/time/sys/time.h index 199125bff31..96649ffa45f 100644 --- a/time/sys/time.h +++ b/time/sys/time.h @@ -153,7 +153,7 @@ extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW; modification time of FILE to TVP[1]. If TVP is a null pointer, use the current time instead. Returns 0 on success, -1 on errors. */ extern int futimesat (int __fd, __const char *__file, - __const struct timeval __tvp[2]) __THROW __nonnull ((2)); + __const struct timeval __tvp[2]) __THROW; #endif diff --git a/sysdeps/generic/time.c b/time/time.c similarity index 100% rename from sysdeps/generic/time.c rename to time/time.c diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile index 4aab7e8d892..7446bda89e8 100644 --- a/wcsmbs/Makefile +++ b/wcsmbs/Makefile @@ -47,7 +47,7 @@ include ../Rules CFLAGS-wcwidth.c = -I../wctype CFLAGS-wcswidth.c = -I../wctype -strtox-CFLAGS = -I../include -I../stdlib +strtox-CFLAGS = -I../include CFLAGS-wcstol.c = $(strtox-CFLAGS) CFLAGS-wcstoul.c = $(strtox-CFLAGS) CFLAGS-wcstoll.c = $(strtox-CFLAGS) @@ -64,6 +64,9 @@ CFLAGS-wcstold_l.c = $(strtox-CFLAGS) CFLAGS-wcstof_l.c = $(strtox-CFLAGS) CFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2 +# We need to find the default version of strtold_l in stdlib. +CPPFLAGS-wcstold_l.c = -I../stdlib + tst-btowc-ENV = LOCPATH=$(common-objpfx)localedata tst-mbrtowc-ENV = LOCPATH=$(common-objpfx)localedata tst-wcrtomb-ENV = LOCPATH=$(common-objpfx)localedata diff --git a/wcsmbs/btowc.c b/wcsmbs/btowc.c index 6add7ed8bbb..6517d4f635e 100644 --- a/wcsmbs/btowc.c +++ b/wcsmbs/btowc.c @@ -26,6 +26,8 @@ #include #include +#include + wint_t __btowc (c) @@ -45,13 +47,17 @@ __btowc (c) /* Get the conversion functions. */ fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE)); + __gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct; if (__builtin_expect (fcts->towc_nsteps == 1, 1) - && __builtin_expect (fcts->towc->__btowc_fct != NULL, 1)) + && __builtin_expect (btowc_fct != NULL, 1)) { /* Use the shortcut function. */ - return DL_CALL_FCT (fcts->towc->__btowc_fct, - (fcts->towc, (unsigned char) c)); +#ifdef PTR_DEMANGLE + if (fcts->towc->__shlib_handle != NULL) + PTR_DEMANGLE (btowc_fct); +#endif + return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c)); } else { @@ -78,9 +84,13 @@ __btowc (c) /* Create the input string. */ inbuf[0] = c; - status = DL_CALL_FCT (fcts->towc->__fct, - (fcts->towc, &data, &inptr, inptr + 1, - NULL, &dummy, 0, 1)); + __gconv_fct fct = fcts->towc->__fct; +#ifdef PTR_DEMANGLE + if (fcts->towc->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + status = DL_CALL_FCT (fct, (fcts->towc, &data, &inptr, inptr + 1, + NULL, &dummy, 0, 1)); if (status != __GCONV_OK && status != __GCONV_FULL_OUTPUT && status != __GCONV_EMPTY_INPUT) diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtowc.c index eb2a312b7c1..b5345717361 100644 --- a/wcsmbs/mbrtowc.c +++ b/wcsmbs/mbrtowc.c @@ -18,13 +18,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include #include #include -#include +#include #ifndef EILSEQ # define EILSEQ EINVAL @@ -73,9 +74,13 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) endbuf = inbuf + n; if (__builtin_expect (endbuf < inbuf, 0)) endbuf = (const unsigned char *) ~(uintptr_t) 0; - status = DL_CALL_FCT (fcts->towc->__fct, - (fcts->towc, &data, &inbuf, endbuf, - NULL, &dummy, 0, 1)); + __gconv_fct fct = fcts->towc->__fct; +#ifdef PTR_DEMANGLE + if (fcts->towc->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + status = DL_CALL_FCT (fct, (fcts->towc, &data, &inbuf, endbuf, + NULL, &dummy, 0, 1)); /* There must not be any problems with the conversion but illegal input characters. The output buffer must be large enough, otherwise the diff --git a/wcsmbs/mbsnrtowcs.c b/wcsmbs/mbsnrtowcs.c index ef5ca06e2f3..8d0b9d36094 100644 --- a/wcsmbs/mbsnrtowcs.c +++ b/wcsmbs/mbsnrtowcs.c @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -24,7 +25,7 @@ #include #include -#include +#include #ifndef EILSEQ # define EILSEQ EINVAL @@ -69,6 +70,11 @@ __mbsnrtowcs (dst, src, nmc, len, ps) /* Get the structure with the function pointers. */ towc = fcts->towc; + __gconv_fct fct = towc->__fct; +#ifdef PTR_DEMANGLE + if (towc->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif /* We have to handle DST == NULL special. */ if (dst == NULL) @@ -82,9 +88,8 @@ __mbsnrtowcs (dst, src, nmc, len, ps) { data.__outbuf = (unsigned char *) buf; - status = DL_CALL_FCT (towc->__fct, - (towc, &data, &inbuf, srcend, NULL, - &dummy, 0, 1)); + status = DL_CALL_FCT (fct, (towc, &data, &inbuf, srcend, NULL, + &dummy, 0, 1)); result += (wchar_t *) data.__outbuf - buf; } @@ -103,7 +108,7 @@ __mbsnrtowcs (dst, src, nmc, len, ps) data.__outbuf = (unsigned char *) dst; data.__outbufend = data.__outbuf + len * sizeof (wchar_t); - status = DL_CALL_FCT (towc->__fct, + status = DL_CALL_FCT (fct, (towc, &data, (const unsigned char **) src, srcend, NULL, &dummy, 0, 1)); diff --git a/wcsmbs/mbsrtowcs_l.c b/wcsmbs/mbsrtowcs_l.c index c44c8e50661..264c410c92e 100644 --- a/wcsmbs/mbsrtowcs_l.c +++ b/wcsmbs/mbsrtowcs_l.c @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include "wcsmbsload.h" @@ -28,7 +29,7 @@ #include #include -#include +#include #ifndef EILSEQ # define EILSEQ EINVAL @@ -63,6 +64,11 @@ __mbsrtowcs_l (dst, src, len, ps, l) /* Get the structure with the function pointers. */ towc = fcts->towc; + __gconv_fct fct = towc->__fct; +#ifdef PTR_DEMANGLE + if (towc->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif /* We have to handle DST == NULL special. */ if (dst == NULL) @@ -81,9 +87,8 @@ __mbsrtowcs_l (dst, src, len, ps, l) { data.__outbuf = (unsigned char *) buf; - status = DL_CALL_FCT (towc->__fct, - (towc, &data, &inbuf, srcend, NULL, - &non_reversible, 0, 1)); + status = DL_CALL_FCT (fct, (towc, &data, &inbuf, srcend, NULL, + &non_reversible, 0, 1)); result += (wchar_t *) data.__outbuf - buf; } @@ -116,9 +121,8 @@ __mbsrtowcs_l (dst, src, len, ps, l) worst case we need one input byte for one output wchar_t. */ srcend = srcp + __strnlen ((const char *) srcp, len) + 1; - status = DL_CALL_FCT (towc->__fct, - (towc, &data, &srcp, srcend, NULL, - &non_reversible, 0, 1)); + status = DL_CALL_FCT (fct, (towc, &data, &srcp, srcend, NULL, + &non_reversible, 0, 1)); if ((status != __GCONV_EMPTY_INPUT && status != __GCONV_INCOMPLETE_INPUT) /* Not all input read. */ diff --git a/wcsmbs/wcrtomb.c b/wcsmbs/wcrtomb.c index f7971e704be..aa51b6891b0 100644 --- a/wcsmbs/wcrtomb.c +++ b/wcsmbs/wcrtomb.c @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -24,7 +25,7 @@ #include #include -#include +#include #ifndef EILSEQ # define EILSEQ EINVAL @@ -65,15 +66,19 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps) /* Get the conversion functions. */ fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE)); + __gconv_fct fct = fcts->tomb->__fct; +#ifdef PTR_DEMANGLE + if (fcts->tomb->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif /* If WC is the NUL character we write into the output buffer the byte sequence necessary for PS to get into the initial state, followed by a NUL byte. */ if (wc == L'\0') { - status = DL_CALL_FCT (fcts->tomb->__fct, - (fcts->tomb, &data, NULL, NULL, - NULL, &dummy, 1, 1)); + status = DL_CALL_FCT (fct, (fcts->tomb, &data, NULL, NULL, + NULL, &dummy, 1, 1)); if (status == __GCONV_OK || status == __GCONV_EMPTY_INPUT) *data.__outbuf++ = '\0'; @@ -83,7 +88,7 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps) /* Do a normal conversion. */ const unsigned char *inbuf = (const unsigned char *) &wc; - status = DL_CALL_FCT (fcts->tomb->__fct, + status = DL_CALL_FCT (fct, (fcts->tomb, &data, &inbuf, inbuf + sizeof (wchar_t), NULL, &dummy, 0, 1)); } diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c index 1d7374b3861..e82b1ffaff9 100644 --- a/wcsmbs/wcsmbsload.c +++ b/wcsmbs/wcsmbsload.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,1999,2000,2001,2002,2004 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002,2004,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -29,7 +29,7 @@ /* These are the descriptions for the default conversion functions. */ -static struct __gconv_step to_wc = +static const struct __gconv_step to_wc = { .__shlib_handle = NULL, .__modname = NULL, @@ -48,7 +48,7 @@ static struct __gconv_step to_wc = .__data = NULL }; -static struct __gconv_step to_mb = +static const struct __gconv_step to_mb = { .__shlib_handle = NULL, .__modname = NULL, @@ -71,9 +71,9 @@ static struct __gconv_step to_mb = /* For the default locale we only have to handle ANSI_X3.4-1968. */ const struct gconv_fcts __wcsmbs_gconv_fcts_c = { - .towc = &to_wc, + .towc = (struct __gconv_step *) &to_wc, .towc_nsteps = 1, - .tomb = &to_mb, + .tomb = (struct __gconv_step *) &to_mb, .tomb_nsteps = 1 }; diff --git a/wcsmbs/wcsnrtombs.c b/wcsmbs/wcsnrtombs.c index 0252b7fa234..171fc3c227f 100644 --- a/wcsmbs/wcsnrtombs.c +++ b/wcsmbs/wcsnrtombs.c @@ -17,13 +17,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include #include #include -#include +#include #ifndef EILSEQ # define EILSEQ EINVAL @@ -67,6 +68,11 @@ __wcsnrtombs (dst, src, nwc, len, ps) /* Get the structure with the function pointers. */ tomb = fcts->tomb; + __gconv_fct fct = tomb->__fct; +#ifdef PTR_DEMANGLE + if (tomb->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif /* We have to handle DST == NULL special. */ if (dst == NULL) @@ -82,10 +88,9 @@ __wcsnrtombs (dst, src, nwc, len, ps) { data.__outbuf = buf; - status = DL_CALL_FCT (tomb->__fct, - (tomb, &data, &inbuf, - (const unsigned char *) srcend, NULL, - &dummy, 0, 1)); + status = DL_CALL_FCT (fct, (tomb, &data, &inbuf, + (const unsigned char *) srcend, NULL, + &dummy, 0, 1)); /* Count the number of bytes. */ result += data.__outbuf - buf; @@ -107,10 +112,9 @@ __wcsnrtombs (dst, src, nwc, len, ps) data.__outbuf = (unsigned char *) dst; data.__outbufend = (unsigned char *) dst + len; - status = DL_CALL_FCT (tomb->__fct, - (tomb, &data, (const unsigned char **) src, - (const unsigned char *) srcend, NULL, - &dummy, 0, 1)); + status = DL_CALL_FCT (fct, (tomb, &data, (const unsigned char **) src, + (const unsigned char *) srcend, NULL, + &dummy, 0, 1)); /* Count the number of bytes. */ result = data.__outbuf - (unsigned char *) dst; diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c index d41ca5366b3..5973fd93032 100644 --- a/wcsmbs/wcsrtombs.c +++ b/wcsmbs/wcsrtombs.c @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -24,7 +25,7 @@ #include #include -#include +#include #ifndef EILSEQ # define EILSEQ EINVAL @@ -59,6 +60,11 @@ __wcsrtombs (dst, src, len, ps) /* Get the structure with the function pointers. */ tomb = fcts->tomb; + __gconv_fct fct = tomb->__fct; +#ifdef PTR_DEMANGLE + if (tomb->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif /* We have to handle DST == NULL special. */ if (dst == NULL) @@ -79,10 +85,9 @@ __wcsrtombs (dst, src, len, ps) { data.__outbuf = buf; - status = DL_CALL_FCT (tomb->__fct, - (tomb, &data, &inbuf, - (const unsigned char *) srcend, NULL, - &dummy, 0, 1)); + status = DL_CALL_FCT (fct, (tomb, &data, &inbuf, + (const unsigned char *) srcend, NULL, + &dummy, 0, 1)); /* Count the number of bytes. */ result += data.__outbuf - buf; @@ -108,10 +113,9 @@ __wcsrtombs (dst, src, len, ps) data.__outbuf = (unsigned char *) dst; data.__outbufend = (unsigned char *) dst + len; - status = DL_CALL_FCT (tomb->__fct, - (tomb, &data, (const unsigned char **) src, - (const unsigned char *) srcend, NULL, - &dummy, 0, 1)); + status = DL_CALL_FCT (fct, (tomb, &data, (const unsigned char **) src, + (const unsigned char *) srcend, NULL, + &dummy, 0, 1)); /* Count the number of bytes. */ result = data.__outbuf - (unsigned char *) dst; diff --git a/sysdeps/generic/wcstol.c b/wcsmbs/wcstol.c similarity index 90% rename from sysdeps/generic/wcstol.c rename to wcsmbs/wcstol.c index b121d138762..b238d04b192 100644 --- a/sysdeps/generic/wcstol.c +++ b/wcsmbs/wcstol.c @@ -1,5 +1,5 @@ /* Function to parse a `long int' from text. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -20,4 +20,4 @@ #define USE_WIDE_CHAR 1 -#include +#include diff --git a/sysdeps/generic/wcstol_l.c b/wcsmbs/wcstol_l.c similarity index 91% rename from sysdeps/generic/wcstol_l.c rename to wcsmbs/wcstol_l.c index f1b4171f186..3d3bf76ea60 100644 --- a/sysdeps/generic/wcstol_l.c +++ b/wcsmbs/wcstol_l.c @@ -1,5 +1,5 @@ /* Convert string representing a number to integer value, using given locale. - Copyright (C) 1997, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -27,4 +27,4 @@ extern long int ____wcstol_l_internal (const wchar_t *, wchar_t **, int, int, __locale_t); -#include "strtol_l.c" +#include diff --git a/sysdeps/generic/wcstoll.c b/wcsmbs/wcstoll.c similarity index 100% rename from sysdeps/generic/wcstoll.c rename to wcsmbs/wcstoll.c diff --git a/sysdeps/generic/wcstoll_l.c b/wcsmbs/wcstoll_l.c similarity index 100% rename from sysdeps/generic/wcstoll_l.c rename to wcsmbs/wcstoll_l.c diff --git a/sysdeps/generic/wcstoul.c b/wcsmbs/wcstoul.c similarity index 100% rename from sysdeps/generic/wcstoul.c rename to wcsmbs/wcstoul.c diff --git a/sysdeps/generic/wcstoul_l.c b/wcsmbs/wcstoul_l.c similarity index 100% rename from sysdeps/generic/wcstoul_l.c rename to wcsmbs/wcstoul_l.c diff --git a/sysdeps/generic/wcstoull.c b/wcsmbs/wcstoull.c similarity index 100% rename from sysdeps/generic/wcstoull.c rename to wcsmbs/wcstoull.c diff --git a/sysdeps/generic/wcstoull_l.c b/wcsmbs/wcstoull_l.c similarity index 100% rename from sysdeps/generic/wcstoull_l.c rename to wcsmbs/wcstoull_l.c diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c index 0f241577a41..cbaac533675 100644 --- a/wcsmbs/wctob.c +++ b/wcsmbs/wctob.c @@ -24,6 +24,8 @@ #include #include +#include + int wctob (c) @@ -64,7 +66,12 @@ wctob (c) inbuf[0] = c; const unsigned char *argptr = (const unsigned char *) inptr; - status = DL_CALL_FCT (fcts->tomb->__fct, + __gconv_fct fct = fcts->tomb->__fct; +#ifdef PTR_DEMANGLE + if (fcts->tomb->__shlib_handle != NULL) + PTR_DEMANGLE (fct); +#endif + status = DL_CALL_FCT (fct, (fcts->tomb, &data, &argptr, argptr + sizeof (inbuf[0]), NULL, &dummy, 0, 1));