aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-14 08:43:25 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-14 08:43:25 +0000
commitb6ab06cef4670e02756bcdd4d2c33a49369a4346 (patch)
treeb30743eb9728d890d1519f62b2d1f2b96f62547a
parentd1dc39a44e339f9c48baa3854fffb3d68c73c8fa (diff)
downloadglibc-b6ab06cef4670e02756bcdd4d2c33a49369a4346.zip
glibc-b6ab06cef4670e02756bcdd4d2c33a49369a4346.tar.gz
glibc-b6ab06cef4670e02756bcdd4d2c33a49369a4346.tar.bz2
2005-12-13 Ulrich Drepper <drepper@redhat.com>
-rw-r--r--ChangeLog1590
-rw-r--r--Makeconfig13
-rw-r--r--Makerules95
-rw-r--r--bare/brdinit.c32
-rw-r--r--bare/console.c42
-rw-r--r--csu/check_fds.c102
-rw-r--r--csu/errno-loc.c37
-rw-r--r--debug/backtrace.c94
-rw-r--r--debug/backtracesyms.c58
-rw-r--r--debug/backtracesymsfd.c64
-rw-r--r--dirent/alphasort64.c27
-rw-r--r--dirent/closedir.c35
-rw-r--r--dirent/dirfd.c33
-rw-r--r--elf/dl-brk.c5
-rw-r--r--elf/dl-cache.c311
-rw-r--r--elf/dl-environ.c86
-rw-r--r--elf/dl-execstack.c32
-rw-r--r--elf/dl-fptr.c323
-rw-r--r--elf/dl-origin.c51
-rw-r--r--elf/dl-sbrk.c5
-rw-r--r--elf/dl-symaddr.c33
-rw-r--r--elf/dl-sysdep.c590
-rw-r--r--elf/dl-tls.c799
-rw-r--r--elf/dl-trampoline.c1
-rw-r--r--gmon/bb_init_func.c54
-rw-r--r--inet/check_pf.c50
-rw-r--r--io/access.c41
-rw-r--r--io/chdir.c40
-rw-r--r--io/chmod.c42
-rw-r--r--io/chown.c45
-rw-r--r--io/close.c40
-rw-r--r--io/creat.c36
-rw-r--r--io/creat64.c31
-rw-r--r--io/dup.c34
-rw-r--r--io/dup2.c48
-rw-r--r--locale/programs/charmap-kw.h100
-rw-r--r--locale/programs/locfile-kw.h727
-rw-r--r--math/cabsf.c29
-rw-r--r--math/cargf.c29
-rw-r--r--math/cimagf.c28
-rw-r--r--math/conjf.c28
-rw-r--r--math/crealf.c28
-rw-r--r--math/e_acoshl.c14
-rw-r--r--math/e_acosl.c14
-rw-r--r--math/e_asinl.c14
-rw-r--r--math/e_atan2l.c14
-rw-r--r--math/e_atanhl.c14
-rw-r--r--math/e_coshl.c14
-rw-r--r--math/e_exp10.c30
-rw-r--r--math/e_exp10f.c30
-rw-r--r--math/e_exp10l.c30
-rw-r--r--math/e_exp2l.c14
-rw-r--r--math/e_expl.c14
-rw-r--r--math/e_fmodl.c14
-rw-r--r--math/e_gammal_r.c15
-rw-r--r--math/e_hypotl.c14
-rw-r--r--math/e_j0l.c25
-rw-r--r--math/e_j1l.c25
-rw-r--r--math/e_jnl.c25
-rw-r--r--math/e_lgammal_r.c17
-rw-r--r--math/e_log10l.c14
-rw-r--r--misc/acct.c34
-rw-r--r--misc/brk.c37
-rw-r--r--misc/chflags.c43
-rw-r--r--misc/chroot.c34
-rw-r--r--nptl/ChangeLog6
-rw-r--r--nptl/errno-loc.c1
-rw-r--r--nptl/sysdeps/pthread/sigfillset.c4
-rw-r--r--posix/_exit.c (renamed from sysdeps/generic/_exit.c)0
-rw-r--r--posix/alarm.c39
-rw-r--r--rt/aio_cancel.c44
-rw-r--r--rt/aio_fsync.c51
-rw-r--r--rt/aio_misc.c29
-rw-r--r--rt/aio_notify.c24
-rw-r--r--rt/aio_read.c36
-rw-r--r--rt/aio_read64.c2
-rw-r--r--rt/aio_sigqueue.c36
-rw-r--r--rt/aio_suspend.c46
-rw-r--r--rt/aio_write.c36
-rw-r--r--rt/aio_write64.c2
-rw-r--r--rt/clock_getcpuclockid.c39
-rw-r--r--rt/clock_getres.c30
-rw-r--r--rt/clock_gettime.c31
-rw-r--r--rt/clock_nanosleep.c39
-rw-r--r--rt/clock_settime.c30
-rw-r--r--setjmp/__longjmp.c (renamed from sysdeps/generic/__longjmp.c)0
-rw-r--r--setjmp/bsd-_setjmp.c35
-rw-r--r--setjmp/bsd-setjmp.c34
-rw-r--r--signal/allocrtsig.c96
-rw-r--r--socket/accept.c40
-rw-r--r--socket/bind.c36
-rw-r--r--socket/connect.c38
-rw-r--r--stdio-common/ctermid.c36
-rw-r--r--stdio-common/cuserid.c35
-rw-r--r--stdlib/abort.c140
-rw-r--r--stdlib/add_n.c62
-rw-r--r--stdlib/addmul_1.c65
-rw-r--r--stdlib/cmp.c56
-rw-r--r--stdlib/dbl2mpn.c32
-rw-r--r--stdlib/div.c86
-rw-r--r--stdlib/divmod_1.c208
-rw-r--r--stdlib/divrem.c245
-rw-r--r--stdlib/strtod_l.c4
-rw-r--r--string/_strerror.c67
-rw-r--r--string/bcopy.c29
-rw-r--r--string/bzero.c83
-rw-r--r--sysdeps/ieee754/ldbl-96/printf_fphex.c4
-rw-r--r--sysdeps/ieee754/ldbl-96/strtold_l.c4
-rw-r--r--sysdeps/powerpc/elf/libc-start.c4
-rw-r--r--sysdeps/unix/sysv/linux/dl-sbrk.c2
-rw-r--r--sysdeps/unix/sysv/linux/dl-sysdep.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/getrlimit64.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/glob64.c4
-rw-r--r--sysdeps/unix/sysv/linux/segfault.c2
-rw-r--r--sysdeps/unix/sysv/linux/sigreturn.c2
-rw-r--r--sysdeps/unix/sysv/linux/syslog.c2
-rw-r--r--sysdeps/unix/sysv/linux/updwtmp.c4
-rw-r--r--sysdeps/unix/sysv/linux/utmp_file.c4
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c4
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h4
-rw-r--r--sysdeps/wordsize-32/llabs.c4
-rw-r--r--sysdeps/wordsize-32/lldiv.c4
-rw-r--r--sysdeps/wordsize-64/glob.c2
-rw-r--r--sysdeps/wordsize-64/labs.c4
-rw-r--r--sysdeps/wordsize-64/ldiv.c4
-rw-r--r--sysdeps/wordsize-64/strtol.c2
-rw-r--r--sysdeps/wordsize-64/strtol_l.c2
-rw-r--r--sysdeps/wordsize-64/strtoul.c2
-rw-r--r--sysdeps/wordsize-64/strtoul_l.c2
-rw-r--r--sysdeps/wordsize-64/wcstol.c2
-rw-r--r--sysdeps/wordsize-64/wcstol_l.c2
-rw-r--r--sysdeps/wordsize-64/wcstoul.c2
-rw-r--r--sysdeps/wordsize-64/wcstoul_l.c2
-rw-r--r--sysdeps/x86_64/fpu/printf_fphex.c4
-rw-r--r--time/adjtime.c37
-rw-r--r--time/clock.c32
-rw-r--r--wcsmbs/Makefile5
137 files changed, 8102 insertions, 397 deletions
diff --git a/ChangeLog b/ChangeLog
index 1fa5d98..e39045c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,1593 @@
+2005-12-13 Ulrich Drepper <drepper@redhat.com>
+
+ * 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 <roland@redhat.com>
* sysdeps/generic/Makefile: Remove remaining bits/endian.h cruft.
diff --git a/Makeconfig b/Makeconfig
index 01ca709..45a9704 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -622,14 +622,15 @@ endif # $(+cflags) == ""
+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/Makerules b/Makerules
index 3ffff58..d0b1d89 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/bare/brdinit.c b/bare/brdinit.c
new file mode 100644
index 0000000..af96bcd
--- /dev/null
+++ b/bare/brdinit.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+ 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 <standalone.h>
+
+/* This file is only required when a "bare" board is configured. */
+
+/* _Board_Initialize
+
+This routine normally performs board specific initialization. */
+
+void
+_Board_Initialize ()
+{
+}
diff --git a/bare/console.c b/bare/console.c
new file mode 100644
index 0000000..326ebed
--- /dev/null
+++ b/bare/console.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+ 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 <standalone.h>
+
+/* This file is only required when a "bare" board is configured. */
+
+/* These routines provide console IO routines for your embedded target. */
+
+int
+_Console_Putc (ch)
+ char ch;
+{
+ /* eat the character */
+
+ return 0;
+}
+
+int
+_Console_Getc (poll)
+ int poll;
+{
+ /* boring user, never types anything */
+ return -1;
+}
diff --git a/csu/check_fds.c b/csu/check_fds.c
new file mode 100644
index 0000000..10ba3da
--- /dev/null
+++ b/csu/check_fds.c
@@ -0,0 +1,102 @@
+/* Copyright (C) 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
+ 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 <errno.h>
+#include <fcntl.h>
+#include <paths.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+
+/* Try to get a machine dependent instruction which will make the
+ program crash. This is used in case everything else fails. */
+#include <abort-instr.h>
+#ifndef ABORT_INSTRUCTION
+/* No such instruction is available. */
+# define ABORT_INSTRUCTION
+#endif
+
+#include <device-nrs.h>
+#include <not-cancel.h>
+
+
+/* Should other OSes (e.g., Hurd) have different versions which can
+ be written in a better way? */
+static void
+check_one_fd (int fd, int mode)
+{
+ /* Note that fcntl() with this parameter is not a cancellation point. */
+ if (__builtin_expect (__libc_fcntl (fd, F_GETFD), 0) == -1
+ && errno == EBADF)
+ {
+ const char *name;
+ dev_t dev;
+
+ /* For writable descriptors we use /dev/full. */
+ if ((mode & O_ACCMODE) == O_WRONLY)
+ {
+ name = _PATH_DEV "full";
+ dev = makedev (DEV_FULL_MAJOR, DEV_FULL_MINOR);
+ }
+ else
+ {
+ name = _PATH_DEVNULL;
+ dev = makedev (DEV_NULL_MAJOR, DEV_NULL_MINOR);
+ }
+
+ /* Something is wrong with this descriptor, it's probably not
+ opened. Open /dev/null so that the SUID program we are
+ about to start does not accidently use this descriptor. */
+ int nullfd = open_not_cancel (name, mode, 0);
+
+ /* We are very paranoid here. With all means we try to ensure
+ that we are actually opening the /dev/null device and nothing
+ else.
+
+ Note that the following code assumes that STDIN_FILENO,
+ STDOUT_FILENO, STDERR_FILENO are the three lowest file
+ decsriptor numbers, in this order. */
+ struct stat64 st;
+ if (__builtin_expect (nullfd != fd, 0)
+ || __builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) != 0
+ || __builtin_expect (S_ISCHR (st.st_mode), 1) == 0
+ || st.st_rdev != dev)
+ /* We cannot even give an error message here since it would
+ run into the same problems. */
+ while (1)
+ /* Try for ever and ever. */
+ ABORT_INSTRUCTION;
+ }
+}
+
+
+void
+__libc_check_standard_fds (void)
+{
+ /* This is really paranoid but some people actually are. If /dev/null
+ should happen to be a symlink to somewhere else and not the device
+ commonly known as "/dev/null" we bail out. We can detect this with
+ the O_NOFOLLOW flag for open() but only on some system. */
+#ifndef O_NOFOLLOW
+# define O_NOFOLLOW 0
+#endif
+ /* Check all three standard file descriptors. */
+ check_one_fd (STDIN_FILENO, O_WRONLY | O_NOFOLLOW);
+ check_one_fd (STDOUT_FILENO, O_RDONLY | O_NOFOLLOW);
+ check_one_fd (STDERR_FILENO, O_RDONLY | O_NOFOLLOW);
+}
diff --git a/csu/errno-loc.c b/csu/errno-loc.c
new file mode 100644
index 0000000..633590f
--- /dev/null
+++ b/csu/errno-loc.c
@@ -0,0 +1,37 @@
+/* MT support function to get address of `errno' variable, non-threaded
+ version.
+ Copyright (C) 1996, 1998, 2002, 2004 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 <errno.h>
+#include <tls.h>
+
+#if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
+#undef errno
+extern int errno;
+#endif
+
+int *
+#if ! USE___THREAD
+weak_const_function
+#endif
+__errno_location (void)
+{
+ return &errno;
+}
+libc_hidden_def (__errno_location)
diff --git a/debug/backtrace.c b/debug/backtrace.c
new file mode 100644
index 0000000..f2d5237
--- /dev/null
+++ b/debug/backtrace.c
@@ -0,0 +1,94 @@
+/* Return backtrace of current program state. Generic version.
+ Copyright (C) 1998, 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 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.
+
+ 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 <execinfo.h>
+#include <signal.h>
+#include <frame.h>
+#include <sigcontextinfo.h>
+#include <bp-checks.h>
+#include <ldsodefs.h>
+
+/* This implementation assumes a stack layout that matches the defaults
+ used by gcc's `__builtin_frame_address' and `__builtin_return_address'
+ (FP is the frame pointer register):
+
+ +-----------------+ +-----------------+
+ FP -> | previous FP --------> | previous FP ------>...
+ | | | |
+ | return address | | return address |
+ +-----------------+ +-----------------+
+
+ */
+
+/* Get some notion of the current stack. Need not be exactly the top
+ of the stack, just something somewhere in the current frame. */
+#ifndef CURRENT_STACK_FRAME
+# define CURRENT_STACK_FRAME ({ char __csf; &__csf; })
+#endif
+
+/* By default we assume that the stack grows downward. */
+#ifndef INNER_THAN
+# define INNER_THAN <
+#endif
+
+/* By default assume the `next' pointer in struct layout points to the
+ next struct layout. */
+#ifndef ADVANCE_STACK_FRAME
+# define ADVANCE_STACK_FRAME(next) BOUNDED_1 ((struct layout *) (next))
+#endif
+
+/* By default, the frame pointer is just what we get from gcc. */
+#ifndef FIRST_FRAME_POINTER
+# define FIRST_FRAME_POINTER __builtin_frame_address (0)
+#endif
+
+int
+__backtrace (array, size)
+ void **array;
+ int size;
+{
+ struct layout *current;
+ void *__unbounded top_frame;
+ void *__unbounded top_stack;
+ int cnt = 0;
+
+ top_frame = FIRST_FRAME_POINTER;
+ top_stack = CURRENT_STACK_FRAME;
+
+ /* We skip the call to this function, it makes no sense to record it. */
+ current = BOUNDED_1 ((struct layout *) top_frame);
+ while (cnt < size)
+ {
+ if ((void *) current INNER_THAN top_stack
+ || !((void *) current INNER_THAN __libc_stack_end))
+ /* This means the address is out of range. Note that for the
+ toplevel we see a frame pointer with value NULL which clearly is
+ out of range. */
+ break;
+
+ array[cnt++] = current->return_address;
+
+ current = ADVANCE_STACK_FRAME (current->next);
+ }
+
+ return cnt;
+}
+weak_alias (__backtrace, backtrace)
+libc_hidden_def (__backtrace)
diff --git a/debug/backtracesyms.c b/debug/backtracesyms.c
new file mode 100644
index 0000000..db7ba36
--- /dev/null
+++ b/debug/backtracesyms.c
@@ -0,0 +1,58 @@
+/* Return list with names for address in backtrace.
+ Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 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.
+
+ 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 <execinfo.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+/* Assume the worst for the width of an address. */
+#define WORD_WIDTH 16
+
+
+char **
+__backtrace_symbols (array, size)
+ void *const *array;
+ int size;
+{
+ int cnt;
+ size_t total = 0;
+ char **result;
+
+ /* We can compute the text size needed for the symbols since we print
+ them all as "[+0x<addr>]". */
+ total = size * (WORD_WIDTH + 6);
+
+ /* Allocate memory for the result. */
+ result = malloc (size * sizeof (char *) + total);
+ if (result != NULL)
+ {
+ char *last = (char *) (result + size);
+
+ for (cnt = 0; cnt < size; ++cnt)
+ {
+ result[cnt] = last;
+ last += 1 + sprintf (last, "[+%p]", array[cnt]);
+ }
+ }
+
+ return result;
+}
+weak_alias (__backtrace_symbols, backtrace_symbols)
diff --git a/debug/backtracesymsfd.c b/debug/backtracesymsfd.c
new file mode 100644
index 0000000..b01f8b0
--- /dev/null
+++ b/debug/backtracesymsfd.c
@@ -0,0 +1,64 @@
+/* Write formatted list with names for addresses in backtrace to a file.
+ Copyright (C) 1998, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 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.
+
+ 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 <execinfo.h>
+#include <string.h>
+#include <sys/uio.h>
+
+#include <stdio-common/_itoa.h>
+#include <not-cancel.h>
+
+#if __ELF_NATIVE_CLASS == 32
+# define WORD_WIDTH 8
+#else
+/* We assume 64bits. */
+# define WORD_WIDTH 16
+#endif
+
+
+void
+__backtrace_symbols_fd (array, size, fd)
+ void *const *array;
+ int size;
+ int fd;
+{
+ struct iovec iov[3];
+ int cnt;
+
+ for (cnt = 0; cnt < size; ++cnt)
+ {
+ char buf[WORD_WIDTH];
+
+ iov[0].iov_base = (void *) "[0x";
+ iov[0].iov_len = 3;
+
+ iov[1].iov_base = _itoa_word ((unsigned long int) array[cnt],
+ &buf[WORD_WIDTH], 16, 0);
+ iov[1].iov_len = &buf[WORD_WIDTH] - (char *) iov[1].iov_base;
+
+ iov[2].iov_base = (void *) "]\n";
+ iov[2].iov_len = 2;
+
+ /* We prefer to use the non-cancelable interface if it is available. */
+ writev_not_cancel_no_status (fd, iov, 3);
+ }
+}
+weak_alias (__backtrace_symbols_fd, backtrace_symbols_fd)
+libc_hidden_def (__backtrace_symbols_fd)
diff --git a/dirent/alphasort64.c b/dirent/alphasort64.c
new file mode 100644
index 0000000..fe84aec
--- /dev/null
+++ b/dirent/alphasort64.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1992, 1997, 1998, 2000 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 <dirent.h>
+#include <string.h>
+
+int
+alphasort64 (const void *a, const void *b)
+{
+ return strcoll ((*(const struct dirent64 **) a)->d_name,
+ (*(const struct dirent64 **) b)->d_name);
+}
diff --git a/dirent/closedir.c b/dirent/closedir.c
new file mode 100644
index 0000000..4410f02
--- /dev/null
+++ b/dirent/closedir.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+
+/* Close the directory stream DIRP.
+ Return 0 if successful, -1 if not. */
+int
+__closedir (DIR *dirp)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+weak_alias (__closedir, closedir)
+
+stub_warning (closedir)
+#include <stub-tag.h>
diff --git a/dirent/dirfd.c b/dirent/dirfd.c
new file mode 100644
index 0000000..06c0cde
--- /dev/null
+++ b/dirent/dirfd.c
@@ -0,0 +1,33 @@
+/* Return the file descriptor used by a DIR stream. Stub version.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <dirent.h>
+#include <dirstream.h>
+#include <errno.h>
+
+int
+dirfd (dirp)
+ DIR *dirp;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (dirfd)
+#include <stub-tag.h>
diff --git a/elf/dl-brk.c b/elf/dl-brk.c
new file mode 100644
index 0000000..c37cdfe
--- /dev/null
+++ b/elf/dl-brk.c
@@ -0,0 +1,5 @@
+/* We can use the normal code but we also know the __curbrk is not exported
+ from ld.so. */
+extern void *__curbrk attribute_hidden;
+
+#include <brk.c>
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
new file mode 100644
index 0000000..29886e1
--- /dev/null
+++ b/elf/dl-cache.c
@@ -0,0 +1,311 @@
+/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+ Copyright (C) 1996-2002, 2003, 2004 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 <assert.h>
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <sys/mman.h>
+#include <dl-cache.h>
+#include <dl-procinfo.h>
+
+#include <stdio-common/_itoa.h>
+
+#ifndef _DL_PLATFORMS_COUNT
+# define _DL_PLATFORMS_COUNT 0
+#endif
+
+/* This is the starting address and the size of the mmap()ed file. */
+static struct cache_file *cache;
+static struct cache_file_new *cache_new;
+static size_t cachesize;
+
+/* 1 if cache_data + PTR points into the cache. */
+#define _dl_cache_verify_ptr(ptr) (ptr < cache_data_size)
+
+#define SEARCH_CACHE(cache) \
+/* We use binary search since the table is sorted in the cache file. \
+ The first matching entry in the table is returned. \
+ It is important to use the same algorithm as used while generating \
+ the cache file. */ \
+do \
+ { \
+ left = 0; \
+ right = cache->nlibs - 1; \
+ \
+ while (left <= right) \
+ { \
+ __typeof__ (cache->libs[0].key) key; \
+ \
+ middle = (left + right) / 2; \
+ \
+ key = cache->libs[middle].key; \
+ \
+ /* Make sure string table indices are not bogus before using \
+ them. */ \
+ if (! _dl_cache_verify_ptr (key)) \
+ { \
+ cmpres = 1; \
+ break; \
+ } \
+ \
+ /* Actually compare the entry with the key. */ \
+ cmpres = _dl_cache_libcmp (name, cache_data + key); \
+ if (__builtin_expect (cmpres == 0, 0)) \
+ { \
+ /* Found it. LEFT now marks the last entry for which we \
+ know the name is correct. */ \
+ left = middle; \
+ \
+ /* There might be entries with this name before the one we \
+ found. So we have to find the beginning. */ \
+ while (middle > 0) \
+ { \
+ __typeof__ (cache->libs[0].key) key; \
+ \
+ key = cache->libs[middle - 1].key; \
+ /* Make sure string table indices are not bogus before \
+ using them. */ \
+ if (! _dl_cache_verify_ptr (key) \
+ /* Actually compare the entry. */ \
+ || _dl_cache_libcmp (name, cache_data + key) != 0) \
+ break; \
+ --middle; \
+ } \
+ \
+ do \
+ { \
+ int flags; \
+ __typeof__ (cache->libs[0]) *lib = &cache->libs[middle]; \
+ \
+ /* Only perform the name test if necessary. */ \
+ if (middle > left \
+ /* We haven't seen this string so far. Test whether the \
+ index is ok and whether the name matches. Otherwise \
+ we are done. */ \
+ && (! _dl_cache_verify_ptr (lib->key) \
+ || (_dl_cache_libcmp (name, cache_data + lib->key) \
+ != 0))) \
+ break; \
+ \
+ flags = lib->flags; \
+ if (_dl_cache_check_flags (flags) \
+ && _dl_cache_verify_ptr (lib->value)) \
+ { \
+ if (best == NULL || flags == GLRO(dl_correct_cache_id)) \
+ { \
+ HWCAP_CHECK; \
+ best = cache_data + lib->value; \
+ \
+ if (flags == GLRO(dl_correct_cache_id)) \
+ /* We've found an exact match for the shared \
+ object and no general `ELF' release. Stop \
+ searching. */ \
+ break; \
+ } \
+ } \
+ } \
+ while (++middle <= right); \
+ break; \
+ } \
+ \
+ if (cmpres < 0) \
+ left = middle + 1; \
+ else \
+ right = middle - 1; \
+ } \
+ } \
+while (0)
+
+
+int
+internal_function
+_dl_cache_libcmp (const char *p1, const char *p2)
+{
+ while (*p1 != '\0')
+ {
+ if (*p1 >= '0' && *p1 <= '9')
+ {
+ if (*p2 >= '0' && *p2 <= '9')
+ {
+ /* Must compare this numerically. */
+ int val1;
+ int val2;
+
+ val1 = *p1++ - '0';
+ val2 = *p2++ - '0';
+ while (*p1 >= '0' && *p1 <= '9')
+ val1 = val1 * 10 + *p1++ - '0';
+ while (*p2 >= '0' && *p2 <= '9')
+ val2 = val2 * 10 + *p2++ - '0';
+ if (val1 != val2)
+ return val1 - val2;
+ }
+ else
+ return 1;
+ }
+ else if (*p2 >= '0' && *p2 <= '9')
+ return -1;
+ else if (*p1 != *p2)
+ return *p1 - *p2;
+ else
+ {
+ ++p1;
+ ++p2;
+ }
+ }
+ return *p1 - *p2;
+}
+
+
+/* Look up NAME in ld.so.cache and return the file name stored there,
+ or null if none is found. */
+
+const char *
+internal_function
+_dl_load_cache_lookup (const char *name)
+{
+ int left, right, middle;
+ int cmpres;
+ const char *cache_data;
+ uint32_t cache_data_size;
+ const char *best;
+
+ /* Print a message if the loading of libs is traced. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0))
+ _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
+
+ if (cache == NULL)
+ {
+ /* Read the contents of the file. */
+ void *file = _dl_sysdep_read_whole_file (LD_SO_CACHE, &cachesize,
+ PROT_READ);
+
+ /* We can handle three different cache file formats here:
+ - the old libc5/glibc2.0/2.1 format
+ - the old format with the new format in it
+ - only the new format
+ The following checks if the cache contains any of these formats. */
+ if (file != MAP_FAILED && cachesize > sizeof *cache
+ && memcmp (file, CACHEMAGIC, sizeof CACHEMAGIC - 1) == 0)
+ {
+ size_t offset;
+ /* Looks ok. */
+ cache = file;
+
+ /* Check for new version. */
+ offset = ALIGN_CACHE (sizeof (struct cache_file)
+ + cache->nlibs * sizeof (struct file_entry));
+
+ cache_new = (struct cache_file_new *) ((void *) cache + offset);
+ if (cachesize < (offset + sizeof (struct cache_file_new))
+ || memcmp (cache_new->magic, CACHEMAGIC_VERSION_NEW,
+ sizeof CACHEMAGIC_VERSION_NEW - 1) != 0)
+ cache_new = (void *) -1;
+ }
+ else if (file != MAP_FAILED && cachesize > sizeof *cache_new
+ && memcmp (file, CACHEMAGIC_VERSION_NEW,
+ sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
+ {
+ cache_new = file;
+ cache = file;
+ }
+ else
+ {
+ if (file != MAP_FAILED)
+ __munmap (file, cachesize);
+ cache = (void *) -1;
+ }
+
+ assert (cache != NULL);
+ }
+
+ if (cache == (void *) -1)
+ /* Previously looked for the cache file and didn't find it. */
+ return NULL;
+
+ best = NULL;
+
+ if (cache_new != (void *) -1)
+ {
+ uint64_t platform;
+
+ /* This is where the strings start. */
+ cache_data = (const char *) cache_new;
+
+ /* Now we can compute how large the string table is. */
+ cache_data_size = (const char *) cache + cachesize - cache_data;
+
+ platform = _dl_string_platform (GLRO(dl_platform));
+ if (platform != (uint64_t) -1)
+ platform = 1ULL << platform;
+
+ /* Only accept hwcap if it's for the right platform. */
+#ifdef USE_TLS
+# define _DL_HWCAP_TLS_MASK (1LL << 63)
+#else
+# define _DL_HWCAP_TLS_MASK 0
+#endif
+#define HWCAP_CHECK \
+ if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion)) \
+ continue; \
+ if (_DL_PLATFORMS_COUNT && platform != -1 \
+ && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \
+ && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \
+ continue; \
+ if (lib->hwcap \
+ & ~(GLRO(dl_hwcap) | _DL_HWCAP_PLATFORM | _DL_HWCAP_TLS_MASK)) \
+ continue
+ SEARCH_CACHE (cache_new);
+ }
+ else
+ {
+ /* This is where the strings start. */
+ cache_data = (const char *) &cache->libs[cache->nlibs];
+
+ /* Now we can compute how large the string table is. */
+ cache_data_size = (const char *) cache + cachesize - cache_data;
+
+#undef HWCAP_CHECK
+#define HWCAP_CHECK do {} while (0)
+ SEARCH_CACHE (cache);
+ }
+
+ /* Print our result if wanted. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0)
+ && best != NULL)
+ _dl_debug_printf (" trying file=%s\n", best);
+
+ return best;
+}
+
+#ifndef MAP_COPY
+/* If the system does not support MAP_COPY we cannot leave the file open
+ all the time since this would create problems when the file is replaced.
+ Therefore we provide this function to close the file and open it again
+ once needed. */
+void
+_dl_unload_cache (void)
+{
+ if (cache != NULL && cache != (struct cache_file *) -1)
+ {
+ __munmap (cache, cachesize);
+ cache = NULL;
+ }
+}
+#endif
diff --git a/elf/dl-environ.c b/elf/dl-environ.c
new file mode 100644
index 0000000..089e89e
--- /dev/null
+++ b/elf/dl-environ.c
@@ -0,0 +1,86 @@
+/* Environment handling for dynamic loader.
+ Copyright (C) 1995-1998, 2000, 2001, 2002 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 <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <ldsodefs.h>
+
+/* Walk through the environment of the process and return all entries
+ starting with `LD_'. */
+char *
+internal_function
+_dl_next_ld_env_entry (char ***position)
+{
+ char **current = *position;
+ char *result = NULL;
+
+ while (*current != NULL)
+ {
+ if (__builtin_expect ((*current)[0] == 'L', 0)
+ && (*current)[1] == 'D' && (*current)[2] == '_')
+ {
+ result = &(*current)[3];
+
+ /* Save current position for next visit. */
+ *position = ++current;
+
+ break;
+ }
+
+ ++current;
+ }
+
+ return result;
+}
+
+
+/* In ld.so __environ is not exported. */
+extern char **__environ attribute_hidden;
+
+int
+unsetenv (const char *name)
+{
+ char **ep;
+
+ ep = __environ;
+ while (*ep != NULL)
+ {
+ size_t cnt = 0;
+
+ while ((*ep)[cnt] == name[cnt] && name[cnt] != '\0')
+ ++cnt;
+
+ if (name[cnt] == '\0' && (*ep)[cnt] == '=')
+ {
+ /* Found it. Remove this pointer by moving later ones to
+ the front. */
+ char **dp = ep;
+
+ do
+ dp[0] = dp[1];
+ while (*dp++);
+ /* Continue the loop in case NAME appears again. */
+ }
+ else
+ ++ep;
+ }
+
+ return 0;
+}
diff --git a/elf/dl-execstack.c b/elf/dl-execstack.c
new file mode 100644
index 0000000..6dce21e
--- /dev/null
+++ b/elf/dl-execstack.c
@@ -0,0 +1,32 @@
+/* Stack executability handling for GNU dynamic linker. Stub version.
+ Copyright (C) 2003, 2004 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 <ldsodefs.h>
+#include <errno.h>
+
+/* There is no portable way to know the bounds of the initial thread's stack
+ so as to mprotect it. */
+
+int
+internal_function
+_dl_make_stack_executable (void **stack_endp)
+{
+ return ENOSYS;
+}
+rtld_hidden_def (_dl_make_stack_executable)
diff --git a/elf/dl-fptr.c b/elf/dl-fptr.c
new file mode 100644
index 0000000..78beecf
--- /dev/null
+++ b/elf/dl-fptr.c
@@ -0,0 +1,323 @@
+/* Manage function descriptors. Generic version.
+ Copyright (C) 1999,2000,2001,2002,2003,2004 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 <libintl.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/param.h>
+#include <sys/mman.h>
+#include <link.h>
+#include <ldsodefs.h>
+#include <elf/dynamic-link.h>
+#include <dl-fptr.h>
+#include <atomic.h>
+
+#ifndef ELF_MACHINE_BOOT_FPTR_TABLE_LEN
+/* ELF_MACHINE_BOOT_FPTR_TABLE_LEN should be greater than the number of
+ dynamic symbols in ld.so. */
+# define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 256
+#endif
+
+#ifndef ELF_MACHINE_LOAD_ADDRESS
+# error "ELF_MACHINE_LOAD_ADDRESS is not defined."
+#endif
+
+#ifndef COMPARE_AND_SWAP
+# define COMPARE_AND_SWAP(ptr, old, new) \
+ (atomic_compare_and_exchange_bool_acq (ptr, new, old) == 0)
+#endif
+
+ElfW(Addr) _dl_boot_fptr_table [ELF_MACHINE_BOOT_FPTR_TABLE_LEN];
+
+static struct local
+ {
+ struct fdesc_table *root;
+ struct fdesc *free_list;
+ unsigned int npages; /* # of pages to allocate */
+ /* the next to members MUST be consecutive! */
+ struct fdesc_table boot_table;
+ struct fdesc boot_fdescs[1024];
+ }
+local =
+ {
+ .root = &local.boot_table,
+ .npages = 2,
+ .boot_table =
+ {
+ .len = sizeof (local.boot_fdescs) / sizeof (local.boot_fdescs[0]),
+ .first_unused = 0
+ }
+ };
+
+/* Create a new fdesc table and return a pointer to the first fdesc
+ entry. The fdesc lock must have been acquired already. */
+
+static struct fdesc_table *
+new_fdesc_table (struct local *l, size_t *size)
+{
+ size_t old_npages = l->npages;
+ size_t new_npages = old_npages + old_npages;
+ struct fdesc_table *new_table;
+
+ /* If someone has just created a new table, we return NULL to tell
+ the caller to use the new table. */
+ if (! COMPARE_AND_SWAP (&l->npages, old_npages, new_npages))
+ return (struct fdesc_table *) NULL;
+
+ *size = old_npages * GLRO(dl_pagesize);
+ new_table = __mmap (NULL, *size,
+ PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
+ if (new_table == MAP_FAILED)
+ _dl_signal_error (errno, NULL, NULL,
+ N_("cannot map pages for fdesc table"));
+
+ new_table->len
+ = (*size - sizeof (*new_table)) / sizeof (struct fdesc);
+ new_table->first_unused = 1;
+ return new_table;
+}
+
+
+static ElfW(Addr)
+make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp)
+{
+ struct fdesc *fdesc = NULL;
+ struct fdesc_table *root;
+ unsigned int old;
+ struct local *l;
+
+ ELF_MACHINE_LOAD_ADDRESS (l, local);
+
+ retry:
+ root = l->root;
+ while (1)
+ {
+ old = root->first_unused;
+ if (old >= root->len)
+ break;
+ else if (COMPARE_AND_SWAP (&root->first_unused, old, old + 1))
+ {
+ fdesc = &root->fdesc[old];
+ goto install;
+ }
+ }
+
+ if (l->free_list)
+ {
+ /* Get it from free-list. */
+ do
+ {
+ fdesc = l->free_list;
+ if (fdesc == NULL)
+ goto retry;
+ }
+ while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->free_list,
+ (ElfW(Addr)) fdesc, fdesc->ip));
+ }
+ else
+ {
+ /* Create a new fdesc table. */
+ size_t size;
+ struct fdesc_table *new_table = new_fdesc_table (l, &size);
+
+ if (new_table == NULL)
+ goto retry;
+
+ new_table->next = root;
+ if (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->root,
+ (ElfW(Addr)) root,
+ (ElfW(Addr)) new_table))
+ {
+ /* Someone has just installed a new table. Return NULL to
+ tell the caller to use the new table. */
+ __munmap (new_table, size);
+ goto retry;
+ }
+
+ /* Note that the first entry was reserved while allocating the
+ memory for the new page. */
+ fdesc = &new_table->fdesc[0];
+ }
+
+ install:
+ fdesc->ip = ip;
+ fdesc->gp = gp;
+
+ return (ElfW(Addr)) fdesc;
+}
+
+
+static inline ElfW(Addr) * __attribute__ ((always_inline))
+make_fptr_table (struct link_map *map)
+{
+ const ElfW(Sym) *symtab
+ = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
+ const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ ElfW(Addr) *fptr_table;
+ size_t size;
+ size_t len;
+
+ /* XXX Apparently the only way to find out the size of the dynamic
+ symbol section is to assume that the string table follows right
+ afterwards... */
+ len = ((strtab - (char *) symtab)
+ / map->l_info[DT_SYMENT]->d_un.d_val);
+ size = ((len * sizeof (fptr_table[0]) + GLRO(dl_pagesize) - 1)
+ & -GLRO(dl_pagesize));
+ /* XXX We don't support here in the moment systems without MAP_ANON.
+ There probably are none for IA-64. In case this is proven wrong
+ we will have to open /dev/null here and use the file descriptor
+ instead of the hard-coded -1. */
+ fptr_table = __mmap (NULL, size,
+ PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE,
+ -1, 0);
+ if (fptr_table == MAP_FAILED)
+ _dl_signal_error (errno, NULL, NULL,
+ N_("cannot map pages for fptr table"));
+
+ if (COMPARE_AND_SWAP ((ElfW(Addr) *) &map->l_mach.fptr_table,
+ (ElfW(Addr)) NULL, (ElfW(Addr)) fptr_table))
+ map->l_mach.fptr_table_len = len;
+ else
+ __munmap (fptr_table, len * sizeof (fptr_table[0]));
+
+ return map->l_mach.fptr_table;
+}
+
+
+ElfW(Addr)
+_dl_make_fptr (struct link_map *map, const ElfW(Sym) *sym,
+ ElfW(Addr) ip)
+{
+ ElfW(Addr) *ftab = map->l_mach.fptr_table;
+ const ElfW(Sym) *symtab;
+ Elf_Symndx symidx;
+ struct local *l;
+
+ if (__builtin_expect (ftab == NULL, 0))
+ ftab = make_fptr_table (map);
+
+ symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
+ symidx = sym - symtab;
+
+ if (symidx >= map->l_mach.fptr_table_len)
+ _dl_signal_error (0, NULL, NULL,
+ N_("internal error: symidx out of range of fptr table"));
+
+ while (ftab[symidx] == 0)
+ {
+ /* GOT has already been relocated in elf_get_dynamic_info -
+ don't try to relocate it again. */
+ ElfW(Addr) fdesc
+ = make_fdesc (ip, map->l_info[DT_PLTGOT]->d_un.d_ptr);
+
+ if (__builtin_expect (COMPARE_AND_SWAP (&ftab[symidx], (ElfW(Addr)) NULL,
+ fdesc), 1))
+ {
+ /* Noone has updated the entry and the new function
+ descriptor has been installed. */
+#if 0
+ const char *strtab
+ = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+
+ ELF_MACHINE_LOAD_ADDRESS (l, local);
+ if (l->root != &l->boot_table
+ || l->boot_table.first_unused > 20)
+ _dl_debug_printf ("created fdesc symbol `%s' at %lx\n",
+ strtab + sym->st_name, ftab[symidx]);
+#endif
+ break;
+ }
+ else
+ {
+ /* We created a duplicated function descriptor. We put it on
+ free-list. */
+ struct fdesc *f = (struct fdesc *) fdesc;
+
+ ELF_MACHINE_LOAD_ADDRESS (l, local);
+
+ do
+ f->ip = (ElfW(Addr)) l->free_list;
+ while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &l->free_list,
+ f->ip, fdesc));
+ }
+ }
+
+ return ftab[symidx];
+}
+
+
+void
+_dl_unmap (struct link_map *map)
+{
+ ElfW(Addr) *ftab = map->l_mach.fptr_table;
+ struct fdesc *head = NULL, *tail = NULL;
+ size_t i;
+
+ __munmap ((void *) map->l_map_start,
+ map->l_map_end - map->l_map_start);
+
+ if (ftab == NULL)
+ return;
+
+ /* String together the fdesc structures that are being freed. */
+ for (i = 0; i < map->l_mach.fptr_table_len; ++i)
+ {
+ if (ftab[i])
+ {
+ *(struct fdesc **) ftab[i] = head;
+ head = (struct fdesc *) ftab[i];
+ if (tail == NULL)
+ tail = head;
+ }
+ }
+
+ /* Prepend the new list to the free_list: */
+ if (tail)
+ do
+ tail->ip = (ElfW(Addr)) local.free_list;
+ while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &local.free_list,
+ tail->ip, (ElfW(Addr)) head));
+
+ __munmap (ftab, (map->l_mach.fptr_table_len
+ * sizeof (map->l_mach.fptr_table[0])));
+
+ map->l_mach.fptr_table = NULL;
+}
+
+
+ElfW(Addr)
+_dl_lookup_address (const void *address)
+{
+ ElfW(Addr) addr = (ElfW(Addr)) address;
+ struct fdesc_table *t;
+ unsigned long int i;
+
+ for (t = local.root; t != NULL; t = t->next)
+ {
+ i = (struct fdesc *) addr - &t->fdesc[0];
+ if (i < t->first_unused && addr == (ElfW(Addr)) &t->fdesc[i])
+ {
+ addr = t->fdesc[i].ip;
+ break;
+ }
+ }
+
+ return addr;
+}
diff --git a/elf/dl-origin.c b/elf/dl-origin.c
new file mode 100644
index 0000000..8761937
--- /dev/null
+++ b/elf/dl-origin.c
@@ -0,0 +1,51 @@
+/* Find path of executable.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 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.
+
+ 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 <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+#include <ldsodefs.h>
+
+#include <dl-dst.h>
+
+
+const char *
+_dl_get_origin (void)
+{
+ char *result = (char *) -1;
+ /* We use the environment variable LD_ORIGIN_PATH. If it is set make
+ a copy and strip out trailing slashes. */
+ if (GLRO(dl_origin_path) != NULL)
+ {
+ size_t len = strlen (GLRO(dl_origin_path));
+ result = (char *) malloc (len + 1);
+ if (result == NULL)
+ result = (char *) -1;
+ else
+ {
+ char *cp = __mempcpy (result, GLRO(dl_origin_path), len);
+ while (cp > result + 1 && cp[-1] == '/')
+ --cp;
+ *cp = '\0';
+ }
+ }
+
+ return result;
+}
diff --git a/elf/dl-sbrk.c b/elf/dl-sbrk.c
new file mode 100644
index 0000000..4713a92
--- /dev/null
+++ b/elf/dl-sbrk.c
@@ -0,0 +1,5 @@
+/* We can use the normal code but we also know the __curbrk is not exported
+ from ld.so. */
+extern void *__curbrk attribute_hidden;
+
+#include <sbrk.c>
diff --git a/elf/dl-symaddr.c b/elf/dl-symaddr.c
new file mode 100644
index 0000000..3c850ca
--- /dev/null
+++ b/elf/dl-symaddr.c
@@ -0,0 +1,33 @@
+/* Get the symbol address. Generic version.
+ Copyright (C) 1999, 2000, 2001, 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 <ldsodefs.h>
+#include <dl-fptr.h>
+
+void *
+_dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref)
+{
+ ElfW(Addr) value = (map ? map->l_addr : 0) + ref->st_value;
+
+ /* Return the pointer to function descriptor. */
+ if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC)
+ return (void *) _dl_make_fptr (map, ref, value);
+ else
+ return (void *) value;
+}
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
new file mode 100644
index 0000000..985e2b8
--- /dev/null
+++ b/elf/dl-sysdep.c
@@ -0,0 +1,590 @@
+/* Operating system support for run-time dynamic linker. Generic Unix version.
+ Copyright (C) 1995-1998, 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
+ 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 <assert.h>
+#include <elf.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <libintl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <ldsodefs.h>
+#include <stdio-common/_itoa.h>
+#include <fpu_control.h>
+
+#include <entry.h>
+#include <dl-machine.h>
+#include <dl-procinfo.h>
+#include <dl-osinfo.h>
+#include <hp-timing.h>
+#include <tls.h>
+
+#ifdef _DL_FIRST_PLATFORM
+# define _DL_FIRST_EXTRA (_DL_FIRST_PLATFORM + _DL_PLATFORMS_COUNT)
+#else
+# define _DL_FIRST_EXTRA _DL_HWCAP_COUNT
+#endif
+
+extern char **_environ attribute_hidden;
+extern void _end attribute_hidden;
+
+/* Protect SUID program against misuse of file descriptors. */
+extern void __libc_check_standard_fds (void);
+
+#ifdef NEED_DL_BASE_ADDR
+ElfW(Addr) _dl_base_addr;
+#endif
+int __libc_enable_secure attribute_relro = 0;
+INTVARDEF(__libc_enable_secure)
+int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
+ of init-first. */
+/* This variable contains the lowest stack address ever used. */
+void *__libc_stack_end attribute_relro = NULL;
+rtld_hidden_data_def(__libc_stack_end)
+static ElfW(auxv_t) *_dl_auxv attribute_relro;
+
+#ifndef DL_FIND_ARG_COMPONENTS
+# define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \
+ do { \
+ void **_tmp; \
+ (argc) = *(long int *) cookie; \
+ (argv) = (char **) ((long int *) cookie + 1); \
+ (envp) = (argv) + (argc) + 1; \
+ for (_tmp = (void **) (envp); *_tmp; ++_tmp) \
+ continue; \
+ (auxp) = (void *) ++_tmp; \
+ } while (0)
+#endif
+
+#ifndef DL_STACK_END
+# define DL_STACK_END(cookie) ((void *) (cookie))
+#endif
+
+ElfW(Addr)
+_dl_sysdep_start (void **start_argptr,
+ void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phnum,
+ ElfW(Addr) *user_entry))
+{
+ const ElfW(Phdr) *phdr = NULL;
+ ElfW(Word) phnum = 0;
+ ElfW(Addr) user_entry;
+ ElfW(auxv_t) *av;
+#ifdef HAVE_AUX_SECURE
+# define set_seen(tag) (tag) /* Evaluate for the side effects. */
+# define set_seen_secure() ((void) 0)
+#else
+ uid_t uid = 0;
+ gid_t gid = 0;
+ unsigned int seen = 0;
+# define set_seen_secure() (seen = -1)
+# ifdef HAVE_AUX_XID
+# define set_seen(tag) (tag) /* Evaluate for the side effects. */
+# else
+# define M(type) (1 << (type))
+# define set_seen(tag) seen |= M ((tag)->a_type)
+# endif
+#endif
+#ifdef NEED_DL_SYSINFO
+ uintptr_t new_sysinfo = 0;
+#endif
+
+ __libc_stack_end = DL_STACK_END (start_argptr);
+ DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, INTUSE(_dl_argv), _environ,
+ _dl_auxv);
+
+ user_entry = (ElfW(Addr)) ENTRY_POINT;
+ GLRO(dl_platform) = NULL; /* Default to nothing known about the platform. */
+
+ for (av = _dl_auxv; av->a_type != AT_NULL; set_seen (av++))
+ switch (av->a_type)
+ {
+ case AT_PHDR:
+ phdr = (void *) av->a_un.a_val;
+ break;
+ case AT_PHNUM:
+ phnum = av->a_un.a_val;
+ break;
+ case AT_PAGESZ:
+ GLRO(dl_pagesize) = av->a_un.a_val;
+ break;
+ case AT_ENTRY:
+ user_entry = av->a_un.a_val;
+ break;
+#ifdef NEED_DL_BASE_ADDR
+ case AT_BASE:
+ _dl_base_addr = av->a_un.a_val;
+ break;
+#endif
+#ifndef HAVE_AUX_SECURE
+ case AT_UID:
+ case AT_EUID:
+ uid ^= av->a_un.a_val;
+ break;
+ case AT_GID:
+ case AT_EGID:
+ gid ^= av->a_un.a_val;
+ break;
+#endif
+ case AT_SECURE:
+#ifndef HAVE_AUX_SECURE
+ seen = -1;
+#endif
+ INTUSE(__libc_enable_secure) = av->a_un.a_val;
+ break;
+ case AT_PLATFORM:
+ GLRO(dl_platform) = (void *) av->a_un.a_val;
+ break;
+ case AT_HWCAP:
+ GLRO(dl_hwcap) = (unsigned long int) av->a_un.a_val;
+ break;
+ case AT_CLKTCK:
+ GLRO(dl_clktck) = av->a_un.a_val;
+ break;
+ case AT_FPUCW:
+ GLRO(dl_fpu_control) = av->a_un.a_val;
+ break;
+#ifdef NEED_DL_SYSINFO
+ case AT_SYSINFO:
+ new_sysinfo = av->a_un.a_val;
+ break;
+#endif
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+ case AT_SYSINFO_EHDR:
+ GLRO(dl_sysinfo_dso) = (void *) av->a_un.a_val;
+ break;
+#endif
+#ifdef DL_PLATFORM_AUXV
+ DL_PLATFORM_AUXV
+#endif
+ }
+
+#ifndef HAVE_AUX_SECURE
+ if (seen != -1)
+ {
+ /* Fill in the values we have not gotten from the kernel through the
+ auxiliary vector. */
+# ifndef HAVE_AUX_XID
+# define SEE(UID, var, uid) \
+ if ((seen & M (AT_##UID)) == 0) var ^= __get##uid ()
+ SEE (UID, uid, uid);
+ SEE (EUID, uid, euid);
+ SEE (GID, gid, gid);
+ SEE (EGID, gid, egid);
+# endif
+
+ /* If one of the two pairs of IDs does not match this is a setuid
+ or setgid run. */
+ INTUSE(__libc_enable_secure) = uid | gid;
+ }
+#endif
+
+#ifndef HAVE_AUX_PAGESIZE
+ if (GLRO(dl_pagesize) == 0)
+ GLRO(dl_pagesize) = __getpagesize ();
+#endif
+
+#if defined NEED_DL_SYSINFO
+ /* Only set the sysinfo value if we also have the vsyscall DSO. */
+ if (GLRO(dl_sysinfo_dso) != 0 && new_sysinfo)
+ GLRO(dl_sysinfo) = new_sysinfo;
+#endif
+
+#ifdef DL_SYSDEP_INIT
+ DL_SYSDEP_INIT;
+#endif
+
+#ifdef DL_PLATFORM_INIT
+ DL_PLATFORM_INIT;
+#endif
+
+ /* Determine the length of the platform name. */
+ if (GLRO(dl_platform) != NULL)
+ GLRO(dl_platformlen) = strlen (GLRO(dl_platform));
+
+ if (__sbrk (0) == &_end)
+ /* The dynamic linker was run as a program, and so the initial break
+ starts just after our bss, at &_end. The malloc in dl-minimal.c
+ will consume the rest of this page, so tell the kernel to move the
+ break up that far. When the user program examines its break, it
+ will see this new value and not clobber our data. */
+ __sbrk (GLRO(dl_pagesize)
+ - ((&_end - (void *) 0) & (GLRO(dl_pagesize) - 1)));
+
+ /* If this is a SUID program we make sure that FDs 0, 1, and 2 are
+ allocated. If necessary we are doing it ourself. If it is not
+ possible we stop the program. */
+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
+ __libc_check_standard_fds ();
+
+ (*dl_main) (phdr, phnum, &user_entry);
+ return user_entry;
+}
+
+void
+internal_function
+_dl_sysdep_start_cleanup (void)
+{
+}
+
+void
+internal_function
+_dl_show_auxv (void)
+{
+ char buf[64];
+ ElfW(auxv_t) *av;
+
+ /* Terminate string. */
+ buf[63] = '\0';
+
+ /* The following code assumes that the AT_* values are encoded
+ starting from 0 with AT_NULL, 1 for AT_IGNORE, and all other values
+ close by (otherwise the array will be too large). In case we have
+ to support a platform where these requirements are not fulfilled
+ some alternative implementation has to be used. */
+ for (av = _dl_auxv; av->a_type != AT_NULL; ++av)
+ {
+ static const struct
+ {
+ const char label[20];
+ enum { unknown = 0, dec, hex, str, ignore } form;
+ } auxvars[] =
+ {
+ [AT_EXECFD - 2] = { "AT_EXECFD: ", dec },
+ [AT_PHDR - 2] = { "AT_PHDR: 0x", hex },
+ [AT_PHENT - 2] = { "AT_PHENT: ", dec },
+ [AT_PHNUM - 2] = { "AT_PHNUM: ", dec },
+ [AT_PAGESZ - 2] = { "AT_PAGESZ: ", dec },
+ [AT_BASE - 2] = { "AT_BASE: 0x", hex },
+ [AT_FLAGS - 2] = { "AT_FLAGS: 0x", hex },
+ [AT_ENTRY - 2] = { "AT_ENTRY: 0x", hex },
+ [AT_NOTELF - 2] = { "AT_NOTELF: ", hex },
+ [AT_UID - 2] = { "AT_UID: ", dec },
+ [AT_EUID - 2] = { "AT_EUID: ", dec },
+ [AT_GID - 2] = { "AT_GID: ", dec },
+ [AT_EGID - 2] = { "AT_EGID: ", dec },
+ [AT_PLATFORM - 2] = { "AT_PLATFORM: ", str },
+ [AT_HWCAP - 2] = { "AT_HWCAP: ", hex },
+ [AT_CLKTCK - 2] = { "AT_CLKTCK: ", dec },
+ [AT_FPUCW - 2] = { "AT_FPUCW: ", hex },
+ [AT_DCACHEBSIZE - 2] = { "AT_DCACHEBSIZE: 0x", hex },
+ [AT_ICACHEBSIZE - 2] = { "AT_ICACHEBSIZE: 0x", hex },
+ [AT_UCACHEBSIZE - 2] = { "AT_UCACHEBSIZE: 0x", hex },
+ [AT_IGNOREPPC - 2] = { "AT_IGNOREPPC", ignore },
+ [AT_SECURE - 2] = { "AT_SECURE: ", dec },
+ [AT_SYSINFO - 2] = { "AT_SYSINFO: 0x", hex },
+ [AT_SYSINFO_EHDR - 2] = { "AT_SYSINFO_EHDR: 0x", hex },
+ };
+ unsigned int idx = (unsigned int) (av->a_type - 2);
+
+ if ((unsigned int) av->a_type < 2u || auxvars[idx].form == ignore)
+ continue;
+
+ assert (AT_NULL == 0);
+ assert (AT_IGNORE == 1);
+
+ if (av->a_type == AT_HWCAP)
+ {
+ /* This is handled special. */
+ if (_dl_procinfo (av->a_un.a_val) == 0)
+ continue;
+ }
+
+ if (idx < sizeof (auxvars) / sizeof (auxvars[0])
+ && auxvars[idx].form != unknown)
+ {
+ const char *val = (char *) av->a_un.a_val;
+
+ if (__builtin_expect (auxvars[idx].form, dec) == dec)
+ val = _itoa ((unsigned long int) av->a_un.a_val,
+ buf + sizeof buf - 1, 10, 0);
+ else if (__builtin_expect (auxvars[idx].form, hex) == hex)
+ val = _itoa ((unsigned long int) av->a_un.a_val,
+ buf + sizeof buf - 1, 16, 0);
+
+ _dl_printf ("%s%s\n", auxvars[idx].label, val);
+
+ continue;
+ }
+
+ /* Unknown value: print a generic line. */
+ char buf2[17];
+ buf[sizeof (buf2) - 1] = '\0';
+ const char *val2 = _itoa ((unsigned long int) av->a_un.a_val,
+ buf2 + sizeof buf2 - 1, 16, 0);
+ const char *val = _itoa ((unsigned long int) av->a_type,
+ buf + sizeof buf - 1, 16, 0);
+ _dl_printf ("AT_??? (0x%s): 0x%s\n", val, val2);
+ }
+}
+
+
+/* Return an array of useful/necessary hardware capability names. */
+const struct r_strlenpair *
+internal_function
+_dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
+ size_t *max_capstrlen)
+{
+ /* Determine how many important bits are set. */
+ uint64_t masked = GLRO(dl_hwcap) & GLRO(dl_hwcap_mask);
+ size_t cnt = platform != NULL;
+ size_t n, m;
+ size_t total;
+ struct r_strlenpair *temp;
+ struct r_strlenpair *result;
+ struct r_strlenpair *rp;
+ char *cp;
+
+ /* Count the number of bits set in the masked value. */
+ for (n = 0; (~((1ULL << n) - 1) & masked) != 0; ++n)
+ if ((masked & (1ULL << n)) != 0)
+ ++cnt;
+
+#if (defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO) && defined SHARED
+ /* The system-supplied DSO can contain a note of type 2, vendor "GNU".
+ This gives us a list of names to treat as fake hwcap bits. */
+
+ const char *dsocaps = NULL;
+ size_t dsocapslen = 0;
+ if (GLRO(dl_sysinfo_map) != NULL)
+ {
+ const ElfW(Phdr) *const phdr = GLRO(dl_sysinfo_map)->l_phdr;
+ const ElfW(Word) phnum = GLRO(dl_sysinfo_map)->l_phnum;
+ for (uint_fast16_t i = 0; i < phnum; ++i)
+ if (phdr[i].p_type == PT_NOTE)
+ {
+ const ElfW(Addr) start = (phdr[i].p_vaddr
+ + GLRO(dl_sysinfo_map)->l_addr);
+ const struct
+ {
+ ElfW(Word) vendorlen;
+ ElfW(Word) datalen;
+ ElfW(Word) type;
+ } *note = (const void *) start;
+ while ((ElfW(Addr)) (note + 1) - start < phdr[i].p_memsz)
+ {
+#define ROUND(len) (((len) + sizeof (ElfW(Word)) - 1) & -sizeof (ElfW(Word)))
+ if (note->type == 2
+ && note->vendorlen == sizeof "GNU"
+ && !memcmp ((note + 1), "GNU", sizeof "GNU")
+ && note->datalen > 2 * sizeof (ElfW(Word)) + 2)
+ {
+ const ElfW(Word) *p = ((const void *) (note + 1)
+ + ROUND (sizeof "GNU"));
+ cnt += *p++;
+ ++p; /* Skip mask word. */
+ dsocaps = (const char *) p;
+ dsocapslen = note->datalen - sizeof *p * 2;
+ break;
+ }
+ note = ((const void *) (note + 1)
+ + ROUND (note->vendorlen) + ROUND (note->datalen));
+ }
+ if (dsocaps != NULL)
+ break;
+ }
+ }
+#endif
+
+#ifdef USE_TLS
+ /* For TLS enabled builds always add 'tls'. */
+ ++cnt;
+#else
+ if (cnt == 0)
+ {
+ /* If we no have platform name and no important capability we only
+ have the base directory to search. */
+ result = (struct r_strlenpair *) malloc (sizeof (*result));
+ if (result == NULL)
+ goto no_memory;
+
+ result[0].str = (char *) result; /* Does not really matter. */
+ result[0].len = 0;
+
+ *sz = 1;
+ return result;
+ }
+#endif
+
+ /* Create temporary data structure to generate result table. */
+ temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
+ m = 0;
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+ if (dsocaps != NULL)
+ {
+ const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];
+ GLRO(dl_hwcap) |= (uint64_t) mask << _DL_FIRST_EXTRA;
+ size_t len;
+ for (const char *p = dsocaps; p < dsocaps + dsocapslen; p += len + 1)
+ {
+ uint_fast8_t bit = *p++;
+ len = strlen (p);
+
+ /* Skip entries that are not enabled in the mask word. */
+ if (__builtin_expect (mask & ((ElfW(Word)) 1 << bit), 1))
+ {
+ temp[m].str = p;
+ temp[m].len = len;
+ ++m;
+ }
+ else
+ --cnt;
+ }
+ }
+#endif
+ for (n = 0; masked != 0; ++n)
+ if ((masked & (1ULL << n)) != 0)
+ {
+ temp[m].str = _dl_hwcap_string (n);
+ temp[m].len = strlen (temp[m].str);
+ masked ^= 1ULL << n;
+ ++m;
+ }
+ if (platform != NULL)
+ {
+ temp[m].str = platform;
+ temp[m].len = platform_len;
+ ++m;
+ }
+#ifdef USE_TLS
+ temp[m].str = "tls";
+ temp[m].len = 3;
+ ++m;
+#endif
+ assert (m == cnt);
+
+ /* Determine the total size of all strings together. */
+ if (cnt == 1)
+ total = temp[0].len + 1;
+ else
+ {
+ total = (1UL << (cnt - 2)) * (temp[0].len + temp[cnt - 1].len + 2);
+ for (n = 1; n + 1 < cnt; ++n)
+ total += (1UL << (cnt - 3)) * (temp[n].len + 1);
+ }
+
+ /* The result structure: we use a very compressed way to store the
+ various combinations of capability names. */
+ *sz = 1 << cnt;
+ result = (struct r_strlenpair *) malloc (*sz * sizeof (*result) + total);
+ if (result == NULL)
+ {
+#ifndef USE_TLS
+ no_memory:
+#endif
+ _dl_signal_error (ENOMEM, NULL, NULL,
+ N_("cannot create capability list"));
+ }
+
+ if (cnt == 1)
+ {
+ result[0].str = (char *) (result + *sz);
+ result[0].len = temp[0].len + 1;
+ result[1].str = (char *) (result + *sz);
+ result[1].len = 0;
+ cp = __mempcpy ((char *) (result + *sz), temp[0].str, temp[0].len);
+ *cp = '/';
+ *sz = 2;
+ *max_capstrlen = result[0].len;
+
+ return result;
+ }
+
+ /* Fill in the information. This follows the following scheme
+ (indeces from TEMP for four strings):
+ entry #0: 0, 1, 2, 3 binary: 1111
+ #1: 0, 1, 3 1101
+ #2: 0, 2, 3 1011
+ #3: 0, 3 1001
+ This allows the representation of all possible combinations of
+ capability names in the string. First generate the strings. */
+ result[1].str = result[0].str = cp = (char *) (result + *sz);
+#define add(idx) \
+ cp = __mempcpy (__mempcpy (cp, temp[idx].str, temp[idx].len), "/", 1);
+ if (cnt == 2)
+ {
+ add (1);
+ add (0);
+ }
+ else
+ {
+ n = 1 << (cnt - 1);
+ do
+ {
+ n -= 2;
+
+ /* We always add the last string. */
+ add (cnt - 1);
+
+ /* Add the strings which have the bit set in N. */
+ for (m = cnt - 2; m > 0; --m)
+ if ((n & (1 << m)) != 0)
+ add (m);
+
+ /* Always add the first string. */
+ add (0);
+ }
+ while (n != 0);
+ }
+#undef add
+
+ /* Now we are ready to install the string pointers and length. */
+ for (n = 0; n < (1UL << cnt); ++n)
+ result[n].len = 0;
+ n = cnt;
+ do
+ {
+ size_t mask = 1 << --n;
+
+ rp = result;
+ for (m = 1 << cnt; m > 0; ++rp)
+ if ((--m & mask) != 0)
+ rp->len += temp[n].len + 1;
+ }
+ while (n != 0);
+
+ /* The first half of the strings all include the first string. */
+ n = (1 << cnt) - 2;
+ rp = &result[2];
+ while (n != (1UL << (cnt - 1)))
+ {
+ if ((--n & 1) != 0)
+ rp[0].str = rp[-2].str + rp[-2].len;
+ else
+ rp[0].str = rp[-1].str;
+ ++rp;
+ }
+
+ /* The second half starts right after the first part of the string of
+ the corresponding entry in the first half. */
+ do
+ {
+ rp[0].str = rp[-(1 << (cnt - 1))].str + temp[cnt - 1].len + 1;
+ ++rp;
+ }
+ while (--n != 0);
+
+ /* The maximum string length. */
+ *max_capstrlen = result[0].len;
+
+ return result;
+}
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
new file mode 100644
index 0000000..4fed570
--- /dev/null
+++ b/elf/dl-tls.c
@@ -0,0 +1,799 @@
+/* Thread-local storage handling in the ELF dynamic linker. Generic version.
+ 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
+ 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 <assert.h>
+#include <errno.h>
+#include <libintl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/param.h>
+
+#include <tls.h>
+
+/* We don't need any of this if TLS is not supported. */
+#ifdef USE_TLS
+
+# include <dl-tls.h>
+# include <ldsodefs.h>
+
+/* Amount of excess space to allocate in the static TLS area
+ to allow dynamic loading of modules defining IE-model TLS data. */
+# define TLS_STATIC_SURPLUS 64 + DL_NNS * 100
+
+/* Value used for dtv entries for which the allocation is delayed. */
+# define TLS_DTV_UNALLOCATED ((void *) -1l)
+
+
+/* Out-of-memory handler. */
+# ifdef SHARED
+static void
+__attribute__ ((__noreturn__))
+oom (void)
+{
+ _dl_fatal_printf ("cannot allocate memory for thread-local data: ABORT\n");
+}
+# endif
+
+
+size_t
+internal_function
+_dl_next_tls_modid (void)
+{
+ size_t result;
+
+ if (__builtin_expect (GL(dl_tls_dtv_gaps), false))
+ {
+ size_t disp = 0;
+ struct dtv_slotinfo_list *runp = GL(dl_tls_dtv_slotinfo_list);
+
+ /* Note that this branch will never be executed during program
+ start since there are no gaps at that time. Therefore it
+ does not matter that the dl_tls_dtv_slotinfo is not allocated
+ yet when the function is called for the first times.
+
+ NB: the offset +1 is due to the fact that DTV[0] is used
+ for something else. */
+ result = GL(dl_tls_static_nelem) + 1;
+ if (result <= GL(dl_tls_max_dtv_idx))
+ do
+ {
+ while (result - disp < runp->len)
+ {
+ if (runp->slotinfo[result - disp].map == NULL)
+ break;
+
+ ++result;
+ assert (result <= GL(dl_tls_max_dtv_idx) + 1);
+ }
+
+ if (result - disp < runp->len)
+ break;
+
+ disp += runp->len;
+ }
+ while ((runp = runp->next) != NULL);
+
+ if (result > GL(dl_tls_max_dtv_idx))
+ {
+ /* The new index must indeed be exactly one higher than the
+ previous high. */
+ assert (result == GL(dl_tls_max_dtv_idx) + 1);
+ /* There is no gap anymore. */
+ GL(dl_tls_dtv_gaps) = false;
+
+ goto nogaps;
+ }
+ }
+ else
+ {
+ /* No gaps, allocate a new entry. */
+ nogaps:
+
+ result = ++GL(dl_tls_max_dtv_idx);
+ }
+
+ return result;
+}
+
+
+# ifdef SHARED
+void
+internal_function
+_dl_determine_tlsoffset (void)
+{
+ size_t max_align = TLS_TCB_ALIGN;
+ size_t freetop = 0;
+ size_t freebottom = 0;
+
+ /* The first element of the dtv slot info list is allocated. */
+ assert (GL(dl_tls_dtv_slotinfo_list) != NULL);
+ /* There is at this point only one element in the
+ dl_tls_dtv_slotinfo_list list. */
+ assert (GL(dl_tls_dtv_slotinfo_list)->next == NULL);
+
+ struct dtv_slotinfo *slotinfo = GL(dl_tls_dtv_slotinfo_list)->slotinfo;
+
+ /* Determining the offset of the various parts of the static TLS
+ block has several dependencies. In addition we have to work
+ around bugs in some toolchains.
+
+ Each TLS block from the objects available at link time has a size
+ and an alignment requirement. The GNU ld computes the alignment
+ requirements for the data at the positions *in the file*, though.
+ I.e, it is not simply possible to allocate a block with the size
+ of the TLS program header entry. The data is layed out assuming
+ that the first byte of the TLS block fulfills
+
+ p_vaddr mod p_align == &TLS_BLOCK mod p_align
+
+ This means we have to add artificial padding at the beginning of
+ the TLS block. These bytes are never used for the TLS data in
+ this module but the first byte allocated must be aligned
+ according to mod p_align == 0 so that the first byte of the TLS
+ block is aligned according to p_vaddr mod p_align. This is ugly
+ and the linker can help by computing the offsets in the TLS block
+ assuming the first byte of the TLS block is aligned according to
+ p_align.
+
+ The extra space which might be allocated before the first byte of
+ the TLS block need not go unused. The code below tries to use
+ that memory for the next TLS block. This can work if the total
+ memory requirement for the next TLS block is smaller than the
+ gap. */
+
+# if TLS_TCB_AT_TP
+ /* We simply start with zero. */
+ size_t offset = 0;
+
+ for (size_t cnt = 0; slotinfo[cnt].map != NULL; ++cnt)
+ {
+ assert (cnt < GL(dl_tls_dtv_slotinfo_list)->len);
+
+ size_t firstbyte = (-slotinfo[cnt].map->l_tls_firstbyte_offset
+ & (slotinfo[cnt].map->l_tls_align - 1));
+ size_t off;
+ max_align = MAX (max_align, slotinfo[cnt].map->l_tls_align);
+
+ if (freebottom - freetop >= slotinfo[cnt].map->l_tls_blocksize)
+ {
+ off = roundup (freetop + slotinfo[cnt].map->l_tls_blocksize
+ - firstbyte, slotinfo[cnt].map->l_tls_align)
+ + firstbyte;
+ if (off <= freebottom)
+ {
+ freetop = off;
+
+ /* XXX For some architectures we perhaps should store the
+ negative offset. */
+ slotinfo[cnt].map->l_tls_offset = off;
+ continue;
+ }
+ }
+
+ off = roundup (offset + slotinfo[cnt].map->l_tls_blocksize - firstbyte,
+ slotinfo[cnt].map->l_tls_align) + firstbyte;
+ if (off > offset + slotinfo[cnt].map->l_tls_blocksize
+ + (freebottom - freetop))
+ {
+ freetop = offset;
+ freebottom = off - slotinfo[cnt].map->l_tls_blocksize;
+ }
+ offset = off;
+
+ /* XXX For some architectures we perhaps should store the
+ negative offset. */
+ slotinfo[cnt].map->l_tls_offset = off;
+ }
+
+ GL(dl_tls_static_used) = offset;
+ GL(dl_tls_static_size) = (roundup (offset + TLS_STATIC_SURPLUS, max_align)
+ + TLS_TCB_SIZE);
+# elif TLS_DTV_AT_TP
+ /* The TLS blocks start right after the TCB. */
+ size_t offset = TLS_TCB_SIZE;
+
+ for (size_t cnt = 0; slotinfo[cnt].map != NULL; ++cnt)
+ {
+ assert (cnt < GL(dl_tls_dtv_slotinfo_list)->len);
+
+ size_t firstbyte = (-slotinfo[cnt].map->l_tls_firstbyte_offset
+ & (slotinfo[cnt].map->l_tls_align - 1));
+ size_t off;
+ max_align = MAX (max_align, slotinfo[cnt].map->l_tls_align);
+
+ if (slotinfo[cnt].map->l_tls_blocksize <= freetop - freebottom)
+ {
+ off = roundup (freebottom, slotinfo[cnt].map->l_tls_align);
+ if (off - freebottom < firstbyte)
+ off += slotinfo[cnt].map->l_tls_align;
+ if (off + slotinfo[cnt].map->l_tls_blocksize - firstbyte <= freetop)
+ {
+ slotinfo[cnt].map->l_tls_offset = off - firstbyte;
+ freebottom = (off + slotinfo[cnt].map->l_tls_blocksize
+ - firstbyte);
+ continue;
+ }
+ }
+
+ off = roundup (offset, slotinfo[cnt].map->l_tls_align);
+ if (off - offset < firstbyte)
+ off += slotinfo[cnt].map->l_tls_align;
+
+ slotinfo[cnt].map->l_tls_offset = off - firstbyte;
+ if (off - firstbyte - offset > freetop - freebottom)
+ {
+ freebottom = offset;
+ freetop = off - firstbyte;
+ }
+
+ offset = off + slotinfo[cnt].map->l_tls_blocksize - firstbyte;
+ }
+
+ GL(dl_tls_static_used) = offset;
+ GL(dl_tls_static_size) = roundup (offset + TLS_STATIC_SURPLUS,
+ TLS_TCB_ALIGN);
+# else
+# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
+# endif
+
+ /* The alignment requirement for the static TLS block. */
+ GL(dl_tls_static_align) = max_align;
+}
+
+
+/* This is called only when the data structure setup was skipped at startup,
+ when there was no need for it then. Now we have dynamically loaded
+ something needing TLS, or libpthread needs it. */
+int
+internal_function
+_dl_tls_setup (void)
+{
+ assert (GL(dl_tls_dtv_slotinfo_list) == NULL);
+ assert (GL(dl_tls_max_dtv_idx) == 0);
+
+ const size_t nelem = 2 + TLS_SLOTINFO_SURPLUS;
+
+ GL(dl_tls_dtv_slotinfo_list)
+ = calloc (1, (sizeof (struct dtv_slotinfo_list)
+ + nelem * sizeof (struct dtv_slotinfo)));
+ if (GL(dl_tls_dtv_slotinfo_list) == NULL)
+ return -1;
+
+ GL(dl_tls_dtv_slotinfo_list)->len = nelem;
+
+ /* Number of elements in the static TLS block. It can't be zero
+ because of various assumptions. The one element is null. */
+ GL(dl_tls_static_nelem) = GL(dl_tls_max_dtv_idx) = 1;
+
+ /* This initializes more variables for us. */
+ _dl_determine_tlsoffset ();
+
+ return 0;
+}
+rtld_hidden_def (_dl_tls_setup)
+# endif
+
+static void *
+internal_function
+allocate_dtv (void *result)
+{
+ dtv_t *dtv;
+ size_t dtv_length;
+
+ /* We allocate a few more elements in the dtv than are needed for the
+ initial set of modules. This should avoid in most cases expansions
+ of the dtv. */
+ dtv_length = GL(dl_tls_max_dtv_idx) + DTV_SURPLUS;
+ dtv = calloc (dtv_length + 2, sizeof (dtv_t));
+ if (dtv != NULL)
+ {
+ /* This is the initial length of the dtv. */
+ dtv[0].counter = dtv_length;
+
+ /* The rest of the dtv (including the generation counter) is
+ Initialize with zero to indicate nothing there. */
+
+ /* Add the dtv to the thread data structures. */
+ INSTALL_DTV (result, dtv);
+ }
+ else
+ result = NULL;
+
+ return result;
+}
+
+
+/* Get size and alignment requirements of the static TLS block. */
+void
+internal_function
+_dl_get_tls_static_info (size_t *sizep, size_t *alignp)
+{
+ *sizep = GL(dl_tls_static_size);
+ *alignp = GL(dl_tls_static_align);
+}
+
+
+void *
+internal_function
+_dl_allocate_tls_storage (void)
+{
+ void *result;
+ size_t size = GL(dl_tls_static_size);
+
+# if TLS_DTV_AT_TP
+ /* Memory layout is:
+ [ TLS_PRE_TCB_SIZE ] [ TLS_TCB_SIZE ] [ TLS blocks ]
+ ^ This should be returned. */
+ size += (TLS_PRE_TCB_SIZE + GL(dl_tls_static_align) - 1)
+ & ~(GL(dl_tls_static_align) - 1);
+# endif
+
+ /* Allocate a correctly aligned chunk of memory. */
+ result = __libc_memalign (GL(dl_tls_static_align), size);
+ if (__builtin_expect (result != NULL, 1))
+ {
+ /* Allocate the DTV. */
+ void *allocated = result;
+
+# if TLS_TCB_AT_TP
+ /* The TCB follows the TLS blocks. */
+ result = (char *) result + size - TLS_TCB_SIZE;
+
+ /* Clear the TCB data structure. We can't ask the caller (i.e.
+ libpthread) to do it, because we will initialize the DTV et al. */
+ memset (result, '\0', TLS_TCB_SIZE);
+# elif TLS_DTV_AT_TP
+ result = (char *) result + size - GL(dl_tls_static_size);
+
+ /* Clear the TCB data structure and TLS_PRE_TCB_SIZE bytes before it.
+ We can't ask the caller (i.e. libpthread) to do it, because we will
+ initialize the DTV et al. */
+ memset ((char *) result - TLS_PRE_TCB_SIZE, '\0',
+ TLS_PRE_TCB_SIZE + TLS_TCB_SIZE);
+# endif
+
+ result = allocate_dtv (result);
+ if (result == NULL)
+ free (allocated);
+ }
+
+ return result;
+}
+
+
+void *
+internal_function
+_dl_allocate_tls_init (void *result)
+{
+ if (result == NULL)
+ /* The memory allocation failed. */
+ return NULL;
+
+ dtv_t *dtv = GET_DTV (result);
+ struct dtv_slotinfo_list *listp;
+ size_t total = 0;
+ size_t maxgen = 0;
+
+ /* We have to prepare the dtv for all currently loaded modules using
+ TLS. For those which are dynamically loaded we add the values
+ indicating deferred allocation. */
+ listp = GL(dl_tls_dtv_slotinfo_list);
+ while (1)
+ {
+ size_t cnt;
+
+ for (cnt = total == 0 ? 1 : 0; cnt < listp->len; ++cnt)
+ {
+ struct link_map *map;
+ void *dest;
+
+ /* Check for the total number of used slots. */
+ if (total + cnt > GL(dl_tls_max_dtv_idx))
+ break;
+
+ map = listp->slotinfo[cnt].map;
+ if (map == NULL)
+ /* Unused entry. */
+ continue;
+
+ /* Keep track of the maximum generation number. This might
+ not be the generation counter. */
+ maxgen = MAX (maxgen, listp->slotinfo[cnt].gen);
+
+ if (map->l_tls_offset == NO_TLS_OFFSET)
+ {
+ /* For dynamically loaded modules we simply store
+ the value indicating deferred allocation. */
+ dtv[map->l_tls_modid].pointer.val = TLS_DTV_UNALLOCATED;
+ dtv[map->l_tls_modid].pointer.is_static = false;
+ continue;
+ }
+
+ assert (map->l_tls_modid == cnt);
+ assert (map->l_tls_blocksize >= map->l_tls_initimage_size);
+# if TLS_TCB_AT_TP
+ assert ((size_t) map->l_tls_offset >= map->l_tls_blocksize);
+ dest = (char *) result - map->l_tls_offset;
+# elif TLS_DTV_AT_TP
+ dest = (char *) result + map->l_tls_offset;
+# else
+# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
+# endif
+
+ /* Copy the initialization image and clear the BSS part. */
+ dtv[map->l_tls_modid].pointer.val = dest;
+ dtv[map->l_tls_modid].pointer.is_static = true;
+ memset (__mempcpy (dest, map->l_tls_initimage,
+ map->l_tls_initimage_size), '\0',
+ map->l_tls_blocksize - map->l_tls_initimage_size);
+ }
+
+ total += cnt;
+ if (total >= GL(dl_tls_max_dtv_idx))
+ break;
+
+ listp = listp->next;
+ assert (listp != NULL);
+ }
+
+ /* The DTV version is up-to-date now. */
+ dtv[0].counter = maxgen;
+
+ return result;
+}
+rtld_hidden_def (_dl_allocate_tls_init)
+
+void *
+internal_function
+_dl_allocate_tls (void *mem)
+{
+ return _dl_allocate_tls_init (mem == NULL
+ ? _dl_allocate_tls_storage ()
+ : allocate_dtv (mem));
+}
+rtld_hidden_def (_dl_allocate_tls)
+
+
+void
+internal_function
+_dl_deallocate_tls (void *tcb, bool dealloc_tcb)
+{
+ dtv_t *dtv = GET_DTV (tcb);
+
+ /* We need to free the memory allocated for non-static TLS. */
+ for (size_t cnt = 0; cnt < dtv[-1].counter; ++cnt)
+ if (! dtv[1 + cnt].pointer.is_static
+ && dtv[1 + cnt].pointer.val != TLS_DTV_UNALLOCATED)
+ free (dtv[1 + cnt].pointer.val);
+
+ /* The array starts with dtv[-1]. */
+#ifdef SHARED
+ if (dtv != GL(dl_initial_dtv))
+#endif
+ free (dtv - 1);
+
+ if (dealloc_tcb)
+ {
+# if TLS_TCB_AT_TP
+ /* The TCB follows the TLS blocks. Back up to free the whole block. */
+ tcb -= GL(dl_tls_static_size) - TLS_TCB_SIZE;
+# elif TLS_DTV_AT_TP
+ /* Back up the TLS_PRE_TCB_SIZE bytes. */
+ tcb -= (TLS_PRE_TCB_SIZE + GL(dl_tls_static_align) - 1)
+ & ~(GL(dl_tls_static_align) - 1);
+# endif
+ free (tcb);
+ }
+}
+rtld_hidden_def (_dl_deallocate_tls)
+
+
+# ifdef SHARED
+/* The __tls_get_addr function has two basic forms which differ in the
+ arguments. The IA-64 form takes two parameters, the module ID and
+ offset. The form used, among others, on IA-32 takes a reference to
+ a special structure which contain the same information. The second
+ form seems to be more often used (in the moment) so we default to
+ it. Users of the IA-64 form have to provide adequate definitions
+ of the following macros. */
+# ifndef GET_ADDR_ARGS
+# define GET_ADDR_ARGS tls_index *ti
+# endif
+# ifndef GET_ADDR_MODULE
+# define GET_ADDR_MODULE ti->ti_module
+# endif
+# ifndef GET_ADDR_OFFSET
+# define GET_ADDR_OFFSET ti->ti_offset
+# endif
+
+
+static void *
+allocate_and_init (struct link_map *map)
+{
+ void *newp;
+
+ newp = __libc_memalign (map->l_tls_align, map->l_tls_blocksize);
+ if (newp == NULL)
+ oom ();
+
+ /* Initialize the memory. */
+ memset (__mempcpy (newp, map->l_tls_initimage, map->l_tls_initimage_size),
+ '\0', map->l_tls_blocksize - map->l_tls_initimage_size);
+
+ return newp;
+}
+
+
+struct link_map *
+_dl_update_slotinfo (unsigned long int req_modid)
+{
+ struct link_map *the_map = NULL;
+ dtv_t *dtv = THREAD_DTV ();
+
+ /* The global dl_tls_dtv_slotinfo array contains for each module
+ index the generation counter current when the entry was created.
+ This array never shrinks so that all module indices which were
+ valid at some time can be used to access it. Before the first
+ use of a new module index in this function the array was extended
+ appropriately. Access also does not have to be guarded against
+ modifications of the array. It is assumed that pointer-size
+ values can be read atomically even in SMP environments. It is
+ possible that other threads at the same time dynamically load
+ code and therefore add to the slotinfo list. This is a problem
+ since we must not pick up any information about incomplete work.
+ The solution to this is to ignore all dtv slots which were
+ created after the one we are currently interested. We know that
+ dynamic loading for this module is completed and this is the last
+ load operation we know finished. */
+ unsigned long int idx = req_modid;
+ struct dtv_slotinfo_list *listp = GL(dl_tls_dtv_slotinfo_list);
+
+ while (idx >= listp->len)
+ {
+ idx -= listp->len;
+ listp = listp->next;
+ }
+
+ if (dtv[0].counter < listp->slotinfo[idx].gen)
+ {
+ /* The generation counter for the slot is higher than what the
+ current dtv implements. We have to update the whole dtv but
+ only those entries with a generation counter <= the one for
+ the entry we need. */
+ size_t new_gen = listp->slotinfo[idx].gen;
+ size_t total = 0;
+
+ /* We have to look through the entire dtv slotinfo list. */
+ listp = GL(dl_tls_dtv_slotinfo_list);
+ do
+ {
+ for (size_t cnt = total == 0 ? 1 : 0; cnt < listp->len; ++cnt)
+ {
+ size_t gen = listp->slotinfo[cnt].gen;
+
+ if (gen > new_gen)
+ /* This is a slot for a generation younger than the
+ one we are handling now. It might be incompletely
+ set up so ignore it. */
+ continue;
+
+ /* If the entry is older than the current dtv layout we
+ know we don't have to handle it. */
+ if (gen <= dtv[0].counter)
+ continue;
+
+ /* If there is no map this means the entry is empty. */
+ struct link_map *map = listp->slotinfo[cnt].map;
+ if (map == NULL)
+ {
+ /* If this modid was used at some point the memory
+ might still be allocated. */
+ if (! dtv[total + cnt].pointer.is_static
+ && dtv[total + cnt].pointer.val != TLS_DTV_UNALLOCATED)
+ {
+ free (dtv[total + cnt].pointer.val);
+ dtv[total + cnt].pointer.val = TLS_DTV_UNALLOCATED;
+ }
+
+ continue;
+ }
+
+ /* Check whether the current dtv array is large enough. */
+ size_t modid = map->l_tls_modid;
+ assert (total + cnt == modid);
+ if (dtv[-1].counter < modid)
+ {
+ /* Reallocate the dtv. */
+ dtv_t *newp;
+ size_t newsize = GL(dl_tls_max_dtv_idx) + DTV_SURPLUS;
+ size_t oldsize = dtv[-1].counter;
+
+ assert (map->l_tls_modid <= newsize);
+
+ if (dtv == GL(dl_initial_dtv))
+ {
+ /* This is the initial dtv that was allocated
+ during rtld startup using the dl-minimal.c
+ malloc instead of the real malloc. We can't
+ free it, we have to abandon the old storage. */
+
+ newp = malloc ((2 + newsize) * sizeof (dtv_t));
+ if (newp == NULL)
+ oom ();
+ memcpy (newp, &dtv[-1], oldsize * sizeof (dtv_t));
+ }
+ else
+ {
+ newp = realloc (&dtv[-1],
+ (2 + newsize) * sizeof (dtv_t));
+ if (newp == NULL)
+ oom ();
+ }
+
+ newp[0].counter = newsize;
+
+ /* Clear the newly allocated part. */
+ memset (newp + 2 + oldsize, '\0',
+ (newsize - oldsize) * sizeof (dtv_t));
+
+ /* Point dtv to the generation counter. */
+ dtv = &newp[1];
+
+ /* Install this new dtv in the thread data
+ structures. */
+ INSTALL_NEW_DTV (dtv);
+ }
+
+ /* If there is currently memory allocate for this
+ dtv entry free it. */
+ /* XXX Ideally we will at some point create a memory
+ pool. */
+ if (! dtv[modid].pointer.is_static
+ && dtv[modid].pointer.val != TLS_DTV_UNALLOCATED)
+ /* Note that free is called for NULL is well. We
+ deallocate even if it is this dtv entry we are
+ supposed to load. The reason is that we call
+ memalign and not malloc. */
+ free (dtv[modid].pointer.val);
+
+ /* This module is loaded dynamically- We defer memory
+ allocation. */
+ dtv[modid].pointer.is_static = false;
+ dtv[modid].pointer.val = TLS_DTV_UNALLOCATED;
+
+ if (modid == req_modid)
+ the_map = map;
+ }
+
+ total += listp->len;
+ }
+ while ((listp = listp->next) != NULL);
+
+ /* This will be the new maximum generation counter. */
+ dtv[0].counter = new_gen;
+ }
+
+ return the_map;
+}
+
+
+/* The generic dynamic and local dynamic model cannot be used in
+ statically linked applications. */
+void *
+__tls_get_addr (GET_ADDR_ARGS)
+{
+ dtv_t *dtv = THREAD_DTV ();
+ struct link_map *the_map = NULL;
+ void *p;
+
+ if (__builtin_expect (dtv[0].counter != GL(dl_tls_generation), 0))
+ the_map = _dl_update_slotinfo (GET_ADDR_MODULE);
+
+ p = dtv[GET_ADDR_MODULE].pointer.val;
+
+ if (__builtin_expect (p == TLS_DTV_UNALLOCATED, 0))
+ {
+ /* The allocation was deferred. Do it now. */
+ if (the_map == NULL)
+ {
+ /* Find the link map for this module. */
+ size_t idx = GET_ADDR_MODULE;
+ struct dtv_slotinfo_list *listp = GL(dl_tls_dtv_slotinfo_list);
+
+ while (idx >= listp->len)
+ {
+ idx -= listp->len;
+ listp = listp->next;
+ }
+
+ the_map = listp->slotinfo[idx].map;
+ }
+
+ p = dtv[GET_ADDR_MODULE].pointer.val = allocate_and_init (the_map);
+ dtv[GET_ADDR_MODULE].pointer.is_static = false;
+ }
+
+ return (char *) p + GET_ADDR_OFFSET;
+}
+# endif
+
+
+
+void
+_dl_add_to_slotinfo (struct link_map *l)
+{
+ /* Now that we know the object is loaded successfully add
+ modules containing TLS data to the dtv info table. We
+ might have to increase its size. */
+ struct dtv_slotinfo_list *listp;
+ struct dtv_slotinfo_list *prevp;
+ size_t idx = l->l_tls_modid;
+
+ /* Find the place in the dtv slotinfo list. */
+ listp = GL(dl_tls_dtv_slotinfo_list);
+ prevp = NULL; /* Needed to shut up gcc. */
+ do
+ {
+ /* Does it fit in the array of this list element? */
+ if (idx < listp->len)
+ break;
+ idx -= listp->len;
+ prevp = listp;
+ listp = listp->next;
+ }
+ while (listp != NULL);
+
+ if (listp == NULL)
+ {
+ /* When we come here it means we have to add a new element
+ to the slotinfo list. And the new module must be in
+ the first slot. */
+ assert (idx == 0);
+
+ listp = prevp->next = (struct dtv_slotinfo_list *)
+ malloc (sizeof (struct dtv_slotinfo_list)
+ + TLS_SLOTINFO_SURPLUS * sizeof (struct dtv_slotinfo));
+ if (listp == NULL)
+ {
+ /* We ran out of memory. We will simply fail this
+ call but don't undo anything we did so far. The
+ application will crash or be terminated anyway very
+ soon. */
+
+ /* We have to do this since some entries in the dtv
+ slotinfo array might already point to this
+ generation. */
+ ++GL(dl_tls_generation);
+
+ _dl_signal_error (ENOMEM, "dlopen", NULL, N_("\
+cannot create TLS data structures"));
+ }
+
+ listp->len = TLS_SLOTINFO_SURPLUS;
+ listp->next = NULL;
+ memset (listp->slotinfo, '\0',
+ TLS_SLOTINFO_SURPLUS * sizeof (struct dtv_slotinfo));
+ }
+
+ /* Add the information into the slotinfo data structure. */
+ listp->slotinfo[idx].map = l;
+ listp->slotinfo[idx].gen = GL(dl_tls_generation) + 1;
+}
+#endif /* use TLS */
diff --git a/elf/dl-trampoline.c b/elf/dl-trampoline.c
new file mode 100644
index 0000000..3ca89f3
--- /dev/null
+++ b/elf/dl-trampoline.c
@@ -0,0 +1 @@
+#error "Architecture specific PLT trampolines must be defined."
diff --git a/gmon/bb_init_func.c b/gmon/bb_init_func.c
new file mode 100644
index 0000000..19901d8
--- /dev/null
+++ b/gmon/bb_init_func.c
@@ -0,0 +1,54 @@
+/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+ 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. */
+
+/* __bb_init_func is invoked at the beginning of each function, before
+ any registers have been saved. This generic routine should work
+ provided that calling this function doesn't mangle the arguments
+ passed to the function being called. If that's not the case, a
+ system specific routine must be provided. */
+
+#include <sys/types.h>
+#include <sys/gmon.h>
+
+#include <stdlib.h>
+
+void
+__bb_init_func (struct __bb *bb)
+{
+ struct gmonparam *p = &_gmonparam;
+
+ if (bb->zero_word != 0)
+ {
+ return; /* handle common case quickly */
+ }
+
+ /* insert this basic-block into basic-block list: */
+ bb->zero_word = 1;
+ bb->next = __bb_head;
+ __bb_head = bb;
+
+ if (bb->next == 0 && p->state != GMON_PROF_ON)
+ {
+ /* we didn't register _mcleanup yet and pc profiling doesn't seem
+ to be active, so let's register it now: */
+ extern void *__dso_handle __attribute__ ((__weak__));
+ __cxa_atexit ((void (*) (void *)) _mcleanup, NULL,
+ &__dso_handle ? __dso_handle : NULL);
+ }
+}
diff --git a/inet/check_pf.c b/inet/check_pf.c
new file mode 100644
index 0000000..5d98c98
--- /dev/null
+++ b/inet/check_pf.c
@@ -0,0 +1,50 @@
+/* Determine protocol families for which interfaces exist. Generic version.
+ Copyright (C) 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 <ifaddrs.h>
+#include <netdb.h>
+
+
+void
+attribute_hidden
+__check_pf (bool *seen_ipv4, bool *seen_ipv6)
+{
+ /* Get the interface list via getifaddrs. */
+ struct ifaddrs *ifa = NULL;
+ if (getifaddrs (&ifa) != 0)
+ {
+ /* We cannot determine what interfaces are available. Be
+ pessimistic. */
+ *seen_ipv4 = true;
+ *seen_ipv6 = true;
+ return;
+ }
+
+ *seen_ipv4 = false;
+ *seen_ipv6 = false;
+
+ struct ifaddrs *runp;
+ for (runp = ifa; runp != NULL; runp = runp->ifa_next)
+ if (runp->ifa_addr->sa_family == PF_INET)
+ *seen_ipv4 = true;
+ else if (runp->ifa_addr->sa_family == PF_INET6)
+ *seen_ipv6 = true;
+
+ (void) freeifaddrs (ifa);
+}
diff --git a/io/access.c b/io/access.c
new file mode 100644
index 0000000..c266e94
--- /dev/null
+++ b/io/access.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+
+/* Test for access to FILE. */
+int
+__access (file, type)
+ const char *file;
+ int type;
+{
+ if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (access)
+
+weak_alias (__access, access)
+#include <stub-tag.h>
diff --git a/io/chdir.c b/io/chdir.c
new file mode 100644
index 0000000..afaeef8
--- /dev/null
+++ b/io/chdir.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+
+/* Change the current directory to PATH. */
+int
+__chdir (path)
+ const char *path;
+{
+ if (path == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (chdir)
+
+weak_alias (__chdir, chdir)
+#include <stub-tag.h>
diff --git a/io/chmod.c b/io/chmod.c
new file mode 100644
index 0000000..38b0512
--- /dev/null
+++ b/io/chmod.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+/* Change the protections of FILE to MODE. */
+int
+__chmod (file, mode)
+ const char *file;
+ mode_t mode;
+{
+ if (file == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (chmod)
+
+weak_alias (__chmod, chmod)
+#include <stub-tag.h>
diff --git a/io/chown.c b/io/chown.c
new file mode 100644
index 0000000..0e368f2
--- /dev/null
+++ b/io/chown.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997, 2002
+ 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 <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+/* Change the owner and group of FILE. */
+int
+__chown (file, owner, group)
+ const char *file;
+ uid_t owner;
+ gid_t group;
+{
+ if (file == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+libc_hidden_def (__chown)
+stub_warning (chown)
+
+weak_alias (__chown, chown)
+#include <stub-tag.h>
diff --git a/io/close.c b/io/close.c
new file mode 100644
index 0000000..0856ba8
--- /dev/null
+++ b/io/close.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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 <errno.h>
+#include <unistd.h>
+
+/* Close the file descriptor FD. */
+int
+__close (fd)
+ int fd;
+{
+ if (fd < 0)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+libc_hidden_def (__close)
+stub_warning (close)
+
+weak_alias (__close, close)
+#include <stub-tag.h>
diff --git a/io/creat.c b/io/creat.c
new file mode 100644
index 0000000..4628824
--- /dev/null
+++ b/io/creat.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1991, 1996, 1997, 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 <fcntl.h>
+#include <sys/types.h>
+#include <sysdep-cancel.h>
+
+#undef creat
+
+/* Create FILE with protections MODE. */
+int
+__libc_creat (file, mode)
+ const char *file;
+ mode_t mode;
+{
+ return __open (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
+}
+weak_alias (__libc_creat, creat)
+
+/* __open handles cancellation. */
+LIBC_CANCEL_HANDLED ();
diff --git a/io/creat64.c b/io/creat64.c
new file mode 100644
index 0000000..39f4580
--- /dev/null
+++ b/io/creat64.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <fcntl.h>
+#include <sys/types.h>
+
+#undef creat
+
+/* Create FILE with protections MODE. */
+int
+creat64 (file, mode)
+ const char *file;
+ mode_t mode;
+{
+ return __open64 (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
+}
diff --git a/io/dup.c b/io/dup.c
new file mode 100644
index 0000000..5d5e1b4
--- /dev/null
+++ b/io/dup.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+/* Duplicate FD, returning a new file descriptor open on the same file. */
+int
+__dup (fd)
+ int fd;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (dup)
+
+weak_alias (__dup, dup)
+#include <stub-tag.h>
diff --git a/io/dup2.c b/io/dup2.c
new file mode 100644
index 0000000..2b89789
--- /dev/null
+++ b/io/dup2.c
@@ -0,0 +1,48 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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 <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+
+/* Duplicate FD to FD2, closing the old FD2 and making FD2 be
+ open the same file as FD is. Return FD2 or -1. */
+int
+__dup2 (fd, fd2)
+ int fd;
+ int fd2;
+{
+ if (fd < 0 || fd2 < 0)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
+
+ if (fd == fd2)
+ /* No way to check that they are valid. */
+ return fd2;
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+libc_hidden_def (__dup2)
+stub_warning (dup2)
+
+weak_alias (__dup2, dup2)
+#include <stub-tag.h>
diff --git a/locale/programs/charmap-kw.h b/locale/programs/charmap-kw.h
index 089f45d..25996f4 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 <bug-gnu-gperf@gnu.org>."
+#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, <drepper@gnu.org>.
- 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 <string.h>
#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/locfile-kw.h b/locale/programs/locfile-kw.h
index da4a63e..8692b09 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 <bug-gnu-gperf@gnu.org>."
+#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 <drepper@gnu.org>, 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 <string.h>
#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/math/cabsf.c b/math/cabsf.c
new file mode 100644
index 0000000..956db76
--- /dev/null
+++ b/math/cabsf.c
@@ -0,0 +1,29 @@
+/* Return the complex absolute value of float complex value.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU 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 <complex.h>
+#include <math.h>
+
+float
+__cabsf (float _Complex z)
+{
+ return __hypotf (__real__ z, __imag__ z);
+}
+weak_alias (__cabsf, cabsf)
diff --git a/math/cargf.c b/math/cargf.c
new file mode 100644
index 0000000..df1f20b
--- /dev/null
+++ b/math/cargf.c
@@ -0,0 +1,29 @@
+/* Compute argument of complex float value.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU 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 <complex.h>
+#include <math.h>
+
+float
+__cargf (__complex__ float x)
+{
+ return __atan2f (__imag__ x, __real__ x);
+}
+weak_alias (__cargf, cargf)
diff --git a/math/cimagf.c b/math/cimagf.c
new file mode 100644
index 0000000..d4e441e
--- /dev/null
+++ b/math/cimagf.c
@@ -0,0 +1,28 @@
+/* Return imaginary part of complex float value.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU 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 <complex.h>
+
+float
+__cimagf (float _Complex z)
+{
+ return __imag__ z;
+}
+weak_alias (__cimagf, cimagf)
diff --git a/math/conjf.c b/math/conjf.c
new file mode 100644
index 0000000..7893891
--- /dev/null
+++ b/math/conjf.c
@@ -0,0 +1,28 @@
+/* Return complex conjugate of complex float value.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU 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 <complex.h>
+
+float _Complex
+__conjf (float _Complex z)
+{
+ return ~z;
+}
+weak_alias (__conjf, conjf)
diff --git a/math/crealf.c b/math/crealf.c
new file mode 100644
index 0000000..e3235a8
--- /dev/null
+++ b/math/crealf.c
@@ -0,0 +1,28 @@
+/* Return real part of complex float value.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU 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 <complex.h>
+
+float
+__crealf (float _Complex z)
+{
+ return __real__ z;
+}
+weak_alias (__crealf, crealf)
diff --git a/math/e_acoshl.c b/math/e_acoshl.c
new file mode 100644
index 0000000..2c2fbe8
--- /dev/null
+++ b/math/e_acoshl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_acoshl (long double x)
+{
+ fputs ("__ieee754_acoshl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (acoshl)
+#include <stub-tag.h>
diff --git a/math/e_acosl.c b/math/e_acosl.c
new file mode 100644
index 0000000..d844d88
--- /dev/null
+++ b/math/e_acosl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_acosl (long double x)
+{
+ fputs ("__ieee754_acosl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (acosl)
+#include <stub-tag.h>
diff --git a/math/e_asinl.c b/math/e_asinl.c
new file mode 100644
index 0000000..3b26f03
--- /dev/null
+++ b/math/e_asinl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_asinl (long double x)
+{
+ fputs ("__ieee754_asinl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (asinl)
+#include <stub-tag.h>
diff --git a/math/e_atan2l.c b/math/e_atan2l.c
new file mode 100644
index 0000000..0caed8a
--- /dev/null
+++ b/math/e_atan2l.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_atan2l (long double x, long double y)
+{
+ fputs ("__ieee754_atan2l not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (atan2l)
+#include <stub-tag.h>
diff --git a/math/e_atanhl.c b/math/e_atanhl.c
new file mode 100644
index 0000000..625d42d
--- /dev/null
+++ b/math/e_atanhl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_atanhl (long double x)
+{
+ fputs ("__ieee754_atanhl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (__ieee754_atanhl)
+#include <stub-tag.h>
diff --git a/math/e_coshl.c b/math/e_coshl.c
new file mode 100644
index 0000000..0da319b
--- /dev/null
+++ b/math/e_coshl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_coshl (long double x)
+{
+ fputs ("__ieee754_coshl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (__ieee754_coshl)
+#include <stub-tag.h>
diff --git a/math/e_exp10.c b/math/e_exp10.c
new file mode 100644
index 0000000..a3eccbb
--- /dev/null
+++ b/math/e_exp10.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 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.
+
+ 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 <math.h>
+#include "math_private.h"
+
+
+double
+__ieee754_exp10 (double arg)
+{
+ /* This is a very stupid and inprecise implementation. It'll get
+ replaced sometime (soon?). */
+ return __ieee754_exp (M_LN10 * arg);
+}
diff --git a/math/e_exp10f.c b/math/e_exp10f.c
new file mode 100644
index 0000000..7d06d07
--- /dev/null
+++ b/math/e_exp10f.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 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.
+
+ 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 <math.h>
+#include "math_private.h"
+
+
+float
+__ieee754_exp10f (float arg)
+{
+ /* This is a very stupid and inprecise implementation. It'll get
+ replaced sometime (soon?). */
+ return __ieee754_expf (M_LN10 * arg);
+}
diff --git a/math/e_exp10l.c b/math/e_exp10l.c
new file mode 100644
index 0000000..56f0cfe
--- /dev/null
+++ b/math/e_exp10l.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 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.
+
+ 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 <math.h>
+#include "math_private.h"
+
+
+long double
+__ieee754_exp10l (long double arg)
+{
+ /* This is a very stupid and inprecise implementation. It'll get
+ replaced sometime (soon?). */
+ return __ieee754_expl (M_LN10l * arg);
+}
diff --git a/math/e_exp2l.c b/math/e_exp2l.c
new file mode 100644
index 0000000..64ef6d3
--- /dev/null
+++ b/math/e_exp2l.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_exp2l (long double x)
+{
+ fputs ("__ieee754_exp2l not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (exp2l)
+#include <stub-tag.h>
diff --git a/math/e_expl.c b/math/e_expl.c
new file mode 100644
index 0000000..f9467c3
--- /dev/null
+++ b/math/e_expl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_expl (long double x)
+{
+ fputs ("__ieee754_expl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (expl)
+#include <stub-tag.h>
diff --git a/math/e_fmodl.c b/math/e_fmodl.c
new file mode 100644
index 0000000..380da24
--- /dev/null
+++ b/math/e_fmodl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_fmodl (long double x, long double y)
+{
+ fputs ("__ieee754_fmodl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (fmodl)
+#include <stub-tag.h>
diff --git a/math/e_gammal_r.c b/math/e_gammal_r.c
new file mode 100644
index 0000000..1c45c84
--- /dev/null
+++ b/math/e_gammal_r.c
@@ -0,0 +1,15 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_gammal_r (long double x, int *signgamp)
+{
+ *signgamp = 0;
+ fputs ("__ieee754_gammal_r not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (__ieee754_gammal_r)
+#include <stub-tag.h>
diff --git a/math/e_hypotl.c b/math/e_hypotl.c
new file mode 100644
index 0000000..07df22e
--- /dev/null
+++ b/math/e_hypotl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_hypotl (long double x, long double y)
+{
+ fputs ("__ieee754_hypotl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (__ieee754_hypotl)
+#include <stub-tag.h>
diff --git a/math/e_j0l.c b/math/e_j0l.c
new file mode 100644
index 0000000..1bf0a1d
--- /dev/null
+++ b/math/e_j0l.c
@@ -0,0 +1,25 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+#include "math_private.h"
+
+long double
+__ieee754_j0l (long double x)
+{
+ fputs ("__ieee754_j0l not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (j0l)
+
+long double
+__ieee754_y0l (long double x)
+{
+ fputs ("__ieee754_y0l not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (y0l)
+#include <stub-tag.h>
diff --git a/math/e_j1l.c b/math/e_j1l.c
new file mode 100644
index 0000000..656abeb
--- /dev/null
+++ b/math/e_j1l.c
@@ -0,0 +1,25 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+#include "math_private.h"
+
+long double
+__ieee754_j1l (long double x)
+{
+ fputs ("__ieee754_j1l not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (j1l)
+
+long double
+__ieee754_y1l (long double x)
+{
+ fputs ("__ieee754_y1l not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (y1l)
+#include <stub-tag.h>
diff --git a/math/e_jnl.c b/math/e_jnl.c
new file mode 100644
index 0000000..1bfc069
--- /dev/null
+++ b/math/e_jnl.c
@@ -0,0 +1,25 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+#include "math_private.h"
+
+long double
+__ieee754_jnl (int n, long double x)
+{
+ fputs ("__ieee754_jnl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (jnl)
+
+long double
+__ieee754_ynl (int n, long double x)
+{
+ fputs ("__ieee754_ynl not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (ynl)
+#include <stub-tag.h>
diff --git a/math/e_lgammal_r.c b/math/e_lgammal_r.c
new file mode 100644
index 0000000..1784b26
--- /dev/null
+++ b/math/e_lgammal_r.c
@@ -0,0 +1,17 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+#include "math_private.h"
+
+long double
+__ieee754_lgammal_r (long double x, int *signgamp)
+{
+ *signgamp = 0;
+ fputs ("__ieee754_lgammal_r not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (lgammal)
+stub_warning (lgammal_r)
+#include <stub-tag.h>
diff --git a/math/e_log10l.c b/math/e_log10l.c
new file mode 100644
index 0000000..5bc264b
--- /dev/null
+++ b/math/e_log10l.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_log10l (long double x)
+{
+ fputs ("__ieee754_log10l not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+
+stub_warning (log10l)
+#include <stub-tag.h>
diff --git a/misc/acct.c b/misc/acct.c
new file mode 100644
index 0000000..b626b5d
--- /dev/null
+++ b/misc/acct.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <unistd.h>
+
+/* Turn accounting on if NAME is an existing file. The system will then write
+ a record for each process as it terminates, to this file. If NAME is NULL,
+ turn accounting off. This call is restricted to the super-user. */
+int
+acct (name)
+ const char *name;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (acct)
+#include <stub-tag.h>
diff --git a/misc/brk.c b/misc/brk.c
new file mode 100644
index 0000000..b951819
--- /dev/null
+++ b/misc/brk.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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 <errno.h>
+#include <unistd.h>
+
+/* sbrk.c expects this. */
+void *__curbrk;
+
+/* Set the end of the process's data space to ADDR.
+ Return 0 if successful, -1 if not. */
+int
+__brk (addr)
+ void *addr;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (brk)
+
+weak_alias (__brk, brk)
+#include <stub-tag.h>
diff --git a/misc/chflags.c b/misc/chflags.c
new file mode 100644
index 0000000..b678121
--- /dev/null
+++ b/misc/chflags.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2004 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 <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+/* Change the flags of FILE to FLAGS. */
+
+int chflags (const char *file, int flags) __THROW;
+
+int
+chflags (file, flags)
+ const char *file;
+ int flags;
+{
+ if (file == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (chflags)
+#include <stub-tag.h>
diff --git a/misc/chroot.c b/misc/chroot.c
new file mode 100644
index 0000000..f20ccf4
--- /dev/null
+++ b/misc/chroot.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <unistd.h>
+
+/* Make PATH be the root directory (the starting point for absolute paths).
+ This call is restricted to the super-user. */
+int
+chroot (path)
+ const char *path;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+
+stub_warning (chroot)
+#include <stub-tag.h>
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 5f4edd5..5c99234 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-13 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
+ sysdeps/generic.
+ * errno-loc.c: New file.
+
2005-12-12 Roland McGrath <roland@redhat.com>
* init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
diff --git a/nptl/errno-loc.c b/nptl/errno-loc.c
new file mode 100644
index 0000000..712b2b1
--- /dev/null
+++ b/nptl/errno-loc.c
@@ -0,0 +1 @@
+#include "../csu/errno-loc.c"
diff --git a/nptl/sysdeps/pthread/sigfillset.c b/nptl/sysdeps/pthread/sigfillset.c
index fe58ccd..180607c 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 <nptl/pthreadP.h>
-#include <sysdeps/generic/sigfillset.c>
+#include <signal/sigfillset.c>
diff --git a/sysdeps/generic/_exit.c b/posix/_exit.c
index 673667d..673667d 100644
--- a/sysdeps/generic/_exit.c
+++ b/posix/_exit.c
diff --git a/posix/alarm.c b/posix/alarm.c
new file mode 100644
index 0000000..1f0cceb
--- /dev/null
+++ b/posix/alarm.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1991,95,96,97,2002 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 <errno.h>
+#include <unistd.h>
+
+/* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM.
+ If SECONDS is zero, any currently scheduled alarm will be cancelled.
+ The function returns the number of seconds remaining until the last
+ alarm scheduled would have signaled, or zero if there wasn't one.
+ There is no return value to indicate an error, but you can set `errno'
+ to 0 and check its value after calling `alarm', and this might tell you.
+ The signal may come late due to processor scheduling. */
+unsigned int
+alarm (seconds)
+ unsigned int seconds;
+{
+ __set_errno (ENOSYS);
+ return 0;
+}
+libc_hidden_def (alarm)
+
+stub_warning (alarm)
+#include <stub-tag.h>
diff --git a/rt/aio_cancel.c b/rt/aio_cancel.c
new file mode 100644
index 0000000..c24a2f7
--- /dev/null
+++ b/rt/aio_cancel.c
@@ -0,0 +1,44 @@
+/* Cancel requests associated with given file descriptor. Stub version.
+ Copyright (C) 2001 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. */
+
+
+/* We use an UGLY hack to prevent gcc from finding us cheating. The
+ implementation of aio_cancel and aio_cancel64 are identical and so
+ we want to avoid code duplication by using aliases. But gcc sees
+ the different parameter lists and prints a warning. We define here
+ a function so that aio_cancel64 has no prototype. */
+#define aio_cancel64 XXX
+#include <aio.h>
+/* And undo the hack. */
+#undef aio_cancel64
+
+#include <errno.h>
+
+int
+aio_cancel (int fildes, struct aiocb *aiocbp)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+weak_alias (aio_cancel, aio_cancel64)
+
+stub_warning (aio_cancel)
+stub_warning (aio_cancel64)
+#include <stub-tag.h>
diff --git a/rt/aio_fsync.c b/rt/aio_fsync.c
new file mode 100644
index 0000000..bc23d75
--- /dev/null
+++ b/rt/aio_fsync.c
@@ -0,0 +1,51 @@
+/* Synchronize I/O in given file descriptor. Stub version.
+ Copyright (C) 2001 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. */
+
+
+/* We use an UGLY hack to prevent gcc from finding us cheating. The
+ implementation of aio_fsync and aio_fsync64 are identical and so
+ we want to avoid code duplication by using aliases. But gcc sees
+ the different parameter lists and prints a warning. We define here
+ a function so that aio_fsync64 has no prototype. */
+#define aio_fsync64 XXX
+#include <aio.h>
+/* And undo the hack. */
+#undef aio_fsync64
+
+#include <errno.h>
+#include <fcntl.h>
+
+int
+aio_fsync (int op, struct aiocb *aiocbp)
+{
+ if (op != O_SYNC && op != O_DSYNC)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+weak_alias (aio_fsync, aio_fsync64)
+
+stub_warning (aio_fsync)
+stub_warning (aio_fsync64)
+#include <stub-tag.h>
diff --git a/rt/aio_misc.c b/rt/aio_misc.c
new file mode 100644
index 0000000..c29b8d0
--- /dev/null
+++ b/rt/aio_misc.c
@@ -0,0 +1,29 @@
+/* Handle general operations. Stub version.
+ Copyright (C) 2001 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 <aio.h>
+#include <aio_misc.h>
+
+/* This file is for internal code needed by the aio_* implementation. */
+
+void
+__aio_init (const struct aioinit *init)
+{
+}
+weak_alias (__aio_init, aio_init)
diff --git a/rt/aio_notify.c b/rt/aio_notify.c
new file mode 100644
index 0000000..2c79ee6
--- /dev/null
+++ b/rt/aio_notify.c
@@ -0,0 +1,24 @@
+/* Notify initiator of AIO request. Stub version.
+ Copyright (C) 2001 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 <aio.h>
+#include <aio_misc.h>
+
+/* This file contains only internal functions used by
+ the particular aio_* implementation code. */
diff --git a/rt/aio_read.c b/rt/aio_read.c
new file mode 100644
index 0000000..db1d19f
--- /dev/null
+++ b/rt/aio_read.c
@@ -0,0 +1,36 @@
+/* Asynchronous read. Stub version.
+ Copyright (C) 2001 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 <aio.h>
+#include <errno.h>
+
+#ifdef BE_AIO64
+#define aiocb aiocb64
+#define aio_read aio_read64
+#endif
+
+int
+aio_read (struct aiocb *aiocbp)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (aio_read)
+#include <stub-tag.h>
diff --git a/rt/aio_read64.c b/rt/aio_read64.c
new file mode 100644
index 0000000..c129235
--- /dev/null
+++ b/rt/aio_read64.c
@@ -0,0 +1,2 @@
+#define BE_AIO64
+#include "aio_read.c"
diff --git a/rt/aio_sigqueue.c b/rt/aio_sigqueue.c
new file mode 100644
index 0000000..e824c6b
--- /dev/null
+++ b/rt/aio_sigqueue.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1997, 1999 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 <aio.h>
+#include <errno.h>
+#include <signal.h>
+
+#include "aio_misc.h"
+
+int
+__aio_sigqueue (sig, val, caller_pid)
+ int sig;
+ const union sigval val;
+ pid_t caller_pid;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (__aio_sigqueue)
+#include <stub-tag.h>
diff --git a/rt/aio_suspend.c b/rt/aio_suspend.c
new file mode 100644
index 0000000..0530f00
--- /dev/null
+++ b/rt/aio_suspend.c
@@ -0,0 +1,46 @@
+/* Suspend until termination of a requests. Stub version.
+ Copyright (C) 2001 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. */
+
+
+/* We use an UGLY hack to prevent gcc from finding us cheating. The
+ implementations of aio_suspend and aio_suspend64 are identical and so
+ we want to avoid code duplication by using aliases. But gcc sees
+ the different parameter lists and prints a warning. We define here
+ a function so that aio_suspend64 has no prototype. */
+#define aio_suspend64 XXX
+#include <aio.h>
+/* And undo the hack. */
+#undef aio_suspend64
+
+#include <errno.h>
+#include <sys/time.h>
+
+
+int
+aio_suspend (const struct aiocb *const list[], int nent,
+ const struct timespec *timeout)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+weak_alias (aio_suspend, aio_suspend64)
+
+stub_warning (aio_suspend)
+stub_warning (aio_suspend64)
+#include <stub-tag.h>
diff --git a/rt/aio_write.c b/rt/aio_write.c
new file mode 100644
index 0000000..bc62fcb
--- /dev/null
+++ b/rt/aio_write.c
@@ -0,0 +1,36 @@
+/* Asynchronous write. Stub version.
+ Copyright (C) 2001 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 <aio.h>
+#include <errno.h>
+
+#ifdef BE_AIO64
+#define aiocb aiocb64
+#define aio_write aio_write64
+#endif
+
+int
+aio_write (struct aiocb *aiocbp)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (aio_write)
+#include <stub-tag.h>
diff --git a/rt/aio_write64.c b/rt/aio_write64.c
new file mode 100644
index 0000000..bb1693e
--- /dev/null
+++ b/rt/aio_write64.c
@@ -0,0 +1,2 @@
+#define BE_AIO64
+#include "aio_write.c"
diff --git a/rt/clock_getcpuclockid.c b/rt/clock_getcpuclockid.c
new file mode 100644
index 0000000..39c7e55
--- /dev/null
+++ b/rt/clock_getcpuclockid.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2000, 2001 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 <errno.h>
+#include <time.h>
+#include <unistd.h>
+
+int
+clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
+{
+ /* We don't allow any process ID but our own. */
+ if (pid != 0 && pid != getpid ())
+ return EPERM;
+
+#ifdef CLOCK_PROCESS_CPUTIME_ID
+ /* Store the number. */
+ *clock_id = CLOCK_PROCESS_CPUTIME_ID;
+
+ return 0;
+#else
+ /* We don't have a timer for that. */
+ return ENOENT;
+#endif
+}
diff --git a/rt/clock_getres.c b/rt/clock_getres.c
new file mode 100644
index 0000000..f5978da
--- /dev/null
+++ b/rt/clock_getres.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1999 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 <errno.h>
+#include <time.h>
+
+/* Get resolution of clock. */
+int
+clock_getres (clockid_t clock_id, struct timespec *res)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (clock_getres)
+#include <stub-tag.h>
diff --git a/rt/clock_gettime.c b/rt/clock_gettime.c
new file mode 100644
index 0000000..ff30612
--- /dev/null
+++ b/rt/clock_gettime.c
@@ -0,0 +1,31 @@
+/* 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
+ 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 <errno.h>
+#include <time.h>
+
+/* Get current value of CLOCK and store it in TP. */
+int
+clock_gettime (clockid_t clock_id, struct timespec *tp)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+librt_hidden_def (clock_gettime)
+stub_warning (clock_gettime)
+#include <stub-tag.h>
diff --git a/rt/clock_nanosleep.c b/rt/clock_nanosleep.c
new file mode 100644
index 0000000..cff1c25
--- /dev/null
+++ b/rt/clock_nanosleep.c
@@ -0,0 +1,39 @@
+/* High-resolution sleep with the specified clock. Stub version.
+ Copyright (C) 2000 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 <errno.h>
+#include <sys/time.h>
+
+
+int
+clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
+ struct timespec *rem)
+{
+ if (__builtin_expect (req->tv_nsec, 0) < 0
+ || __builtin_expect (req->tv_nsec, 0) >= 1000000000)
+ return EINVAL;
+
+ if (flags != TIMER_ABSTIME && flags != 0)
+ return EINVAL;
+
+ /* Not implemented. */
+ return ENOSYS;
+}
+stub_warning (clock_nanosleep)
+#include <stub-tag.h>
diff --git a/rt/clock_settime.c b/rt/clock_settime.c
new file mode 100644
index 0000000..9d6a92e
--- /dev/null
+++ b/rt/clock_settime.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1999 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 <errno.h>
+#include <time.h>
+
+/* Set CLOCK to value TP. */
+int
+clock_settime (clockid_t clock_id, const struct timespec *tp)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (clock_settime)
+#include <stub-tag.h>
diff --git a/sysdeps/generic/__longjmp.c b/setjmp/__longjmp.c
index 8a61ff6..8a61ff6 100644
--- a/sysdeps/generic/__longjmp.c
+++ b/setjmp/__longjmp.c
diff --git a/setjmp/bsd-_setjmp.c b/setjmp/bsd-_setjmp.c
new file mode 100644
index 0000000..884a4da
--- /dev/null
+++ b/setjmp/bsd-_setjmp.c
@@ -0,0 +1,35 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Stub version.
+ Copyright (C) 1994, 1997, 1999, 2000, 2002 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 <sysdep.h>
+#include <setjmp.h>
+
+#undef _setjmp
+
+/* This implementation in C will not usually work, because the call
+ really needs to be a tail-call so __sigsetjmp saves the state of
+ the caller, not the state of this `setjmp' frame which then
+ immediate unwinds. */
+
+int
+_setjmp (jmp_buf env)
+{
+ return __sigsetjmp (env, 0);
+}
+libc_hidden_def (_setjmp)
diff --git a/setjmp/bsd-setjmp.c b/setjmp/bsd-setjmp.c
new file mode 100644
index 0000000..15f3f15
--- /dev/null
+++ b/setjmp/bsd-setjmp.c
@@ -0,0 +1,34 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Stub version.
+ Copyright (C) 1994, 1997, 1999 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 <sysdep.h>
+#include <setjmp.h>
+
+#undef setjmp
+
+/* This implementation in C will not usually work, because the call
+ really needs to be a tail-call so __sigsetjmp saves the state of
+ the caller, not the state of this `setjmp' frame which then
+ immediate unwinds. */
+
+int
+setjmp (jmp_buf env)
+{
+ return __sigsetjmp (env, 1);
+}
diff --git a/signal/allocrtsig.c b/signal/allocrtsig.c
new file mode 100644
index 0000000..ac8d2b6
--- /dev/null
+++ b/signal/allocrtsig.c
@@ -0,0 +1,96 @@
+/* Handle real-time signal allocation.
+ Copyright (C) 1997,98,99,2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU 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 <signal.h>
+
+/* In these variables we keep track of the used variables. If the
+ platform does not support any real-time signals we will define the
+ values to some unreasonable value which will signal failing of all
+ the functions below. */
+#ifndef __SIGRTMIN
+static int current_rtmin = -1;
+static int current_rtmax = -1;
+#else
+static int current_rtmin;
+static int current_rtmax;
+
+static int initialized;
+
+#include <testrtsig.h>
+
+static void
+init (void)
+{
+ if (!kernel_has_rtsig ())
+ {
+ current_rtmin = -1;
+ current_rtmax = -1;
+ }
+ else
+ {
+ current_rtmin = __SIGRTMIN;
+ current_rtmax = __SIGRTMAX;
+ }
+ initialized = 1;
+}
+#endif
+
+/* Return number of available real-time signal with highest priority. */
+int
+__libc_current_sigrtmin (void)
+{
+#ifdef __SIGRTMIN
+ if (!initialized)
+ init ();
+#endif
+ return current_rtmin;
+}
+libc_hidden_def (__libc_current_sigrtmin)
+
+/* Return number of available real-time signal with lowest priority. */
+int
+__libc_current_sigrtmax (void)
+{
+#ifdef __SIGRTMIN
+ if (!initialized)
+ init ();
+#endif
+ return current_rtmax;
+}
+libc_hidden_def (__libc_current_sigrtmax)
+
+/* Allocate real-time signal with highest/lowest available
+ priority. Please note that we don't use a lock since we assume
+ this function to be called at program start. */
+int
+__libc_allocate_rtsig (int high)
+{
+#ifndef __SIGRTMIN
+ return -1;
+#else
+ if (!initialized)
+ init ();
+ if (current_rtmin == -1 || current_rtmin > current_rtmax)
+ /* We don't have anymore signal available. */
+ return -1;
+
+ return high ? current_rtmin++ : current_rtmax--;
+#endif
+}
diff --git a/socket/accept.c b/socket/accept.c
new file mode 100644
index 0000000..dad34ce
--- /dev/null
+++ b/socket/accept.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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 <errno.h>
+#include <sys/socket.h>
+
+/* Await a connection on socket FD.
+ When a connection arrives, open a new socket to communicate with it,
+ set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting
+ peer and *ADDR_LEN to the address's actual length, and return the
+ new socket's descriptor, or -1 for errors. */
+int
+accept (fd, addr, addr_len)
+ int fd;
+ __SOCKADDR_ARG addr;
+ socklen_t *addr_len;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+libc_hidden_def (accept)
+
+
+stub_warning (accept)
+#include <stub-tag.h>
diff --git a/socket/bind.c b/socket/bind.c
new file mode 100644
index 0000000..382e29d
--- /dev/null
+++ b/socket/bind.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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 <errno.h>
+#include <sys/socket.h>
+
+/* Give the socket FD the local address ADDR (which is LEN bytes long). */
+int
+__bind (fd, addr, len)
+ int fd;
+ __CONST_SOCKADDR_ARG addr;
+ socklen_t len;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+weak_alias (__bind, bind)
+
+stub_warning (bind)
+#include <stub-tag.h>
diff --git a/socket/connect.c b/socket/connect.c
new file mode 100644
index 0000000..5509331
--- /dev/null
+++ b/socket/connect.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <sys/socket.h>
+
+/* Open a connection on socket FD to peer at ADDR (which LEN bytes long).
+ For connectionless socket types, just set the default address to send to
+ and the only address from which to accept transmissions.
+ Return 0 on success, -1 for errors. */
+int
+__connect (fd, addr, len)
+ int fd;
+ __CONST_SOCKADDR_ARG addr;
+ socklen_t len;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+weak_alias (__connect, connect)
+
+stub_warning (connect)
+#include <stub-tag.h>
diff --git a/stdio-common/ctermid.c b/stdio-common/ctermid.c
new file mode 100644
index 0000000..e4d94ea
--- /dev/null
+++ b/stdio-common/ctermid.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <stdio.h>
+
+
+/* Return the name of the controlling terminal.
+ If S is not NULL, the name is copied into it (it should be at
+ least L_ctermid bytes long), otherwise a static buffer is used. */
+char *
+ctermid (s)
+ char *s;
+{
+ __set_errno (ENOSYS);
+ return NULL;
+}
+
+
+stub_warning (ctermid)
+#include <stub-tag.h>
diff --git a/stdio-common/cuserid.c b/stdio-common/cuserid.c
new file mode 100644
index 0000000..826972f
--- /dev/null
+++ b/stdio-common/cuserid.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <stdio.h>
+#include <errno.h>
+
+/* Return the username of the caller.
+ If S is not NULL, it points to a buffer of at least L_cuserid bytes
+ into which the name is copied; otherwise, a static buffer is used. */
+char *
+cuserid (s)
+ char *s;
+{
+ __set_errno (ENOSYS);
+ return NULL;
+}
+
+
+stub_warning (cuserid)
+#include <stub-tag.h>
diff --git a/stdlib/abort.c b/stdlib/abort.c
new file mode 100644
index 0000000..00788f2
--- /dev/null
+++ b/stdlib/abort.c
@@ -0,0 +1,140 @@
+/* Copyright (C) 1991,93,95,96,97,98,2001,02 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 <bits/libc-lock.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+/* Try to get a machine dependent instruction which will make the
+ program crash. This is used in case everything else fails. */
+#include <abort-instr.h>
+#ifndef ABORT_INSTRUCTION
+/* No such instruction is available. */
+# define ABORT_INSTRUCTION
+#endif
+
+#ifdef USE_IN_LIBIO
+# include <libio/libioP.h>
+# define fflush(s) _IO_flush_all_lockp (0)
+#endif
+
+/* We must avoid to run in circles. Therefore we remember how far we
+ already got. */
+static int stage;
+
+/* We should be prepared for multiple threads trying to run abort. */
+__libc_lock_define_initialized_recursive (static, lock);
+
+
+/* Cause an abnormal program termination with core-dump. */
+void
+abort (void)
+{
+ struct sigaction act;
+ sigset_t sigs;
+
+ /* First acquire the lock. */
+ __libc_lock_lock_recursive (lock);
+
+ /* Now it's for sure we are alone. But recursive calls are possible. */
+
+ /* Unlock SIGABRT. */
+ if (stage == 0)
+ {
+ ++stage;
+ if (__sigemptyset (&sigs) == 0 &&
+ __sigaddset (&sigs, SIGABRT) == 0)
+ __sigprocmask (SIG_UNBLOCK, &sigs, (sigset_t *) NULL);
+ }
+
+ /* Flush all streams. We cannot close them now because the user
+ might have registered a handler for SIGABRT. */
+ if (stage == 1)
+ {
+ ++stage;
+ fflush (NULL);
+ }
+
+ /* Send signal which possibly calls a user handler. */
+ if (stage == 2)
+ {
+ /* This stage is special: we must allow repeated calls of
+ `abort' when a user defined handler for SIGABRT is installed.
+ This is risky since the `raise' implementation might also
+ fail but I don't see another possibility. */
+ int save_stage = stage;
+
+ stage = 0;
+ __libc_lock_unlock_recursive (lock);
+
+ raise (SIGABRT);
+
+ __libc_lock_lock_recursive (lock);
+ stage = save_stage + 1;
+ }
+
+ /* There was a handler installed. Now remove it. */
+ if (stage == 3)
+ {
+ ++stage;
+ memset (&act, '\0', sizeof (struct sigaction));
+ act.sa_handler = SIG_DFL;
+ __sigfillset (&act.sa_mask);
+ act.sa_flags = 0;
+ __sigaction (SIGABRT, &act, NULL);
+ }
+
+ /* Now close the streams which also flushes the output the user
+ defined handler might has produced. */
+ if (stage == 4)
+ {
+ ++stage;
+ __fcloseall ();
+ }
+
+ /* Try again. */
+ if (stage == 5)
+ {
+ ++stage;
+ raise (SIGABRT);
+ }
+
+ /* Now try to abort using the system specific command. */
+ if (stage == 6)
+ {
+ ++stage;
+ ABORT_INSTRUCTION;
+ }
+
+ /* If we can't signal ourselves and the abort instruction failed, exit. */
+ if (stage == 7)
+ {
+ ++stage;
+ _exit (127);
+ }
+
+ /* If even this fails try to use the provided instruction to crash
+ or otherwise make sure we never return. */
+ while (1)
+ /* Try for ever and ever. */
+ ABORT_INSTRUCTION;
+}
+libc_hidden_def (abort)
diff --git a/stdlib/add_n.c b/stdlib/add_n.c
new file mode 100644
index 0000000..280e305
--- /dev/null
+++ b/stdlib/add_n.c
@@ -0,0 +1,62 @@
+/* mpn_add_n -- Add two limb vectors of equal, non-zero length.
+
+Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+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 MP 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 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 "gmp-impl.h"
+
+mp_limb_t
+#if __STDC__
+mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
+#else
+mpn_add_n (res_ptr, s1_ptr, s2_ptr, size)
+ register mp_ptr res_ptr;
+ register mp_srcptr s1_ptr;
+ register mp_srcptr s2_ptr;
+ mp_size_t size;
+#endif
+{
+ register mp_limb_t x, y, cy;
+ register mp_size_t j;
+
+ /* The loop counter and index J goes from -SIZE to -1. This way
+ the loop becomes faster. */
+ j = -size;
+
+ /* Offset the base pointers to compensate for the negative indices. */
+ s1_ptr -= j;
+ s2_ptr -= j;
+ res_ptr -= j;
+
+ cy = 0;
+ do
+ {
+ y = s2_ptr[j];
+ x = s1_ptr[j];
+ y += cy; /* add previous carry to one addend */
+ cy = (y < cy); /* get out carry from that addition */
+ y = x + y; /* add other addend */
+ cy = (y < x) + cy; /* get out carry from that add, combine */
+ res_ptr[j] = y;
+ }
+ while (++j != 0);
+
+ return cy;
+}
diff --git a/stdlib/addmul_1.c b/stdlib/addmul_1.c
new file mode 100644
index 0000000..6ae1e57
--- /dev/null
+++ b/stdlib/addmul_1.c
@@ -0,0 +1,65 @@
+/* mpn_addmul_1 -- multiply the S1_SIZE long limb vector pointed to by S1_PTR
+ by S2_LIMB, add the S1_SIZE least significant limbs of the product to the
+ limb vector pointed to by RES_PTR. Return the most significant limb of
+ the product, adjusted for carry-out from the addition.
+
+Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+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 MP 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 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 "gmp-impl.h"
+#include "longlong.h"
+
+mp_limb_t
+mpn_addmul_1 (res_ptr, s1_ptr, s1_size, s2_limb)
+ register mp_ptr res_ptr;
+ register mp_srcptr s1_ptr;
+ mp_size_t s1_size;
+ register mp_limb_t s2_limb;
+{
+ register mp_limb_t cy_limb;
+ register mp_size_t j;
+ register mp_limb_t prod_high, prod_low;
+ register mp_limb_t x;
+
+ /* The loop counter and index J goes from -SIZE to -1. This way
+ the loop becomes faster. */
+ j = -s1_size;
+
+ /* Offset the base pointers to compensate for the negative indices. */
+ res_ptr -= j;
+ s1_ptr -= j;
+
+ cy_limb = 0;
+ do
+ {
+ umul_ppmm (prod_high, prod_low, s1_ptr[j], s2_limb);
+
+ prod_low += cy_limb;
+ cy_limb = (prod_low < cy_limb) + prod_high;
+
+ x = res_ptr[j];
+ prod_low = x + prod_low;
+ cy_limb += (prod_low < x);
+ res_ptr[j] = prod_low;
+ }
+ while (++j != 0);
+
+ return cy_limb;
+}
diff --git a/stdlib/cmp.c b/stdlib/cmp.c
new file mode 100644
index 0000000..e766170
--- /dev/null
+++ b/stdlib/cmp.c
@@ -0,0 +1,56 @@
+/* mpn_cmp -- Compare two low-level natural-number integers.
+
+Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+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 MP 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 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 "gmp-impl.h"
+
+/* Compare OP1_PTR/OP1_SIZE with OP2_PTR/OP2_SIZE.
+ There are no restrictions on the relative sizes of
+ the two arguments.
+ Return 1 if OP1 > OP2, 0 if they are equal, and -1 if OP1 < OP2. */
+
+int
+#if __STDC__
+mpn_cmp (mp_srcptr op1_ptr, mp_srcptr op2_ptr, mp_size_t size)
+#else
+mpn_cmp (op1_ptr, op2_ptr, size)
+ mp_srcptr op1_ptr;
+ mp_srcptr op2_ptr;
+ mp_size_t size;
+#endif
+{
+ mp_size_t i;
+ mp_limb_t op1_word, op2_word;
+
+ for (i = size - 1; i >= 0; i--)
+ {
+ op1_word = op1_ptr[i];
+ op2_word = op2_ptr[i];
+ if (op1_word != op2_word)
+ goto diff;
+ }
+ return 0;
+ diff:
+ /* This can *not* be simplified to
+ op2_word - op2_word
+ since that expression might give signed overflow. */
+ return (op1_word > op2_word) ? 1 : -1;
+}
diff --git a/stdlib/dbl2mpn.c b/stdlib/dbl2mpn.c
new file mode 100644
index 0000000..4444467
--- /dev/null
+++ b/stdlib/dbl2mpn.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1993, 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. */
+
+#include <gmp.h>
+#include "gmp-impl.h"
+
+/* Convert a `double' to a multi-precision integer representing the
+ significand scaled up by the highest possible number of significant bits
+ of fraction (DBL_MANT_DIG), and an integral power of two (MPN frexp). */
+
+mp_size_t
+__mpn_extract_double (mp_ptr res_ptr, mp_size_t size,
+ int *expt, int *is_neg,
+ double value)
+{
+#error "__mpn_extract_double is not implemented for this floating point format"
+}
diff --git a/stdlib/div.c b/stdlib/div.c
new file mode 100644
index 0000000..5268f4c
--- /dev/null
+++ b/stdlib/div.c
@@ -0,0 +1,86 @@
+/* Copyright (C) 1992, 1997, 1999 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. */
+
+/*
+ * Copyright (c) 1990 Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 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
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * 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.
+ */
+
+#include <stdlib.h>
+
+/* Return the `div_t' representation of NUMER over DENOM. */
+div_t
+div (numer, denom)
+ int numer, denom;
+{
+ div_t result;
+
+ result.quot = numer / denom;
+ result.rem = numer % denom;
+
+ /* The ANSI standard says that |QUOT| <= |NUMER / DENOM|, where
+ NUMER / DENOM is to be computed in infinite precision. In
+ other words, we should always truncate the quotient towards
+ zero, never -infinity. Machine division and remainer may
+ work either way when one or both of NUMER or DENOM is
+ negative. If only one is negative and QUOT has been
+ truncated towards -infinity, REM will have the same sign as
+ DENOM and the opposite sign of NUMER; if both are negative
+ and QUOT has been truncated towards -infinity, REM will be
+ positive (will have the opposite sign of NUMER). These are
+ considered `wrong'. If both are NUM and DENOM are positive,
+ RESULT will always be positive. This all boils down to: if
+ NUMER >= 0, but REM < 0, we got the wrong answer. In that
+ case, to get the right answer, add 1 to QUOT and subtract
+ DENOM from REM. */
+
+ if (numer >= 0 && result.rem < 0)
+ {
+ ++result.quot;
+ result.rem -= denom;
+ }
+
+ return result;
+}
diff --git a/stdlib/divmod_1.c b/stdlib/divmod_1.c
new file mode 100644
index 0000000..51a47d8
--- /dev/null
+++ b/stdlib/divmod_1.c
@@ -0,0 +1,208 @@
+/* mpn_divmod_1(quot_ptr, dividend_ptr, dividend_size, divisor_limb) --
+ Divide (DIVIDEND_PTR,,DIVIDEND_SIZE) by DIVISOR_LIMB.
+ Write DIVIDEND_SIZE limbs of quotient at QUOT_PTR.
+ Return the single-limb remainder.
+ There are no constraints on the value of the divisor.
+
+ QUOT_PTR and DIVIDEND_PTR might point to the same limb.
+
+Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+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 MP 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 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 "gmp-impl.h"
+#include "longlong.h"
+
+#ifndef UMUL_TIME
+#define UMUL_TIME 1
+#endif
+
+#ifndef UDIV_TIME
+#define UDIV_TIME UMUL_TIME
+#endif
+
+/* FIXME: We should be using invert_limb (or invert_normalized_limb)
+ here (not udiv_qrnnd). */
+
+mp_limb_t
+#if __STDC__
+mpn_divmod_1 (mp_ptr quot_ptr,
+ mp_srcptr dividend_ptr, mp_size_t dividend_size,
+ mp_limb_t divisor_limb)
+#else
+mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
+ mp_ptr quot_ptr;
+ mp_srcptr dividend_ptr;
+ mp_size_t dividend_size;
+ mp_limb_t divisor_limb;
+#endif
+{
+ mp_size_t i;
+ mp_limb_t n1, n0, r;
+ int dummy;
+
+ /* ??? Should this be handled at all? Rely on callers? */
+ if (dividend_size == 0)
+ return 0;
+
+ /* If multiplication is much faster than division, and the
+ dividend is large, pre-invert the divisor, and use
+ only multiplications in the inner loop. */
+
+ /* This test should be read:
+ Does it ever help to use udiv_qrnnd_preinv?
+ && Does what we save compensate for the inversion overhead? */
+ if (UDIV_TIME > (2 * UMUL_TIME + 6)
+ && (UDIV_TIME - (2 * UMUL_TIME + 6)) * dividend_size > UDIV_TIME)
+ {
+ int normalization_steps;
+
+ count_leading_zeros (normalization_steps, divisor_limb);
+ if (normalization_steps != 0)
+ {
+ mp_limb_t divisor_limb_inverted;
+
+ divisor_limb <<= normalization_steps;
+
+ /* Compute (2**2N - 2**N * DIVISOR_LIMB) / DIVISOR_LIMB. The
+ result is a (N+1)-bit approximation to 1/DIVISOR_LIMB, with the
+ most significant bit (with weight 2**N) implicit. */
+
+ /* Special case for DIVISOR_LIMB == 100...000. */
+ if (divisor_limb << 1 == 0)
+ divisor_limb_inverted = ~(mp_limb_t) 0;
+ else
+ udiv_qrnnd (divisor_limb_inverted, dummy,
+ -divisor_limb, 0, divisor_limb);
+
+ n1 = dividend_ptr[dividend_size - 1];
+ r = n1 >> (BITS_PER_MP_LIMB - normalization_steps);
+
+ /* Possible optimization:
+ if (r == 0
+ && divisor_limb > ((n1 << normalization_steps)
+ | (dividend_ptr[dividend_size - 2] >> ...)))
+ ...one division less... */
+
+ for (i = dividend_size - 2; i >= 0; i--)
+ {
+ n0 = dividend_ptr[i];
+ udiv_qrnnd_preinv (quot_ptr[i + 1], r, r,
+ ((n1 << normalization_steps)
+ | (n0 >> (BITS_PER_MP_LIMB - normalization_steps))),
+ divisor_limb, divisor_limb_inverted);
+ n1 = n0;
+ }
+ udiv_qrnnd_preinv (quot_ptr[0], r, r,
+ n1 << normalization_steps,
+ divisor_limb, divisor_limb_inverted);
+ return r >> normalization_steps;
+ }
+ else
+ {
+ mp_limb_t divisor_limb_inverted;
+
+ /* Compute (2**2N - 2**N * DIVISOR_LIMB) / DIVISOR_LIMB. The
+ result is a (N+1)-bit approximation to 1/DIVISOR_LIMB, with the
+ most significant bit (with weight 2**N) implicit. */
+
+ /* Special case for DIVISOR_LIMB == 100...000. */
+ if (divisor_limb << 1 == 0)
+ divisor_limb_inverted = ~(mp_limb_t) 0;
+ else
+ udiv_qrnnd (divisor_limb_inverted, dummy,
+ -divisor_limb, 0, divisor_limb);
+
+ i = dividend_size - 1;
+ r = dividend_ptr[i];
+
+ if (r >= divisor_limb)
+ r = 0;
+ else
+ {
+ quot_ptr[i] = 0;
+ i--;
+ }
+
+ for (; i >= 0; i--)
+ {
+ n0 = dividend_ptr[i];
+ udiv_qrnnd_preinv (quot_ptr[i], r, r,
+ n0, divisor_limb, divisor_limb_inverted);
+ }
+ return r;
+ }
+ }
+ else
+ {
+ if (UDIV_NEEDS_NORMALIZATION)
+ {
+ int normalization_steps;
+
+ count_leading_zeros (normalization_steps, divisor_limb);
+ if (normalization_steps != 0)
+ {
+ divisor_limb <<= normalization_steps;
+
+ n1 = dividend_ptr[dividend_size - 1];
+ r = n1 >> (BITS_PER_MP_LIMB - normalization_steps);
+
+ /* Possible optimization:
+ if (r == 0
+ && divisor_limb > ((n1 << normalization_steps)
+ | (dividend_ptr[dividend_size - 2] >> ...)))
+ ...one division less... */
+
+ for (i = dividend_size - 2; i >= 0; i--)
+ {
+ n0 = dividend_ptr[i];
+ udiv_qrnnd (quot_ptr[i + 1], r, r,
+ ((n1 << normalization_steps)
+ | (n0 >> (BITS_PER_MP_LIMB - normalization_steps))),
+ divisor_limb);
+ n1 = n0;
+ }
+ udiv_qrnnd (quot_ptr[0], r, r,
+ n1 << normalization_steps,
+ divisor_limb);
+ return r >> normalization_steps;
+ }
+ }
+ /* No normalization needed, either because udiv_qrnnd doesn't require
+ it, or because DIVISOR_LIMB is already normalized. */
+
+ i = dividend_size - 1;
+ r = dividend_ptr[i];
+
+ if (r >= divisor_limb)
+ r = 0;
+ else
+ {
+ quot_ptr[i] = 0;
+ i--;
+ }
+
+ for (; i >= 0; i--)
+ {
+ n0 = dividend_ptr[i];
+ udiv_qrnnd (quot_ptr[i], r, r, n0, divisor_limb);
+ }
+ return r;
+ }
+}
diff --git a/stdlib/divrem.c b/stdlib/divrem.c
new file mode 100644
index 0000000..c97d01e
--- /dev/null
+++ b/stdlib/divrem.c
@@ -0,0 +1,245 @@
+/* mpn_divrem -- Divide natural numbers, producing both remainder and
+ quotient.
+
+Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+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 MP 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 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 "gmp-impl.h"
+#include "longlong.h"
+
+/* Divide num (NP/NSIZE) by den (DP/DSIZE) and write
+ the NSIZE-DSIZE least significant quotient limbs at QP
+ and the DSIZE long remainder at NP. If QEXTRA_LIMBS is
+ non-zero, generate that many fraction bits and append them after the
+ other quotient limbs.
+ Return the most significant limb of the quotient, this is always 0 or 1.
+
+ Preconditions:
+ 0. NSIZE >= DSIZE.
+ 1. The most significant bit of the divisor must be set.
+ 2. QP must either not overlap with the input operands at all, or
+ QP + DSIZE >= NP must hold true. (This means that it's
+ possible to put the quotient in the high part of NUM, right after the
+ remainder in NUM.
+ 3. NSIZE >= DSIZE, even if QEXTRA_LIMBS is non-zero. */
+
+mp_limb_t
+#if __STDC__
+mpn_divrem (mp_ptr qp, mp_size_t qextra_limbs,
+ mp_ptr np, mp_size_t nsize,
+ mp_srcptr dp, mp_size_t dsize)
+#else
+mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
+ mp_ptr qp;
+ mp_size_t qextra_limbs;
+ mp_ptr np;
+ mp_size_t nsize;
+ mp_srcptr dp;
+ mp_size_t dsize;
+#endif
+{
+ mp_limb_t most_significant_q_limb = 0;
+
+ switch (dsize)
+ {
+ case 0:
+ /* We are asked to divide by zero, so go ahead and do it! (To make
+ the compiler not remove this statement, return the value.) */
+ return 1 / dsize;
+
+ case 1:
+ {
+ mp_size_t i;
+ mp_limb_t n1;
+ mp_limb_t d;
+
+ d = dp[0];
+ n1 = np[nsize - 1];
+
+ if (n1 >= d)
+ {
+ n1 -= d;
+ most_significant_q_limb = 1;
+ }
+
+ qp += qextra_limbs;
+ for (i = nsize - 2; i >= 0; i--)
+ udiv_qrnnd (qp[i], n1, n1, np[i], d);
+ qp -= qextra_limbs;
+
+ for (i = qextra_limbs - 1; i >= 0; i--)
+ udiv_qrnnd (qp[i], n1, n1, 0, d);
+
+ np[0] = n1;
+ }
+ break;
+
+ case 2:
+ {
+ mp_size_t i;
+ mp_limb_t n1, n0, n2;
+ mp_limb_t d1, d0;
+
+ np += nsize - 2;
+ d1 = dp[1];
+ d0 = dp[0];
+ n1 = np[1];
+ n0 = np[0];
+
+ if (n1 >= d1 && (n1 > d1 || n0 >= d0))
+ {
+ sub_ddmmss (n1, n0, n1, n0, d1, d0);
+ most_significant_q_limb = 1;
+ }
+
+ for (i = qextra_limbs + nsize - 2 - 1; i >= 0; i--)
+ {
+ mp_limb_t q;
+ mp_limb_t r;
+
+ if (i >= qextra_limbs)
+ np--;
+ else
+ np[0] = 0;
+
+ if (n1 == d1)
+ {
+ /* Q should be either 111..111 or 111..110. Need special
+ treatment of this rare case as normal division would
+ give overflow. */
+ q = ~(mp_limb_t) 0;
+
+ r = n0 + d1;
+ if (r < d1) /* Carry in the addition? */
+ {
+ add_ssaaaa (n1, n0, r - d0, np[0], 0, d0);
+ qp[i] = q;
+ continue;
+ }
+ n1 = d0 - (d0 != 0);
+ n0 = -d0;
+ }
+ else
+ {
+ udiv_qrnnd (q, r, n1, n0, d1);
+ umul_ppmm (n1, n0, d0, q);
+ }
+
+ n2 = np[0];
+ q_test:
+ if (n1 > r || (n1 == r && n0 > n2))
+ {
+ /* The estimated Q was too large. */
+ q--;
+
+ sub_ddmmss (n1, n0, n1, n0, 0, d0);
+ r += d1;
+ if (r >= d1) /* If not carry, test Q again. */
+ goto q_test;
+ }
+
+ qp[i] = q;
+ sub_ddmmss (n1, n0, r, n2, n1, n0);
+ }
+ np[1] = n1;
+ np[0] = n0;
+ }
+ break;
+
+ default:
+ {
+ mp_size_t i;
+ mp_limb_t dX, d1, n0;
+
+ np += nsize - dsize;
+ dX = dp[dsize - 1];
+ d1 = dp[dsize - 2];
+ n0 = np[dsize - 1];
+
+ if (n0 >= dX)
+ {
+ if (n0 > dX || mpn_cmp (np, dp, dsize - 1) >= 0)
+ {
+ mpn_sub_n (np, np, dp, dsize);
+ n0 = np[dsize - 1];
+ most_significant_q_limb = 1;
+ }
+ }
+
+ for (i = qextra_limbs + nsize - dsize - 1; i >= 0; i--)
+ {
+ mp_limb_t q;
+ mp_limb_t n1, n2;
+ mp_limb_t cy_limb;
+
+ if (i >= qextra_limbs)
+ {
+ np--;
+ n2 = np[dsize];
+ }
+ else
+ {
+ n2 = np[dsize - 1];
+ MPN_COPY_DECR (np + 1, np, dsize);
+ np[0] = 0;
+ }
+
+ if (n0 == dX)
+ /* This might over-estimate q, but it's probably not worth
+ the extra code here to find out. */
+ q = ~(mp_limb_t) 0;
+ else
+ {
+ mp_limb_t r;
+
+ udiv_qrnnd (q, r, n0, np[dsize - 1], dX);
+ umul_ppmm (n1, n0, d1, q);
+
+ while (n1 > r || (n1 == r && n0 > np[dsize - 2]))
+ {
+ q--;
+ r += dX;
+ if (r < dX) /* I.e. "carry in previous addition?" */
+ break;
+ n1 -= n0 < d1;
+ n0 -= d1;
+ }
+ }
+
+ /* Possible optimization: We already have (q * n0) and (1 * n1)
+ after the calculation of q. Taking advantage of that, we
+ could make this loop make two iterations less. */
+
+ cy_limb = mpn_submul_1 (np, dp, dsize, q);
+
+ if (n2 != cy_limb)
+ {
+ mpn_add_n (np, np, dp, dsize);
+ q--;
+ }
+
+ qp[i] = q;
+ n0 = np[dsize - 1];
+ }
+ }
+ }
+
+ return most_significant_q_limb;
+}
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index 3a1c1eb..c7901c2 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 <gmp-mparam.h>
#include <gmp.h>
-#include <gmp-impl.h>
-#include <longlong.h>
+#include "gmp-impl.h"
+#include "longlong.h"
#include "fpioconst.h"
#define NDEBUG 1
diff --git a/string/_strerror.c b/string/_strerror.c
new file mode 100644
index 0000000..f6f16ff
--- /dev/null
+++ b/string/_strerror.c
@@ -0,0 +1,67 @@
+/* Copyright (C) 1991,93,95,96,97,98,2000,2002 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 <libintl.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/param.h>
+#include <stdio-common/_itoa.h>
+
+/* It is critical here that we always use the `dcgettext' function for
+ the message translation. Since <libintl.h> only defines the macro
+ `dgettext' to use `dcgettext' for optimizing programs this is not
+ always guaranteed. */
+#ifndef dgettext
+# include <locale.h> /* We need LC_MESSAGES. */
+# define dgettext(domainname, msgid) dcgettext (domainname, msgid, LC_MESSAGES)
+#endif
+
+/* Return a string describing the errno code in ERRNUM. */
+char *
+__strerror_r (int errnum, char *buf, size_t buflen)
+{
+ if (errnum < 0 || errnum >= _sys_nerr_internal
+ || _sys_errlist_internal[errnum] == NULL)
+ {
+ /* Buffer we use to print the number in. For a maximum size for
+ `int' of 8 bytes we never need more than 20 digits. */
+ char numbuf[21];
+ const char *unk = _("Unknown error ");
+ const size_t unklen = strlen (unk);
+ char *p, *q;
+
+ numbuf[20] = '\0';
+ p = _itoa_word (errnum, &numbuf[20], 10, 0);
+
+ /* Now construct the result while taking care for the destination
+ buffer size. */
+ q = __mempcpy (buf, unk, MIN (unklen, buflen));
+ if (unklen < buflen)
+ memcpy (q, p, MIN ((size_t) (&numbuf[21] - p), buflen - unklen));
+
+ /* Terminate the string in any case. */
+ if (buflen > 0)
+ buf[buflen - 1] = '\0';
+
+ return buf;
+ }
+
+ return (char *) _(_sys_errlist_internal[errnum]);
+}
+weak_alias (__strerror_r, strerror_r)
+libc_hidden_def (__strerror_r)
diff --git a/string/bcopy.c b/string/bcopy.c
new file mode 100644
index 0000000..3f16b88
--- /dev/null
+++ b/string/bcopy.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1991, 1992, 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. */
+
+#include <string.h>
+
+#define memmove bcopy
+#define rettype void
+#define RETURN(s) return
+#define a1 src
+#define a1const const
+#define a2 dest
+#define a2const
+
+#include <memmove.c>
diff --git a/string/bzero.c b/string/bzero.c
new file mode 100644
index 0000000..c6ede14
--- /dev/null
+++ b/string/bzero.c
@@ -0,0 +1,83 @@
+/* Copyright (C) 1991, 1997, 1999 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
+ 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 <string.h>
+#include <memcopy.h>
+
+#undef __bzero
+
+/* Set N bytes of S to 0. */
+void
+__bzero (s, len)
+ void *s;
+ size_t len;
+{
+ long int dstp = (long int) s;
+ const op_t zero = 0;
+
+ if (len >= 8)
+ {
+ size_t xlen;
+
+ /* There are at least some bytes to zero. No need to test
+ for LEN == 0 in this alignment loop. */
+ while (dstp % OPSIZ != 0)
+ {
+ ((byte *) dstp)[0] = 0;
+ dstp += 1;
+ len -= 1;
+ }
+
+ /* Write 8 op_t per iteration until less than 8 op_t remain. */
+ xlen = len / (OPSIZ * 8);
+ while (xlen != 0)
+ {
+ ((op_t *) dstp)[0] = zero;
+ ((op_t *) dstp)[1] = zero;
+ ((op_t *) dstp)[2] = zero;
+ ((op_t *) dstp)[3] = zero;
+ ((op_t *) dstp)[4] = zero;
+ ((op_t *) dstp)[5] = zero;
+ ((op_t *) dstp)[6] = zero;
+ ((op_t *) dstp)[7] = zero;
+ dstp += 8 * OPSIZ;
+ xlen -= 1;
+ }
+ len %= OPSIZ * 8;
+
+ /* Write 1 op_t per iteration until less than op_t remain. */
+ xlen = len / OPSIZ;
+ while (xlen != 0)
+ {
+ ((op_t *) dstp)[0] = zero;
+ dstp += OPSIZ;
+ xlen -= 1;
+ }
+ len %= OPSIZ;
+ }
+
+ /* Write the last few bytes. */
+ while (len != 0)
+ {
+ ((byte *) dstp)[0] = 0;
+ dstp += 1;
+ len -= 1;
+ }
+}
+weak_alias (__bzero, bzero)
diff --git a/sysdeps/ieee754/ldbl-96/printf_fphex.c b/sysdeps/ieee754/ldbl-96/printf_fphex.c
index 3c8183d..ba9f4c2 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 <sysdeps/generic/printf_fphex.c>
+#include <stdio-common/printf_fphex.c>
diff --git a/sysdeps/ieee754/ldbl-96/strtold_l.c b/sysdeps/ieee754/ldbl-96/strtold_l.c
index 32bf180..52335c2 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 <strtod_l.c>
+#include <stdlib/strtod_l.c>
diff --git a/sysdeps/powerpc/elf/libc-start.c b/sysdeps/powerpc/elf/libc-start.c
index af67a39..8a60af8 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 <sysdeps/generic/libc-start.c>
+#include <csu/libc-start.c>
struct startup_info
diff --git a/sysdeps/unix/sysv/linux/dl-sbrk.c b/sysdeps/unix/sysv/linux/dl-sbrk.c
index 4713a92..1ce5cb1 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 <sbrk.c>
+#include <misc/sbrk.c>
diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c
index 79f95df..acc2441 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 <sysdeps/generic/dl-sysdep.c>
+#include <elf/dl-sysdep.c>
diff --git a/sysdeps/unix/sysv/linux/i386/getrlimit64.c b/sysdeps/unix/sysv/linux/i386/getrlimit64.c
index d6ab86f..2ff1753 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 <sysdeps/generic/getrlimit64.c>
+#include <resource/getrlimit64.c>
#undef getrlimit64
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/i386/glob64.c b/sysdeps/unix/sysv/linux/i386/glob64.c
index d3d1212..18b7f21 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 <sysdeps/generic/glob.c>
+#include <posix/glob.c>
#include "shlib-compat.h"
@@ -48,7 +48,7 @@ int __old_glob64 (__const char *__pattern, int __flags,
#define GLOB_ONLY_P 1
-#include <sysdeps/generic/glob.c>
+#include <posix/glob.c>
compat_symbol (libc, __old_glob64, glob64, GLIBC_2_1);
#endif
diff --git a/sysdeps/unix/sysv/linux/segfault.c b/sysdeps/unix/sysv/linux/segfault.c
index 088c329..a417df9 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 <sysdeps/generic/segfault.c>
+#include <debug/segfault.c>
diff --git a/sysdeps/unix/sysv/linux/sigreturn.c b/sysdeps/unix/sysv/linux/sigreturn.c
index 6b3116f..626b1eb 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 <sysdeps/generic/sigreturn.c>
+#include <signal/sigreturn.c>
diff --git a/sysdeps/unix/sysv/linux/syslog.c b/sysdeps/unix/sysv/linux/syslog.c
index eaaa983..56828b2 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 <sysdeps/generic/syslog.c>
+#include <misc/syslog.c>
diff --git a/sysdeps/unix/sysv/linux/updwtmp.c b/sysdeps/unix/sysv/linux/updwtmp.c
index 63dd87e..d4d3f2c 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 <kettenis@phys.uva.nl>, 1998.
@@ -31,4 +31,4 @@
&& __access (_PATH_WTMP "x", F_OK) != 0) ? _PATH_WTMP : \
file_name))))
-#include <sysdeps/generic/updwtmp.c>
+#include <login/updwtmp.c>
diff --git a/sysdeps/unix/sysv/linux/utmp_file.c b/sysdeps/unix/sysv/linux/utmp_file.c
index 3a27802..958619a 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 <kettenis@phys.uva.nl>, 1998.
@@ -31,4 +31,4 @@
&& __access (_PATH_WTMP "x", F_OK) != 0) ? _PATH_WTMP : \
file_name))))
-#include <sysdeps/generic/utmp_file.c>
+#include <login/utmp_file.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c
index 7e26fec..6662a94 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 <sysdeps/i386/dl-procinfo.c>
+# include <sysdeps/i386/dl-procinfo.c>
#else
-#include <sysdeps/generic/dl-procinfo.c>
+# include <sysdeps/generic/dl-procinfo.c>
#endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h
index b360b42..3145520 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 <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
+# include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
#else
-#include <sysdeps/generic/dl-procinfo.h>
+# include <sysdeps/generic/dl-procinfo.h>
#endif
diff --git a/sysdeps/wordsize-32/llabs.c b/sysdeps/wordsize-32/llabs.c
index 3087fd6..04a93f4 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 <inttypes.h>
-#include <sysdeps/generic/llabs.c>
+#include <stdlib/llabs.c>
weak_alias (llabs, imaxabs)
diff --git a/sysdeps/wordsize-32/lldiv.c b/sysdeps/wordsize-32/lldiv.c
index 5cefd35..1d543ba 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 <inttypes.h>
-#include <sysdeps/generic/lldiv.c>
+#include <stdlib/lldiv.c>
#undef imaxdiv
weak_alias (lldiv, imaxdiv)
diff --git a/sysdeps/wordsize-64/glob.c b/sysdeps/wordsize-64/glob.c
index 7ee2eb2..082faf1 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 <sysdeps/generic/glob.c>
+#include <posix/glob.c>
#undef glob64
#undef globfree64
weak_alias (glob, glob64)
diff --git a/sysdeps/wordsize-64/labs.c b/sysdeps/wordsize-64/labs.c
index 75b41b1..5162ec5 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 <inttypes.h>
-#include <sysdeps/generic/labs.c>
+#include <stdlib/labs.c>
weak_alias (labs, imaxabs)
diff --git a/sysdeps/wordsize-64/ldiv.c b/sysdeps/wordsize-64/ldiv.c
index ff21391..e4681a3 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 <inttypes.h>
-#include <sysdeps/generic/ldiv.c>
+#include <stdlib/ldiv.c>
#undef imaxdiv
weak_alias (ldiv, imaxdiv)
diff --git a/sysdeps/wordsize-64/strtol.c b/sysdeps/wordsize-64/strtol.c
index ec07ea7..2e1b229 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 <sysdeps/generic/strtol.c>
+#include <stdlib/strtol.c>
#undef __strtoll_internal
#undef strtoll
diff --git a/sysdeps/wordsize-64/strtol_l.c b/sysdeps/wordsize-64/strtol_l.c
index 5a5cd8d..b2cd102 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 <sysdeps/generic/strtol_l.c>
+#include <stdlib/strtol_l.c>
#undef ____strtoll_l_internal
#undef __strtoll_l
diff --git a/sysdeps/wordsize-64/strtoul.c b/sysdeps/wordsize-64/strtoul.c
index ac3ca71..401882c 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 <sysdeps/generic/strtoul.c>
+#include <stdlib/strtoul.c>
#undef __strtoull_internal
#undef strtoull
diff --git a/sysdeps/wordsize-64/strtoul_l.c b/sysdeps/wordsize-64/strtoul_l.c
index 9ee00a3..80cca33 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 <sysdeps/generic/strtoul_l.c>
+#include <stdlib/strtoul_l.c>
#undef ____strtoull_l_internal
#undef __strtoull_l
diff --git a/sysdeps/wordsize-64/wcstol.c b/sysdeps/wordsize-64/wcstol.c
index 96870cb..b10895a 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 <sysdeps/generic/wcstol.c>
+#include <wcsmbs/wcstol.c>
#undef __wcstoll_internal
#undef wcstoll
diff --git a/sysdeps/wordsize-64/wcstol_l.c b/sysdeps/wordsize-64/wcstol_l.c
index fe81147..4f48f60 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 <sysdeps/generic/wcstol_l.c>
+#include <wcsmbs/wcstol_l.c>
#undef ____wcstoll_l_internal
#undef __wcstoll_l
diff --git a/sysdeps/wordsize-64/wcstoul.c b/sysdeps/wordsize-64/wcstoul.c
index b6f5d9a..2becb80 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 <sysdeps/generic/wcstoul.c>
+#include <wcsmbs/wcstoul.c>
#undef __wcstoull_internal
#undef wcstoull
diff --git a/sysdeps/wordsize-64/wcstoul_l.c b/sysdeps/wordsize-64/wcstoul_l.c
index d13bd5b..c376fa0 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 <sysdeps/generic/wcstoul_l.c>
+#include <wcsmbs/wcstoul_l.c>
#undef ____wcstoull_l_internal
#undef __wcstoull_l
diff --git a/sysdeps/x86_64/fpu/printf_fphex.c b/sysdeps/x86_64/fpu/printf_fphex.c
index d6ca102..b701b20 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 <sysdeps/generic/printf_fphex.c>
+#include <stdio-common/printf_fphex.c>
diff --git a/time/adjtime.c b/time/adjtime.c
new file mode 100644
index 0000000..8645652
--- /dev/null
+++ b/time/adjtime.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <errno.h>
+#include <sys/time.h>
+
+/* Adjust the current time of day by the amount in DELTA.
+ If OLDDELTA is not NULL, it is filled in with the amount
+ of time adjustment remaining to be done from the last `__adjtime' call.
+ This call is restricted to the super-user. */
+int
+__adjtime (delta, olddelta)
+ const struct timeval *delta;
+ struct timeval *olddelta;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (adjtime)
+
+weak_alias (__adjtime, adjtime)
+#include <stub-tag.h>
diff --git a/time/clock.c b/time/clock.c
new file mode 100644
index 0000000..99dc5f4
--- /dev/null
+++ b/time/clock.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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 <sys/times.h>
+#include <time.h>
+#include <errno.h>
+
+/* Return the time used by the program so far (user time + system time). */
+clock_t
+clock ()
+{
+ __set_errno (ENOSYS);
+ return (clock_t) -1;
+}
+
+stub_warning (clock)
+#include <stub-tag.h>
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index 4aab7e8..7446bda 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