about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 13:29:44 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 13:29:44 +0000
commit13a4ee0bb4ccb6691729bde67233f5ca66209c7c (patch)
tree72d62fed4d091a1f38c021d9c3eab5e50044e8c4
parent0923a2c896f09795cca4a6d800a336a56b0ee42c (diff)
downloadglibc-13a4ee0bb4ccb6691729bde67233f5ca66209c7c.tar.gz
glibc-13a4ee0bb4ccb6691729bde67233f5ca66209c7c.tar.xz
glibc-13a4ee0bb4ccb6691729bde67233f5ca66209c7c.zip
[BZ #4745]
	[BZ #4586]
	[BZ #4702]
	[BZ #4525]
	[BZ #4514]
	[BZ #4512]
	Merge selected bugfixes from the trunk.
-rw-r--r--ChangeLog496
-rw-r--r--Makeconfig2
-rw-r--r--Makerules8
-rw-r--r--Versions.def1
-rw-r--r--config.make.in2
-rwxr-xr-xconfigure6475
-rw-r--r--configure.in10
-rw-r--r--crypt/md5-crypt.c2
-rw-r--r--debug/Makefile4
-rw-r--r--debug/chk_fail.c7
-rw-r--r--debug/fortify_fail.c34
-rw-r--r--debug/stack_chk_fail.c7
-rw-r--r--elf/dl-close.c6
-rw-r--r--elf/dl-load.c29
-rw-r--r--elf/readelflib.c37
-rw-r--r--include/bits/fcntl2.h1
-rw-r--r--include/fcntl.h5
-rw-r--r--include/stdio.h1
-rw-r--r--io/Versions3
-rw-r--r--io/bits/fcntl2.h177
-rw-r--r--io/fcntl.h8
-rw-r--r--io/open.c19
-rw-r--r--io/open64.c20
-rw-r--r--io/openat.c17
-rw-r--r--io/openat64.c17
-rw-r--r--nis/nis_domain_of.c4
-rw-r--r--nptl/ChangeLog337
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/allocatestack.c18
-rw-r--r--nptl/descr.h4
-rw-r--r--nptl/init.c43
-rw-r--r--nptl/lowlevellock.h20
-rw-r--r--nptl/pthreadP.h8
-rw-r--r--nptl/pthread_barrier_init.c36
-rw-r--r--nptl/pthread_barrier_wait.c10
-rw-r--r--nptl/pthread_cond_broadcast.c6
-rw-r--r--nptl/pthread_cond_destroy.c14
-rw-r--r--nptl/pthread_cond_init.c6
-rw-r--r--nptl/pthread_cond_signal.c10
-rw-r--r--nptl/pthread_cond_timedwait.c18
-rw-r--r--nptl/pthread_cond_wait.c28
-rw-r--r--nptl/pthread_condattr_getclock.c4
-rw-r--r--nptl/pthread_condattr_setclock.c7
-rw-r--r--nptl/pthread_create.c4
-rw-r--r--nptl/pthread_getattr_np.c6
-rw-r--r--nptl/pthread_getschedparam.c8
-rw-r--r--nptl/pthread_mutex_lock.c7
-rw-r--r--nptl/pthread_mutex_setprioceiling.c10
-rw-r--r--nptl/pthread_mutex_timedlock.c7
-rw-r--r--nptl/pthread_mutex_trylock.c3
-rw-r--r--nptl/pthread_mutex_unlock.c9
-rw-r--r--nptl/pthread_rwlock_init.c39
-rw-r--r--nptl/pthread_rwlock_rdlock.c4
-rw-r--r--nptl/pthread_rwlock_timedrdlock.c8
-rw-r--r--nptl/pthread_rwlock_timedwrlock.c6
-rw-r--r--nptl/pthread_rwlock_tryrdlock.c4
-rw-r--r--nptl/pthread_rwlock_unlock.c10
-rw-r--r--nptl/pthread_setschedparam.c8
-rw-r--r--nptl/pthread_setschedprio.c8
-rw-r--r--nptl/sem_getvalue.c6
-rw-r--r--nptl/sem_init.c47
-rw-r--r--nptl/sem_open.c12
-rw-r--r--nptl/semaphoreP.h4
-rw-r--r--nptl/sysdeps/alpha/tls.h2
-rw-r--r--nptl/sysdeps/i386/tcb-offsets.sym3
-rw-r--r--nptl/sysdeps/i386/tls.h7
-rw-r--r--nptl/sysdeps/ia64/tls.h2
-rw-r--r--nptl/sysdeps/powerpc/tcb-offsets.sym1
-rw-r--r--nptl/sysdeps/powerpc/tls.h2
-rw-r--r--nptl/sysdeps/pthread/aio_misc.h7
-rw-r--r--nptl/sysdeps/pthread/gai_misc.h7
-rw-r--r--nptl/sysdeps/pthread/pt-initfini.c4
-rw-r--r--nptl/sysdeps/pthread/pthread-functions.h1
-rw-r--r--nptl/sysdeps/pthread/pthread.h19
-rw-r--r--nptl/sysdeps/s390/tls.h6
-rw-r--r--nptl/sysdeps/sh/tcb-offsets.sym3
-rw-r--r--nptl/sysdeps/sh/tls.h6
-rw-r--r--nptl/sysdeps/sparc/tls.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/Makefile5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/fork.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h7
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S23
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S57
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S14
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S18
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S16
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S14
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S16
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S16
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S21
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S241
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S291
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h99
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S31
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/internaltypes.h22
-rw-r--r--nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.sym1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevelcond.sym2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevellock.c30
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevelrwlock.sym2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h115
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_post.c33
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_timedwait.c60
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_wait.c69
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h19
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S30
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S61
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h90
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S14
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S72
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S33
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S32
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S29
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S27
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S29
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/sem_post.S15
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S254
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S256
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c17
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/structsem.sym10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/unregister-atfork.c4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S23
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S55
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h84
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S30
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S18
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S13
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S13
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S16
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S16
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S18
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S228
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S227
-rw-r--r--nptl/sysdeps/x86_64/tcb-offsets.sym3
-rw-r--r--nptl/sysdeps/x86_64/tls.h7
-rw-r--r--nptl/tst-initializers1.c12
-rw-r--r--nptl/tst-sem11.c76
-rw-r--r--nptl/tst-sem12.c14
-rw-r--r--nptl/tst-typesizes.c5
-rw-r--r--nptl_db/ChangeLog23
-rw-r--r--nptl_db/db_info.c4
-rw-r--r--nptl_db/structs.def3
-rw-r--r--nptl_db/td_ta_map_lwp2thr.c69
-rw-r--r--nptl_db/td_ta_thr_iter.c25
-rw-r--r--nptl_db/td_thr_event_enable.c24
-rw-r--r--nptl_db/td_thr_get_info.c81
-rw-r--r--nptl_db/td_thr_getfpregs.c7
-rw-r--r--nptl_db/td_thr_getgregs.c7
-rw-r--r--nptl_db/td_thr_setfpregs.c7
-rw-r--r--nptl_db/td_thr_setgregs.c7
-rw-r--r--nptl_db/td_thr_tlsbase.c25
-rw-r--r--nptl_db/td_thr_validate.c16
-rw-r--r--nptl_db/thread_dbP.h5
-rw-r--r--nscd/aicache.c22
-rw-r--r--po/Makefile9
-rw-r--r--posix/sched_cpucount.c20
-rw-r--r--resolv/res_init.c9
-rw-r--r--resolv/res_send.c15
-rw-r--r--resolv/resolv.h6
-rw-r--r--soft-fp/eqdf2.c6
-rw-r--r--soft-fp/eqsf2.c6
-rw-r--r--soft-fp/eqtf2.c6
-rw-r--r--soft-fp/gedf2.c6
-rw-r--r--soft-fp/gesf2.c6
-rw-r--r--soft-fp/getf2.c6
-rw-r--r--soft-fp/ledf2.c6
-rw-r--r--soft-fp/lesf2.c6
-rw-r--r--soft-fp/letf2.c6
-rw-r--r--soft-fp/soft-fp.h6
-rw-r--r--soft-fp/unorddf2.c7
-rw-r--r--soft-fp/unordsf2.c7
-rw-r--r--soft-fp/unordtf2.c7
-rw-r--r--sysdeps/generic/initfini.c4
-rw-r--r--sysdeps/powerpc/powerpc32/970/Implies1
-rw-r--r--sysdeps/powerpc/powerpc32/970/fpu/Implies1
-rw-r--r--sysdeps/powerpc/powerpc32/power4/Makefile6
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/Makefile5
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/mpa.c549
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S47
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S39
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S97
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/s_llroundf.S1
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c66
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c94
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.c62
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.c60
-rw-r--r--sysdeps/powerpc/powerpc32/power4/memcmp.S985
-rw-r--r--sysdeps/powerpc/powerpc32/power4/memcopy.h113
-rw-r--r--sysdeps/powerpc/powerpc32/power4/memcpy.S425
-rw-r--r--sysdeps/powerpc/powerpc32/power4/memset.S228
-rw-r--r--sysdeps/powerpc/powerpc32/power4/strncmp.S176
-rw-r--r--sysdeps/powerpc/powerpc32/power4/wordcopy.c209
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/Implies1
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/Implies1
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S37
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S30
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S37
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S30
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S60
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_llroundf.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S58
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S37
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S30
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S37
-rw-r--r--sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S30
-rw-r--r--sysdeps/powerpc/powerpc32/power5/Implies1
-rw-r--r--sysdeps/powerpc/powerpc32/power5/fpu/Implies1
-rw-r--r--sysdeps/powerpc/powerpc32/power6/Implies2
-rw-r--r--sysdeps/powerpc/powerpc32/power6/fpu/Implies2
-rw-r--r--sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S46
-rw-r--r--sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S39
-rw-r--r--sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S60
-rw-r--r--sysdeps/powerpc/powerpc32/power6/fpu/s_llroundf.S2
-rw-r--r--sysdeps/powerpc/powerpc32/power6/memcpy.S842
-rw-r--r--sysdeps/powerpc/powerpc32/power6/memset.S231
-rw-r--r--sysdeps/powerpc/powerpc32/power6/wordcopy.c287
-rw-r--r--sysdeps/powerpc/powerpc32/power6x/Implies3
-rw-r--r--sysdeps/powerpc/powerpc32/power6x/fpu/Implies3
-rw-r--r--sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S42
-rw-r--r--sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S52
-rw-r--r--sysdeps/powerpc/powerpc64/970/Implies1
-rw-r--r--sysdeps/powerpc/powerpc64/970/fpu/Implies1
-rw-r--r--sysdeps/powerpc/powerpc64/power4/Makefile6
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/Makefile5
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/mpa.c549
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c66
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c94
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c62
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/w_sqrtf.c60
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memcmp.S981
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memcopy.h1
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memcpy.S417
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memset.S280
-rw-r--r--sysdeps/powerpc/powerpc64/power4/strncmp.S180
-rw-r--r--sysdeps/powerpc/powerpc64/power4/wordcopy.c1
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/Implies1
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/Implies1
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S38
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S31
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S38
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S31
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S59
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S38
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S31
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S38
-rw-r--r--sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S31
-rw-r--r--sysdeps/powerpc/powerpc64/power5/Implies1
-rw-r--r--sysdeps/powerpc/powerpc64/power5/fpu/Implies1
-rw-r--r--sysdeps/powerpc/powerpc64/power6/Implies1
-rw-r--r--sysdeps/powerpc/powerpc64/power6/fpu/Implies2
-rw-r--r--sysdeps/powerpc/powerpc64/power6/memcpy.S1170
-rw-r--r--sysdeps/powerpc/powerpc64/power6/memset.S285
-rw-r--r--sysdeps/powerpc/powerpc64/power6/wordcopy.c410
-rw-r--r--sysdeps/powerpc/powerpc64/power6x/Implies2
-rw-r--r--sysdeps/powerpc/powerpc64/power6x/fpu/Implies3
-rw-r--r--sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S45
-rw-r--r--sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S55
-rw-r--r--sysdeps/s390/dl-procinfo.c80
-rw-r--r--sysdeps/s390/dl-procinfo.h99
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/bits/sched.h3
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h8
-rw-r--r--sysdeps/unix/sysv/linux/check_pf.c80
-rw-r--r--sysdeps/unix/sysv/linux/futimes.c4
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sys/ptrace.h24
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h7
-rw-r--r--sysdeps/unix/sysv/linux/open64.c34
-rw-r--r--sysdeps/unix/sysv/linux/open_2.c32
-rw-r--r--sysdeps/unix/sysv/linux/openat.c18
-rw-r--r--sysdeps/unix/sysv/linux/openat64.c1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/libc-start.c1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/970/fpu/Implies3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu/Implies3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/fpu/Implies3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/fpu/Implies3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/Implies3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/fpu/Implies4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/970/fpu/Implies1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/fpu/Implies1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/fpu/Implies3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/fpu/Implies1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/Implies3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/fpu/Implies4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h24
-rw-r--r--sysdeps/unix/sysv/linux/s390/dl-procinfo.h43
-rw-r--r--sysdeps/unix/sysv/linux/s390/sys/ptrace.h24
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sys/ptrace.h24
-rw-r--r--sysdeps/unix/sysv/linux/sys/ptrace.h25
-rw-r--r--sysdeps/x86_64/sched_cpucount.c26
-rw-r--r--version.h4
310 files changed, 4300 insertions, 18398 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ff2819df4..872cf8cb4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-04  Jakub Jelinek  <jakub@redhat.com>
+
+	* math/test-misc.c (main): Don't run last batch of tests with
+	IBM long double format.
+
 2007-07-07  Ulrich Drepper  <drepper@redhat.com>
 
 	[BZ #4745]
@@ -10,10 +15,13 @@
 	* stdio-common/bug19.c: New file.
 	* stdio-common/bug19a.c: New file.
 
-2007-07-05  Mike Frysinger  <vapier@gentoo.org>
+2007-06-06  Jakub Jelinek  <jakub@redhat.com>
 
-	* Makeconfig ($(common-objpfx)gnu/lib-names.stmp): Use LC_ALL=C when
-	running awk script.
+	[BZ #4586]
+	* sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Treat
+	pseudo-zeros as zero.
+	* sysdeps/x86_64/ldbl2mpn.c: New file.
+	* sysdeps/ia64/ldbl2mpn.c: New file.
 
 2007-07-01  Jakub Jelinek  <jakub@redhat.com>
 
@@ -31,34 +39,31 @@
 	* nis/nss-default.c: Include errno.h.
 	(init): Preserve errno.
 
-2007-07-02  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/unix/sysv/linux/bits/socket.h (PF_UNIX): Update comment.
-
-2007-06-30  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/unix/sysv/linux/bits/socket.h: Add PF_RXRPC and AF_RXRPC.
-
-2007-06-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
-
-	* sysdeps/unix/sysv/linux/bits/socket.h: Add PF_IUCV and AF_IUCV.
-
-2007-06-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+2007-06-19  Ulrich Drepper  <drepper@redhat.com>
 
-	* sysdeps/s390/dl-procinfo.c: New file.
-	* sysdeps/s390/dl-procinfo.h: New file.
-	* sysdeps/unix/sysv/linux/s390/dl-procinfo.h: New file.
+	* sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements
+	to fill in holes
+	(rtld_global_ro): Likewise.
 
-2007-06-29  Jakub Jelinek  <jakub@redhat.com>
+2007-06-18  Jakub Jelinek  <jakub@redhat.com>
 
-	* elf/dl-load.c (open_verify): Find .note.ABI-tag notes even
-	in PT_NOTE segments with multiple notes.
-	* elf/readelflib.c (process_elf_file): Likewise.
+	* elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous.
+	Move PT_LOAD checking to...
+	(_dl_addr_inside_object): ... here, new function.
+	* elf/dl-sym.c (do_sym): If not l_contiguous,
+	call _dl_addr_inside_object.
+	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
+	* dlfcn/dlinfo.c (dlinfo_doit): Likewise.
+	* elf/dl-open.c (dl_open_worker): Likewise.
+	(_dl_addr_inside_object): New function if IS_IN_rtld.
+	* elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no
+	holes are present or are PROT_NONE protected.
+	* include/link.h (struct link_map): Add l_contiguous field.
+	* sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype.
 
-2007-06-22  Ulrich Drepper  <drepper@redhat.com>
+2007-06-18  Jakub Jelinek  <jakub@redhat.com>
 
-	* nis/nis_domain_of.c (__nis_domain_of): Make the code a bit more
-	ISO C compliant.
+	* elf/rtld.c (dl_main): Don't call init_tls more than once.
 
 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
 
@@ -92,88 +97,6 @@
 	* elf/dl-object.c (_dl_new_object): Don't use
 	__rtld_mrlock_initialize.
 
-2007-06-19  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements
-	to fill in holes
-	(rtld_global_ro): Likewise.
-
-2007-06-18  Jakub Jelinek  <jakub@redhat.com>
-
-	* elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous.
-	Move PT_LOAD checking to...
-	(_dl_addr_inside_object): ... here, new function.
-	* elf/dl-sym.c (do_sym): If not l_contiguous,
-	call _dl_addr_inside_object.
-	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
-	* dlfcn/dlinfo.c (dlinfo_doit): Likewise.
-	* elf/dl-open.c (dl_open_worker): Likewise.
-	(_dl_addr_inside_object): New function if IS_IN_rtld.
-	* elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no
-	holes are present or are PROT_NONE protected.
-	* include/link.h (struct link_map): Add l_contiguous field.
-	* sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype.
-
-2007-06-18  Jakub Jelinek  <jakub@redhat.com>
-            Tomas Janousek  <tjanouse@redhat.com>
-            Ulrich Drepper  <drepper@redhat.com>
-
-	[BZ #4647]
-	* resolv/res_send.c (send_dg): Remove socket_pf.  Use ipv6_unavail
-	member in __res_state, only convaddr4to6 if nssocks[ns] is a PF_INET6
-	socket.
-	* resolv/resolv.h (__res_state): Add ipv6_unavail member.  Make
-	unused member a bitmap.
-	* resolv/res_init.c (__res_vinit): Reset ipv6_unavail if IPv6
-	servers are configured.
-
-2007-06-18  Jakub Jelinek  <jakub@redhat.com>
-
-	* elf/rtld.c (dl_main): Don't call init_tls more than once.
-
-2007-06-17  Andreas Schwab  <schwab@suse.de>
-
-	* sysdeps/generic/initfini.c: Tell gcc about the nonstandard sections.
-
-2007-06-16  Andreas Jaeger  <aj@suse.de>
-
-	[BZ #4125]
-	* sysdeps/unix/sysv/linux/sys/ptrace.h
-	(PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK,
-	PTRACE_O_TRACEVFORK, PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC,
-	PTRACE_O_TRACEVFORKDONE, PTRACE_O_TRACEEXIT, PTRACE_O_MASK,
-	PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK, PTRACE_EVENT_CLONE,
-	PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE, PTRACE_EVENT_EXIT):
-	Define.
-	* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Likewise.
-	* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise.
-	* sysdeps/unix/sysv/linux/sparc/sys/ptrace.h: Likewise.
-	* sysdeps/unix/sysv/linux/s390/sys/ptrace.h: Likewise.
-
-2007-06-16  Ulrich Drepper  <drepper@redhat.com>
-
-	[BZ #4599]
-	* sysdeps/unix/sysv/linux/check_pf.c (make_request): When
-	determining whether there are IPv4/IPv6 addresses, ignore loopback
-	addresses.
-
-2007-06-14 Uros Bizjak <ubizjak@gmail.com>
-
-	* soft-fp/soft-fp.h (CMPtype): Define to "int" if undefined.
-	* soft-fp/eqdf2.c (__eqdf2): Use CMPtype instead of int
-	as the return type.  Change type of "r" variable to CMPtype.
-	* soft-fp/eqsf2.c (__eqsf2): Likewise.
-	* soft-fp/eqtf2.c (__eqtf2): Likewise.
-	* soft-fp/gedf2.c (__gedf2): Likewise.
-	* soft-fp/gesf2.c (__gesf2): Likewise.
-	* soft-fp/getf2.c (__getf2): Likewise.
-	* soft-fp/ledf2.c (__ledf2): Likewise.
-	* soft-fp/lesf2.c (__lesf2): Likewise.
-	* soft-fp/letf2.c (__letf2): Likewise.
-	* soft-fp/unorddf2 (__unorddf2): Likewise.
-	* soft-fp/unordsf2 (__unordsf2): Likewise.
-	* soft-fp/unordtf2 (__unordtf2): Likewise.
-
 2007-06-09  Ulrich Drepper  <drepper@redhat.com>
 
 	* elf/do-lookup.h (do_lookup_x): Read r_nlist before r_list and
@@ -187,46 +110,19 @@
 
 	* elf/dl-close.c (_dl_close_worker): Remove all to be removed
 	libraries from the global scope at once and call THREAD_GSCOPE_WAIT
-	at most once per _dl_close_worker.
-
-2007-06-08  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/unix/sysv/linux/bits/sched.h: Make second parameter of
-	__sched_cpucount as const.
-	* posix/sched_cpucount.c: Adjust.
-
-	* posix/sched_cpucount.c (__sched_cpucount): Allow using special
-	instruction for counting bits.
-	* sysdeps/x86_64/sched_cpucount.c: New file.
-
-2007-06-07  Ulrich Drepper  <drepper@redhat.com>
-
-	* configure.in: Avoid variable named BASH.
-	* config.make.in: Likewise.
-	Patch in part by Mike Frysinger.
-
-2007-06-06  Jakub Jelinek  <jakub@redhat.com>
-
-	[BZ #4586]
-	* sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Treat
-	pseudo-zeros as zero.
-	* sysdeps/x86_64/ldbl2mpn.c: New file.
-	* sysdeps/ia64/ldbl2mpn.c: New file.
 
-2007-06-04  Jakub Jelinek  <jakub@redhat.com>
-
-	* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (nextafterl): Remove
-	unused ily variable.  Fix nextafterl on +-__LDBL_MAX__ and +-Inf.
-	Remove unreachable code at the end.
-
-2007-06-01  Steven Munroe  <sjmunroe@us.ibm.com>
+2007-05-18  Ulrich Drepper  <drepper@redhat.com>
 
-	* sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: Correct description of
-	ldbl-128ibm in comment.
-	(fpclassifyl): Correct classification of denormals.
-	* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (nextafterl): Correct
-	return value for MIN denormal. Rewrite using long double math too
-	correctly handle denormals and canonicalize the results.
+	* elf/dl-close.c (_dl_close_worker): When removing object from
+	global scope, wait for all lookups to finish afterwards.
+	* elf/dl-open.c (add_to_global): When global scope array must
+	grow, allocate a new one and free old array only after all
+	lookups finish.
+	* elf/dl-runtime.c (_dl_fixup): Protect using global scope.
+	(_dl_lookup_symbol_x): Likewise.
+	* elf/dl-support.c: Define _dl_wait_lookup_done.
+	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add
+	_dl_wait_lookup_done.
 
 2007-06-05  Jakub Jelinek  <jakub@redhat.com>
 
@@ -249,297 +145,34 @@
 	* stdio-common/tst-sprintf2.c: New test.
 	* stdio-common/Makefile (tests): Add tst-sprintf2.
 
-	* math/test-misc.c (main): Don't run last batch of tests with
-	IBM long double format.
-
-2007-05-31  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/970/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc32/power5/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc32/power6/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc32/power6x/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc64/970/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power5/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power6/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power6x/fpu/Implies: New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc32/970/fpu/Implies: New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc64/970/fpu/Implies: New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/Implies:
-	New file.
-	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/fpu/Implies:
-	New file.
-
-2007-05-31  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S: Move.
-	* sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: To here.
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrintf.S: Move.
-	* sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: To here.
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llround.S: Move.
-	* sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S: To here.
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llroundf.S: Move.
-	* sysdeps/powerpc/powerpc32/power4/fpu/s_llroundf.S: To here.
-
-2007-05-22  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S
-	(LONG_DOUBLE_COMPAT): Specify correct version, GLIBC_2_1.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S
-	(LONG_DOUBLE_COMPAT): Specify correct version, GLIBC_2_1.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S
-	(LONG_DOUBLE_COMPAT): Specify correct version, GLIBC_2_1.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S
-	(LONG_DOUBLE_COMPAT): Specify correct version, GLIBC_2_1.
-
-2007-05-21  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c: New file.
-	* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.c: New file.
-	* sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c: New file.
-	* sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c: New file.
-
-2007-03-15  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S
-	[LONG_DOUBLE_COMPAT]: Add compat_symbol for llrintl@@GLIBC_2_1.
-
-2006-02-13  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: New File
-	* sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: New File
-	* sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S: New File
-	* sysdeps/powerpc/powerpc32/power6/fpu/s_llroundf.S: New File
-
-2006-10-20  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c: New file.
-	* sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c: New file.
-
-2006-10-03  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llround.S: New file.
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llroundf.S: New file.
-
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/Makefile: Moved.
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/mpa.c: Likewise.
-	* sysdeps/powerpc/powerpc32/power4/fpu/Makefile: To here.
-	* sysdeps/powerpc/powerpc32/power4/fpu/mpa.c: Likewise.
-
-2006-09-29  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S: New file.
-	* sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S: New file.
-	* sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S: New file.
-	* sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S: New file.
-
-2006-09-28  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_llroundf.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S: New file.
-	* sysdeps/powerpc/powerpc32/power6x/fpu/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S: New file.
-	* sysdeps/powerpc/powerpc64/power6x/fpu/Implies: New file.
-
-2006-08-31  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/Makefile: New file.
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/mpa.c: New file.
-	* sysdeps/powerpc/powerpc64/power4/fpu/Makefile: New file.
-	* sysdeps/powerpc/powerpc64/power4/fpu/mpa.c: New file.
-
-2006-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S: New file.
-	* sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S: New file.
-	* sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S: New file.
-
-2006-03-20  Steven Munroe  <sjmunroe@us.ibm.com>
+2007-06-04  Jakub Jelinek  <jakub@redhat.com>
 
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S: New file.
-	* sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrintf.S: New file.
+	* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (nextafterl): Remove
+	unused ily variable.  Fix nextafterl on +-__LDBL_MAX__ and +-Inf.
+	Remove unreachable code at the end.
 
 2007-06-01  Steven Munroe  <sjmunroe@us.ibm.com>
 
-	* sysdeps/powerpc/powerpc32/power6/memset.S: New file.
-	* sysdeps/powerpc/powerpc64/power6/memset.S: New file.
-
-2007-05-31  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/970/Implies: New file.
-	* sysdeps/powerpc/powerpc32/power5/Implies: New file.
-	* sysdeps/powerpc/powerpc32/power5+/Implies: New file.
-	* sysdeps/powerpc/powerpc32/power6/Implies: New file.
-	* sysdeps/powerpc/powerpc32/power6x/Implies: New file.
-	* sysdeps/powerpc/powerpc64/970/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power5/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power5+/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power6/Implies: New file.
-	* sysdeps/powerpc/powerpc64/power6x/Implies: New file.
-
-2007-05-21  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power4/memset.S: New file
-
-2007-03-13  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc64/memcpy.S: Improve aligned loop to minimize
-	branch miss-predicts. Ensure that cache line crossing does not impact
-	dispatch grouping.
-
-2006-12-13  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc64/power4/memcopy.h: Replace with include
-	"../../powerpc32/power4/memcopy.h".
-	* sysdeps/powerpc/powerpc64/power4/wordcopy.c: Replace with include
-	"../../powerpc32/power4/wordcopy.c".
-
-2006-10-03  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/powerpc64/Makefile: Moved.
-	* sysdeps/powerpc/powerpc32/powerpc64/memcopy.h: Likewise.
-	* sysdeps/powerpc/powerpc32/powerpc64/wordcopy.c: Likewise.
-	* sysdeps/powerpc/powerpc32/power4/Makefile: To here.
-	* sysdeps/powerpc/powerpc32/power4/memcopy.h: Likewise.
-	* sysdeps/powerpc/powerpc32/power4/wordcopy.c: Likewise.
-
-2006-09-10  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power6/memcpy.S: New file.
-
-2006-08-31  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power6/wordcopy.c: New file.
-	* sysdeps/powerpc/powerpc32/powerpc64/Makefile: New file.
-	* sysdeps/powerpc/powerpc32/powerpc64/memcopy.h: New file.
-	* sysdeps/powerpc/powerpc32/powerpc64/wordcopy.c: New file.
-	* sysdeps/powerpc/powerpc64/power4/Makefile: New file.
-	* sysdeps/powerpc/powerpc64/power4/memcopy.h: New file.
-	* sysdeps/powerpc/powerpc64/power4/wordcopy.c: New file.
-	* sysdeps/powerpc/powerpc64/power6/wordcopy.c: New file.
-
-2006-07-06  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc64/power6/memcpy.S: New file.
-
-2006-03-20  Steven Munroe  <sjmunroe@us.ibm.com>
-
-	* sysdeps/powerpc/powerpc32/power4/memcmp.S: New file.
-	* sysdeps/powerpc/powerpc32/power4/memcpy.S: New file.
-	* sysdeps/powerpc/powerpc32/power4/memset.S: New file.
-	* sysdeps/powerpc/powerpc32/power4/strncmp.S: New file.
-	* sysdeps/powerpc/powerpc64/power4/memcmp.S: New file.
-	* sysdeps/powerpc/powerpc64/power4/memcpy.S: New file.
-	* sysdeps/powerpc/powerpc64/power4/strncmp.S: New file.
-
-2007-05-29  Roland McGrath  <roland@redhat.com>
-
-	* po/Makefile (po-sed-cmd): New variable.
-	(libc.pot.files): Move sed command text in there, avoid \ inside ''.
+	* sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: Correct description of
+	ldbl-128ibm in comment.
+	(fpclassifyl): Correct classification of denormals.
+	* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (nextafterl): Correct
+	return value for MIN denormal. Rewrite using long double math too
+	correctly handle denormals and canonicalize the results.
 
 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
 
-	* crypt/md5-crypt.c: Fix comment.
-
 	* nscd/nscd_helper.c (get_mapping): Handle short replies instead
 	of crashing.  When this is the case or if the reply is malformed,
 	don't try to close the new file descriptor since it does not
 	exist.
 	Patch in part by Guillaume Chazarain <guichaz@yahoo.fr>.
 
-2007-05-28  Jakub Jelinek  <jakub@redhat.com>
-
-	* sysdeps/unix/sysv/linux/futimes.c (miss_utimensat): Don't define
-	if __NR_utimensat is not defined.
-
-2007-05-26  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/unix/sysv/linux/powerpc/libc-start.c: Include <sysdep.h>.
-
-2007-05-25  Jakub Jelinek  <jakub@redhat.com>
-
-	* io/bits/fcntl2.h (__open_2): Add nonnull attribute.
-	(open): Fix comment typos.  Don't call __open_2 if flags
-	is a compile time constant without O_CREAT.
-	(__open64_2): Add nonnull attribute.
-	(open64): Fix comment typos.  Don't call __open64_2 if flags
-	is a compile time constant without O_CREAT.
-	(__openat_2): Add nonnull attribute, fix nonnull attribute
-	on redirect.
-	(openat): Fix comment typos.  Don't call __openat_2 if flags
-	is a compile time constant without O_CREAT.
-	(__openat64_2): Add nonnull attribute, fix nonnull attribute
-	on redirect.
-	(openat64): Fix comment typos.  Don't call __openat64_2 if flags
-	is a compile time constant without O_CREAT.
-
-2007-05-24  Ulrich Drepper  <drepper@redhat.com>
-
-	* Makerules (sysd-rules): Define PTW for ptw-* files.
-	* Versions: Define GLIBC_2.7 for libc.
-	* include/stdio.h: Declare __fortify_fail.
-	* debug/fortify_fail.c: New file.
-	* debug/Makefile (routines): Add fortify_fail.
-	* debug/chk_fail.c: Use __fortify_fail.
-	* debug/stack_chk_fail.c: Likewise.
-	* io/Versions: Export __open_2, __open64_2, __openat_2, and
-	__openat64_2 for GLIBC_2.7.
-	* io/fcntl.h: When compiling with fortification, include bits/fcntl2.h.
-	* io/open.c: Define *_2 variant of function which checks for O_CREAT
-	and fails if necessary.
-	* io/open64.c: Likewise.
-	* io/openat.c: Likewise.
-	* io/openat64.c: Likewise.
-	* sysdeps/unix/sysv/linux/open64.c: Likewise.
-	* sysdeps/unix/sysv/linux/openat.c: Likewise.
-	* sysdeps/unix/sysv/linux/openat64.c: Likewise.
-	* io/bits/fcntl2.h: New file.
-	* include/fcntl.h: Declare __open_2, __open64_2, __openat_2, and
-	__openat64_2.
-	* include/bits/fcntl2.h: New file.
-	* sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines):
-	Add open_2.
-	* sysdeps/unix/sysv/linux/open_2.c: New file.
-
 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Pass correct value
 	as second parameter to handle_intel.
 
-	* nscd/aicache.c (addhstaiX): If reported TTL is zero don't cache
-	the entry.
-
 	* sysdeps/unix/sysv/linux/x86_64/sysconf.c: Move cache information
 	handling to ...
 	* sysdeps/x86_64/cacheinfo.c: ... here.  New file.
@@ -549,6 +182,8 @@
 	* sysdeps/x86_64/mempcpy.S: Adjust appropriately.
 	Patch by Evandro Menezes <evandro.menezes@amd.com>.
 
+2007-05-21  Ulrich Drepper  <drepper@redhat.com>
+
 	* sysdeps/unix/sysv/linux/i386/epoll_pwait.S: New file.
 
 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
@@ -582,24 +217,8 @@
 	* malloc/Makefile (CFLAGS-malloc.c): Revert accidental
 	2007-05-07 commit.
 
-2007-05-19  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PRIVATE_FUTEX):
-	Define for kernel >= 2.6.22.
-
 2007-05-18  Ulrich Drepper  <drepper@redhat.com>
 
-	* elf/dl-close.c (_dl_close_worker): When removing object from
-	global scope, wait for all lookups to finish afterwards.
-	* elf/dl-open.c (add_to_global): When global scope array must
-	grow, allocate a new one and free old array only after all
-	lookups finish.
-	* elf/dl-runtime.c (_dl_fixup): Protect using global scope.
-	(_dl_lookup_symbol_x): Likewise.
-	* elf/dl-support.c: Define _dl_wait_lookup_done.
-	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add
-	_dl_wait_lookup_done.
-
 	* malloc/malloc.c (do_check_chunk): Correct check for mmaped block
 	not overlapping with arena.
 
@@ -618,12 +237,10 @@
 	* sysdeps/x86_64/fpu/k_sinl.c: New file.
 	* sysdeps/x86_64/fpu/k_tanl.c: New file.
 
-	* version.h (VERSION): Set to 2.6.90.
-
 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
 
-	* version.h (VERSION): Define to 2.6.
-	* include/features.h (__GLIBC_MINOR__): Define to 6.
+	* version.h (VERSION): Define to 6.
+	* include/features.h (__GLIBC_MINOR__): Likewise.
 
 	* malloc/malloc.c: Use all small bin slots on 64-bit archs.
 
@@ -631,7 +248,6 @@
 	sizes.
 
 2007-05-13  Ulrich Drepper  <drepper@redhat.com>
-
 	* malloc/malloc.c [MALLOC_DEBUG]: Keep track of current maximum
 	number of mmaps.  n_mmaps_max is the target.
 	* malloc/hooks.c: Likewise.
diff --git a/Makeconfig b/Makeconfig
index e768cb1339..049e4ca83a 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -856,7 +856,7 @@ $(common-objpfx)gnu/lib-names.stmp: $(..)scripts/lib-names.awk \
 				    $(common-objpfx)soversions.i
 	$(make-target-directory)
 	@rm -f ${@:stmp=T} $@
-	LC_ALL=C $(AWK) -f $^ > ${@:stmp=T}
+	$(AWK) -f $^ > ${@:stmp=T}
 	$(move-if-change) ${@:stmp=T} ${@:stmp=h}
 	touch $@
 endif
diff --git a/Makerules b/Makerules
index 03f39a7441..200f8d7eea 100644
--- a/Makerules
+++ b/Makerules
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1991-2002,2003,2004,2005,2006 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
@@ -240,9 +240,9 @@ $(common-objpfx)sysd-rules: $(common-objpfx)config.make $(..)Makerules \
 	     echo "\$$(objpfx)rtld-%$$o: $$dir/%.s \$$(before-compile); \
 		  \$$(compile-command.s)";			              \
 	     echo "\$$(objpfx)ptw-%$$o: $$dir/%.S \$$(before-compile); \
-		  \$$(compile-command.S) -DPTW";			      \
+		  \$$(compile-command.S)";				      \
 	     echo "\$$(objpfx)ptw-%$$o: $$dir/%.s \$$(before-compile); \
-		  \$$(compile-command.s) -DPTW";		              \
+		  \$$(compile-command.s)";			              \
 	     echo "\$$(objpfx)m_%$$o: $$dir/s_%.S \$$(before-compile); \
 		  \$$(compile-command.S)";				      \
 	     echo "\$$(objpfx)m_%$$o: $$dir/s_%.s \$$(before-compile); \
@@ -253,7 +253,7 @@ $(common-objpfx)sysd-rules: $(common-objpfx)config.make $(..)Makerules \
 	     echo "\$$(objpfx)rtld-%$$o: $$dir/%.c \$$(before-compile); \
 		  \$$(compile-command.c)";				      \
 	     echo "\$$(objpfx)ptw-%$$o: $$dir/%.c \$$(before-compile); \
-		  \$$(compile-command.c) -DPTW";			      \
+		  \$$(compile-command.c)";				      \
 	     echo "\$$(objpfx)m_%$$o: $$dir/s_%.c \$$(before-compile); \
 		  \$$(compile-command.c)";				      \
 	   done; \
diff --git a/Versions.def b/Versions.def
index 7365b54a1b..254208469f 100644
--- a/Versions.def
+++ b/Versions.def
@@ -23,7 +23,6 @@ libc {
   GLIBC_2.4
   GLIBC_2.5
   GLIBC_2.6
-  GLIBC_2.7
 %ifdef USE_IN_LIBIO
   HURD_CTHREADS_0.3
 %endif
diff --git a/config.make.in b/config.make.in
index 836f613135..35597f808d 100644
--- a/config.make.in
+++ b/config.make.in
@@ -117,7 +117,7 @@ LN_S = @LN_S@
 MSGFMT = @MSGFMT@
 
 # Script execution tools.
-BASH = @BASH_SHELL@
+BASH = @BASH@
 KSH = @KSH@
 AWK = @AWK@
 PERL = @PERL@
diff --git a/configure b/configure
index 0401d797fa..177653f813 100755
--- a/configure
+++ b/configure
@@ -1,57 +1,28 @@
 #! /bin/sh
 # From configure.in CVSid.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for GNU C Library (see version.h).
+# Generated by GNU Autoconf 2.59 for GNU C Library (see version.h).
 #
 # Report bugs to <glibc>.
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
+# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
 fi
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # Support unset when possible.
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -61,43 +32,8 @@ else
 fi
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
 # Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
+$as_unset ENV MAIL MAILPATH
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -111,19 +47,18 @@ do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+    $as_unset $as_var
   fi
 done
 
 # Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+if expr a : '\(a\)' >/dev/null 2>&1; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
@@ -131,388 +66,157 @@ fi
 
 
 # Name of the executable.
-as_me=`$as_basename -- "$0" ||
+as_me=`$as_basename "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-
-  if test $as_have_required = yes && 	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
 fi
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
 
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  case $as_dir in
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
 	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-	   done;;
-       esac
-done
-IFS=$as_save_IFS
-
-
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
+	   if ("$as_dir/$as_base" -c '
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf@gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
 
   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
   # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
     sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
       N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
       t loop
-      s/-\n.*//
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
     ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
+  chmod +x $as_me.lineno ||
     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    { (exit 1); exit 1; }; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
   # Exit status is that of the last command.
   exit
 }
 
 
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+if expr a : '\(a\)' >/dev/null 2>&1; then
   as_expr=expr
 else
   as_expr=false
 fi
 
 rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
 echo >conf$$.file
 if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
     as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
 elif ln conf$$.file conf$$ 2>/dev/null; then
   as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
+rm -f conf$$ conf$$.exe conf$$.file
 
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
@@ -521,28 +225,7 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_executable_p="test -f"
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -551,27 +234,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
 
-exec 7<&0 </dev/null 6>&1
 
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
+exec 6>&1
+
 #
 # Initializations.
 #
 ac_default_prefix=/usr/local
-ac_clean_files=
 ac_config_libobj_dir=.
-LIBOBJS=
 cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
 # Identity of this package.
 PACKAGE_NAME='GNU C Library'
 PACKAGE_TARNAME='c-library'
@@ -580,205 +275,46 @@ PACKAGE_STRING='GNU C Library (see version.h)'
 PACKAGE_BUGREPORT='glibc'
 
 ac_unique_file="include/features.h"
+ac_subdirs_all="$ac_subdirs_all "
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
+#if HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
+#if HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef STDC_HEADERS
+#if STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
-# ifdef HAVE_STDLIB_H
+# if HAVE_STDLIB_H
 #  include <stdlib.h>
 # endif
 #endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#ifdef HAVE_STRINGS_H
+#if HAVE_STRINGS_H
 # include <strings.h>
 #endif
-#ifdef HAVE_INTTYPES_H
+#if HAVE_INTTYPES_H
 # include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
 #endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-with_fp
-with_cvs
-enable_check_abi
-oldest_abi
-bindnow
-force_install
-all_warnings
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-subdirs
-add_ons
-add_on_subdirs
-base_machine
-submachine
-sysnames
-sysdeps_add_ons
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-LN_S
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-OBJEXT
-BUILD_CC
-cross_compiling
-CPP
-CXX
-CXXFLAGS
-ac_ct_CXX
-AR
-OBJDUMP
-RANLIB
-MIG
-AS
-LD
-PWD_P
-MAKE
-MSGFMT
-MAKEINFO
-SED
-AUTOCONF
-SYSINCLUDES
-CXX_SYSINCLUDES
-libc_cv_gcc_static_libgcc
-BASH_SHELL
-libc_cv_have_bash2
-KSH
-libc_cv_have_ksh
-AWK
-PERL
-INSTALL_INFO
-BISON
-VERSIONING
-libc_cv_cc_with_libunwind
-libc_cv_Bgroup
-libc_cv_libgcc_s_suffix
-libc_cv_as_needed
-ASFLAGS_config
-libc_cv_z_combreloc
-libc_cv_z_execstack
-libc_cv_fpie
-libc_cv_hashstyle
-fno_unit_at_a_time
-libc_cv_ssp
-libc_cv_gnu89_inline
-libc_cv_have_initfini
-no_whole_archive
-exceptions
-LIBGD
-have_libaudit
-have_libcap
-have_selinux
-GREP
-EGREP
-sizeof_long_double
-libc_cv_gcc_unwind_find_fde
-uname_sysname
-uname_release
-uname_version
-old_glibc_headers
-libc_cv_slibdir
-libc_cv_localedir
-libc_cv_sysconfdir
-libc_cv_rootsbindir
-libc_cv_forced_unwind
-use_ldconfig
-ldd_rewrite_script
-elf
-xcoff
-static
-shared
-pic_default
-profile
-omitfp
-bounded
-static_nss
-nopic_initfini
-DEFINES
-mach_interface_list
-VERSION
-RELEASE
-LIBOBJS
-LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_cc_with_libunwind libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie libc_cv_hashstyle fno_unit_at_a_time libc_cv_ssp libc_cv_gnu89_inline libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_libcap have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP
-CXX
-CXXFLAGS
-CCC'
-ac_subdirs_all=''
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -805,48 +341,34 @@ x_libraries=NONE
 # and all the variables that are supposed to be based on exec_prefix
 # by default will actually change.
 # Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
+datadir='${prefix}/share'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
 
 ac_prev=
-ac_dashdash=
 for ac_option
 do
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
+    eval "$ac_prev=\$ac_option"
     ac_prev=
     continue
   fi
 
-  case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
-  esac
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
+  case $ac_option in
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
@@ -868,45 +390,33 @@ do
   --config-cache | -C)
     cache_file=config.cache ;;
 
-  -datadir | --datadir | --datadi | --datad)
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
     datadir=$ac_optarg ;;
 
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
   -disable-* | --disable-*)
     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
 
   -enable-* | --enable-*)
     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=\$ac_optarg ;;
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -933,12 +443,6 @@ do
   -host=* | --host=* | --hos=* | --ho=*)
     host_alias=$ac_optarg ;;
 
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
@@ -963,16 +467,13 @@ do
   | --libexe=* | --libex=* | --libe=*)
     libexecdir=$ac_optarg ;;
 
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
     localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -1037,16 +538,6 @@ do
   | --progr-tra=* | --program-tr=* | --program-t=*)
     program_transform_name=$ac_optarg ;;
 
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
@@ -1099,20 +590,24 @@ do
   -with-* | --with-*)
     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=\$ac_optarg ;;
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
 
   -without-* | --without-*)
     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=no ;;
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -1143,7 +638,8 @@ Try \`$0 --help' for more information." >&2
     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
    { (exit 1); exit 1; }; }
-    eval $ac_envvar=\$ac_optarg
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
     export $ac_envvar ;;
 
   *)
@@ -1163,19 +659,27 @@ if test -n "$ac_prev"; then
    { (exit 1); exit 1; }; }
 fi
 
-# Be sure to have absolute directory names.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
 do
-  eval ac_val=\$$ac_var
+  eval ac_val=$`echo $ac_var`
   case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
   esac
-  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1202,76 +706,82 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
 test "$silent" = yes && exec 6>/dev/null
 
 
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { echo "$as_me: error: Working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
-
-
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$0" ||
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$0" : 'X\(//\)[^/]' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
+  if test ! -r $srcdir/$ac_unique_file; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
    { (exit 1); exit 1; }; }
+  fi
 fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
    { (exit 1); exit 1; }; }
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
 
 #
 # Report the --help message.
@@ -1300,6 +810,9 @@ Configuration:
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
+_ACEOF
+
+  cat <<_ACEOF
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
 			  [$ac_default_prefix]
@@ -1317,22 +830,15 @@ Fine tuning of the installation directories:
   --bindir=DIR           user executables [EPREFIX/bin]
   --sbindir=DIR          system admin executables [EPREFIX/sbin]
   --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
   --libdir=DIR           object code libraries [EPREFIX/lib]
   --includedir=DIR       C header files [PREFIX/include]
   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR          info documentation [DATAROOTDIR/info]
-  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/c-library]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1356,10 +862,13 @@ Optional Features:
                           in special situations) [default=yes]
   --enable-check-abi      do "make check-abi" in "make check" (no/warn/yes)
                           [default=no]
-  --enable-shared         build shared library [default=yes if GNU ld & ELF]
+  --enable-shared         build shared library [default=yes if GNU ld &
+                          ELF]
   --enable-profile        build profiled library [default=no]
-  --enable-omitfp         build undebuggable optimized library [default=no]
-  --enable-bounded        build with runtime bounds checking [default=no]
+  --enable-omitfp         build undebuggable optimized library
+                          [default=no]
+  --enable-bounded        build with runtime bounds checking
+                          [default=no]
   --disable-versioning    do not include versioning information in the library
                           objects [default=yes if supported]
   --enable-oldest-abi=ABI configure the oldest ABI supported [e.g. 2.2]
@@ -1392,7 +901,8 @@ Optional Packages:
   --with-xcoff            if using the XCOFF object format
   --without-cvs           if CVS should not be used
   --with-headers=PATH     location of system headers to use (for example
-                          /usr/src/linux/include) [default=compiler default]
+                          /usr/src/linux/include) [default=compiler
+                          default]
   --with-tls              enable support for TLS
   --without-__thread      do not use TLS features even when supporting them
   --with-cpu=CPU          select code for CPU variant
@@ -1402,9 +912,8 @@ Some influential environment variables:
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
@@ -1414,86 +923,120 @@ it to find libraries and programs with nonstandard names/locations.
 
 Report bugs to <glibc>.
 _ACEOF
-ac_status=$?
 fi
 
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" || continue
+    test -d $ac_dir || continue
     ac_builddir=.
 
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
+if test "$ac_dir" != .; then
   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
 
 case $srcdir in
-  .)  # We are building in place.
+  .)  # No --srcdir option.  We are building in place.
     ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
 esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
     else
       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
+    fi
+    cd $ac_popdir
   done
 fi
 
-test -n "$ac_init_help" && exit $ac_status
+test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
 GNU C Library configure (see version.h)
-generated by GNU Autoconf 2.61
+generated by GNU Autoconf 2.59
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
-  exit
+  exit 0
 fi
-cat >config.log <<_ACEOF
+exec 5>config.log
+cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by GNU C Library $as_me (see version.h), which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
 
 _ACEOF
-exec 5>>config.log
 {
 cat <<_ASUNAME
 ## --------- ##
@@ -1512,7 +1055,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
@@ -1526,7 +1069,6 @@ do
   test -z "$as_dir" && as_dir=.
   echo "PATH: $as_dir"
 done
-IFS=$as_save_IFS
 
 } >&5
 
@@ -1548,6 +1090,7 @@ _ACEOF
 ac_configure_args=
 ac_configure_args0=
 ac_configure_args1=
+ac_sep=
 ac_must_keep_next=false
 for ac_pass in 1 2
 do
@@ -1558,7 +1101,7 @@ do
     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
-    *\'*)
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
@@ -1580,7 +1123,9 @@ do
 	  -* ) ac_must_keep_next=true ;;
 	esac
       fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
       ;;
     esac
   done
@@ -1591,8 +1136,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
 # would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
 trap 'exit_status=$?
   # Save into config.log some information that might help in debugging.
   {
@@ -1605,34 +1150,20 @@ trap 'exit_status=$?
 _ASBOX
     echo
     # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
+{
   (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
       sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
     *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
       ;;
-    esac |
-    sort
-)
+    esac;
+}
     echo
 
     cat <<\_ASBOX
@@ -1643,28 +1174,22 @@ _ASBOX
     echo
     for ac_var in $ac_subst_vars
     do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      echo "$ac_var='\''$ac_val'\''"
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
       cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
+## ------------- ##
+## Output files. ##
+## ------------- ##
 _ASBOX
       echo
       for ac_var in $ac_subst_files
       do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	echo "$ac_var='\''$ac_val'\''"
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
       done | sort
       echo
     fi
@@ -1676,24 +1201,26 @@ _ASBOX
 ## ----------- ##
 _ASBOX
       echo
-      cat confdefs.h
+      sed "/^$/d" confdefs.h | sort
       echo
     fi
     test "$ac_signal" != 0 &&
       echo "$as_me: caught signal $ac_signal"
     echo "$as_me: exit $exit_status"
   } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
-' 0
+     ' 0
 for ac_signal in 1 2 13 15; do
   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
 
 # Predefined preprocessor variables.
 
@@ -1724,17 +1251,14 @@ _ACEOF
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
-else
-  set x "$ac_default_prefix/share/config.site" \
-	"$ac_default_prefix/etc/config.site"
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
 fi
-shift
-for ac_site_file
-do
+for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
@@ -1750,8 +1274,8 @@ if test -r "$cache_file"; then
     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
     esac
   fi
 else
@@ -1763,11 +1287,12 @@ fi
 # Check that the precious variables saved in the cache have kept the same
 # value.
 ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
   eval ac_old_set=\$ac_cv_env_${ac_var}_set
   eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
   case $ac_old_set,$ac_new_set in
     set,)
       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
@@ -1792,7 +1317,8 @@ echo "$as_me:   current value: $ac_new_val" >&2;}
   # Pass precious variables to config.status.
   if test "$ac_new_set" = set; then
     case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     *) ac_arg=$ac_var=$ac_new_val ;;
     esac
     case " $ac_configure_args " in
@@ -1809,6 +1335,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov
    { (exit 1); exit 1; }; }
 fi
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 
 
 
@@ -1833,46 +1365,35 @@ fi
 
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-ac_config_headers="$ac_config_headers config.h"
+          ac_config_headers="$ac_config_headers config.h"
 
 ac_aux_dir=
-for ac_dir in scripts "$srcdir"/scripts; do
-  if test -f "$ac_dir/install-sh"; then
+for ac_dir in scripts $srcdir/scripts; do
+  if test -f $ac_dir/install-sh; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
     break
-  elif test -f "$ac_dir/install.sh"; then
+  elif test -f $ac_dir/install.sh; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install.sh -c"
     break
-  elif test -f "$ac_dir/shtool"; then
+  elif test -f $ac_dir/shtool; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/shtool install -c"
     break
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in scripts \"$srcdir\"/scripts" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in scripts \"$srcdir\"/scripts" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in scripts $srcdir/scripts" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in scripts $srcdir/scripts" >&2;}
    { (exit 1); exit 1; }; }
 fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
 
 if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then
@@ -1886,36 +1407,36 @@ config_vars=
 
 # Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
 
-# Check whether --with-gd was given.
+# Check whether --with-gd or --without-gd was given.
 if test "${with_gd+set}" = set; then
-  withval=$with_gd; case "$with_gd" in
+  withval="$with_gd"
+  case "$with_gd" in
 yes|''|no) ;;
 *) libgd_include="-I$withval/include"
    libgd_ldflags="-L$withval/lib" ;;
 esac
 
-fi
+fi;
 
-
-# Check whether --with-gd-include was given.
+# Check whether --with-gd-include or --without-gd-include was given.
 if test "${with_gd_include+set}" = set; then
-  withval=$with_gd_include; case "$with_gd_include" in
+  withval="$with_gd_include"
+  case "$with_gd_include" in
 ''|no) ;;
 *) libgd_include="-I$withval" ;;
 esac
 
-fi
-
+fi;
 
-# Check whether --with-gd-lib was given.
+# Check whether --with-gd-lib or --without-gd-lib was given.
 if test "${with_gd_lib+set}" = set; then
-  withval=$with_gd_lib; case "$with_gd_lib" in
+  withval="$with_gd_lib"
+  case "$with_gd_lib" in
 ''|no) ;;
 *) libgd_ldflags="-L$withval" ;;
 esac
 
-fi
-
+fi;
 
 if test -n "$libgd_include"; then
   config_vars="$config_vars
@@ -1927,54 +1448,54 @@ libgd-LDFLAGS = $libgd_ldflags"
 fi
 
 
-# Check whether --with-fp was given.
+# Check whether --with-fp or --without-fp was given.
 if test "${with_fp+set}" = set; then
-  withval=$with_fp; with_fp=$withval
+  withval="$with_fp"
+  with_fp=$withval
 else
   with_fp=yes
-fi
-
+fi;
 
 
-# Check whether --with-binutils was given.
+# Check whether --with-binutils or --without-binutils was given.
 if test "${with_binutils+set}" = set; then
-  withval=$with_binutils; path_binutils=$withval
+  withval="$with_binutils"
+  path_binutils=$withval
 else
   path_binutils=''
-fi
+fi;
 
-
-# Check whether --with-elf was given.
+# Check whether --with-elf or --without-elf was given.
 if test "${with_elf+set}" = set; then
-  withval=$with_elf; elf=$withval
+  withval="$with_elf"
+  elf=$withval
 else
   elf=no
-fi
-
+fi;
 
-# Check whether --with-selinux was given.
+# Check whether --with-selinux or --without-selinux was given.
 if test "${with_selinux+set}" = set; then
-  withval=$with_selinux; with_selinux=$withval
+  withval="$with_selinux"
+  with_selinux=$withval
 else
   with_selinux=auto
-fi
-
+fi;
 
-# Check whether --with-xcoff was given.
+# Check whether --with-xcoff or --without-xcoff was given.
 if test "${with_xcoff+set}" = set; then
-  withval=$with_xcoff; xcoff=$withval
+  withval="$with_xcoff"
+  xcoff=$withval
 else
   xcoff=no
-fi
+fi;
 
-
-# Check whether --with-cvs was given.
+# Check whether --with-cvs or --without-cvs was given.
 if test "${with_cvs+set}" = set; then
-  withval=$with_cvs; with_cvs=$withval
+  withval="$with_cvs"
+  with_cvs=$withval
 else
   with_cvs=yes
-fi
-
+fi;
 if test "$with_cvs" = yes; then
   if test -d $srcdir/CVS && grep :pserver: $srcdir/CVS/Root > /dev/null
   then
@@ -1984,75 +1505,75 @@ fi
 
 
 
-# Check whether --with-headers was given.
+# Check whether --with-headers or --without-headers was given.
 if test "${with_headers+set}" = set; then
-  withval=$with_headers; sysheaders=$withval
+  withval="$with_headers"
+  sysheaders=$withval
 else
   sysheaders=''
-fi
-
+fi;
 
-# Check whether --enable-sanity-checks was given.
+# Check whether --enable-sanity-checks or --disable-sanity-checks was given.
 if test "${enable_sanity_checks+set}" = set; then
-  enableval=$enable_sanity_checks; enable_sanity=$enableval
+  enableval="$enable_sanity_checks"
+  enable_sanity=$enableval
 else
   enable_sanity=yes
-fi
+fi;
 
 
-
-# Check whether --enable-check-abi was given.
+# Check whether --enable-check-abi or --disable-check-abi was given.
 if test "${enable_check_abi+set}" = set; then
-  enableval=$enable_check_abi; enable_check_abi=$enableval
+  enableval="$enable_check_abi"
+  enable_check_abi=$enableval
 else
   enable_check_abi=no
-fi
-
+fi;
 
 static=yes
-# Check whether --enable-shared was given.
+# Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
-  enableval=$enable_shared; shared=$enableval
+  enableval="$enable_shared"
+  shared=$enableval
 else
   shared=default
-fi
-
-# Check whether --enable-profile was given.
+fi;
+# Check whether --enable-profile or --disable-profile was given.
 if test "${enable_profile+set}" = set; then
-  enableval=$enable_profile; profile=$enableval
+  enableval="$enable_profile"
+  profile=$enableval
 else
   profile=no
-fi
-
-# Check whether --enable-omitfp was given.
+fi;
+# Check whether --enable-omitfp or --disable-omitfp was given.
 if test "${enable_omitfp+set}" = set; then
-  enableval=$enable_omitfp; omitfp=$enableval
+  enableval="$enable_omitfp"
+  omitfp=$enableval
 else
   omitfp=no
-fi
-
-# Check whether --enable-bounded was given.
+fi;
+# Check whether --enable-bounded or --disable-bounded was given.
 if test "${enable_bounded+set}" = set; then
-  enableval=$enable_bounded; bounded=$enableval
+  enableval="$enable_bounded"
+  bounded=$enableval
 else
   bounded=no
-fi
-
-# Check whether --enable-versioning was given.
+fi;
+# Check whether --enable-versioning or --disable-versioning was given.
 if test "${enable_versioning+set}" = set; then
-  enableval=$enable_versioning; enable_versioning=$enableval
+  enableval="$enable_versioning"
+  enable_versioning=$enableval
 else
   enable_versioning=yes
-fi
-
+fi;
 
-# Check whether --enable-oldest-abi was given.
+# Check whether --enable-oldest-abi or --disable-oldest-abi was given.
 if test "${enable_oldest_abi+set}" = set; then
-  enableval=$enable_oldest_abi; oldest_abi=$enableval
+  enableval="$enable_oldest_abi"
+  oldest_abi=$enableval
 else
   oldest_abi=no
-fi
-
+fi;
 if test "$oldest_abi" = yes || test "$oldest_abi" = no; then
   oldest_abi=default
 else
@@ -2063,13 +1584,13 @@ _ACEOF
 fi
 
 
-# Check whether --enable-stackguard-randomization was given.
+# Check whether --enable-stackguard-randomization or --disable-stackguard-randomization was given.
 if test "${enable_stackguard_randomization+set}" = set; then
-  enableval=$enable_stackguard_randomization; enable_stackguard_randomize=$enableval
+  enableval="$enable_stackguard_randomization"
+  enable_stackguard_randomize=$enableval
 else
   enable_stackguard_randomize=no
-fi
-
+fi;
 if test "$enable_stackguard_randomize" = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define ENABLE_STACKGUARD_RANDOMIZE 1
@@ -2077,39 +1598,39 @@ _ACEOF
 
 fi
 
-# Check whether --enable-add-ons was given.
+# Check whether --enable-add-ons or --disable-add-ons was given.
 if test "${enable_add_ons+set}" = set; then
-  enableval=$enable_add_ons;
+  enableval="$enable_add_ons"
+
 else
   enable_add_ons=yes
-fi
-
+fi;
 
 
-# Check whether --with-tls was given.
+# Check whether --with-tls or --without-tls was given.
 if test "${with_tls+set}" = set; then
-  withval=$with_tls; usetls=$withval
+  withval="$with_tls"
+  usetls=$withval
 else
   usetls=yes
-fi
-
+fi;
 
 
-# Check whether --with-__thread was given.
+# Check whether --with-__thread or --without-__thread was given.
 if test "${with___thread+set}" = set; then
-  withval=$with___thread; use__thread=$withval
+  withval="$with___thread"
+  use__thread=$withval
 else
   use__thread=yes
-fi
+fi;
 
-
-# Check whether --enable-hidden-plt was given.
+# Check whether --enable-hidden-plt or --disable-hidden-plt was given.
 if test "${enable_hidden_plt+set}" = set; then
-  enableval=$enable_hidden_plt; hidden=$enableval
+  enableval="$enable_hidden_plt"
+  hidden=$enableval
 else
   hidden=yes
-fi
-
+fi;
 if test "x$hidden" = xno; then
   cat >>confdefs.h <<\_ACEOF
 #define NO_HIDDEN 1
@@ -2117,22 +1638,22 @@ _ACEOF
 
 fi
 
-# Check whether --enable-bind-now was given.
+# Check whether --enable-bind-now or --disable-bind-now was given.
 if test "${enable_bind_now+set}" = set; then
-  enableval=$enable_bind_now; bindnow=$enableval
+  enableval="$enable_bind_now"
+  bindnow=$enableval
 else
   bindnow=no
-fi
-
+fi;
 
 
-# Check whether --enable-static-nss was given.
+# Check whether --enable-static-nss or --disable-static-nss was given.
 if test "${enable_static_nss+set}" = set; then
-  enableval=$enable_static_nss; static_nss=$enableval
+  enableval="$enable_static_nss"
+  static_nss=$enableval
 else
   static_nss=no
-fi
-
+fi;
 if test x"$static_nss" = xyes || test x"$shared" = xno; then
   static_nss=yes
   cat >>confdefs.h <<\_ACEOF
@@ -2141,20 +1662,20 @@ _ACEOF
 
 fi
 
-# Check whether --enable-force-install was given.
+# Check whether --enable-force-install or --disable-force-install was given.
 if test "${enable_force_install+set}" = set; then
-  enableval=$enable_force_install; force_install=$enableval
+  enableval="$enable_force_install"
+  force_install=$enableval
 else
   force_install=yes
-fi
+fi;
 
 
-
-# Check whether --enable-kernel was given.
+# Check whether --enable-kernel or --disable-kernel was given.
 if test "${enable_kernel+set}" = set; then
-  enableval=$enable_kernel; minimum_kernel=$enableval
-fi
-
+  enableval="$enable_kernel"
+  minimum_kernel=$enableval
+fi;
 if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then
   # Better nothing than this.
   minimum_kernel=""
@@ -2164,94 +1685,65 @@ else
   fi
 fi
 
-# Check whether --enable-all-warnings was given.
+# Check whether --enable-all-warnings or --disable-all-warnings was given.
 if test "${enable_all_warnings+set}" = set; then
-  enableval=$enable_all_warnings; all_warnings=$enableval
-fi
-
+  enableval="$enable_all_warnings"
+  all_warnings=$enableval
+fi;
 
 
 # Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
    { (exit 1); exit 1; }; }
 
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
 if test "${ac_cv_build+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
    { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
 build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
 if test "${ac_cv_host+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
    { (exit 1); exit 1; }; }
-fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
 host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
 
 
@@ -2315,9 +1807,10 @@ esac
 
 submachine=
 
-# Check whether --with-cpu was given.
+# Check whether --with-cpu or --without-cpu was given.
 if test "${with_cpu+set}" = set; then
-  withval=$with_cpu;   case "$withval" in
+  withval="$with_cpu"
+    case "$withval" in
   yes|'') { { echo "$as_me:$LINENO: error: --with-cpu requires an argument" >&5
 echo "$as_me: error: --with-cpu requires an argument" >&2;}
    { (exit 1); exit 1; }; } ;;
@@ -2325,13 +1818,14 @@ echo "$as_me: error: --with-cpu requires an argument" >&2;}
   *) submachine="$withval" ;;
   esac
 
-fi
-
+fi;
 
 
 # An add-on can set this when it wants to disable the sanity check below.
 libc_config_ok=no
 
+
+
 subdirs="$subdirs "
 
 
@@ -2450,15 +1944,15 @@ $d-srcdir = $subdir_srcdir"
     if test -n "$libc_add_on"; then
       if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
       then
-	{ echo "$as_me:$LINENO: checking add-on $libc_add_on for preconfigure fragments" >&5
-echo $ECHO_N "checking add-on $libc_add_on for preconfigure fragments... $ECHO_C" >&6; }
+	echo "$as_me:$LINENO: checking add-on $libc_add_on for preconfigure fragments" >&5
+echo $ECHO_N "checking add-on $libc_add_on for preconfigure fragments... $ECHO_C" >&6
 	for frag in $frags; do
 	  name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
 	  echo $ECHO_N "$name $ECHO_C" >&6
 	  . "$frag"
 	done
-	{ echo "$as_me:$LINENO: result: " >&5
-echo "${ECHO_T}" >&6; }
+	echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
       fi
       use_add_ons="$use_add_ons $libc_add_on"
       add_ons_pfx="$add_ons_pfx $libc_add_on/"
@@ -2545,8 +2039,8 @@ fi
 # Compute the list of sysdep directories for this configuration.
 # This can take a while to compute.
 sysdep_dir=$srcdir/sysdeps
-{ echo "$as_me:$LINENO: checking sysdep dirs" >&5
-echo $ECHO_N "checking sysdep dirs... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking sysdep dirs" >&5
+echo $ECHO_N "checking sysdep dirs... $ECHO_C" >&6
 # Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
 os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
 
@@ -2783,8 +2277,8 @@ fi
 sysnames="$names $default_sysnames"
 
 # The other names were emitted during the scan.
-{ echo "$as_me:$LINENO: result: $default_sysnames" >&5
-echo "${ECHO_T}$default_sysnames" >&6; }
+echo "$as_me:$LINENO: result: $default_sysnames" >&5
+echo "${ECHO_T}$default_sysnames" >&6
 
 # Collect the list of add-ons that supply partial sysdeps trees.
 sysdeps_add_ons=
@@ -2861,8 +2355,8 @@ done
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2884,7 +2378,7 @@ case $as_dir/ in
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -2903,22 +2397,21 @@ case $as_dir/ in
     ;;
 esac
 done
-IFS=$as_save_IFS
 
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
     INSTALL=$ac_cv_path_install
   else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
     # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
+    # removed, or if the path is relative.
     INSTALL=$ac_install_sh
   fi
 fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -2932,15 +2425,15 @@ if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then
   # The makefiles need to use a different form to find it in $srcdir.
   INSTALL='\$(..)./scripts/install-sh -c'
 fi
-{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
 LN_S=$as_ln_s
 if test "$LN_S" = "ln -s"; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 else
-  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6; }
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
 fi
 
 
@@ -2952,8 +2445,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -2966,34 +2459,32 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
 fi
 if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3006,51 +2497,36 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
+  CC=$ac_ct_CC
 else
   CC="$ac_cv_prog_CC"
 fi
 
 if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3063,34 +2539,74 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
 fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3104,7 +2620,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -3115,7 +2631,6 @@ do
   fi
 done
 done
-IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
@@ -3133,23 +2648,22 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
 fi
 if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
+  for ac_prog in cl
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3162,38 +2676,36 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
     test -n "$CC" && break
   done
 fi
 if test -z "$CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl.exe
+  for ac_prog in cl
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3206,45 +2718,29 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$ac_ct_CC" && break
 done
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
+  CC=$ac_ct_CC
 fi
 
 fi
@@ -3257,42 +2753,28 @@ See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
 EXEEXT=
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
 if test "${ac_cv_objext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3312,20 +2794,14 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
@@ -3343,12 +2819,12 @@ fi
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
 if test "${ac_cv_c_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3371,49 +2847,50 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_compiler_gnu=no
+ac_compiler_gnu=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
 GCC=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
 if test "${ac_cv_prog_cc_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -3429,118 +2906,38 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_prog_cc_g=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -3556,12 +2953,12 @@ else
     CFLAGS=
   fi
 fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_prog_cc_c89=no
+  ac_cv_prog_cc_stdc=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3595,17 +2992,12 @@ static char *f (char * (*g) (char **, int), char **p, ...)
 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
    function prototypes and stuff, but not '\xHH' hex character constants.
    These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
+   as 'x'.  The following induces an error, until -std1 is added to get
    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
    array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
+   that's true only with -std1.  */
 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
 int test (int i, double x);
 struct s1 {int (*f) (int a);};
 struct s2 {int (*f) (double a);};
@@ -3620,57 +3012,205 @@ return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
   return 0;
 }
 _ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
   rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_c89=$ac_arg
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
+rm -f conftest.err conftest.$ac_objext
 done
-rm -f conftest.$ac_ext
+rm -f conftest.$ac_ext conftest.$ac_objext
 CC=$ac_save_CC
 
 fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
-  xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
   *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
 esac
 
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3682,8 +3222,8 @@ if test $host != $build; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3696,27 +3236,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_BUILD_CC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 BUILD_CC=$ac_cv_prog_BUILD_CC
 if test -n "$BUILD_CC"; then
-  { echo "$as_me:$LINENO: result: $BUILD_CC" >&5
-echo "${ECHO_T}$BUILD_CC" >&6; }
+  echo "$as_me:$LINENO: result: $BUILD_CC" >&5
+echo "${ECHO_T}$BUILD_CC" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$BUILD_CC" && break
 done
 
@@ -3727,8 +3265,8 @@ ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -3762,22 +3300,24 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
 		     Syntax error
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -3786,10 +3326,9 @@ sed 's/^/| /' conftest.$ac_ext >&5
   # Broken: fails on valid input.
 continue
 fi
-
 rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
+  # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3799,22 +3338,24 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   # Broken: success on invalid input.
 continue
 else
@@ -3825,7 +3366,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
 ac_preproc_ok=:
 break
 fi
-
 rm -f conftest.err conftest.$ac_ext
 
 done
@@ -3843,8 +3383,8 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -3867,22 +3407,24 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
 		     Syntax error
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -3891,10 +3433,9 @@ sed 's/^/| /' conftest.$ac_ext >&5
   # Broken: fails on valid input.
 continue
 fi
-
 rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
+  # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3904,22 +3445,24 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   # Broken: success on invalid input.
 continue
 else
@@ -3930,7 +3473,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
 ac_preproc_ok=:
 break
 fi
-
 rm -f conftest.err conftest.$ac_ext
 
 done
@@ -3953,22 +3495,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 # We need the C++ compiler only for testing.
-ac_ext=cpp
+ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3981,38 +3519,36 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
     test -n "$CXX" && break
   done
 fi
 if test -z "$CXX"; then
   ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4025,85 +3561,55 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CXX="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 if test -n "$ac_ct_CXX"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$ac_ct_CXX" && break
 done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
 
-  if test "x$ac_ct_CXX" = x; then
-    CXX="g++"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    CXX=$ac_ct_CXX
-  fi
+  CXX=$ac_ct_CXX
 fi
 
-  fi
-fi
+
 # Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4126,49 +3632,50 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_compiler_gnu=no
+ac_compiler_gnu=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
 GXX=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
 if test "${ac_cv_prog_cxx_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-   ac_cxx_werror_flag=yes
-   ac_cv_prog_cxx_g=no
-   CXXFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -4184,133 +3691,159 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_prog_cxx_g=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	CXXFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+$ac_declaration
+#include <stdlib.h>
 int
 main ()
 {
-
+exit (42);
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   :
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+$ac_declaration
 int
 main ()
 {
-
+exit (42);
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cxx_g=yes
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4338,8 +3871,8 @@ if test "x$ac_ranlib" = xranlib; then
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_RANLIB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4352,34 +3885,32 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
 fi
 if test -z "$ac_cv_prog_RANLIB"; then
   ac_ct_RANLIB=$RANLIB
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4392,41 +3923,27 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
 fi
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
+  RANLIB=$ac_ct_RANLIB
 else
   RANLIB="$ac_cv_prog_RANLIB"
 fi
@@ -4437,8 +3954,8 @@ fi
 
 
 # Determine whether we are using GNU binutils.
-{ echo "$as_me:$LINENO: checking whether $AS is GNU as" >&5
-echo $ECHO_N "checking whether $AS is GNU as... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether $AS is GNU as" >&5
+echo $ECHO_N "checking whether $AS is GNU as... $ECHO_C" >&6
 if test "${libc_cv_prog_as_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4451,13 +3968,13 @@ else
 fi
 rm -fr contest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_prog_as_gnu" >&5
-echo "${ECHO_T}$libc_cv_prog_as_gnu" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_prog_as_gnu" >&5
+echo "${ECHO_T}$libc_cv_prog_as_gnu" >&6
 rm -f a.out
 gnu_as=$libc_cv_prog_as_gnu
 
-{ echo "$as_me:$LINENO: checking whether $LD is GNU ld" >&5
-echo $ECHO_N "checking whether $LD is GNU ld... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether $LD is GNU ld" >&5
+echo $ECHO_N "checking whether $LD is GNU ld... $ECHO_C" >&6
 if test "${libc_cv_prog_ld_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4470,8 +3987,8 @@ else
 fi
 rm -fr contest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_prog_ld_gnu" >&5
-echo "${ECHO_T}$libc_cv_prog_ld_gnu" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_prog_ld_gnu" >&5
+echo "${ECHO_T}$libc_cv_prog_ld_gnu" >&6
 gnu_ld=$libc_cv_prog_ld_gnu
 
 
@@ -4480,8 +3997,8 @@ for ac_prog in $AS
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_AS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4494,27 +4011,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AS="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 AS=$ac_cv_prog_AS
 if test -n "$AS"; then
-  { echo "$as_me:$LINENO: result: $AS" >&5
-echo "${ECHO_T}$AS" >&6; }
+  echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$AS" && break
 done
 
@@ -4522,8 +4037,8 @@ if test -z "$AS"; then
   ac_verc_fail=yes
 else
   # Found it, now check the version.
-  { echo "$as_me:$LINENO: checking version of $AS" >&5
-echo $ECHO_N "checking version of $AS... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking version of $AS" >&5
+echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
   ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -4532,8 +4047,8 @@ echo $ECHO_N "checking version of $AS... $ECHO_C" >&6; }
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
   esac
-  { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6; }
+  echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
 fi
 if test $ac_verc_fail = yes; then
   AS=: critic_missing="$critic_missing as"
@@ -4543,8 +4058,8 @@ for ac_prog in $LD
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_LD+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4557,27 +4072,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_LD="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 LD=$ac_cv_prog_LD
 if test -n "$LD"; then
-  { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$LD" && break
 done
 
@@ -4585,8 +4098,8 @@ if test -z "$LD"; then
   ac_verc_fail=yes
 else
   # Found it, now check the version.
-  { echo "$as_me:$LINENO: checking version of $LD" >&5
-echo $ECHO_N "checking version of $LD... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking version of $LD" >&5
+echo $ECHO_N "checking version of $LD... $ECHO_C" >&6
   ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -4595,8 +4108,8 @@ echo $ECHO_N "checking version of $LD... $ECHO_C" >&6; }
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
   esac
-  { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6; }
+  echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
 fi
 if test $ac_verc_fail = yes; then
   LD=: critic_missing="$critic_missing ld"
@@ -4610,8 +4123,8 @@ fi
 # that.
 # Extract the first word of "pwd", so it can be a program name with args.
 set dummy pwd; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PWD_P+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4626,29 +4139,28 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PWD_P="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
   test -z "$ac_cv_path_PWD_P" && ac_cv_path_PWD_P="no"
   ;;
 esac
 fi
 PWD_P=$ac_cv_path_PWD_P
+
 if test -n "$PWD_P"; then
-  { echo "$as_me:$LINENO: result: $PWD_P" >&5
-echo "${ECHO_T}$PWD_P" >&6; }
+  echo "$as_me:$LINENO: result: $PWD_P" >&5
+echo "${ECHO_T}$PWD_P" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
 if test "$PWD_P" = no; then
   { { echo "$as_me:$LINENO: error: *** A pwd binary could not be found." >&5
 echo "$as_me: error: *** A pwd binary could not be found." >&2;}
@@ -4661,8 +4173,8 @@ for ac_prog in ${ac_tool_prefix}gcc ${ac_tool_prefix}cc
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4675,27 +4187,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$CC" && break
 done
 
@@ -4703,8 +4213,8 @@ if test -z "$CC"; then
   ac_verc_fail=yes
 else
   # Found it, now check the version.
-  { echo "$as_me:$LINENO: checking version of $CC" >&5
-echo $ECHO_N "checking version of $CC... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking version of $CC" >&5
+echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -4713,8 +4223,8 @@ echo $ECHO_N "checking version of $CC... $ECHO_C" >&6; }
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
   esac
-  { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6; }
+  echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
 fi
 if test $ac_verc_fail = yes; then
   critic_missing="$critic_missing gcc"
@@ -4724,8 +4234,8 @@ for ac_prog in gnumake gmake make
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MAKE+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4738,27 +4248,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MAKE="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 MAKE=$ac_cv_prog_MAKE
 if test -n "$MAKE"; then
-  { echo "$as_me:$LINENO: result: $MAKE" >&5
-echo "${ECHO_T}$MAKE" >&6; }
+  echo "$as_me:$LINENO: result: $MAKE" >&5
+echo "${ECHO_T}$MAKE" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$MAKE" && break
 done
 
@@ -4766,8 +4274,8 @@ if test -z "$MAKE"; then
   ac_verc_fail=yes
 else
   # Found it, now check the version.
-  { echo "$as_me:$LINENO: checking version of $MAKE" >&5
-echo $ECHO_N "checking version of $MAKE... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking version of $MAKE" >&5
+echo $ECHO_N "checking version of $MAKE... $ECHO_C" >&6
   ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -4776,8 +4284,8 @@ echo $ECHO_N "checking version of $MAKE... $ECHO_C" >&6; }
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
   esac
-  { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6; }
+  echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
 fi
 if test $ac_verc_fail = yes; then
   critic_missing="$critic_missing make"
@@ -4788,8 +4296,8 @@ for ac_prog in gnumsgfmt gmsgfmt msgfmt
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MSGFMT+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4802,27 +4310,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MSGFMT="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 MSGFMT=$ac_cv_prog_MSGFMT
 if test -n "$MSGFMT"; then
-  { echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6; }
+  echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$MSGFMT" && break
 done
 
@@ -4830,8 +4336,8 @@ if test -z "$MSGFMT"; then
   ac_verc_fail=yes
 else
   # Found it, now check the version.
-  { echo "$as_me:$LINENO: checking version of $MSGFMT" >&5
-echo $ECHO_N "checking version of $MSGFMT... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking version of $MSGFMT" >&5
+echo $ECHO_N "checking version of $MSGFMT... $ECHO_C" >&6
   ac_prog_version=`$MSGFMT --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -4840,8 +4346,8 @@ echo $ECHO_N "checking version of $MSGFMT... $ECHO_C" >&6; }
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
   esac
-  { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6; }
+  echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
 fi
 if test $ac_verc_fail = yes; then
   MSGFMT=: aux_missing="$aux_missing msgfmt"
@@ -4851,8 +4357,8 @@ for ac_prog in makeinfo
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MAKEINFO+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4865,27 +4371,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MAKEINFO="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 MAKEINFO=$ac_cv_prog_MAKEINFO
 if test -n "$MAKEINFO"; then
-  { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
-echo "${ECHO_T}$MAKEINFO" >&6; }
+  echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+echo "${ECHO_T}$MAKEINFO" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$MAKEINFO" && break
 done
 
@@ -4893,8 +4397,8 @@ if test -z "$MAKEINFO"; then
   ac_verc_fail=yes
 else
   # Found it, now check the version.
-  { echo "$as_me:$LINENO: checking version of $MAKEINFO" >&5
-echo $ECHO_N "checking version of $MAKEINFO... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking version of $MAKEINFO" >&5
+echo $ECHO_N "checking version of $MAKEINFO... $ECHO_C" >&6
   ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -4903,8 +4407,8 @@ echo $ECHO_N "checking version of $MAKEINFO... $ECHO_C" >&6; }
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
   esac
-  { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6; }
+  echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
 fi
 if test $ac_verc_fail = yes; then
   MAKEINFO=: aux_missing="$aux_missing makeinfo"
@@ -4914,8 +4418,8 @@ for ac_prog in sed
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_SED+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4928,27 +4432,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_SED="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 SED=$ac_cv_prog_SED
 if test -n "$SED"; then
-  { echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6; }
+  echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$SED" && break
 done
 
@@ -4956,8 +4458,8 @@ if test -z "$SED"; then
   ac_verc_fail=yes
 else
   # Found it, now check the version.
-  { echo "$as_me:$LINENO: checking version of $SED" >&5
-echo $ECHO_N "checking version of $SED... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking version of $SED" >&5
+echo $ECHO_N "checking version of $SED... $ECHO_C" >&6
   ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -4966,8 +4468,8 @@ echo $ECHO_N "checking version of $SED... $ECHO_C" >&6; }
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
   esac
-  { echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6; }
+  echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
 fi
 if test $ac_verc_fail = yes; then
   SED=: aux_missing="$aux_missing sed"
@@ -4978,8 +4480,8 @@ for ac_prog in autoconf
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_AUTOCONF+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4992,27 +4494,25 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AUTOCONF="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 AUTOCONF=$ac_cv_prog_AUTOCONF
 if test -n "$AUTOCONF"; then
-  { echo "$as_me:$LINENO: result: $AUTOCONF" >&5
-echo "${ECHO_T}$AUTOCONF" >&6; }
+  echo "$as_me:$LINENO: result: $AUTOCONF" >&5
+echo "${ECHO_T}$AUTOCONF" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$AUTOCONF" && break
 done
 test -n "$AUTOCONF" || AUTOCONF="no"
@@ -5020,8 +4520,8 @@ test -n "$AUTOCONF" || AUTOCONF="no"
 case "x$AUTOCONF" in
 xno|x|x:) AUTOCONF=no ;;
 *)
-  { echo "$as_me:$LINENO: checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works" >&5
-echo $ECHO_N "checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works" >&5
+echo $ECHO_N "checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works... $ECHO_C" >&6
 if test "${libc_cv_autoconf_works+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5031,8 +4531,8 @@ else
     libc_cv_autoconf_works=no
   fi
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_autoconf_works" >&5
-echo "${ECHO_T}$libc_cv_autoconf_works" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_autoconf_works" >&5
+echo "${ECHO_T}$libc_cv_autoconf_works" >&6
   test $libc_cv_autoconf_works = yes || AUTOCONF=no
   ;;
 esac
@@ -5077,8 +4577,8 @@ fi
 
 
 # check if ranlib is necessary
-{ echo "$as_me:$LINENO: checking whether ranlib is necessary" >&5
-echo $ECHO_N "checking whether ranlib is necessary... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether ranlib is necessary" >&5
+echo $ECHO_N "checking whether ranlib is necessary... $ECHO_C" >&6
 if test "${libc_cv_ranlib_necessary+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5098,8 +4598,8 @@ else
 fi
 rm -rf conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_ranlib_necessary" >&5
-echo "${ECHO_T}$libc_cv_ranlib_necessary" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_ranlib_necessary" >&5
+echo "${ECHO_T}$libc_cv_ranlib_necessary" >&6
 if test "$libc_cv_ranlib_necessary" = no; then
  RANLIB=:
 fi
@@ -5111,8 +4611,8 @@ fi
 # - one of the terminals (":" and ";") is the first or last sign
 # - two terminals occur directly after each other
 # - the path contains an element with a dot in it
-{ echo "$as_me:$LINENO: checking LD_LIBRARY_PATH variable" >&5
-echo $ECHO_N "checking LD_LIBRARY_PATH variable... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking LD_LIBRARY_PATH variable" >&5
+echo $ECHO_N "checking LD_LIBRARY_PATH variable... $ECHO_C" >&6
 case ${LD_LIBRARY_PATH} in
   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
     ld_library_path_setting="contains current directory"
@@ -5121,8 +4621,8 @@ case ${LD_LIBRARY_PATH} in
     ld_library_path_setting="ok"
     ;;
 esac
-{ echo "$as_me:$LINENO: result: $ld_library_path_setting" >&5
-echo "${ECHO_T}$ld_library_path_setting" >&6; }
+echo "$as_me:$LINENO: result: $ld_library_path_setting" >&5
+echo "${ECHO_T}$ld_library_path_setting" >&6
 if test "$ld_library_path_setting" != "ok"; then
 { { echo "$as_me:$LINENO: error:
 *** LD_LIBRARY_PATH shouldn't contain the current directory when
@@ -5135,8 +4635,8 @@ echo "$as_me: error:
    { (exit 1); exit 1; }; }
 fi
 
-{ echo "$as_me:$LINENO: checking whether GCC supports -static-libgcc" >&5
-echo $ECHO_N "checking whether GCC supports -static-libgcc... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether GCC supports -static-libgcc" >&5
+echo $ECHO_N "checking whether GCC supports -static-libgcc... $ECHO_C" >&6
 if test "${libc_cv_gcc_static_libgcc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5146,20 +4646,20 @@ else
   libc_cv_gcc_static_libgcc=-static-libgcc
 fi
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_gcc_static_libgcc" >&5
-echo "${ECHO_T}$libc_cv_gcc_static_libgcc" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_gcc_static_libgcc" >&5
+echo "${ECHO_T}$libc_cv_gcc_static_libgcc" >&6
 
 
 # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_BASH_SHELL+set}" = set; then
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_BASH+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case $BASH_SHELL in
+  case $BASH in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_BASH_SHELL="$BASH_SHELL" # Let the user override the test with a path.
+  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5168,31 +4668,30 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_BASH_SHELL="$as_dir/$ac_word$ac_exec_ext"
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_BASH_SHELL" && ac_cv_path_BASH_SHELL="no"
+  test -z "$ac_cv_path_BASH" && ac_cv_path_BASH="no"
   ;;
 esac
 fi
-BASH_SHELL=$ac_cv_path_BASH_SHELL
-if test -n "$BASH_SHELL"; then
-  { echo "$as_me:$LINENO: result: $BASH_SHELL" >&5
-echo "${ECHO_T}$BASH_SHELL" >&6; }
+BASH=$ac_cv_path_BASH
+
+if test -n "$BASH"; then
+  echo "$as_me:$LINENO: result: $BASH" >&5
+echo "${ECHO_T}$BASH" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
-if test "$BASH_SHELL" != no &&
-   $BASH_SHELL -c 'test "$BASH_VERSINFO" \
+if test "$BASH" != no &&
+   $BASH -c 'test "$BASH_VERSINFO" \
 	     && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then
   libc_cv_have_bash2=yes
 else
@@ -5200,11 +4699,11 @@ else
 fi
 
 
-if test "$BASH_SHELL" = no; then
+if test "$BASH" = no; then
   # Extract the first word of "ksh", so it can be a program name with args.
 set dummy ksh; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_KSH+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5219,36 +4718,35 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_KSH="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
   test -z "$ac_cv_path_KSH" && ac_cv_path_KSH="no"
   ;;
 esac
 fi
 KSH=$ac_cv_path_KSH
+
 if test -n "$KSH"; then
-  { echo "$as_me:$LINENO: result: $KSH" >&5
-echo "${ECHO_T}$KSH" >&6; }
+  echo "$as_me:$LINENO: result: $KSH" >&5
+echo "${ECHO_T}$KSH" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   if test "$KSH" = no; then
     libc_cv_have_ksh=no
   else
     libc_cv_have_ksh=yes
   fi
 else
-  KSH="$BASH_SHELL"
+  KSH="$BASH"
 
   libc_cv_have_ksh=yes
 fi
@@ -5258,8 +4756,8 @@ for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5272,34 +4770,32 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
 fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
   test -n "$AWK" && break
 done
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PERL+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5314,37 +4810,36 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
   ;;
 esac
 fi
 PERL=$ac_cv_path_PERL
+
 if test -n "$PERL"; then
-  { echo "$as_me:$LINENO: result: $PERL" >&5
-echo "${ECHO_T}$PERL" >&6; }
+  echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
 if test "$PERL" != no &&
    (eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then
   PERL=no
 fi
 # Extract the first word of "install-info", so it can be a program name with args.
 set dummy install-info; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5360,33 +4855,32 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
   test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO="no"
   ;;
 esac
 fi
 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
+
 if test -n "$INSTALL_INFO"; then
-  { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
-echo "${ECHO_T}$INSTALL_INFO" >&6; }
+  echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
+echo "${ECHO_T}$INSTALL_INFO" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
 # Extract the first word of "bison", so it can be a program name with args.
 set dummy bison; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_BISON+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5402,32 +4896,31 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
-IFS=$as_save_IFS
 
   test -z "$ac_cv_path_BISON" && ac_cv_path_BISON="no"
   ;;
 esac
 fi
 BISON=$ac_cv_path_BISON
+
 if test -n "$BISON"; then
-  { echo "$as_me:$LINENO: result: $BISON" >&5
-echo "${ECHO_T}$BISON" >&6; }
+  echo "$as_me:$LINENO: result: $BISON" >&5
+echo "${ECHO_T}$BISON" >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 
-
-{ echo "$as_me:$LINENO: checking for signed size_t type" >&5
-echo $ECHO_N "checking for signed size_t type... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for signed size_t type" >&5
+echo $ECHO_N "checking for signed size_t type... $ECHO_C" >&6
 if test "${libc_cv_signed_size_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5441,8 +4934,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_signed_size_t" >&5
-echo "${ECHO_T}$libc_cv_signed_size_t" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_signed_size_t" >&5
+echo "${ECHO_T}$libc_cv_signed_size_t" >&6
 if test $libc_cv_signed_size_t = yes; then
     cat >> confdefs.h <<\EOF
 #undef __SIZE_TYPE__
@@ -5451,8 +4944,8 @@ EOF
 fi
 
 
-{ echo "$as_me:$LINENO: checking for libc-friendly stddef.h" >&5
-echo $ECHO_N "checking for libc-friendly stddef.h... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for libc-friendly stddef.h" >&5
+echo $ECHO_N "checking for libc-friendly stddef.h... $ECHO_C" >&6
 if test "${libc_cv_friendly_stddef+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5480,41 +4973,45 @@ if (&size == NULL || &wchar == NULL) abort ();
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   libc_cv_friendly_stddef=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	libc_cv_friendly_stddef=no
+libc_cv_friendly_stddef=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_friendly_stddef" >&5
-echo "${ECHO_T}$libc_cv_friendly_stddef" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_friendly_stddef" >&5
+echo "${ECHO_T}$libc_cv_friendly_stddef" >&6
 if test $libc_cv_friendly_stddef = yes; then
   config_vars="$config_vars
 override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
 fi
 
-{ echo "$as_me:$LINENO: checking whether we need to use -P to assemble .S files" >&5
-echo $ECHO_N "checking whether we need to use -P to assemble .S files... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether we need to use -P to assemble .S files" >&5
+echo $ECHO_N "checking whether we need to use -P to assemble .S files... $ECHO_C" >&6
 if test "${libc_cv_need_minus_P+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5534,15 +5031,15 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_need_minus_P" >&5
-echo "${ECHO_T}$libc_cv_need_minus_P" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_need_minus_P" >&5
+echo "${ECHO_T}$libc_cv_need_minus_P" >&6
 if test $libc_cv_need_minus_P = yes; then
   config_vars="$config_vars
 asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
 fi
 
-{ echo "$as_me:$LINENO: checking whether .text pseudo-op must be used" >&5
-echo $ECHO_N "checking whether .text pseudo-op must be used... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether .text pseudo-op must be used" >&5
+echo $ECHO_N "checking whether .text pseudo-op must be used... $ECHO_C" >&6
 if test "${libc_cv_dot_text+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5562,15 +5059,15 @@ rm -f conftest*
 fi
 
 if test -z "$libc_cv_dot_text"; then
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 else
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 fi
 
-{ echo "$as_me:$LINENO: checking for assembler global-symbol directive" >&5
-echo $ECHO_N "checking for assembler global-symbol directive... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for assembler global-symbol directive" >&5
+echo $ECHO_N "checking for assembler global-symbol directive... $ECHO_C" >&6
 if test "${libc_cv_asm_global_directive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5593,8 +5090,8 @@ EOF
   test $libc_cv_asm_global_directive != UNKNOWN && break
 done
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_global_directive" >&5
-echo "${ECHO_T}$libc_cv_asm_global_directive" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_global_directive" >&5
+echo "${ECHO_T}$libc_cv_asm_global_directive" >&6
 if test $libc_cv_asm_global_directive = UNKNOWN; then
   { { echo "$as_me:$LINENO: error: cannot determine asm global directive" >&5
 echo "$as_me: error: cannot determine asm global directive" >&2;}
@@ -5606,8 +5103,8 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for .set assembler directive" >&5
-echo $ECHO_N "checking for .set assembler directive... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for .set assembler directive" >&5
+echo $ECHO_N "checking for .set assembler directive... $ECHO_C" >&6
 if test "${libc_cv_asm_set_directive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5632,8 +5129,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_set_directive" >&5
-echo "${ECHO_T}$libc_cv_asm_set_directive" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_set_directive" >&5
+echo "${ECHO_T}$libc_cv_asm_set_directive" >&6
 if test $libc_cv_asm_set_directive = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_ASM_SET_DIRECTIVE 1
@@ -5641,8 +5138,8 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for assembler .type directive prefix" >&5
-echo $ECHO_N "checking for assembler .type directive prefix... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for assembler .type directive prefix" >&5
+echo $ECHO_N "checking for assembler .type directive prefix... $ECHO_C" >&6
 if test "${libc_cv_asm_type_prefix+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5668,8 +5165,8 @@ EOF
   test "x$libc_cv_asm_type_prefix" != xno && break
 done
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_type_prefix" >&5
-echo "${ECHO_T}$libc_cv_asm_type_prefix" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_type_prefix" >&5
+echo "${ECHO_T}$libc_cv_asm_type_prefix" >&6
 if test "x$libc_cv_asm_type_prefix" != xno; then
   cat >>confdefs.h <<_ACEOF
 #define ASM_TYPE_DIRECTIVE_PREFIX ${libc_cv_asm_type_prefix}
@@ -5677,8 +5174,8 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for .symver assembler directive" >&5
-echo $ECHO_N "checking for .symver assembler directive... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for .symver assembler directive" >&5
+echo $ECHO_N "checking for .symver assembler directive... $ECHO_C" >&6
 if test "${libc_cv_asm_symver_directive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5694,10 +5191,10 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_symver_directive" >&5
-echo "${ECHO_T}$libc_cv_asm_symver_directive" >&6; }
-{ echo "$as_me:$LINENO: checking for ld --version-script" >&5
-echo $ECHO_N "checking for ld --version-script... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_symver_directive" >&5
+echo "${ECHO_T}$libc_cv_asm_symver_directive" >&6
+echo "$as_me:$LINENO: checking for ld --version-script" >&5
+echo $ECHO_N "checking for ld --version-script... $ECHO_C" >&6
 if test "${libc_cv_ld_version_script_option+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5740,8 +5237,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_ld_version_script_option" >&5
-echo "${ECHO_T}$libc_cv_ld_version_script_option" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_ld_version_script_option" >&5
+echo "${ECHO_T}$libc_cv_ld_version_script_option" >&6
 if test $shared != no &&
    test $libc_cv_asm_symver_directive = yes &&
    test $libc_cv_ld_version_script_option = yes &&
@@ -5764,8 +5261,8 @@ if test $elf = yes && test $shared != no && test $VERSIONING = no; then
 *** For versioning you need recent binutils (binutils-2.8.1.0.23 or newer)."
 fi
 if test $elf = yes; then
-  { echo "$as_me:$LINENO: checking for .previous assembler directive" >&5
-echo $ECHO_N "checking for .previous assembler directive... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for .previous assembler directive" >&5
+echo $ECHO_N "checking for .previous assembler directive... $ECHO_C" >&6
 if test "${libc_cv_asm_previous_directive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5785,16 +5282,16 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_previous_directive" >&5
-echo "${ECHO_T}$libc_cv_asm_previous_directive" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_previous_directive" >&5
+echo "${ECHO_T}$libc_cv_asm_previous_directive" >&6
   if test $libc_cv_asm_previous_directive = yes; then
     cat >>confdefs.h <<\_ACEOF
 #define HAVE_ASM_PREVIOUS_DIRECTIVE 1
 _ACEOF
 
   else
-    { echo "$as_me:$LINENO: checking for .popsection assembler directive" >&5
-echo $ECHO_N "checking for .popsection assembler directive... $ECHO_C" >&6; }
+    echo "$as_me:$LINENO: checking for .popsection assembler directive" >&5
+echo $ECHO_N "checking for .popsection assembler directive... $ECHO_C" >&6
 if test "${libc_cv_asm_popsection_directive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5814,8 +5311,8 @@ EOF
     fi
     rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_popsection_directive" >&5
-echo "${ECHO_T}$libc_cv_asm_popsection_directive" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_popsection_directive" >&5
+echo "${ECHO_T}$libc_cv_asm_popsection_directive" >&6
     if test $libc_cv_asm_popsection_directive = yes; then
       cat >>confdefs.h <<\_ACEOF
 #define HAVE_ASM_POPSECTION_DIRECTIVE 1
@@ -5823,8 +5320,8 @@ _ACEOF
 
     fi
   fi
-  { echo "$as_me:$LINENO: checking for .protected and .hidden assembler directive" >&5
-echo $ECHO_N "checking for .protected and .hidden assembler directive... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for .protected and .hidden assembler directive" >&5
+echo $ECHO_N "checking for .protected and .hidden assembler directive... $ECHO_C" >&6
 if test "${libc_cv_asm_protected_directive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5848,12 +5345,12 @@ echo "$as_me: error: assembler support for symbol visibility is required" >&2;}
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_protected_directive" >&5
-echo "${ECHO_T}$libc_cv_asm_protected_directive" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_protected_directive" >&5
+echo "${ECHO_T}$libc_cv_asm_protected_directive" >&6
 
   if test $libc_cv_asm_protected_directive = yes; then
-    { echo "$as_me:$LINENO: checking whether __attribute__((visibility())) is supported" >&5
-echo $ECHO_N "checking whether __attribute__((visibility())) is supported... $ECHO_C" >&6; }
+    echo "$as_me:$LINENO: checking whether __attribute__((visibility())) is supported" >&5
+echo $ECHO_N "checking whether __attribute__((visibility())) is supported... $ECHO_C" >&6
 if test "${libc_cv_visibility_attribute+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5877,8 +5374,8 @@ EOF
 		  rm -f conftest.cs
 
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_visibility_attribute" >&5
-echo "${ECHO_T}$libc_cv_visibility_attribute" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_visibility_attribute" >&5
+echo "${ECHO_T}$libc_cv_visibility_attribute" >&6
     if test $libc_cv_visibility_attribute != yes; then
       { { echo "$as_me:$LINENO: error: compiler support for visibility attribute is required" >&5
 echo "$as_me: error: compiler support for visibility attribute is required" >&2;}
@@ -5887,8 +5384,8 @@ echo "$as_me: error: compiler support for visibility attribute is required" >&2;
   fi
 
   if test $libc_cv_visibility_attribute = yes; then
-    { echo "$as_me:$LINENO: checking for broken __attribute__((visibility()))" >&5
-echo $ECHO_N "checking for broken __attribute__((visibility()))... $ECHO_C" >&6; }
+    echo "$as_me:$LINENO: checking for broken __attribute__((visibility()))" >&5
+echo $ECHO_N "checking for broken __attribute__((visibility()))... $ECHO_C" >&6
 if test "${libc_cv_broken_visibility_attribute+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5911,8 +5408,8 @@ EOF
 		  rm -f conftest.c conftest.s
 
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_broken_visibility_attribute" >&5
-echo "${ECHO_T}$libc_cv_broken_visibility_attribute" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_broken_visibility_attribute" >&5
+echo "${ECHO_T}$libc_cv_broken_visibility_attribute" >&6
     if test $libc_cv_broken_visibility_attribute = yes; then
       { { echo "$as_me:$LINENO: error: working compiler support for visibility attribute is required" >&5
 echo "$as_me: error: working compiler support for visibility attribute is required" >&2;}
@@ -5920,8 +5417,8 @@ echo "$as_me: error: working compiler support for visibility attribute is requir
     fi
   fi
 
-  { echo "$as_me:$LINENO: checking for broken __attribute__((alias()))" >&5
-echo $ECHO_N "checking for broken __attribute__((alias()))... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for broken __attribute__((alias()))" >&5
+echo $ECHO_N "checking for broken __attribute__((alias()))... $ECHO_C" >&6
 if test "${libc_cv_broken_alias_attribute+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5948,8 +5445,8 @@ EOF
 		  rm -f conftest.c conftest.s
 
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_broken_alias_attribute" >&5
-echo "${ECHO_T}$libc_cv_broken_alias_attribute" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_broken_alias_attribute" >&5
+echo "${ECHO_T}$libc_cv_broken_alias_attribute" >&6
   if test $libc_cv_broken_alias_attribute = yes; then
     { { echo "$as_me:$LINENO: error: working alias attribute support required" >&5
 echo "$as_me: error: working alias attribute support required" >&2;}
@@ -5957,8 +5454,8 @@ echo "$as_me: error: working alias attribute support required" >&2;}
   fi
 
   if test $libc_cv_visibility_attribute = yes; then
-    { echo "$as_me:$LINENO: checking whether to put _rtld_local into .sdata section" >&5
-echo $ECHO_N "checking whether to put _rtld_local into .sdata section... $ECHO_C" >&6; }
+    echo "$as_me:$LINENO: checking whether to put _rtld_local into .sdata section" >&5
+echo $ECHO_N "checking whether to put _rtld_local into .sdata section... $ECHO_C" >&6
 if test "${libc_cv_have_sdata_section+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5971,8 +5468,8 @@ else
 		  rm -f conftest.c conftest.so
 
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_have_sdata_section" >&5
-echo "${ECHO_T}$libc_cv_have_sdata_section" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_have_sdata_section" >&5
+echo "${ECHO_T}$libc_cv_have_sdata_section" >&6
     if test $libc_cv_have_sdata_section = yes; then
       cat >>confdefs.h <<\_ACEOF
 #define HAVE_SDATA_SECTION 1
@@ -5981,8 +5478,8 @@ _ACEOF
     fi
   fi
 
-  { echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
-echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
+echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
 if test "${libc_cv_initfini_array+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6010,16 +5507,16 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_initfini_array" >&5
-echo "${ECHO_T}$libc_cv_initfini_array" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_initfini_array" >&5
+echo "${ECHO_T}$libc_cv_initfini_array" >&6
   if test $libc_cv_initfini_array != yes; then
     { { echo "$as_me:$LINENO: error: Need linker with .init_array/.fini_array support." >&5
 echo "$as_me: error: Need linker with .init_array/.fini_array support." >&2;}
    { (exit 1); exit 1; }; }
   fi
 
-  { echo "$as_me:$LINENO: checking for libunwind-support in compiler" >&5
-echo $ECHO_N "checking for libunwind-support in compiler... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for libunwind-support in compiler" >&5
+echo $ECHO_N "checking for libunwind-support in compiler... $ECHO_C" >&6
 if test "${libc_cv_cc_with_libunwind+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6035,8 +5532,8 @@ EOF
     fi
     rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_cc_with_libunwind" >&5
-echo "${ECHO_T}$libc_cv_cc_with_libunwind" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_cc_with_libunwind" >&5
+echo "${ECHO_T}$libc_cv_cc_with_libunwind" >&6
 
   if test $libc_cv_cc_with_libunwind = yes; then
     cat >>confdefs.h <<\_ACEOF
@@ -6045,8 +5542,8 @@ _ACEOF
 
   fi
 
-  { echo "$as_me:$LINENO: checking for -z nodelete option" >&5
-echo $ECHO_N "checking for -z nodelete option... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for -z nodelete option" >&5
+echo $ECHO_N "checking for -z nodelete option... $ECHO_C" >&6
 if test "${libc_cv_z_nodelete+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6071,11 +5568,11 @@ echo "$as_me: error: linker with -z nodelete support required" >&2;}
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_z_nodelete" >&5
-echo "${ECHO_T}$libc_cv_z_nodelete" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_z_nodelete" >&5
+echo "${ECHO_T}$libc_cv_z_nodelete" >&6
 
-  { echo "$as_me:$LINENO: checking for -z nodlopen option" >&5
-echo $ECHO_N "checking for -z nodlopen option... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for -z nodlopen option" >&5
+echo $ECHO_N "checking for -z nodlopen option... $ECHO_C" >&6
 if test "${libc_cv_z_nodlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6100,11 +5597,11 @@ echo "$as_me: error: linker with -z nodlopen support required" >&2;}
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_z_nodlopen" >&5
-echo "${ECHO_T}$libc_cv_z_nodlopen" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_z_nodlopen" >&5
+echo "${ECHO_T}$libc_cv_z_nodlopen" >&6
 
-  { echo "$as_me:$LINENO: checking for -z initfirst option" >&5
-echo $ECHO_N "checking for -z initfirst option... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for -z initfirst option" >&5
+echo $ECHO_N "checking for -z initfirst option... $ECHO_C" >&6
 if test "${libc_cv_z_initfirst+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6129,13 +5626,13 @@ echo "$as_me: error: linker with -z initfirst support required" >&2;}
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_z_initfirst" >&5
-echo "${ECHO_T}$libc_cv_z_initfirst" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_z_initfirst" >&5
+echo "${ECHO_T}$libc_cv_z_initfirst" >&6
 
   case "$base_machine" in
     i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*)
-      { echo "$as_me:$LINENO: checking for -z relro option" >&5
-echo $ECHO_N "checking for -z relro option... $ECHO_C" >&6; }
+      echo "$as_me:$LINENO: checking for -z relro option" >&5
+echo $ECHO_N "checking for -z relro option... $ECHO_C" >&6
 if test "${libc_cv_z_relro+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6158,8 +5655,8 @@ else
     fi
   fi
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_z_relro" >&5
-echo "${ECHO_T}$libc_cv_z_relro" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_z_relro" >&5
+echo "${ECHO_T}$libc_cv_z_relro" >&6
       if test "$libc_cv_z_relro" = no; then
         { { echo "$as_me:$LINENO: error: linker with -z relro support required" >&5
 echo "$as_me: error: linker with -z relro support required" >&2;}
@@ -6169,8 +5666,8 @@ echo "$as_me: error: linker with -z relro support required" >&2;}
     *) ;;
    esac
 
-  { echo "$as_me:$LINENO: checking for -Bgroup option" >&5
-echo $ECHO_N "checking for -Bgroup option... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for -Bgroup option" >&5
+echo $ECHO_N "checking for -Bgroup option... $ECHO_C" >&6
 if test "${libc_cv_Bgroup+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6192,12 +5689,12 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_Bgroup" >&5
-echo "${ECHO_T}$libc_cv_Bgroup" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_Bgroup" >&5
+echo "${ECHO_T}$libc_cv_Bgroup" >&6
 
 
-  { echo "$as_me:$LINENO: checking for libgcc_s suffix" >&5
-echo $ECHO_N "checking for libgcc_s suffix... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for libgcc_s suffix" >&5
+echo $ECHO_N "checking for libgcc_s suffix... $ECHO_C" >&6
 if test "${libc_cv_libgcc_s_suffix+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6210,12 +5707,12 @@ EOF
 			   | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'`
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_libgcc_s_suffix" >&5
-echo "${ECHO_T}$libc_cv_libgcc_s_suffix" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_libgcc_s_suffix" >&5
+echo "${ECHO_T}$libc_cv_libgcc_s_suffix" >&6
 
 
-  { echo "$as_me:$LINENO: checking for --as-needed option" >&5
-echo $ECHO_N "checking for --as-needed option... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for --as-needed option" >&5
+echo $ECHO_N "checking for --as-needed option... $ECHO_C" >&6
 if test "${libc_cv_as_needed+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6238,13 +5735,13 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_as_needed" >&5
-echo "${ECHO_T}$libc_cv_as_needed" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_as_needed" >&5
+echo "${ECHO_T}$libc_cv_as_needed" >&6
 
 
   ASFLAGS_config=
-  { echo "$as_me:$LINENO: checking whether --noexecstack is desirable for .S files" >&5
-echo $ECHO_N "checking whether --noexecstack is desirable for .S files... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking whether --noexecstack is desirable for .S files" >&5
+echo $ECHO_N "checking whether --noexecstack is desirable for .S files... $ECHO_C" >&6
 if test "${libc_cv_as_noexecstack+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6273,15 +5770,15 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_as_noexecstack" >&5
-echo "${ECHO_T}$libc_cv_as_noexecstack" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_as_noexecstack" >&5
+echo "${ECHO_T}$libc_cv_as_noexecstack" >&6
   if test $libc_cv_as_noexecstack = yes; then
     ASFLAGS_config="$ASFLAGS_config -Wa,--noexecstack"
   fi
 
 
-  { echo "$as_me:$LINENO: checking for -z combreloc" >&5
-echo $ECHO_N "checking for -z combreloc... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for -z combreloc" >&5
+echo $ECHO_N "checking for -z combreloc... $ECHO_C" >&6
 if test "${libc_cv_z_combreloc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6310,8 +5807,8 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_z_combreloc" >&5
-echo "${ECHO_T}$libc_cv_z_combreloc" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_z_combreloc" >&5
+echo "${ECHO_T}$libc_cv_z_combreloc" >&6
   if test "$libc_cv_z_combreloc" = yes; then
     cat >>confdefs.h <<\_ACEOF
 #define HAVE_Z_COMBRELOC 1
@@ -6320,8 +5817,8 @@ _ACEOF
   fi
 
 
-  { echo "$as_me:$LINENO: checking for -z execstack" >&5
-echo $ECHO_N "checking for -z execstack... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for -z execstack" >&5
+echo $ECHO_N "checking for -z execstack... $ECHO_C" >&6
 if test "${libc_cv_z_execstack+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6344,12 +5841,12 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_z_execstack" >&5
-echo "${ECHO_T}$libc_cv_z_execstack" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_z_execstack" >&5
+echo "${ECHO_T}$libc_cv_z_execstack" >&6
 
 
-  { echo "$as_me:$LINENO: checking for -fpie" >&5
-echo $ECHO_N "checking for -fpie... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for -fpie" >&5
+echo $ECHO_N "checking for -fpie... $ECHO_C" >&6
 if test "${libc_cv_fpie+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6371,13 +5868,13 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_fpie" >&5
-echo "${ECHO_T}$libc_cv_fpie" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_fpie" >&5
+echo "${ECHO_T}$libc_cv_fpie" >&6
 
 
 
-  { echo "$as_me:$LINENO: checking for --hash-style option" >&5
-echo $ECHO_N "checking for --hash-style option... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for --hash-style option" >&5
+echo $ECHO_N "checking for --hash-style option... $ECHO_C" >&6
 if test "${libc_cv_hashstyle+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6399,13 +5896,13 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_hashstyle" >&5
-echo "${ECHO_T}$libc_cv_hashstyle" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_hashstyle" >&5
+echo "${ECHO_T}$libc_cv_hashstyle" >&6
 
 fi
 
-{ echo "$as_me:$LINENO: checking for -fno-toplevel-reorder" >&5
-echo $ECHO_N "checking for -fno-toplevel-reorder... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for -fno-toplevel-reorder" >&5
+echo $ECHO_N "checking for -fno-toplevel-reorder... $ECHO_C" >&6
 if test "${libc_cv_fno_toplevel_reorder+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6426,8 +5923,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_fno_toplevel_reorder" >&5
-echo "${ECHO_T}$libc_cv_fno_toplevel_reorder" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_fno_toplevel_reorder" >&5
+echo "${ECHO_T}$libc_cv_fno_toplevel_reorder" >&6
 if test $libc_cv_fno_toplevel_reorder = yes; then
   fno_unit_at_a_time=-fno-toplevel-reorder
 else
@@ -6435,8 +5932,8 @@ else
 fi
 
 
-{ echo "$as_me:$LINENO: checking for -fstack-protector" >&5
-echo $ECHO_N "checking for -fstack-protector... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for -fstack-protector" >&5
+echo $ECHO_N "checking for -fstack-protector... $ECHO_C" >&6
 if test "${libc_cv_ssp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6458,12 +5955,12 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_ssp" >&5
-echo "${ECHO_T}$libc_cv_ssp" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_ssp" >&5
+echo "${ECHO_T}$libc_cv_ssp" >&6
 
 
-{ echo "$as_me:$LINENO: checking for -fgnu89-inline" >&5
-echo $ECHO_N "checking for -fgnu89-inline... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for -fgnu89-inline" >&5
+echo $ECHO_N "checking for -fgnu89-inline... $ECHO_C" >&6
 if test "${libc_cv_gnu89_inline+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6489,8 +5986,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_gnu89_inline" >&5
-echo "${ECHO_T}$libc_cv_gnu89_inline" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_gnu89_inline" >&5
+echo "${ECHO_T}$libc_cv_gnu89_inline" >&6
 if test $libc_cv_gnu89_inline = yes; then
   libc_cv_gnu89_inline=-fgnu89-inline
 else
@@ -6499,8 +5996,8 @@ fi
 
 
 if test $elf != yes; then
-  { echo "$as_me:$LINENO: checking for .init and .fini sections" >&5
-echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for .init and .fini sections" >&5
+echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6
 if test "${libc_cv_have_initfini+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6522,34 +6019,38 @@ asm (".section .init");
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   libc_cv_have_initfini=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	libc_cv_have_initfini=no
+libc_cv_have_initfini=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_have_initfini" >&5
-echo "${ECHO_T}$libc_cv_have_initfini" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_have_initfini" >&5
+echo "${ECHO_T}$libc_cv_have_initfini" >&6
     if test $libc_cv_have_initfini = yes; then
     cat >>confdefs.h <<\_ACEOF
 #define HAVE_INITFINI 1
@@ -6559,8 +6060,8 @@ _ACEOF
 fi
 
 if test $elf = yes; then
-  { echo "$as_me:$LINENO: checking whether cc puts quotes around section names" >&5
-echo $ECHO_N "checking whether cc puts quotes around section names... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking whether cc puts quotes around section names" >&5
+echo $ECHO_N "checking whether cc puts quotes around section names... $ECHO_C" >&6
 if test "${libc_cv_have_section_quotes+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6580,8 +6081,8 @@ EOF
 		  rm -f conftest.cs
 
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_have_section_quotes" >&5
-echo "${ECHO_T}$libc_cv_have_section_quotes" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_have_section_quotes" >&5
+echo "${ECHO_T}$libc_cv_have_section_quotes" >&6
   if test $libc_cv_have_section_quotes = yes; then
     cat >>confdefs.h <<\_ACEOF
 #define HAVE_SECTION_QUOTES 1
@@ -6596,8 +6097,8 @@ if test $elf = yes; then
   libc_cv_asm_underscores=no
 else
   if test $ac_cv_prog_cc_works = yes; then
-    { echo "$as_me:$LINENO: checking for _ prefix on C symbol names" >&5
-echo $ECHO_N "checking for _ prefix on C symbol names... $ECHO_C" >&6; }
+    echo "$as_me:$LINENO: checking for _ prefix on C symbol names" >&5
+echo $ECHO_N "checking for _ prefix on C symbol names... $ECHO_C" >&6
 if test "${libc_cv_asm_underscores+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6617,39 +6118,42 @@ glibc_foobar ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   libc_cv_asm_underscores=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	libc_cv_asm_underscores=no
+libc_cv_asm_underscores=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_underscores" >&5
-echo "${ECHO_T}$libc_cv_asm_underscores" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_underscores" >&5
+echo "${ECHO_T}$libc_cv_asm_underscores" >&6
   else
-    { echo "$as_me:$LINENO: checking for _ prefix on C symbol names" >&5
-echo $ECHO_N "checking for _ prefix on C symbol names... $ECHO_C" >&6; }
+    echo "$as_me:$LINENO: checking for _ prefix on C symbol names" >&5
+echo $ECHO_N "checking for _ prefix on C symbol names... $ECHO_C" >&6
 if test "${libc_cv_asm_underscores+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6679,8 +6183,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_underscores" >&5
-echo "${ECHO_T}$libc_cv_asm_underscores" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_underscores" >&5
+echo "${ECHO_T}$libc_cv_asm_underscores" >&6
   fi
 fi
 if test $libc_cv_asm_underscores = no; then
@@ -6694,8 +6198,8 @@ if test $elf = yes; then
   libc_cv_weak_symbols=yes
 fi
 
-{ echo "$as_me:$LINENO: checking for assembler .weak directive" >&5
-echo $ECHO_N "checking for assembler .weak directive... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for assembler .weak directive" >&5
+echo $ECHO_N "checking for assembler .weak directive... $ECHO_C" >&6
 if test "${libc_cv_asm_weak_directive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6718,12 +6222,12 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_weak_directive" >&5
-echo "${ECHO_T}$libc_cv_asm_weak_directive" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_weak_directive" >&5
+echo "${ECHO_T}$libc_cv_asm_weak_directive" >&6
 
 if test $libc_cv_asm_weak_directive = no; then
-  { echo "$as_me:$LINENO: checking for assembler .weakext directive" >&5
-echo $ECHO_N "checking for assembler .weakext directive... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for assembler .weakext directive" >&5
+echo $ECHO_N "checking for assembler .weakext directive... $ECHO_C" >&6
 if test "${libc_cv_asm_weakext_directive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6748,8 +6252,8 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_weakext_directive" >&5
-echo "${ECHO_T}$libc_cv_asm_weakext_directive" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_weakext_directive" >&5
+echo "${ECHO_T}$libc_cv_asm_weakext_directive" >&6
 
 fi # no .weak
 
@@ -6765,8 +6269,8 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking whether CFI directives are supported" >&5
-echo $ECHO_N "checking whether CFI directives are supported... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether CFI directives are supported" >&5
+echo $ECHO_N "checking whether CFI directives are supported... $ECHO_C" >&6
 if test "${libc_cv_asm_cfi_directives+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6795,8 +6299,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_asm_cfi_directives" >&5
-echo "${ECHO_T}$libc_cv_asm_cfi_directives" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_asm_cfi_directives" >&5
+echo "${ECHO_T}$libc_cv_asm_cfi_directives" >&6
 if test $libc_cv_asm_cfi_directives = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_ASM_CFI_DIRECTIVES 1
@@ -6804,8 +6308,8 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for ld --no-whole-archive" >&5
-echo $ECHO_N "checking for ld --no-whole-archive... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for ld --no-whole-archive" >&5
+echo $ECHO_N "checking for ld --no-whole-archive... $ECHO_C" >&6
 if test "${libc_cv_ld_no_whole_archive+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6828,14 +6332,14 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_ld_no_whole_archive" >&5
-echo "${ECHO_T}$libc_cv_ld_no_whole_archive" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_ld_no_whole_archive" >&5
+echo "${ECHO_T}$libc_cv_ld_no_whole_archive" >&6
 if test $libc_cv_ld_no_whole_archive = yes; then
   no_whole_archive=-Wl,--no-whole-archive
 fi
 
-{ echo "$as_me:$LINENO: checking for gcc -fexceptions" >&5
-echo $ECHO_N "checking for gcc -fexceptions... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for gcc -fexceptions" >&5
+echo $ECHO_N "checking for gcc -fexceptions... $ECHO_C" >&6
 if test "${libc_cv_gcc_exceptions+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6858,8 +6362,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_gcc_exceptions" >&5
-echo "${ECHO_T}$libc_cv_gcc_exceptions" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_gcc_exceptions" >&5
+echo "${ECHO_T}$libc_cv_gcc_exceptions" >&6
 if test $libc_cv_gcc_exceptions = yes; then
   exceptions=-fexceptions
 fi
@@ -6867,8 +6371,8 @@ fi
 if test "$host_cpu" = powerpc ; then
 # Check for a bug present in at least versions 2.8.x of GCC
 # and versions 1.0.x of EGCS.
-{ echo "$as_me:$LINENO: checking whether clobbering cr0 causes problems" >&5
-echo $ECHO_N "checking whether clobbering cr0 causes problems... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether clobbering cr0 causes problems" >&5
+echo $ECHO_N "checking whether clobbering cr0 causes problems... $ECHO_C" >&6
 if test "${libc_cv_c_asmcr0_bug+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6888,34 +6392,38 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   libc_cv_c_asmcr0_bug='no'
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	libc_cv_c_asmcr0_bug='yes'
+libc_cv_c_asmcr0_bug='yes'
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_c_asmcr0_bug" >&5
-echo "${ECHO_T}$libc_cv_c_asmcr0_bug" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_c_asmcr0_bug" >&5
+echo "${ECHO_T}$libc_cv_c_asmcr0_bug" >&6
 if test "$libc_cv_c_asmcr0_bug" != 'no'; then
   cat >>confdefs.h <<\_ACEOF
 #define BROKEN_PPC_ASM_CR0 1
@@ -6924,8 +6432,8 @@ _ACEOF
 fi
 fi
 
-{ echo "$as_me:$LINENO: checking for __builtin_expect" >&5
-echo $ECHO_N "checking for __builtin_expect... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for __builtin_expect" >&5
+echo $ECHO_N "checking for __builtin_expect... $ECHO_C" >&6
 if test "${libc_cv_gcc_builtin_expect+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6950,8 +6458,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_expect" >&5
-echo "${ECHO_T}$libc_cv_gcc_builtin_expect" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_expect" >&5
+echo "${ECHO_T}$libc_cv_gcc_builtin_expect" >&6
 if test "$libc_cv_gcc_builtin_expect" = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_BUILTIN_EXPECT 1
@@ -6959,8 +6467,8 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for __builtin_memset" >&5
-echo $ECHO_N "checking for __builtin_memset... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for __builtin_memset" >&5
+echo $ECHO_N "checking for __builtin_memset... $ECHO_C" >&6
 if test "${libc_cv_gcc_builtin_memset+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -6983,8 +6491,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_memset" >&5
-echo "${ECHO_T}$libc_cv_gcc_builtin_memset" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_memset" >&5
+echo "${ECHO_T}$libc_cv_gcc_builtin_memset" >&6
 if test "$libc_cv_gcc_builtin_memset" = yes ; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_BUILTIN_MEMSET 1
@@ -6992,8 +6500,8 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for redirection of built-in functions" >&5
-echo $ECHO_N "checking for redirection of built-in functions... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for redirection of built-in functions" >&5
+echo $ECHO_N "checking for redirection of built-in functions... $ECHO_C" >&6
 if test "${libc_cv_gcc_builtin_redirection+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7017,8 +6525,8 @@ else
 fi
 rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_redirection" >&5
-echo "${ECHO_T}$libc_cv_gcc_builtin_redirection" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_redirection" >&5
+echo "${ECHO_T}$libc_cv_gcc_builtin_redirection" >&6
 if test "$libc_cv_gcc_builtin_redirection" = yes ; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_BUILTIN_REDIRECTION 1
@@ -7027,8 +6535,8 @@ _ACEOF
 fi
 
 if test "x$use__thread" != xno; then
-  { echo "$as_me:$LINENO: checking for __thread" >&5
-echo $ECHO_N "checking for __thread... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for __thread" >&5
+echo $ECHO_N "checking for __thread... $ECHO_C" >&6
 if test "${libc_cv_gcc___thread+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7047,8 +6555,8 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_gcc___thread" >&5
-echo "${ECHO_T}$libc_cv_gcc___thread" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_gcc___thread" >&5
+echo "${ECHO_T}$libc_cv_gcc___thread" >&6
   if test "$libc_cv_gcc___thread" = yes; then
     cat >>confdefs.h <<\_ACEOF
 #define HAVE___THREAD 1
@@ -7060,8 +6568,8 @@ else
 fi
 
 if test "$libc_cv_gcc___thread" = yes; then
-    { echo "$as_me:$LINENO: checking for tls_model attribute" >&5
-echo $ECHO_N "checking for tls_model attribute... $ECHO_C" >&6; }
+    echo "$as_me:$LINENO: checking for tls_model attribute" >&5
+echo $ECHO_N "checking for tls_model attribute... $ECHO_C" >&6
 if test "${libc_cv_gcc_tls_model_attr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7080,8 +6588,8 @@ EOF
   fi
   rm -f conftest*
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_gcc_tls_model_attr" >&5
-echo "${ECHO_T}$libc_cv_gcc_tls_model_attr" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_gcc_tls_model_attr" >&5
+echo "${ECHO_T}$libc_cv_gcc_tls_model_attr" >&6
   if test "$libc_cv_gcc_tls_model_attr" = yes; then
     cat >>confdefs.h <<\_ACEOF
 #define HAVE_TLS_MODEL_ATTRIBUTE 1
@@ -7090,8 +6598,8 @@ _ACEOF
   fi
 fi
 
-{ echo "$as_me:$LINENO: checking for libgd" >&5
-echo $ECHO_N "checking for libgd... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for libgd" >&5
+echo $ECHO_N "checking for libgd... $ECHO_C" >&6
 if test "$with_gd" != "no"; then
   old_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $libgd_include"
@@ -7115,32 +6623,35 @@ gdImagePng (0, 0)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   LIBGD=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	LIBGD=no
+LIBGD=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$old_CFLAGS"
   LDFLAGS="$old_LDFLAGS"
@@ -7148,8 +6659,8 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 else
   LIBGD=no
 fi
-{ echo "$as_me:$LINENO: result: $LIBGD" >&5
-echo "${ECHO_T}$LIBGD" >&6; }
+echo "$as_me:$LINENO: result: $LIBGD" >&5
+echo "${ECHO_T}$LIBGD" >&6
 
 
 # SELinux detection
@@ -7157,8 +6668,8 @@ if test x$with_selinux = xno ; then
   have_selinux=no;
 else
   # See if we have the SELinux library
-  { echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5
-echo $ECHO_N "checking for is_selinux_enabled in -lselinux... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5
+echo $ECHO_N "checking for is_selinux_enabled in -lselinux... $ECHO_C" >&6
 if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7171,53 +6682,56 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+/* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
 char is_selinux_enabled ();
 int
 main ()
 {
-return is_selinux_enabled ();
+is_selinux_enabled ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_selinux_is_selinux_enabled=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_selinux_is_selinux_enabled=no
+ac_cv_lib_selinux_is_selinux_enabled=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
-echo "${ECHO_T}$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
+echo "${ECHO_T}$ac_cv_lib_selinux_is_selinux_enabled" >&6
 if test $ac_cv_lib_selinux_is_selinux_enabled = yes; then
   have_selinux=yes
 else
@@ -7226,8 +6740,8 @@ fi
 
   # See if we have the SELinux header with the NSCD permissions in it.
   if test x$have_selinux = xyes ; then
-    { echo "$as_me:$LINENO: checking for NSCD Flask permissions in selinux/av_permissions.h" >&5
-echo $ECHO_N "checking for NSCD Flask permissions in selinux/av_permissions.h... $ECHO_C" >&6; }
+    echo "$as_me:$LINENO: checking for NSCD Flask permissions in selinux/av_permissions.h" >&5
+echo $ECHO_N "checking for NSCD Flask permissions in selinux/av_permissions.h... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7248,33 +6762,37 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   have_selinux=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	have_selinux=no
+have_selinux=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    { echo "$as_me:$LINENO: result: $have_selinux" >&5
-echo "${ECHO_T}$have_selinux" >&6; }
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    echo "$as_me:$LINENO: result: $have_selinux" >&5
+echo "${ECHO_T}$have_selinux" >&6
   fi
 
   if test x$with_selinux = xyes ; then
@@ -7294,8 +6812,8 @@ _ACEOF
 
 
   # See if we have the libaudit library
-  { echo "$as_me:$LINENO: checking for audit_log_user_avc_message in -laudit" >&5
-echo $ECHO_N "checking for audit_log_user_avc_message in -laudit... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for audit_log_user_avc_message in -laudit" >&5
+echo $ECHO_N "checking for audit_log_user_avc_message in -laudit... $ECHO_C" >&6
 if test "${ac_cv_lib_audit_audit_log_user_avc_message+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7308,53 +6826,56 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+/* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
 char audit_log_user_avc_message ();
 int
 main ()
 {
-return audit_log_user_avc_message ();
+audit_log_user_avc_message ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_audit_audit_log_user_avc_message=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_audit_audit_log_user_avc_message=no
+ac_cv_lib_audit_audit_log_user_avc_message=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_audit_audit_log_user_avc_message" >&5
-echo "${ECHO_T}$ac_cv_lib_audit_audit_log_user_avc_message" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_lib_audit_audit_log_user_avc_message" >&5
+echo "${ECHO_T}$ac_cv_lib_audit_audit_log_user_avc_message" >&6
 if test $ac_cv_lib_audit_audit_log_user_avc_message = yes; then
   have_libaudit=yes
 else
@@ -7371,8 +6892,8 @@ _ACEOF
 
 
   # See if we have the libcap library
-  { echo "$as_me:$LINENO: checking for cap_init in -lcap" >&5
-echo $ECHO_N "checking for cap_init in -lcap... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking for cap_init in -lcap" >&5
+echo $ECHO_N "checking for cap_init in -lcap... $ECHO_C" >&6
 if test "${ac_cv_lib_cap_cap_init+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7385,53 +6906,56 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+/* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
 #endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
 char cap_init ();
 int
 main ()
 {
-return cap_init ();
+cap_init ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_lib_cap_cap_init=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_cap_cap_init=no
+ac_cv_lib_cap_cap_init=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_cap_cap_init" >&5
-echo "${ECHO_T}$ac_cv_lib_cap_cap_init" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_lib_cap_cap_init" >&5
+echo "${ECHO_T}$ac_cv_lib_cap_cap_init" >&6
 if test $ac_cv_lib_cap_cap_init = yes; then
   have_libcap=yes
 else
@@ -7450,170 +6974,23 @@ fi
 
 
 
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-    # Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
     fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-
-    $ac_path_GREP_found && break 3
-  done
-done
-
-done
-IFS=$as_save_IFS
-
-
 fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
 
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-    # Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-
-    $ac_path_EGREP_found && break 3
-  done
-done
-
-done
-IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-
-   fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
 if test "${ac_cv_header_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7637,31 +7014,35 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_header_stdc=no
+ac_cv_header_stdc=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
@@ -7717,7 +7098,6 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <ctype.h>
-#include <stdlib.h>
 #if ((' ' & 0x0FF) == 0x020)
 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -7737,27 +7117,18 @@ main ()
   for (i = 0; i < 256; i++)
     if (XOR (islower (i), ISLOWER (i))
 	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
+      exit(2);
+  exit (0);
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -7770,14 +7141,12 @@ sed 's/^/| /' conftest.$ac_ext >&5
 ( exit $ac_status )
 ac_cv_header_stdc=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-
-
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
 if test $ac_cv_header_stdc = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -7800,9 +7169,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
 		  inttypes.h stdint.h unistd.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -7816,35 +7185,38 @@ $ac_includes_default
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	eval "$as_ac_Header=no"
+eval "$as_ac_Header=no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -7855,8 +7227,8 @@ fi
 done
 
 
-{ echo "$as_me:$LINENO: checking for long double" >&5
-echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for long double" >&5
+echo $ECHO_N "checking for long double... $ECHO_C" >&6
 if test "${ac_cv_type_long_double+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7867,57 +7239,61 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-typedef long double ac__type_new_;
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
+if ((long double *) 0)
   return 0;
-if (sizeof (ac__type_new_))
+if (sizeof (long double))
   return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_type_long_double=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_type_long_double=no
+ac_cv_type_long_double=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
-echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
+echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
+echo "${ECHO_T}$ac_cv_type_long_double" >&6
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of long double" >&5
-echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking size of long double" >&5
+echo $ECHO_N "checking size of long double... $ECHO_C" >&6
 if test "${ac_cv_sizeof_long_double+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  if test "$ac_cv_type_long_double" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
@@ -7927,11 +7303,10 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+static int test_array [1 - 2 * !(((long) (sizeof (long double))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -7939,22 +7314,27 @@ test_array [0] = 0
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_lo=0 ac_mid=0
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
@@ -7964,11 +7344,10 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -7976,53 +7355,56 @@ test_array [0] = 0
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_hi=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
+ac_lo=`expr $ac_mid + 1`
+		    if test $ac_lo -le $ac_mid; then
+		      ac_lo= ac_hi=
+		      break
+		    fi
+		    ac_mid=`expr 2 '*' $ac_mid + 1`
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+static int test_array [1 - 2 * !(((long) (sizeof (long double))) < 0)];
 test_array [0] = 0
 
   ;
@@ -8030,22 +7412,27 @@ test_array [0] = 0
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_hi=-1 ac_mid=-1
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
@@ -8055,11 +7442,10 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long) (sizeof (long double))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -8067,48 +7453,50 @@ test_array [0] = 0
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_lo=$ac_mid; break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
+ac_hi=`expr '(' $ac_mid ')' - 1`
+		       if test $ac_mid -le $ac_hi; then
+			 ac_lo= ac_hi=
+			 break
+		       fi
+		       ac_mid=`expr 2 '*' $ac_mid`
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_lo= ac_hi=
+ac_lo= ac_hi=
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 # Binary search between lo and hi bounds.
 while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
@@ -8119,11 +7507,10 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -8131,45 +7518,52 @@ test_array [0] = 0
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_hi=$ac_mid
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_lo=`expr '(' $ac_mid ')' + 1`
+ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 done
 case $ac_lo in
 ?*) ac_cv_sizeof_long_double=$ac_lo;;
-'') if test "$ac_cv_type_long_double" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77
 See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long double)
+echo "$as_me: error: cannot compute sizeof (long double), 77
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long_double=0
-   fi ;;
+   { (exit 1); exit 1; }; } ;;
 esac
 else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -8177,9 +7571,8 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-   typedef long double ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+long longval () { return (long) (sizeof (long double)); }
+unsigned long ulongval () { return (long) (sizeof (long double)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -8188,44 +7581,35 @@ main ()
 
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+    exit (1);
+  if (((long) (sizeof (long double))) < 0)
     {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
+      long i = longval ();
+      if (i != ((long) (sizeof (long double))))
+	exit (1);
       fprintf (f, "%ld\n", i);
     }
   else
     {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (long double))))
+	exit (1);
       fprintf (f, "%lu\n", i);
     }
-  return ferror (f) || fclose (f) != 0;
+  exit (ferror (f) || fclose (f) != 0);
 
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -8236,25 +7620,22 @@ echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-if test "$ac_cv_type_long_double" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77
 See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long double)
+echo "$as_me: error: cannot compute sizeof (long double), 77
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long_double=0
-   fi
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
+else
+  ac_cv_sizeof_long_double=0
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
-
-
-
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6
 cat >>confdefs.h <<_ACEOF
 #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
 _ACEOF
@@ -8282,8 +7663,8 @@ for dir in $sysnames; do
     *)  dest=$srcdir/$dir ;;
   esac
   if test -r $dest/configure; then
-    { echo "$as_me:$LINENO: result: running configure fragment for $dir" >&5
-echo "${ECHO_T}running configure fragment for $dir" >&6; }
+    echo "$as_me:$LINENO: result: running configure fragment for $dir" >&5
+echo "${ECHO_T}running configure fragment for $dir" >&6
     . $dest/configure
   fi
 
@@ -8314,8 +7695,8 @@ if test "$uname" = "sysdeps/generic"; then
     config_release=`echo $config_os | sed s/$uname_sysname//`
   fi
 
-  { echo "$as_me:$LINENO: checking OS release for uname" >&5
-echo $ECHO_N "checking OS release for uname... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking OS release for uname" >&5
+echo $ECHO_N "checking OS release for uname... $ECHO_C" >&6
 if test "${libc_cv_uname_release+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8340,12 +7721,12 @@ else
     libc_cv_uname_release=unknown
   fi
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_uname_release" >&5
-echo "${ECHO_T}$libc_cv_uname_release" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_uname_release" >&5
+echo "${ECHO_T}$libc_cv_uname_release" >&6
   uname_release="$libc_cv_uname_release"
 
-  { echo "$as_me:$LINENO: checking OS version for uname" >&5
-echo $ECHO_N "checking OS version for uname... $ECHO_C" >&6; }
+  echo "$as_me:$LINENO: checking OS version for uname" >&5
+echo $ECHO_N "checking OS version for uname... $ECHO_C" >&6
 if test "${libc_cv_uname_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8364,8 +7745,8 @@ else
     libc_cv_uname_version=unknown
   fi
 fi
-{ echo "$as_me:$LINENO: result: $libc_cv_uname_version" >&5
-echo "${ECHO_T}$libc_cv_uname_version" >&6; }
+echo "$as_me:$LINENO: result: $libc_cv_uname_version" >&5
+echo "${ECHO_T}$libc_cv_uname_version" >&6
   uname_version="$libc_cv_uname_version"
 
     config_uname=config-name.h:config-name.in
@@ -8381,16 +7762,16 @@ _ACEOF
 
 # Test for old glibc 2.0.x headers so that they can be removed properly
 # Search only in includedir.
-{ echo "$as_me:$LINENO: checking for old glibc 2.0.x headers" >&5
-echo $ECHO_N "checking for old glibc 2.0.x headers... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking for old glibc 2.0.x headers" >&5
+echo $ECHO_N "checking for old glibc 2.0.x headers... $ECHO_C" >&6
 if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h"
 then
   old_glibc_headers=yes
 else
   old_glibc_headers=no
 fi
-{ echo "$as_me:$LINENO: result: $old_glibc_headers" >&5
-echo "${ECHO_T}$old_glibc_headers" >&6; }
+echo "$as_me:$LINENO: result: $old_glibc_headers" >&5
+echo "${ECHO_T}$old_glibc_headers" >&6
 if test ${old_glibc_headers} = yes; then
   { echo "$as_me:$LINENO: WARNING: *** During \"make install\" old headers from glibc 2.0.x will" >&5
 echo "$as_me: WARNING: *** During \"make install\" old headers from glibc 2.0.x will" >&2;}
@@ -8428,8 +7809,8 @@ if test $shared = default; then
   shared=$elf
 fi
 
-{ echo "$as_me:$LINENO: checking whether -fPIC is default" >&5
-echo $ECHO_N "checking whether -fPIC is default... $ECHO_C" >&6; }
+echo "$as_me:$LINENO: checking whether -fPIC is default" >&5
+echo $ECHO_N "checking whether -fPIC is default... $ECHO_C" >&6
 if test "${pic_default+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8444,8 +7825,8 @@ if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then
 fi
 rm -f conftest.*
 fi
-{ echo "$as_me:$LINENO: result: $pic_default" >&5
-echo "${ECHO_T}$pic_default" >&6; }
+echo "$as_me:$LINENO: result: $pic_default" >&5
+echo "${ECHO_T}$pic_default" >&6
 
 
 
@@ -8469,9 +7850,9 @@ RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
 
 
 
-ac_config_files="$ac_config_files config.make ${config_makefile} ${config_uname}"
+                              ac_config_files="$ac_config_files config.make ${config_makefile} ${config_uname}"
 
-ac_config_commands="$ac_config_commands default"
+          ac_config_commands="$ac_config_commands default"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -8491,58 +7872,39 @@ _ACEOF
 
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
+# So, don't put newlines in cache variables' values.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
+{
   (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
       # `set' does not quote correctly, so add quotes (double-quote
       # substitution turns \\\\ into \\, and sed turns \\ into \).
       sed -n \
 	"s/'/'\\\\''/g;
 	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
+      ;;
     *)
       # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
       ;;
-    esac |
-    sort
-) |
+    esac;
+} |
   sed '
-     /^ac_cv_env_/b end
      t clear
-     :clear
+     : clear
      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
      t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
     cat confcache >$cache_file
   else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+    echo "not updating unwritable cache $cache_file"
   fi
 fi
 rm -f confcache
@@ -8551,18 +7913,32 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
 DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
@@ -8593,45 +7969,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
+# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
 fi
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # Support unset when possible.
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -8641,43 +7989,8 @@ else
 fi
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
 # Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
+$as_unset ENV MAIL MAILPATH
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -8691,19 +8004,18 @@ do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+    $as_unset $as_var
   fi
 done
 
 # Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+if expr a : '\(a\)' >/dev/null 2>&1; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
@@ -8711,120 +8023,159 @@ fi
 
 
 # Name of the executable.
-as_me=`$as_basename -- "$0" ||
+as_me=`$as_basename "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
 
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
 
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
 
   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
   # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
     sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
       N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
       t loop
-      s/-\n.*//
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
     ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
    { (exit 1); exit 1; }; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
   # Exit status is that of the last command.
   exit
 }
 
 
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+if expr a : '\(a\)' >/dev/null 2>&1; then
   as_expr=expr
 else
   as_expr=false
 fi
 
 rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
 echo >conf$$.file
 if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
     as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
 elif ln conf$$.file conf$$ 2>/dev/null; then
   as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
+rm -f conf$$ conf$$.exe conf$$.file
 
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
@@ -8833,28 +8184,7 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_executable_p="test -f"
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -8863,14 +8193,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
 exec 6>&1
 
-# Save the log message, to keep $[0] and so on meaningful, and to
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
 This file was extended by GNU C Library $as_me (see version.h), which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -8878,20 +8225,30 @@ generated by GNU Autoconf 2.61.  Invocation command line was
   CONFIG_COMMANDS = $CONFIG_COMMANDS
   $ $0 $@
 
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
 _ACEOF
 
-cat >>$CONFIG_STATUS <<_ACEOF
 # Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
 
-_ACEOF
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
 
 cat >>$CONFIG_STATUS <<\_ACEOF
+
 ac_cs_usage="\
 \`$as_me' instantiates files from templates according to the
 current configuration.
@@ -8899,7 +8256,7 @@ current configuration.
 Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
+  -V, --version    print version number, then exit
   -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
@@ -8918,21 +8275,19 @@ Configuration commands:
 $config_commands
 
 Report bugs to <bug-autoconf@gnu.org>."
-
 _ACEOF
+
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 GNU C Library config.status (see version.h)
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
+srcdir=$srcdir
+INSTALL="$INSTALL"
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
@@ -8943,24 +8298,39 @@ while test $# != 0
 do
   case $1 in
   --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
     ac_shift=:
     ;;
-  *)
+  -*)
     ac_option=$1
     ac_optarg=$2
     ac_shift=shift
     ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
   esac
 
   case $ac_option in
   # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
@@ -8970,24 +8340,18 @@ do
     $ac_shift
     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
     ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
    { (exit 1); exit 1; }; } ;;
 
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
+  *) ac_config_targets="$ac_config_targets $1" ;;
 
   esac
   shift
@@ -9003,51 +8367,39 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 if \$ac_cs_recheck; then
-  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  CONFIG_SHELL=$SHELL
-  export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
 fi
 
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  echo "$ac_log"
-} >&5
 
-_ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 #
-# INIT-COMMANDS
+# INIT-COMMANDS section.
 #
+
 config_vars='$config_vars'
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
 
-# Handling of arguments.
+
+cat >>$CONFIG_STATUS <<\_ACEOF
 for ac_config_target in $ac_config_targets
 do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "config.make") CONFIG_FILES="$CONFIG_FILES config.make" ;;
-    "${config_makefile}") CONFIG_FILES="$CONFIG_FILES ${config_makefile}" ;;
-    "${config_uname}") CONFIG_FILES="$CONFIG_FILES ${config_uname}" ;;
-    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
-
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "config.make" ) CONFIG_FILES="$CONFIG_FILES config.make" ;;
+  "${config_makefile}" ) CONFIG_FILES="$CONFIG_FILES ${config_makefile}" ;;
+  "${config_uname}" ) CONFIG_FILES="$CONFIG_FILES ${config_uname}" ;;
+  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
 done
 
-
 # If the user did not use the arguments to specify the items to instantiate,
 # then the envvar interface is used.  Set only those that are not.
 # We use the long form for the default assignment because of an extremely
@@ -9059,504 +8411,396 @@ if $ac_need_defaults; then
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
+# simply because there is no reason to put it here, and in addition,
 # creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
+# Create a temporary directory, and hook for its removal unless debugging.
 $debug ||
 {
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
   trap '{ (exit 1); exit 1; }' 1 2 13 15
 }
+
 # Create a (secure) tmp directory for tmp files.
 
 {
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
 } ||
 {
    echo "$me: cannot create a temporary directory in ." >&2
    { (exit 1); exit 1; }
 }
 
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
 #
-# Set up the sed scripts for CONFIG_FILES section.
+# CONFIG_FILES section.
 #
 
 # No need to generate the scripts if there are no CONFIG_FILES.
 # This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-_ACEOF
-
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-with_fp!$with_fp$ac_delim
-with_cvs!$with_cvs$ac_delim
-enable_check_abi!$enable_check_abi$ac_delim
-oldest_abi!$oldest_abi$ac_delim
-bindnow!$bindnow$ac_delim
-force_install!$force_install$ac_delim
-all_warnings!$all_warnings$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-subdirs!$subdirs$ac_delim
-add_ons!$add_ons$ac_delim
-add_on_subdirs!$add_on_subdirs$ac_delim
-base_machine!$base_machine$ac_delim
-submachine!$submachine$ac_delim
-sysnames!$sysnames$ac_delim
-sysdeps_add_ons!$sysdeps_add_ons$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-LN_S!$LN_S$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-BUILD_CC!$BUILD_CC$ac_delim
-cross_compiling!$cross_compiling$ac_delim
-CPP!$CPP$ac_delim
-CXX!$CXX$ac_delim
-CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
-AR!$AR$ac_delim
-OBJDUMP!$OBJDUMP$ac_delim
-RANLIB!$RANLIB$ac_delim
-MIG!$MIG$ac_delim
-AS!$AS$ac_delim
-LD!$LD$ac_delim
-PWD_P!$PWD_P$ac_delim
-MAKE!$MAKE$ac_delim
-MSGFMT!$MSGFMT$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-SED!$SED$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-SYSINCLUDES!$SYSINCLUDES$ac_delim
-CXX_SYSINCLUDES!$CXX_SYSINCLUDES$ac_delim
-libc_cv_gcc_static_libgcc!$libc_cv_gcc_static_libgcc$ac_delim
-BASH_SHELL!$BASH_SHELL$ac_delim
-libc_cv_have_bash2!$libc_cv_have_bash2$ac_delim
-KSH!$KSH$ac_delim
-libc_cv_have_ksh!$libc_cv_have_ksh$ac_delim
-AWK!$AWK$ac_delim
-PERL!$PERL$ac_delim
-INSTALL_INFO!$INSTALL_INFO$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
-    break
-  elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@with_fp@,$with_fp,;t t
+s,@with_cvs@,$with_cvs,;t t
+s,@enable_check_abi@,$enable_check_abi,;t t
+s,@oldest_abi@,$oldest_abi,;t t
+s,@bindnow@,$bindnow,;t t
+s,@force_install@,$force_install,;t t
+s,@all_warnings@,$all_warnings,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@subdirs@,$subdirs,;t t
+s,@add_ons@,$add_ons,;t t
+s,@add_on_subdirs@,$add_on_subdirs,;t t
+s,@base_machine@,$base_machine,;t t
+s,@submachine@,$submachine,;t t
+s,@sysnames@,$sysnames,;t t
+s,@sysdeps_add_ons@,$sysdeps_add_ons,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@LN_S@,$LN_S,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@BUILD_CC@,$BUILD_CC,;t t
+s,@cross_compiling@,$cross_compiling,;t t
+s,@CPP@,$CPP,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@AR@,$AR,;t t
+s,@OBJDUMP@,$OBJDUMP,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@MIG@,$MIG,;t t
+s,@AS@,$AS,;t t
+s,@LD@,$LD,;t t
+s,@PWD_P@,$PWD_P,;t t
+s,@MAKE@,$MAKE,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@SED@,$SED,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@SYSINCLUDES@,$SYSINCLUDES,;t t
+s,@CXX_SYSINCLUDES@,$CXX_SYSINCLUDES,;t t
+s,@libc_cv_gcc_static_libgcc@,$libc_cv_gcc_static_libgcc,;t t
+s,@BASH@,$BASH,;t t
+s,@libc_cv_have_bash2@,$libc_cv_have_bash2,;t t
+s,@KSH@,$KSH,;t t
+s,@libc_cv_have_ksh@,$libc_cv_have_ksh,;t t
+s,@AWK@,$AWK,;t t
+s,@PERL@,$PERL,;t t
+s,@INSTALL_INFO@,$INSTALL_INFO,;t t
+s,@BISON@,$BISON,;t t
+s,@VERSIONING@,$VERSIONING,;t t
+s,@libc_cv_cc_with_libunwind@,$libc_cv_cc_with_libunwind,;t t
+s,@libc_cv_Bgroup@,$libc_cv_Bgroup,;t t
+s,@libc_cv_libgcc_s_suffix@,$libc_cv_libgcc_s_suffix,;t t
+s,@libc_cv_as_needed@,$libc_cv_as_needed,;t t
+s,@ASFLAGS_config@,$ASFLAGS_config,;t t
+s,@libc_cv_z_combreloc@,$libc_cv_z_combreloc,;t t
+s,@libc_cv_z_execstack@,$libc_cv_z_execstack,;t t
+s,@libc_cv_fpie@,$libc_cv_fpie,;t t
+s,@libc_cv_hashstyle@,$libc_cv_hashstyle,;t t
+s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t
+s,@libc_cv_ssp@,$libc_cv_ssp,;t t
+s,@libc_cv_gnu89_inline@,$libc_cv_gnu89_inline,;t t
+s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t
+s,@no_whole_archive@,$no_whole_archive,;t t
+s,@exceptions@,$exceptions,;t t
+s,@LIBGD@,$LIBGD,;t t
+s,@have_libaudit@,$have_libaudit,;t t
+s,@have_libcap@,$have_libcap,;t t
+s,@have_selinux@,$have_selinux,;t t
+s,@EGREP@,$EGREP,;t t
+s,@sizeof_long_double@,$sizeof_long_double,;t t
+s,@libc_cv_gcc_unwind_find_fde@,$libc_cv_gcc_unwind_find_fde,;t t
+s,@uname_sysname@,$uname_sysname,;t t
+s,@uname_release@,$uname_release,;t t
+s,@uname_version@,$uname_version,;t t
+s,@old_glibc_headers@,$old_glibc_headers,;t t
+s,@libc_cv_slibdir@,$libc_cv_slibdir,;t t
+s,@libc_cv_localedir@,$libc_cv_localedir,;t t
+s,@libc_cv_sysconfdir@,$libc_cv_sysconfdir,;t t
+s,@libc_cv_rootsbindir@,$libc_cv_rootsbindir,;t t
+s,@libc_cv_forced_unwind@,$libc_cv_forced_unwind,;t t
+s,@use_ldconfig@,$use_ldconfig,;t t
+s,@ldd_rewrite_script@,$ldd_rewrite_script,;t t
+s,@elf@,$elf,;t t
+s,@xcoff@,$xcoff,;t t
+s,@static@,$static,;t t
+s,@shared@,$shared,;t t
+s,@pic_default@,$pic_default,;t t
+s,@profile@,$profile,;t t
+s,@omitfp@,$omitfp,;t t
+s,@bounded@,$bounded,;t t
+s,@static_nss@,$static_nss,;t t
+s,@nopic_initfini@,$nopic_initfini,;t t
+s,@DEFINES@,$DEFINES,;t t
+s,@mach_interface_list@,$mach_interface_list,;t t
+s,@VERSION@,$VERSION,;t t
+s,@RELEASE@,$RELEASE,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
   fi
-done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
+fi # test -n "$CONFIG_FILES"
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
 _ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
-_ACEOF
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-BISON!$BISON$ac_delim
-VERSIONING!$VERSIONING$ac_delim
-libc_cv_cc_with_libunwind!$libc_cv_cc_with_libunwind$ac_delim
-libc_cv_Bgroup!$libc_cv_Bgroup$ac_delim
-libc_cv_libgcc_s_suffix!$libc_cv_libgcc_s_suffix$ac_delim
-libc_cv_as_needed!$libc_cv_as_needed$ac_delim
-ASFLAGS_config!$ASFLAGS_config$ac_delim
-libc_cv_z_combreloc!$libc_cv_z_combreloc$ac_delim
-libc_cv_z_execstack!$libc_cv_z_execstack$ac_delim
-libc_cv_fpie!$libc_cv_fpie$ac_delim
-libc_cv_hashstyle!$libc_cv_hashstyle$ac_delim
-fno_unit_at_a_time!$fno_unit_at_a_time$ac_delim
-libc_cv_ssp!$libc_cv_ssp$ac_delim
-libc_cv_gnu89_inline!$libc_cv_gnu89_inline$ac_delim
-libc_cv_have_initfini!$libc_cv_have_initfini$ac_delim
-no_whole_archive!$no_whole_archive$ac_delim
-exceptions!$exceptions$ac_delim
-LIBGD!$LIBGD$ac_delim
-have_libaudit!$have_libaudit$ac_delim
-have_libcap!$have_libcap$ac_delim
-have_selinux!$have_selinux$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-sizeof_long_double!$sizeof_long_double$ac_delim
-libc_cv_gcc_unwind_find_fde!$libc_cv_gcc_unwind_find_fde$ac_delim
-uname_sysname!$uname_sysname$ac_delim
-uname_release!$uname_release$ac_delim
-uname_version!$uname_version$ac_delim
-old_glibc_headers!$old_glibc_headers$ac_delim
-libc_cv_slibdir!$libc_cv_slibdir$ac_delim
-libc_cv_localedir!$libc_cv_localedir$ac_delim
-libc_cv_sysconfdir!$libc_cv_sysconfdir$ac_delim
-libc_cv_rootsbindir!$libc_cv_rootsbindir$ac_delim
-libc_cv_forced_unwind!$libc_cv_forced_unwind$ac_delim
-use_ldconfig!$use_ldconfig$ac_delim
-ldd_rewrite_script!$ldd_rewrite_script$ac_delim
-elf!$elf$ac_delim
-xcoff!$xcoff$ac_delim
-static!$static$ac_delim
-shared!$shared$ac_delim
-pic_default!$pic_default$ac_delim
-profile!$profile$ac_delim
-omitfp!$omitfp$ac_delim
-bounded!$bounded$ac_delim
-static_nss!$static_nss$ac_delim
-nopic_initfini!$nopic_initfini$ac_delim
-DEFINES!$DEFINES$ac_delim
-mach_interface_list!$mach_interface_list$ac_delim
-VERSION!$VERSION$ac_delim
-RELEASE!$RELEASE$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
-    break
-  elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
-
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
-
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
 cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      ac_file_inputs="$ac_file_inputs $ac_f"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input="Generated from "`IFS=:
-	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    fi
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
-    esac
-    ;;
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
   esac
 
-  ac_dir=`$as_dirname -- "$ac_file" ||
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$ac_file" : 'X\(//\)[^/]' \| \
 	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
     as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
     done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
    { (exit 1); exit 1; }; }; }
+
   ac_builddir=.
 
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
+if test "$ac_dir" != .; then
   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
 
 case $srcdir in
-  .)  # We are building in place.
+  .)  # No --srcdir option.  We are building in place.
     ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
 
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
 
   case $INSTALL in
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
   esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
 
-case `sed -n '/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
 _ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
 cat >>$CONFIG_STATUS <<_ACEOF
   sed "$ac_vpsub
 $extrasub
@@ -9564,148 +8808,374 @@ _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
   esac
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-_ACEOF
-
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status.  If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless.  But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
-ac_dB='\\)[	 (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
-  sed -n '
-	t rset
-	:rset
-	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
-	t ok
-	d
-	:ok
-	s/[\\&,]/\\&/g
-	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
-	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
-  ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments.  This is necessary, for
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[	 #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
 do
-  # Write a here document:
-    cat >>$CONFIG_STATUS <<_ACEOF
-    # First, check the format of the line:
-    cat >"\$tmp/defines.sed" <<\\CEOF
-/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
-/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
-b
-:def
-_ACEOF
-  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
   echo 'CEOF
-    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
-  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
-  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
-  grep . conftest.tail >/dev/null || break
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
   rm -f conftest.defines
   mv conftest.tail conftest.defines
 done
-rm -f conftest.defines conftest.tail
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
 
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
 cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
   if test x"$ac_file" != x-; then
-    echo "/* $configure_input  */" >"$tmp/config.h"
-    cat "$ac_result" >>"$tmp/config.h"
-    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
       rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
+      mv $tmp/config.h $ac_file
     fi
   else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
+    cat $tmp/config.h
+    rm -f $tmp/config.h
   fi
-  rm -f "$tmp/out12"
- ;;
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
 
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
 
 
-  case $ac_file$ac_mode in
-    "default":C)
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    default )
 case $CONFIG_FILES in *config.make*)
 echo "$config_vars" >> config.make;;
 esac
 test -d bits || mkdir bits ;;
-
   esac
-done # for ac_tag
+done
+_ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF
 
 { (exit 0); exit 0; }
 _ACEOF
@@ -9742,10 +9212,7 @@ if test "$no_recursion" != yes; then
   # Remove --cache-file and --srcdir arguments so they do not pile up.
   ac_sub_configure_args=
   ac_prev=
-  eval "set x $ac_configure_args"
-  shift
-  for ac_arg
-  do
+  for ac_arg in $ac_configure_args; do
     if test -n "$ac_prev"; then
       ac_prev=
       continue
@@ -9768,123 +9235,123 @@ if test "$no_recursion" != yes; then
       ac_prev=prefix ;;
     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
       ;;
-    *)
-      case $ac_arg in
-      *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-      esac
-      ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
+    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
     esac
   done
 
   # Always prepend --prefix to ensure using the same prefix
   # in subdir configurations.
-  ac_arg="--prefix=$prefix"
-  case $ac_arg in
-  *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-  esac
-  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
-  # Pass --silent
-  if test "$silent" = yes; then
-    ac_sub_configure_args="--silent $ac_sub_configure_args"
-  fi
+  ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
 
   ac_popdir=`pwd`
   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
 
     # Do not complain, so a configure script can configure whichever
     # parts of a large source tree are present.
-    test -d "$srcdir/$ac_dir" || continue
-
-    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
-    echo "$as_me:$LINENO: $ac_msg" >&5
-    echo "$ac_msg" >&6
-    { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    test -d $srcdir/$ac_dir || continue
+
+    { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
+echo "$as_me: configuring in $ac_dir" >&6;}
+    { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
     as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
     done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
    { (exit 1); exit 1; }; }; }
+
     ac_builddir=.
 
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
+if test "$ac_dir" != .; then
   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
 
 case $srcdir in
-  .)  # We are building in place.
+  .)  # No --srcdir option.  We are building in place.
     ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
 esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
 
-    cd "$ac_dir"
+    cd $ac_dir
 
     # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      ac_sub_configure=$ac_srcdir/configure.gnu
-    elif test -f "$ac_srcdir/configure"; then
-      ac_sub_configure=$ac_srcdir/configure
-    elif test -f "$ac_srcdir/configure.in"; then
-      # This should be Cygnus configure.
-      ac_sub_configure=$ac_aux_dir/configure
+    if test -f $ac_srcdir/configure.gnu; then
+      ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
+    elif test -f $ac_srcdir/configure; then
+      ac_sub_configure="$SHELL '$ac_srcdir/configure'"
+    elif test -f $ac_srcdir/configure.in; then
+      ac_sub_configure=$ac_configure
     else
       { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
@@ -9896,21 +9363,21 @@ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
       # Make the cache file name correct relative to the subdirectory.
       case $cache_file in
       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
-      *) # Relative name.
-	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+      *) # Relative path.
+	ac_sub_cache_file=$ac_top_builddir$cache_file ;;
       esac
 
-      { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+      { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
       # The eval makes quoting arguments work.
-      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
-	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+      eval $ac_sub_configure $ac_sub_configure_args \
+	   --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
 	{ { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
    { (exit 1); exit 1; }; }
     fi
 
-    cd "$ac_popdir"
+    cd $ac_popdir
   done
 fi
 
diff --git a/configure.in b/configure.in
index 2f8f7793df..a9274a8dd6 100644
--- a/configure.in
+++ b/configure.in
@@ -980,9 +980,9 @@ else
 fi])
 AC_SUBST(libc_cv_gcc_static_libgcc)
 
-AC_PATH_PROG(BASH_SHELL, bash, no)
-if test "$BASH_SHELL" != no &&
-   $BASH_SHELL -c 'test "$BASH_VERSINFO" \
+AC_PATH_PROG(BASH, bash, no)
+if test "$BASH" != no &&
+   $BASH -c 'test "$BASH_VERSINFO" \
 	     && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then
   libc_cv_have_bash2=yes
 else
@@ -991,7 +991,7 @@ fi
 AC_SUBST(libc_cv_have_bash2)
 
 dnl We need a ksh compatible shell for tzselect.
-if test "$BASH_SHELL" = no; then
+if test "$BASH" = no; then
   AC_PATH_PROG(KSH, ksh, no)
   if test "$KSH" = no; then
     libc_cv_have_ksh=no
@@ -999,7 +999,7 @@ if test "$BASH_SHELL" = no; then
     libc_cv_have_ksh=yes
   fi
 else
-  KSH="$BASH_SHELL"
+  KSH="$BASH"
   AC_SUBST(KSH)
   libc_cv_have_ksh=yes
 fi
diff --git a/crypt/md5-crypt.c b/crypt/md5-crypt.c
index 8a000f0acd..7ba1491db6 100644
--- a/crypt/md5-crypt.c
+++ b/crypt/md5-crypt.c
@@ -106,7 +106,7 @@ __md5_crypt_r (key, salt, buffer, buflen)
 
   /* The last part is the salt string.  This must be at most 8
      characters and it ends at the first `$' character (for
-     compatibility with existing implementations).  */
+     compatibility which existing solutions).  */
   __md5_process_bytes (salt, salt_len, &ctx);
 
 
diff --git a/debug/Makefile b/debug/Makefile
index b9902cb4bf..9d9b6ac96a 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2001,2004,2005,2006,2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2001,2004,2005,2006 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,7 +42,7 @@ routines  = backtrace backtracesyms backtracesymsfd noophooks \
 	    gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
 	    wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
 	    wcstombs_chk \
-	    stack_chk_fail fortify_fail \
+	    stack_chk_fail \
 	    $(static-only-routines)
 static-only-routines := warning-nop stack_chk_fail_local
 
diff --git a/debug/chk_fail.c b/debug/chk_fail.c
index bff17e4d3a..0cfca295a9 100644
--- a/debug/chk_fail.c
+++ b/debug/chk_fail.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -26,6 +26,9 @@ void
 __attribute__ ((noreturn))
 __chk_fail (void)
 {
-  __fortify_fail ("buffer overflow detected");
+  /* The loop is added only to keep gcc happy.  */
+  while (1)
+    __libc_message (2, "*** buffer overflow detected ***: %s terminated\n",
+		    __libc_argv[0] ?: "<unknown>");
 }
 libc_hidden_def (__chk_fail)
diff --git a/debug/fortify_fail.c b/debug/fortify_fail.c
deleted file mode 100644
index 66494a678f..0000000000
--- a/debug/fortify_fail.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 2007 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 <stdlib.h>
-
-
-extern char **__libc_argv attribute_hidden;
-
-void
-__attribute__ ((noreturn))
-__fortify_fail (msg)
-     const char *msg;
-{
-  /* The loop is added only to keep gcc happy.  */
-  while (1)
-    __libc_message (2, "*** %s ***: %s terminated\n",
-		    msg, __libc_argv[0] ?: "<unknown>");
-}
diff --git a/debug/stack_chk_fail.c b/debug/stack_chk_fail.c
index 77e42f2dcb..298b323671 100644
--- a/debug/stack_chk_fail.c
+++ b/debug/stack_chk_fail.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -26,5 +26,8 @@ void
 __attribute__ ((noreturn))
 __stack_chk_fail (void)
 {
-  __fortify_fail ("stack smashing detected");
+  /* The loop is added only to keep gcc happy.  */
+  while (1)
+    __libc_message (1, "*** stack smashing detected ***: %s terminated\n",
+		    __libc_argv[0] ?: "<unknown>");
 }
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 67188bb6c1..932e6110b6 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -494,11 +494,11 @@ _dl_close_worker (struct link_map *map)
 	  || (GL(dl_scope_free_list) != NULL
 	      && GL(dl_scope_free_list)->count)))
     {
-      THREAD_GSCOPE_WAIT ();
+      struct dl_scope_free_list *fsl;
 
+      THREAD_GSCOPE_WAIT ();
       /* Now we can free any queued old scopes.  */
-      struct dl_scope_free_list *fsl  = GL(dl_scope_free_list);
-      if (fsl != NULL)
+      if ((fsl = GL(dl_scope_free_list)) != NULL)
 	while (fsl->count > 0)
 	  free (fsl->list[--fsl->count]);
     }
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 73e9b9ce7b..025b9fd86b 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1634,7 +1634,7 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
     {
       ElfW(Ehdr) *ehdr;
       ElfW(Phdr) *phdr, *ph;
-      ElfW(Word) *abi_note;
+      ElfW(Word) *abi_note, abi_note_buf[8];
       unsigned int osversion;
       size_t maplength;
 
@@ -1751,37 +1751,20 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
 
       /* Check .note.ABI-tag if present.  */
       for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph)
-	if (ph->p_type == PT_NOTE && ph->p_filesz >= 32 && ph->p_align >= 4)
+	if (ph->p_type == PT_NOTE && ph->p_filesz == 32 && ph->p_align >= 4)
 	  {
-	    ElfW(Addr) size = ph->p_filesz;
-
-	    if (ph->p_offset + size <= (size_t) fbp->len)
+	    if (ph->p_offset + 32 <= (size_t) fbp->len)
 	      abi_note = (void *) (fbp->buf + ph->p_offset);
 	    else
 	      {
-		abi_note = alloca (size);
 		__lseek (fd, ph->p_offset, SEEK_SET);
-		if (__libc_read (fd, (void *) abi_note, size) != size)
+		if (__libc_read (fd, (void *) abi_note_buf, 32) != 32)
 		  goto read_error;
-	      }
-
-	    while (memcmp (abi_note, &expected_note, sizeof (expected_note)))
-	      {
-#define ROUND(len) (((len) + sizeof (ElfW(Word)) - 1) & -sizeof (ElfW(Word)))
-		ElfW(Addr) note_size = 3 * sizeof (ElfW(Word))
-				       + ROUND (abi_note[0])
-				       + ROUND (abi_note[1]);
 
-		if (size - 32 < note_size)
-		  {
-		    size = 0;
-		    break;
-		  }
-		size -= note_size;
-		abi_note = (void *) abi_note + note_size;
+		abi_note = abi_note_buf;
 	      }
 
-	    if (size == 0)
+	    if (memcmp (abi_note, &expected_note, sizeof (expected_note)))
 	      continue;
 
 	    osversion = (abi_note[5] & 0xff) * 65536
diff --git a/elf/readelflib.c b/elf/readelflib.c
index ea92d89b20..26444ad6b2 100644
--- a/elf/readelflib.c
+++ b/elf/readelflib.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1999 and
 		  Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -127,37 +127,16 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
 	  break;
 
 	case PT_NOTE:
-	  if (!*osversion && segment->p_filesz >= 32 && segment->p_align >= 4)
+	  if (!*osversion && segment->p_filesz == 32 && segment->p_align >= 4)
 	    {
 	      ElfW(Word) *abi_note = (ElfW(Word) *) (file_contents
 						     + segment->p_offset);
-	      ElfW(Addr) size = segment->p_filesz;
-
-	      while (abi_note [0] != 4 || abi_note [1] != 16
-		     || abi_note [2] != 1
-		     || memcmp (abi_note + 3, "GNU", 4) != 0)
-		{
-#define ROUND(len) (((len) + sizeof (ElfW(Word)) - 1) & -sizeof (ElfW(Word)))
-		  ElfW(Addr) note_size = 3 * sizeof (ElfW(Word))
-					 + ROUND (abi_note[0])
-					 + ROUND (abi_note[1]);
-
-		  if (size - 32 < note_size || note_size == 0)
-		    {
-		      size = 0;
-		      break;
-		    }
-		  size -= note_size;
-		  abi_note = (void *) abi_note + note_size;
-		}
-
-	      if (size == 0)
-		break;
-
-	      *osversion = (abi_note [4] << 24) |
-			   ((abi_note [5] & 0xff) << 16) |
-			   ((abi_note [6] & 0xff) << 8) |
-			   (abi_note [7] & 0xff);
+	      if (abi_note [0] == 4 && abi_note [1] == 16 && abi_note [2] == 1
+		  && memcmp (abi_note + 3, "GNU", 4) == 0)
+		*osversion = (abi_note [4] << 24) |
+			     ((abi_note [5] & 0xff) << 16) |
+			     ((abi_note [6] & 0xff) << 8) |
+			     (abi_note [7] & 0xff);
 	    }
 	  break;
 
diff --git a/include/bits/fcntl2.h b/include/bits/fcntl2.h
deleted file mode 100644
index 832b2c9abb..0000000000
--- a/include/bits/fcntl2.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../io/bits/fcntl2.h"
diff --git a/include/fcntl.h b/include/fcntl.h
index 1e919befb6..e23af1c3d3 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -24,11 +24,6 @@ extern int __openat64 (int __fd, __const char *__file, int __oflag, ...)
   __nonnull ((2));
 libc_hidden_proto (__openat64)
 
-extern int __open_2 (__const char *__path, int __oflag);
-extern int __open64_2 (__const char *__path, int __oflag);
-extern int __openat_2 (int __fd, __const char *__path, int __oflag);
-extern int __openat64_2 (int __fd, __const char *__path, int __oflag);
-
 
 /* Helper functions for the various *at functions.  For Linux.  */
 extern void __atfct_seterrno (int errval, int fd, const char *buf)
diff --git a/include/stdio.h b/include/stdio.h
index 6fe881cd97..b293b8f1c7 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -65,7 +65,6 @@ extern int __gen_tempname (char *__tmpl, int __kind);
 extern void __libc_fatal (__const char *__message)
      __attribute__ ((__noreturn__));
 extern void __libc_message (int do_abort, __const char *__fnt, ...);
-extern void __fortify_fail (const char *msg) __attribute__ ((noreturn));
 
 /* Acquire ownership of STREAM.  */
 extern void __flockfile (FILE *__stream);
diff --git a/io/Versions b/io/Versions
index d603668f4f..9cc515796d 100644
--- a/io/Versions
+++ b/io/Versions
@@ -116,7 +116,4 @@ libc {
   GLIBC_2.6 {
     utimensat; futimens;
   }
-  GLIBC_2.7 {
-    __open_2; __open64_2; __openat_2; __openat64_2;
-  }
 }
diff --git a/io/bits/fcntl2.h b/io/bits/fcntl2.h
deleted file mode 100644
index a1b03f6194..0000000000
--- a/io/bits/fcntl2.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Checking macros for fcntl functions.
-   Copyright (C) 2007 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef	_FCNTL_H
-# error "Never include <bits/fcntl2.h> directly; use <fcntl.h> instead."
-#endif
-
-/* Check that calls to open and openat with O_CREAT set have an
-   appropriate third/fourth parameter.  */
-#ifndef __USE_FILE_OFFSET64
-extern int __open_2 (__const char *__path, int __oflag) __nonnull ((1));
-#else
-extern int __REDIRECT (__open_2, (__const char *__file, int __oflag),
-		       __open64_2) __nonnull ((1));
-#endif
-
-#define open(fname, flags, ...) \
-  ({ int ___r;								      \
-     /* If the compiler complains about an invalid type, excess elements, etc \
-	in the initialization this means a parameter of the wrong type has    \
-	been passed to open. */						      \
-     int ___arr[] = { __VA_ARGS__ };					      \
-     if (__builtin_constant_p (flags) && ((flags) & O_CREAT) != 0)	      \
-       {								      \
-	 /* If the compiler complains about the size of this array type the   \
-	    mode parameter is missing since O_CREAT has been used.  */	      \
-	 typedef int __open_missing_mode[((flags) & O_CREAT) != 0	      \
-					 ? ((long int) sizeof (___arr)	      \
-					    - (long int) sizeof (int)) : 1];  \
-       }								      \
-     if (sizeof (___arr) == 0)						      \
-       {								      \
-	 if (__builtin_constant_p (flags) && ((flags) & O_CREAT) == 0)	      \
-	   ___r = open (fname, flags);					      \
-	 else     							      \
-	   ___r = __open_2 (fname, flags);				      \
-       }								      \
-     else								      \
-       {								      \
-	 /* If the compiler complains about the size of this array type too   \
-	    many parameters have been passed to open.  */		      \
-	 typedef int __open_too_many_args[-(sizeof (___arr) > sizeof (int))]; \
-	 ___r = open (fname, flags, ___arr[0]);				      \
-       }								      \
-     ___r;								      \
-  })
-
-
-#ifdef __USE_LARGEFILE64
-extern int __open64_2 (__const char *__path, int __oflag) __nonnull ((1));
-
-# define open64(fname, flags, ...) \
-  ({ int ___r;								      \
-     /* If the compiler complains about an invalid type, excess elements, etc \
-	in the initialization this means a parameter of the wrong type has    \
-	been passed to open64. */					      \
-     int ___arr[] = { __VA_ARGS__ };					      \
-     if (__builtin_constant_p (flags) && ((flags) & O_CREAT) != 0)	      \
-       {								      \
-	 /* If the compiler complains about the size of this array type the   \
-	    mode parameter is missing since O_CREAT has been used.  */	      \
-	 typedef int __open_missing_mode[((flags) & O_CREAT) != 0	      \
-					 ? ((long int) sizeof (___arr)	      \
-					    - (long int) sizeof (int)) : 1];  \
-       }								      \
-     if (sizeof (___arr) == 0)						      \
-       {								      \
-	 if (__builtin_constant_p (flags) && ((flags) & O_CREAT) == 0)	      \
-	   ___r = open64 (fname, flags);				      \
-	 else     							      \
-	   ___r = __open64_2 (fname, flags);				      \
-       }								      \
-     else								      \
-       {								      \
-	 /* If the compiler complains about the size of this array type too   \
-	    many parameters have been passed to open64.  */		      \
-	 typedef int __open_too_many_args[-(sizeof (___arr) > sizeof (int))]; \
-	 ___r = open64 (fname, flags, ___arr[0]);			      \
-       }								      \
-     ___r;								      \
-  })
-#endif
-
-#ifdef __USE_ATFILE
-# ifndef __USE_FILE_OFFSET64
-extern int __openat_2 (int __fd, __const char *__path, int __oflag)
-     __nonnull ((2));
-# else
-extern int __REDIRECT (__openat_2, (int __fd, __const char *__file,
-				    int __oflag), __openat64_2)
-     __nonnull ((2));
-# endif
-
-# define openat(fd, fname, flags, ...) \
-  ({ int ___r;								      \
-     /* If the compiler complains about an invalid type, excess elements, etc \
-	in the initialization this means a parameter of the wrong type has    \
-	been passed to openat. */					      \
-     int ___arr[] = { __VA_ARGS__ };					      \
-     if (__builtin_constant_p (flags) && ((flags) & O_CREAT) != 0)	      \
-       {								      \
-	 /* If the compiler complains about the size of this array type the   \
-	    mode parameter is missing since O_CREAT has been used.  */	      \
-	 typedef int __open_missing_mode[((flags) & O_CREAT) != 0	      \
-					 ? ((long int) sizeof (___arr)	      \
-					    - (long int) sizeof (int)) : 1];  \
-       }								      \
-     if (sizeof (___arr) == 0)						      \
-       {								      \
-	 if (__builtin_constant_p (flags) && ((flags) & O_CREAT) == 0)	      \
-	   ___r = openat (fd, fname, flags);				      \
-	 else     							      \
-	   ___r = __openat_2 (fd, fname, flags);			      \
-       }								      \
-     else								      \
-       {								      \
-	 /* If the compiler complains about the size of this array type too   \
-	    many parameters have been passed to openat.  */		      \
-	 typedef int __open_too_many_args[-(sizeof (___arr) > sizeof (int))]; \
-	 ___r = openat (fd, fname, flags, ___arr[0]);			      \
-       }								      \
-     ___r;								      \
-  })
-
-
-# ifdef __USE_LARGEFILE64
-extern int __openat64_2 (int __fd, __const char *__path, int __oflag)
-     __nonnull ((2));
-
-#  define openat64(fd, fname, flags, ...) \
-  ({ int ___r;								      \
-     /* If the compiler complains about an invalid type, excess elements, etc \
-	in the initialization this means a parameter of the wrong type has    \
-	been passed to openat64. */					      \
-     int ___arr[] = { __VA_ARGS__ };					      \
-     if (__builtin_constant_p (flags) && ((flags) & O_CREAT) != 0)	      \
-       {								      \
-	 /* If the compiler complains about the size of this array type the   \
-	    mode parameter is missing since O_CREAT has been used.  */	      \
-	 typedef int __open_missing_mode[((flags) & O_CREAT) != 0	      \
-					 ? ((long int) sizeof (___arr)	      \
-					    - (long int) sizeof (int)) : 1];  \
-       }								      \
-     if (sizeof (___arr) == 0)						      \
-       {								      \
-	 if (__builtin_constant_p (flags) && ((flags) & O_CREAT) == 0)	      \
-	   ___r = openat64 (fd, fname, flags);				      \
-	 else     							      \
-	   ___r = __openat64_2 (fd, fname, flags);			      \
-       }								      \
-     else								      \
-       {								      \
-	 /* If the compiler complains about the size of this array type too   \
-	    many parameters have been passed to openat64.  */		      \
-	 typedef int __open_too_many_args[-(sizeof (___arr) > sizeof (int))]; \
-	 ___r = openat64 (fd, fname, flags, ___arr[0]);			      \
-       }								      \
-     ___r;								      \
-  })
-# endif
-#endif
diff --git a/io/fcntl.h b/io/fcntl.h
index c89bf625bf..72a944b3d4 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007
+/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -210,12 +210,6 @@ extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
 # endif
 #endif
 
-
-/* Define some macros helping to catch common problems.  */
-#if __USE_FORTIFY_LEVEL > 0 && !defined __cplusplus
-# include <bits/fcntl2.h>
-#endif
-
 __END_DECLS
 
 #endif /* fcntl.h  */
diff --git a/io/open.c b/io/open.c
index c104406245..188110b3f3 100644
--- a/io/open.c
+++ b/io/open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1995,1996,1997,2002,2007 Free Software Foundation, Inc.
+/* 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
@@ -20,9 +20,6 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <stddef.h>
-#include <stdio.h>
-
-extern char **__libc_argv attribute_hidden;
 
 /* Open FILE with access OFLAG.  If OFLAG includes O_CREAT,
    a third argument is the file protection.  */
@@ -54,18 +51,4 @@ libc_hidden_def (__open)
 stub_warning (open)
 
 weak_alias (__open, open)
-
-
-int
-__open_2 (file, oflag)
-     const char *file;
-     int oflag;
-{
-  if (oflag & O_CREAT)
-    __fortify_fail ("invalid open call: O_CREAT without mode");
-
-  return __open (file, oflag);
-}
-stub_warning (__open_2)
-
 #include <stub-tag.h>
diff --git a/io/open64.c b/io/open64.c
index 7056718922..d9a38112ac 100644
--- a/io/open64.c
+++ b/io/open64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 1999, 2000, 2002, 2007
+/* Copyright (C) 1991, 1995, 1996, 1997, 1999, 2000, 2002
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -21,7 +21,7 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <stddef.h>
-#include <stdio.h>
+#include <bp-sym.h>
 
 /* Open FILE with access OFLAG.  If OFLAG includes O_CREAT,
    a third argument is the file protection.  */
@@ -51,21 +51,7 @@ __libc_open64 (file, oflag)
 }
 strong_alias (__libc_open64, __open64)
 libc_hidden_def (__open64)
-weak_alias (__libc_open64, open64)
+weak_alias (__libc_open64, BP_SYM (open64))
 
 stub_warning (open64)
-
-
-int
-__open64_2 (file, oflag)
-     const char *file;
-     int oflag;
-{
-  if (oflag & O_CREAT)
-    __fortify_fail ("invalid open64 call: O_CREAT without mode");
-
-  return __open64 (file, oflag);
-}
-stub_warning (__open64_2)
-
 #include <stub-tag.h>
diff --git a/io/openat.c b/io/openat.c
index 98fa1a1d64..c65ad19c7a 100644
--- a/io/openat.c
+++ b/io/openat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,6 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <stddef.h>
-#include <stdio.h>
 #include <sys/stat.h>
 
 /* Open FILE with access OFLAG.  Interpret relative paths relative to
@@ -69,18 +68,4 @@ libc_hidden_def (__openat)
 weak_alias (__openat, openat)
 stub_warning (openat)
 
-
-int
-__openat_2 (fd, file, oflag)
-     int fd;
-     const char *file;
-     int oflag;
-{
-  if (oflag & O_CREAT)
-    __fortify_fail ("invalid openat call: O_CREAT without mode");
-
-  return __openat (file, oflag);
-}
-stub_warning (__openat_2)
-
 #include <stub-tag.h>
diff --git a/io/openat64.c b/io/openat64.c
index 2d63490c65..830701a949 100644
--- a/io/openat64.c
+++ b/io/openat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,6 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <stddef.h>
-#include <stdio.h>
 #include <sys/stat.h>
 
 /* Open FILE with access OFLAG.  Interpret relative paths relative to
@@ -69,18 +68,4 @@ libc_hidden_def (__openat64)
 weak_alias (__openat64, openat64)
 stub_warning (openat64)
 
-
-int
-__openat64_2 (fd, file, oflag)
-     int fd;
-     const char *file;
-     int oflag;
-{
-  if (oflag & O_CREAT)
-    __fortify_fail ("invalid openat64 call: O_CREAT without mode");
-
-  return __openat64 (file, oflag);
-}
-stub_warning (__openat_2)
-
 #include <stub-tag.h>
diff --git a/nis/nis_domain_of.c b/nis/nis_domain_of.c
index 6f41b92bf7..4d6b48640e 100644
--- a/nis/nis_domain_of.c
+++ b/nis/nis_domain_of.c
@@ -32,10 +32,10 @@ __nis_domain_of (const_nis_name name)
 {
   const_nis_name cptr = strchr (name, '.');
 
-  if (cptr == NULL)
+  if (cptr++ == NULL)
     return "";
 
-  if (*++cptr == '\0')
+  if (*cptr == '\0')
     return ".";
 
   return cptr;
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 0a463b2164..88c3210a69 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,186 +1,10 @@
-2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
-
-	* sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
-	kernel-features.h.
-
-2007-05-16  Roland McGrath  <roland@redhat.com>
-
-	* init.c (__nptl_initial_report_events): New variable.
-	(__pthread_initialize_minimal_internal): Initialize pd->report_events
-	to that.
-
 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
 
 	* pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
 	cpusetsize if pthread_getaffinity_np failed with ENOSYS.
 
-2007-06-19  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
-	implementation.
-
-2007-06-18  Ulrich Drepper  <drepper@redhat.com>
-
-	* pthreadP.h: Define PTHREAD_MUTEX_TYPE.
-	* phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
-	* pthread_mutex_timedlock.c: Likewise.
-	* pthread_mutex_trylock.c: Likewise.
-	* pthread_mutex_unlock.c: Likewise.
-
-2007-06-17  Andreas Schwab  <schwab@suse.de>
-
-	* sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
-	sections.
-
-2007-06-17  Ulrich Drepper  <drepper@redhat.com>
-
-	* allocatestack.c (allocate_stack): Make code compile if
-	__ASSUME_PRIVATE_FUTEX is set.
-
-2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
-
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
-	(__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
-	(__pthread_rwlock_wrlock): Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
-	(pthread_rwlock_timedrdlock): Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
-	(pthread_rwlock_timedwrlock): Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
-	(__pthread_rwlock_unlock): Likewise.
-
-2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
-
-	* sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
-	* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
-	Split __flags into __flags, __shared, __pad1 and __pad2.
-	* sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
-        futexes if they are available.
-	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
-        in libc-lowlevellock.S allow using private futexes.
-	* sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
-	FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
-	lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
-	to call lll_futex_timed_wait.  Add lll_private_futex_wait,
-	lll_private_futex_timed_wait and lll_private_futex_wake.
-	(lll_robust_mutex_unlock): Fix typo.
-	* sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
-        field in futex command setup.
-	* sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
-	COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
-	* sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
-        if they are available.  Remove clear_once_control.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
-	futexes if they are available.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
-	Wake only when there are waiters.
-	* sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
-	support.  Indicate that there are waiters.  Remove unnecessary
-        extra cancellation test.
-	* sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
-	left-over duplication of __sem_wait_cleanup.
-
-2007-06-07  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
-	parameter to lll_futex_wait, lll_futex_timed_wait, and
-	lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
-	Add lll_private_futex_wait, lll_private_futex_timed_wait, and
-	lll_private_futex_wake.
-	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
-	* allocatestack.c: Adjust use of lll_futex_* macros.
-	* init.c: Likewise.
-	* lowlevellock.h: Likewise.
-	* pthread_barrier_wait.c: Likewise.
-	* pthread_cond_broadcast.c: Likewise.
-	* pthread_cond_destroy.c: Likewise.
-	* pthread_cond_signal.c: Likewise.
-	* pthread_cond_timedwait.c: Likewise.
-	* pthread_cond_wait.c: Likewise.
-	* pthread_create.c: Likewise.
-	* pthread_mutex_lock.c: Likewise.
-	* pthread_mutex_setprioceiling.c: Likewise.
-	* pthread_mutex_timedlock.c: Likewise.
-	* pthread_mutex_unlock.c: Likewise.
-	* pthread_rwlock_timedrdlock.c: Likewise.
-	* pthread_rwlock_timedwrlock.c: Likewise.
-	* pthread_rwlock_unlock.c: Likewise.
-	* sysdeps/alpha/tls.h: Likewise.
-	* sysdeps/i386/tls.h: Likewise.
-	* sysdeps/ia64/tls.h: Likewise.
-	* sysdeps/powerpc/tls.h: Likewise.
-	* sysdeps/pthread/aio_misc.h: Likewise.
-	* sysdeps/pthread/gai_misc.h: Likewise.
-	* sysdeps/s390/tls.h: Likewise.
-	* sysdeps/sh/tls.h: Likewise.
-	* sysdeps/sparc/tls.h: Likewise.
-	* sysdeps/unix/sysv/linux/fork.c: Likewise.
-	* sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
-	* sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
-	* sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
-	* sysdeps/unix/sysv/linux/sem_post.c: Likewise.
-	* sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
-	* sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
-	* sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
-	* sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
-	* sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
-	Likewise.
-	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
-	* sysdeps/x86_64/tls.h: Likewise.
-
-2007-05-29  Ulrich Drepper  <drepper@redhat.com>
-
-	* pthread_getattr_np.c: No need to install a cancellation handler,
-	this is no cancellation point.
-	* pthread_getschedparam.c: Likewise.
-	* pthread_setschedparam.c: Likewise.
-	* pthread_setschedprio.c: Likewise.
-	* sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
-	lll_unlock_wake_cb.
-	* sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
-	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
-	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
-	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
-	* sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
-	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
-	* sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
-	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
-	* sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
-
-	* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
-	whether there are more than one thread makes no sense here since
-	we only call the slow path if the locks are taken.
-	* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
-
-	* sysdeps/unix/sysv/linux/internaltypes.h: Introduce
-	COND_NWAITERS_SHIFT.
-	* pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
-	COND_CLOCK_BITS.
-	* pthread_cond_init.c: Likewise.
-	* pthread_cond_timedwait.c: Likewise.
-	* pthread_cond_wait.c: Likewise.
-	* pthread_condattr_getclock.c: Likewise.
-	* pthread_condattr_setclock.c: Likewise.
-	* sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
-
 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
 
-	* sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
-	unistd.h.
-
 	* sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
 	insn suffix.
 	(THREAD_GSCOPE_GET_FLAG): Remove.
@@ -218,127 +42,15 @@
 	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
 	THREAD_GSCOPE_WAIT): Define.
 
-2007-05-27  Ulrich Drepper  <drepper@redhat.com>
-
-	* init.c: Make it compile with older kernel headers.
-
-	* tst-initializers1.c: Show through exit code which test failed.
-
-	* pthread_rwlock_init.c: Also initialize __shared field.
-	* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
-	element in rwlock structure into four byte elements.  One of them is
-	the new __shared element.
-	* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
-	Likewise.
-	[__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
-	__shared, adjust names of other padding elements.
-	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
-	* sysdeps/pthread/pthread.h: Adjust rwlock initializers.
-	* sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
-	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
-	FUTEX_PRIVATE_FLAG.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
-	futex to use private operations if possible.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
-	Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
-
 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
 
-	* pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
-	* pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
-	* pthread_rwlock_timedrdlock.c: Likewise.
-	* pthread_rwlock_tryrdlock.c: Likewise.
-
-	* sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
-	optimization.
-
-	* sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
-	* sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
-	duplication of __sem_wait_cleanup.
-
 	* allocatestack.c: Revert last change.
 	* init.c: Likewise.
 	* sysdeps/i386/tls.h: Likewise.
 	* sysdeps/x86_64/tls.h: Likewise.
-	* descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
-	header structure.
-	* sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
-
-	* sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
-	Add private field.
-	* sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
-	* pthread_barrier_init.c: Set private flag if pshared and private
-	futexes are supported.
-	* sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
-	private field in futex command setup.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
-
-2007-05-25  Ulrich Drepper  <drepper@redhat.com>
-
-	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
-	support.
-	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
-
-	* semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
-	* sem_init.c (__new_sem_init): Rewrite to initialize all three
-	fields in the structure.
-	(__old_sem_init): New function.
-	* sem_open.c: Initialize all fields of the structure.
-	* sem_getvalue.c: Adjust for renamed element.
-	* sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
-	(gen-as-const-headers): Add structsem.sym.
-	* sysdeps/unix/sysv/linux/structsem.sym: New file.
-	* sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
-	struct new_sem.  Add struct old_sem.
-	* sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
-	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
-	* sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
-	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
-	* sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
-	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
-	* Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
-	* tst-sem10.c: New file.
-	* tst-sem11.c: New file.
-	* tst-sem12.c: New file.
-	* tst-typesizes.c: Test struct new_sem and struct old_sem instead
-	of struct sem.
-
-2007-05-25  Ulrich Drepper  <drepper@redhat.com>
-	    Jakub Jelinek  <jakub@redhat.com>
-
-	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
-	Move __pthread_enable_asynccancel right before futex syscall.
-	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
-	Likewise.
 
 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
 
-	* sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
-	THREAD_COPY_PRIVATE_FUTEX): Define.
-	* sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
-	THREAD_COPY_PRIVATE_FUTEX): Define.
-	* allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
-	* init.c (__pthread_initialize_minimal_internal): Use
-	THREAD_SET_PRIVATE_FUTEX.
-
 	* sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
 	(THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
 	THREAD_GSCOPE_FLAG_WAIT): Define.
@@ -351,29 +63,6 @@
 	* allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
 	instead of ->header.gscope_flag directly.
 
-2007-05-23  Ulrich Drepper  <drepper@redhat.com>
-
-	* init.c (__pthread_initialize_minimal_internal): Check whether
-	private futexes are available.
-	* allocatestack.c (allocate_stack): Copy private_futex field from
-	current thread into the new stack.
-	* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
-	futexes if they are available.
-	* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
-	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
-	in libc-lowlevellock.S allow using private futexes.
-	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
-	FUTEX_PRIVATE_FLAG.
-	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
-	* sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
-	if they are available.
-	* sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
-	* sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
-	* sysdeps/i386/tcb-offsets.sym: Likewise.
-	* sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
-	* sysdeps/i386/tls.h (tcbhead_t): Likewise.
-
 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/pthread/pthread-functions.h (struct pthread_functions):
@@ -386,11 +75,6 @@
 	* sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
 	encrypted for now.
 
-2007-05-21  Jakub Jelinek  <jakub@redhat.com>
-
-	* tst-robust9.c (do_test): Don't fail if ENABLE_PI and
-	pthread_mutex_init failed with ENOTSUP.
-
 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
 
 	* allocatestack.c (__wait_lookup_done): New function.
@@ -404,6 +88,24 @@
 	* sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
 	Initialize GL(dl_wait_lookup_done).
 
+2007-05-25  Ulrich Drepper  <drepper@redhat.com>
+
+	* Makefile (tests): Add tst-sem10.
+	* tst-sem10.c: New file.
+
+2007-05-25  Ulrich Drepper  <drepper@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
+	Move __pthread_enable_asynccancel right before futex syscall.
+	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
+	Likewise.
+
+2007-05-21  Jakub Jelinek  <jakub@redhat.com>
+
+	* tst-robust9.c (do_test): Don't fail if ENABLE_PI and
+	pthread_mutex_init failed with ENOTSUP.
+
 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
 
 	[BZ #4512]
@@ -417,9 +119,6 @@
 	* tst-robust9.c: New file.
 	* tst-robustpi9.c: New file.
 
-	* sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
-	unnecessary extra cancellation test.
-
 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
diff --git a/nptl/Makefile b/nptl/Makefile
index a9eac89e41..61cd25756c 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -218,7 +218,7 @@ tests = tst-typesizes \
 	tst-once1 tst-once2 tst-once3 tst-once4 \
 	tst-key1 tst-key2 tst-key3 tst-key4 \
 	tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \
-	tst-sem8 tst-sem9 tst-sem10 tst-sem11 tst-sem12 \
+	tst-sem8 tst-sem9 tst-sem10 \
 	tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
 	tst-align tst-align2 tst-align3 \
 	tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 145fe0a35f..e556dbac08 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -376,12 +376,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
       __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
 #endif
 
-#ifndef __ASSUME_PRIVATE_FUTEX
-      /* The thread must know when private futexes are supported.  */
-      pd->header.private_futex = THREAD_GETMEM (THREAD_SELF,
-						header.private_futex);
-#endif
-
 #ifdef NEED_DL_SYSINFO
       /* Copy the sysinfo value from the parent.  */
       THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO;
@@ -516,12 +510,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 	  __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
 #endif
 
-#ifndef __ASSUME_PRIVATE_FUTEX
-	  /* The thread must know when private futexes are supported.  */
-	  pd->header.private_futex = THREAD_GETMEM (THREAD_SELF,
-                                                    header.private_futex);
-#endif
-
 #ifdef NEED_DL_SYSINFO
 	  /* Copy the sysinfo value from the parent.  */
 	  THREAD_SYSINFO(pd) = THREAD_SELF_SYSINFO;
@@ -951,7 +939,7 @@ __nptl_setxid (struct xid_command *cmdp)
   int cur = cmdp->cntr;
   while (cur != 0)
     {
-      lll_private_futex_wait (&cmdp->cntr, cur);
+      lll_futex_wait (&cmdp->cntr, cur);
       cur = cmdp->cntr;
     }
 
@@ -1037,7 +1025,7 @@ __wait_lookup_done (void)
 	continue;
 
       do
-	lll_private_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT);
+	lll_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT);
       while (*gscope_flagp == THREAD_GSCOPE_FLAG_WAIT);
     }
 
@@ -1059,7 +1047,7 @@ __wait_lookup_done (void)
 	continue;
 
       do
-	lll_private_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT);
+	lll_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT);
       while (*gscope_flagp == THREAD_GSCOPE_FLAG_WAIT);
     }
 
diff --git a/nptl/descr.h b/nptl/descr.h
index 3a3361d9e3..74d8c44140 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -37,7 +37,6 @@
 #endif
 #define __need_res_state
 #include <resolv.h>
-#include <kernel-features.h>
 
 #ifndef TCB_ALIGNMENT
 # define TCB_ALIGNMENT	sizeof (double)
@@ -133,9 +132,6 @@ struct pthread
     {
       int multiple_threads;
       int gscope_flag;
-# ifndef __ASSUME_PRIVATE_FUTEX
-      int private_futex;
-# endif
     } header;
 #endif
 
diff --git a/nptl/init.c b/nptl/init.c
index a1aec6b8f7..4449a9dbc0 100644
--- a/nptl/init.c
+++ b/nptl/init.c
@@ -35,6 +35,27 @@
 #include <lowlevellock.h>
 
 
+#ifndef __NR_set_tid_address
+/* XXX For the time being...  Once we can rely on the kernel headers
+   having the definition remove these lines.  */
+#if defined __s390__
+# define __NR_set_tid_address	252
+#elif defined __ia64__
+# define __NR_set_tid_address	1233
+#elif defined __i386__
+# define __NR_set_tid_address	258
+#elif defined __x86_64__
+# define __NR_set_tid_address	218
+#elif defined __powerpc__
+# define __NR_set_tid_address	232
+#elif defined __sparc__
+# define __NR_set_tid_address	166
+#else
+# error "define __NR_set_tid_address"
+#endif
+#endif
+
+
 /* Size and alignment of static TLS block.  */
 size_t __static_tls_size;
 size_t __static_tls_align_m1;
@@ -216,7 +237,7 @@ sighandler_setxid (int sig, siginfo_t *si, void *ctx)
 			__xidcmd->id[1], __xidcmd->id[2]);
 
   if (atomic_decrement_val (&__xidcmd->cntr) == 0)
-    lll_private_futex_wake (&__xidcmd->cntr, 1);
+    lll_futex_wake (&__xidcmd->cntr, 1);
 
   /* Reset the SETXID flag.  */
   struct pthread *self = THREAD_SELF;
@@ -225,7 +246,7 @@ sighandler_setxid (int sig, siginfo_t *si, void *ctx)
 
   /* And release the futex.  */
   self->setxid_futex = 1;
-  lll_private_futex_wake (&self->setxid_futex, 1);
+  lll_futex_wake (&self->setxid_futex, 1);
 }
 
 
@@ -234,9 +255,6 @@ sighandler_setxid (int sig, siginfo_t *si, void *ctx)
 extern void **__libc_dl_error_tsd (void) __attribute__ ((const));
 
 
-/* This can be set by the debugger before initialization is complete.  */
-static bool __nptl_initial_report_events;
-
 void
 __pthread_initialize_minimal_internal (void)
 {
@@ -279,18 +297,6 @@ __pthread_initialize_minimal_internal (void)
 #endif
     set_robust_list_not_avail ();
 
-#ifndef __ASSUME_PRIVATE_FUTEX
-  /* Private futexes are always used (at least internally) so that
-     doing the test once this early is beneficial.  */
-  {
-    int word;
-    word = INTERNAL_SYSCALL (futex, err, 3, &word,
-			    FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1);
-    if (!INTERNAL_SYSCALL_ERROR_P (word, err))
-      THREAD_SETMEM (pd, header.private_futex, FUTEX_PRIVATE_FLAG);
-  }
-#endif
-
   /* Set initial thread's stack block from 0 up to __libc_stack_end.
      It will be bigger than it actually is, but for unwind.c/pt-longjmp.c
      purposes this is good enough.  */
@@ -300,9 +306,6 @@ __pthread_initialize_minimal_internal (void)
   INIT_LIST_HEAD (&__stack_user);
   list_add (&pd->list, &__stack_user);
 
-  /* Before initializing __stack_user, the debugger could not find us and
-     had to set __nptl_initial_report_events.  Propagate its setting.  */
-  THREAD_SETMEM (pd, report_events, __nptl_initial_report_events);
 
   /* Install the cancellation signal handler.  If for some reason we
      cannot install the handler we do not abort.  Maybe we should, but
diff --git a/nptl/lowlevellock.h b/nptl/lowlevellock.h
index 0600e1794d..338da39990 100644
--- a/nptl/lowlevellock.h
+++ b/nptl/lowlevellock.h
@@ -1,5 +1,5 @@
 /* Low level locking macros used in NPTL implementation.  Stub version.
-   Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -21,6 +21,16 @@
 #include <atomic.h>
 
 
+/* Implement generic mutex.  Basic futex syscall support is required:
+
+     lll_futex_wait(futex, value) - call sys_futex with FUTEX_WAIT
+				    and third parameter VALUE
+
+     lll_futex_wake(futex, value) - call sys_futex with FUTEX_WAKE
+				    and third parameter VALUE
+*/
+
+
 /* Mutex lock counter:
    bit 31 clear means unlocked;
    bit 31 set means locked.
@@ -56,9 +66,7 @@ __generic_mutex_lock (int *mutex)
       if (v >= 0)
 	continue;
 
-      lll_futex_wait (mutex, v,
-		      // XYZ check mutex flag
-		      LLL_SHARED);
+      lll_futex_wait (mutex, v);
     }
 }
 
@@ -74,9 +82,7 @@ __generic_mutex_unlock (int *mutex)
 
   /* There are other threads waiting for this mutex, wake one of them
      up.  */
-  lll_futex_wake (mutex, 1,
-		  // XYZ check mutex flag
-		  LLL_SHARED);
+  lll_futex_wake (mutex, 1);
 }
 
 
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 85fb9b8e48..21ce6fe0b7 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -97,9 +97,6 @@ enum
   = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_ADAPTIVE_NP
 };
 
-#define PTHREAD_MUTEX_TYPE(m) \
-  ((m)->__data.__kind)
-
 /* Ceiling in __data.__lock.  __data.__lock is signed, so don't
    use the MSB bit in there, but in the mask also include that bit,
    so that the compiler can optimize & PTHREAD_MUTEX_PRIO_CEILING_MASK
@@ -121,11 +118,6 @@ enum
    | PTHREAD_MUTEXATTR_PROTOCOL_MASK | PTHREAD_MUTEXATTR_PRIO_CEILING_MASK)
 
 
-/* Check whether rwlock prefers readers.   */
-#define PTHREAD_RWLOCK_PREFER_READER_P(rwlock) \
-  ((rwlock)->__data.__flags == 0)
-
-
 /* Bits used in robust mutex implementation.  */
 #define FUTEX_WAITERS		0x80000000
 #define FUTEX_OWNER_DIED	0x40000000
diff --git a/nptl/pthread_barrier_init.c b/nptl/pthread_barrier_init.c
index 8dfc444965..19e82fa38d 100644
--- a/nptl/pthread_barrier_init.c
+++ b/nptl/pthread_barrier_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -20,13 +20,6 @@
 #include <errno.h>
 #include "pthreadP.h"
 #include <lowlevellock.h>
-#include <kernel-features.h>
-
-
-static const struct pthread_barrierattr default_attr =
-  {
-    .pshared = PTHREAD_PROCESS_PRIVATE
-  };
 
 
 int
@@ -40,15 +33,17 @@ pthread_barrier_init (barrier, attr, count)
   if (__builtin_expect (count == 0, 0))
     return EINVAL;
 
-  struct pthread_barrierattr *iattr
-    = (attr != NULL
-       ? iattr = (struct pthread_barrierattr *) attr
-       : &default_attr);
+  if (attr != NULL)
+    {
+      struct pthread_barrierattr *iattr;
 
-  if (iattr->pshared != PTHREAD_PROCESS_PRIVATE
-      && __builtin_expect (iattr->pshared != PTHREAD_PROCESS_SHARED, 0))
-    /* Invalid attribute.  */
-    return EINVAL;
+      iattr = (struct pthread_barrierattr *) attr;
+
+      if (iattr->pshared != PTHREAD_PROCESS_PRIVATE
+	  && __builtin_expect (iattr->pshared != PTHREAD_PROCESS_SHARED, 0))
+	/* Invalid attribute.  */
+	return EINVAL;
+    }
 
   ibarrier = (struct pthread_barrier *) barrier;
 
@@ -58,14 +53,5 @@ pthread_barrier_init (barrier, attr, count)
   ibarrier->init_count = count;
   ibarrier->curr_event = 0;
 
-#ifdef __ASSUME_PRIVATE_FUTEX
-  ibarrier->private = (iattr->pshared != PTHREAD_PROCESS_PRIVATE
-		       ? 0 : FUTEX_PRIVATE_FLAG);
-#else
-  ibarrier->private = (iattr->pshared != PTHREAD_PROCESS_PRIVATE
-		       ? 0 : THREAD_GETMEM (THREAD_SELF,
-					    header.private_futex));
-#endif
-
   return 0;
 }
diff --git a/nptl/pthread_barrier_wait.c b/nptl/pthread_barrier_wait.c
index e96a3e5473..c6b563f242 100644
--- a/nptl/pthread_barrier_wait.c
+++ b/nptl/pthread_barrier_wait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -45,9 +45,7 @@ pthread_barrier_wait (barrier)
       ++ibarrier->curr_event;
 
       /* Wake up everybody.  */
-      lll_futex_wake (&ibarrier->curr_event, INT_MAX,
-		      // XYZ check mutex flag
-		      LLL_SHARED);
+      lll_futex_wake (&ibarrier->curr_event, INT_MAX);
 
       /* This is the thread which finished the serialization.  */
       result = PTHREAD_BARRIER_SERIAL_THREAD;
@@ -63,9 +61,7 @@ pthread_barrier_wait (barrier)
 
       /* Wait for the event counter of the barrier to change.  */
       do
-	lll_futex_wait (&ibarrier->curr_event, event,
-			// XYZ check mutex flag
-			LLL_SHARED);
+	lll_futex_wait (&ibarrier->curr_event, event);
       while (event == ibarrier->curr_event);
     }
 
diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c
index aec33f3bd8..2b8b5460f4 100644
--- a/nptl/pthread_cond_broadcast.c
+++ b/nptl/pthread_cond_broadcast.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -69,9 +69,7 @@ __pthread_cond_broadcast (cond)
 	{
 	  /* The requeue functionality is not available.  */
 	wake_all:
-	  lll_futex_wake (&cond->__data.__futex, INT_MAX,
-			  // XYZ check mutex flag
-			  LLL_SHARED);
+	  lll_futex_wake (&cond->__data.__futex, INT_MAX);
 	}
 
       /* That's all.  */
diff --git a/nptl/pthread_cond_destroy.c b/nptl/pthread_cond_destroy.c
index 8574b6118f..3e4ec8d0e4 100644
--- a/nptl/pthread_cond_destroy.c
+++ b/nptl/pthread_cond_destroy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -45,7 +45,7 @@ __pthread_cond_destroy (cond)
      pthread_cond_destroy needs to wait for them.  */
   unsigned int nwaiters = cond->__data.__nwaiters;
 
-  if (nwaiters >= (1 << COND_NWAITERS_SHIFT))
+  if (nwaiters >= (1 << COND_CLOCK_BITS))
     {
       /* Wake everybody on the associated mutex in case there are
          threads that have been requeued to it.
@@ -59,24 +59,20 @@ __pthread_cond_destroy (cond)
 	  && cond->__data.__mutex != (void *) ~0l)
 	{
 	  pthread_mutex_t *mut = (pthread_mutex_t *) cond->__data.__mutex;
-	  lll_futex_wake (&mut->__data.__lock, INT_MAX,
-			  // XYZ check mutex flag
-			  LLL_SHARED);
+	  lll_futex_wake (&mut->__data.__lock, INT_MAX);
 	}
 
       do
 	{
 	  lll_mutex_unlock (cond->__data.__lock);
 
-	  lll_futex_wait (&cond->__data.__nwaiters, nwaiters,
-			  // XYZ check mutex flag
-			  LLL_SHARED);
+	  lll_futex_wait (&cond->__data.__nwaiters, nwaiters);
 
 	  lll_mutex_lock (cond->__data.__lock);
 
 	  nwaiters = cond->__data.__nwaiters;
 	}
-      while (nwaiters >= (1 << COND_NWAITERS_SHIFT));
+      while (nwaiters >= (1 << COND_CLOCK_BITS));
     }
 
   return 0;
diff --git a/nptl/pthread_cond_init.c b/nptl/pthread_cond_init.c
index 7c6d4c18f1..5e2e6704a9 100644
--- a/nptl/pthread_cond_init.c
+++ b/nptl/pthread_cond_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -31,8 +31,8 @@ __pthread_cond_init (cond, cond_attr)
   cond->__data.__lock = LLL_MUTEX_LOCK_INITIALIZER;
   cond->__data.__futex = 0;
   cond->__data.__nwaiters = (icond_attr != NULL
-			     && ((icond_attr->value
-				  & (COND_NWAITERS_SHIFT << 1)) >> 1));
+			     && ((icond_attr->value & (COND_CLOCK_BITS << 1))
+				 >> 1));
   cond->__data.__total_seq = 0;
   cond->__data.__wakeup_seq = 0;
   cond->__data.__woken_seq = 0;
diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c
index a4faf41854..5a9bbcad91 100644
--- a/nptl/pthread_cond_signal.c
+++ b/nptl/pthread_cond_signal.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -44,15 +44,11 @@ __pthread_cond_signal (cond)
 
       /* Wake one.  */
       if (! __builtin_expect (lll_futex_wake_unlock (&cond->__data.__futex, 1,
-						     1, &cond->__data.__lock,
-						     // XYZ check mutex flag
-						     LLL_SHARED),
+						     1, &cond->__data.__lock),
 						     0))
 	return 0;
 
-      lll_futex_wake (&cond->__data.__futex, 1,
-		      // XYZ check mutex flag
-		      LLL_SHARED);
+      lll_futex_wake (&cond->__data.__futex, 1);
     }
 
   /* We are done.  */
diff --git a/nptl/pthread_cond_timedwait.c b/nptl/pthread_cond_timedwait.c
index d1c29d2377..fdbf43eae8 100644
--- a/nptl/pthread_cond_timedwait.c
+++ b/nptl/pthread_cond_timedwait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -67,7 +67,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
   /* We have one new user of the condvar.  */
   ++cond->__data.__total_seq;
   ++cond->__data.__futex;
-  cond->__data.__nwaiters += 1 << COND_NWAITERS_SHIFT;
+  cond->__data.__nwaiters += 1 << COND_CLOCK_BITS;
 
   /* Remember the mutex we are using here.  If there is already a
      different address store this is a bad user bug.  Do not store
@@ -100,7 +100,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
 	int ret;
 	ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
 				(cond->__data.__nwaiters
-				 & ((1 << COND_NWAITERS_SHIFT) - 1)),
+				 & ((1 << COND_CLOCK_BITS) - 1)),
 				&rt);
 # ifndef __ASSUME_POSIX_TIMERS
 	if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (ret, err), 0))
@@ -153,9 +153,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
 
       /* Wait until woken by signal or broadcast.  */
       err = lll_futex_timed_wait (&cond->__data.__futex,
-				  futex_val, &rt,
-				  // XYZ check mutex flag
-				  LLL_SHARED);
+				  futex_val, &rt);
 
       /* Disable asynchronous cancellation.  */
       __pthread_disable_asynccancel (cbuffer.oldtype);
@@ -191,16 +189,14 @@ __pthread_cond_timedwait (cond, mutex, abstime)
 
  bc_out:
 
-  cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT;
+  cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS;
 
   /* If pthread_cond_destroy was called on this variable already,
      notify the pthread_cond_destroy caller all waiters have left
      and it can be successfully destroyed.  */
   if (cond->__data.__total_seq == -1ULL
-      && cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT))
-    lll_futex_wake (&cond->__data.__nwaiters, 1,
-		    // XYZ check mutex flag
-		    LLL_SHARED);
+      && cond->__data.__nwaiters < (1 << COND_CLOCK_BITS))
+    lll_futex_wake (&cond->__data.__nwaiters, 1);
 
   /* We are done with the condvar.  */
   lll_mutex_unlock (cond->__data.__lock);
diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c
index e524aa6c94..f5f5cec5a8 100644
--- a/nptl/pthread_cond_wait.c
+++ b/nptl/pthread_cond_wait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -62,18 +62,16 @@ __condvar_cleanup (void *arg)
       ++cbuffer->cond->__data.__woken_seq;
     }
 
-  cbuffer->cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT;
+  cbuffer->cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS;
 
   /* If pthread_cond_destroy was called on this variable already,
      notify the pthread_cond_destroy caller all waiters have left
      and it can be successfully destroyed.  */
   destroying = 0;
   if (cbuffer->cond->__data.__total_seq == -1ULL
-      && cbuffer->cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT))
+      && cbuffer->cond->__data.__nwaiters < (1 << COND_CLOCK_BITS))
     {
-      lll_futex_wake (&cbuffer->cond->__data.__nwaiters, 1,
-		      // XYZ check mutex flag
-		      LLL_SHARED);
+      lll_futex_wake (&cbuffer->cond->__data.__nwaiters, 1);
       destroying = 1;
     }
 
@@ -82,9 +80,7 @@ __condvar_cleanup (void *arg)
 
   /* Wake everybody to make sure no condvar signal gets lost.  */
   if (! destroying)
-    lll_futex_wake (&cbuffer->cond->__data.__futex, INT_MAX,
-		    // XYZ check mutex flag
-		    LLL_SHARED);
+    lll_futex_wake (&cbuffer->cond->__data.__futex, INT_MAX);
 
   /* Get the mutex before returning unless asynchronous cancellation
      is in effect.  */
@@ -115,7 +111,7 @@ __pthread_cond_wait (cond, mutex)
   /* We have one new user of the condvar.  */
   ++cond->__data.__total_seq;
   ++cond->__data.__futex;
-  cond->__data.__nwaiters += 1 << COND_NWAITERS_SHIFT;
+  cond->__data.__nwaiters += 1 << COND_CLOCK_BITS;
 
   /* Remember the mutex we are using here.  If there is already a
      different address store this is a bad user bug.  Do not store
@@ -150,9 +146,7 @@ __pthread_cond_wait (cond, mutex)
       cbuffer.oldtype = __pthread_enable_asynccancel ();
 
       /* Wait until woken by signal or broadcast.  */
-      lll_futex_wait (&cond->__data.__futex, futex_val,
-		      // XYZ check mutex flag
-		      LLL_SHARED);
+      lll_futex_wait (&cond->__data.__futex, futex_val);
 
       /* Disable asynchronous cancellation.  */
       __pthread_disable_asynccancel (cbuffer.oldtype);
@@ -174,16 +168,14 @@ __pthread_cond_wait (cond, mutex)
 
  bc_out:
 
-  cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT;
+  cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS;
 
   /* If pthread_cond_destroy was called on this varaible already,
      notify the pthread_cond_destroy caller all waiters have left
      and it can be successfully destroyed.  */
   if (cond->__data.__total_seq == -1ULL
-      && cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT))
-    lll_futex_wake (&cond->__data.__nwaiters, 1,
-		    // XYZ check mutex flag
-		    LLL_SHARED);
+      && cond->__data.__nwaiters < (1 << COND_CLOCK_BITS))
+    lll_futex_wake (&cond->__data.__nwaiters, 1);
 
   /* We are done with the condvar.  */
   lll_mutex_unlock (cond->__data.__lock);
diff --git a/nptl/pthread_condattr_getclock.c b/nptl/pthread_condattr_getclock.c
index 3eedeb17ef..84de918a54 100644
--- a/nptl/pthread_condattr_getclock.c
+++ b/nptl/pthread_condattr_getclock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -26,6 +26,6 @@ pthread_condattr_getclock (attr, clock_id)
      clockid_t *clock_id;
 {
   *clock_id = (((((const struct pthread_condattr *) attr)->value) >> 1)
-	       & ((1 << COND_NWAITERS_SHIFT) - 1));
+	       & ((1 << COND_CLOCK_BITS) - 1));
   return 0;
 }
diff --git a/nptl/pthread_condattr_setclock.c b/nptl/pthread_condattr_setclock.c
index 9c03bce9fc..04e246b74d 100644
--- a/nptl/pthread_condattr_setclock.c
+++ b/nptl/pthread_condattr_setclock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -62,12 +62,11 @@ pthread_condattr_setclock (attr, clock_id)
     return EINVAL;
 
   /* Make sure the value fits in the bits we reserved.  */
-  assert (clock_id < (1 << COND_NWAITERS_SHIFT));
+  assert (clock_id < (1 << COND_CLOCK_BITS));
 
   int *valuep = &((struct pthread_condattr *) attr)->value;
 
-  *valuep = ((*valuep & ~(1 << (COND_NWAITERS_SHIFT + 1)) & ~1)
-	     | (clock_id << 1));
+  *valuep = (*valuep & ~(1 << (COND_CLOCK_BITS + 1)) & ~1) | (clock_id << 1);
 
   return 0;
 }
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index b1f852dc95..79729ced03 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -385,7 +385,7 @@ start_thread (void *arg)
       /* Some other thread might call any of the setXid functions and expect
 	 us to reply.  In this case wait until we did that.  */
       do
-	lll_private_futex_wait (&pd->setxid_futex, 0);
+	lll_futex_wait (&pd->setxid_futex, 0);
       while (pd->cancelhandling & SETXID_BITMASK);
 
       /* Reset the value so that the stack can be reused.  */
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
index 87cf56482f..f6cd8899d8 100644
--- a/nptl/pthread_getattr_np.c
+++ b/nptl/pthread_getattr_np.c
@@ -39,6 +39,10 @@ pthread_getattr_np (thread_id, attr)
   struct pthread_attr *iattr = (struct pthread_attr *) attr;
   int ret = 0;
 
+  /* We have to handle cancellation in the following code since we are
+     locking another threads desriptor.  */
+  pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &thread->lock);
+
   lll_lock (thread->lock);
 
   /* The thread library is responsible for keeping the values in the
@@ -175,5 +179,7 @@ pthread_getattr_np (thread_id, attr)
 
   lll_unlock (thread->lock);
 
+  pthread_cleanup_pop (0);
+
   return ret;
 }
diff --git a/nptl/pthread_getschedparam.c b/nptl/pthread_getschedparam.c
index 5e8713016e..434d867779 100644
--- a/nptl/pthread_getschedparam.c
+++ b/nptl/pthread_getschedparam.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -38,6 +38,10 @@ __pthread_getschedparam (threadid, policy, param)
 
   int result = 0;
 
+  /* We have to handle cancellation in the following code since we are
+     locking another threads descriptor.  */
+  pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
+
   lll_lock (pd->lock);
 
   /* The library is responsible for maintaining the values at all
@@ -70,6 +74,8 @@ __pthread_getschedparam (threadid, policy, param)
 
   lll_unlock (pd->lock);
 
+  pthread_cleanup_pop (0);
+
   return result;
 }
 strong_alias (__pthread_getschedparam, pthread_getschedparam)
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
index d0d6805aea..1c3ee4fe25 100644
--- a/nptl/pthread_mutex_lock.c
+++ b/nptl/pthread_mutex_lock.c
@@ -43,8 +43,7 @@ __pthread_mutex_lock (mutex)
   pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
 
   int retval = 0;
-  switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex),
-			    PTHREAD_MUTEX_TIMED_NP))
+  switch (__builtin_expect (mutex->__data.__kind, PTHREAD_MUTEX_TIMED_NP))
     {
       /* Recursive mutex.  */
     case PTHREAD_MUTEX_RECURSIVE_NP:
@@ -409,9 +408,7 @@ __pthread_mutex_lock (mutex)
 		  break;
 
 		if (oldval != ceilval)
-		  lll_futex_wait (&mutex->__data.__lock, ceilval | 2,
-				  // XYZ check mutex flag
-				  LLL_SHARED);
+		  lll_futex_wait (&mutex->__data.__lock, ceilval | 2);
 	      }
 	    while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
 							ceilval | 2, ceilval)
diff --git a/nptl/pthread_mutex_setprioceiling.c b/nptl/pthread_mutex_setprioceiling.c
index 301fb63d21..cd13d1c14c 100644
--- a/nptl/pthread_mutex_setprioceiling.c
+++ b/nptl/pthread_mutex_setprioceiling.c
@@ -1,5 +1,5 @@
 /* Set current priority ceiling of pthread_mutex_t.
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
 
@@ -80,9 +80,7 @@ pthread_mutex_setprioceiling (mutex, prioceiling, old_ceiling)
 	      break;
 
 	    if (oldval != ceilval)
-	      lll_futex_wait (&mutex->__data.__lock, ceilval | 2,
-			      // XYZ check mutex flag
-			      LLL_SHARED);
+	      lll_futex_wait (&mutex->__data.__lock, ceilval | 2);
 	  }
 	while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
 						    ceilval | 2, ceilval)
@@ -112,9 +110,7 @@ pthread_mutex_setprioceiling (mutex, prioceiling, old_ceiling)
 			 | (prioceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT);
   atomic_full_barrier ();
 
-  lll_futex_wake (&mutex->__data.__lock, INT_MAX,
-		  // XYZ check mutex flag
-		  LLL_SHARED);
+  lll_futex_wake (&mutex->__data.__lock, INT_MAX);
 
   return 0;
 }
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index 825a9849b8..8fd681c6ef 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -37,8 +37,7 @@ pthread_mutex_timedlock (mutex, abstime)
   /* We must not check ABSTIME here.  If the thread does not block
      abstime must not be checked for a valid value.  */
 
-  switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex),
-			    PTHREAD_MUTEX_TIMED_NP))
+  switch (__builtin_expect (mutex->__data.__kind, PTHREAD_MUTEX_TIMED_NP))
     {
       /* Recursive mutex.  */
     case PTHREAD_MUTEX_RECURSIVE_NP:
@@ -442,9 +441,7 @@ pthread_mutex_timedlock (mutex, abstime)
 		      }
 
 		    lll_futex_timed_wait (&mutex->__data.__lock,
-					  ceilval | 2, &rt,
-					  // XYZ check mutex flag
-					  LLL_SHARED);
+					  ceilval | 2, &rt);
 		  }
 	      }
 	    while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c
index 9a97a6cf81..9db904c60b 100644
--- a/nptl/pthread_mutex_trylock.c
+++ b/nptl/pthread_mutex_trylock.c
@@ -31,8 +31,7 @@ __pthread_mutex_trylock (mutex)
   int oldval;
   pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
 
-  switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex),
-			    PTHREAD_MUTEX_TIMED_NP))
+  switch (__builtin_expect (mutex->__data.__kind, PTHREAD_MUTEX_TIMED_NP))
     {
       /* Recursive mutex.  */
     case PTHREAD_MUTEX_RECURSIVE_NP:
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index 642e3a4442..33919d60af 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -31,8 +31,7 @@ __pthread_mutex_unlock_usercnt (mutex, decr)
 {
   int newowner = 0;
 
-  switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex),
-			    PTHREAD_MUTEX_TIMED_NP))
+  switch (__builtin_expect (mutex->__data.__kind, PTHREAD_MUTEX_TIMED_NP))
     {
     case PTHREAD_MUTEX_RECURSIVE_NP:
       /* Recursive mutex.  */
@@ -241,9 +240,7 @@ __pthread_mutex_unlock_usercnt (mutex, decr)
 						   newval, oldval));
 
       if ((oldval & ~PTHREAD_MUTEX_PRIO_CEILING_MASK) > 1)
-	lll_futex_wake (&mutex->__data.__lock, 1,
-			// XYZ check mutex flag
-			LLL_SHARED);
+	lll_futex_wake (&mutex->__data.__lock, 1);
 
       int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
       return __pthread_tpp_change_priority (oldprio, -1);
diff --git a/nptl/pthread_rwlock_init.c b/nptl/pthread_rwlock_init.c
index 27f25ac2ab..f664dd8104 100644
--- a/nptl/pthread_rwlock_init.c
+++ b/nptl/pthread_rwlock_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -18,7 +18,6 @@
    02111-1307 USA.  */
 
 #include "pthreadP.h"
-#include <kernel-features.h>
 
 
 static const struct pthread_rwlockattr default_attr =
@@ -38,44 +37,14 @@ __pthread_rwlock_init (rwlock, attr)
   iattr = ((const struct pthread_rwlockattr *) attr) ?: &default_attr;
 
   rwlock->__data.__lock = 0;
+  rwlock->__data.__flags
+    = iattr->lockkind == PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP;
   rwlock->__data.__nr_readers = 0;
+  rwlock->__data.__writer = 0;
   rwlock->__data.__readers_wakeup = 0;
   rwlock->__data.__writer_wakeup = 0;
   rwlock->__data.__nr_readers_queued = 0;
   rwlock->__data.__nr_writers_queued = 0;
-  rwlock->__data.__writer = 0;
-
-  rwlock->__data.__flags
-    = iattr->lockkind == PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP;
-
-  /* The __SHARED field is computed to minimize the work that needs to
-     be done while handling the futex.  There are two inputs: the
-     availability of private futexes and whether the rwlock is shared
-     or private.  Unfortunately the value of a private rwlock is
-     fixed: it must be zero.  The PRIVATE_FUTEX flag has the value
-     0x80 in case private futexes are available and zero otherwise.
-     This leads to the following table:
-
-                 |     pshared     |     result
-                 | shared  private | shared  private |
-     ------------+-----------------+-----------------+
-     !avail 0    |     0       0   |     0       0   |
-      avail 0x80 |  0x80       0   |     0    0x80   |
-
-     If the pshared value is in locking functions XORed with avail
-     we get the expected result.  */
-#ifdef __ASSUME_PRIVATE_FUTEX
-  rwlock->__data.__shared = (iattr->pshared == PTHREAD_PROCESS_PRIVATE
-			     ? 0 : FUTEX_PRIVATE_FLAG);
-#else
-  rwlock->__data.__shared = (iattr->pshared == PTHREAD_PROCESS_PRIVATE
-			     ? 0
-			     : THREAD_GETMEM (THREAD_SELF,
-					      header.private_futex));
-#endif
-
-  rwlock->__data.__pad1 = 0;
-  rwlock->__data.__pad2 = 0;
 
   return 0;
 }
diff --git a/nptl/pthread_rwlock_rdlock.c b/nptl/pthread_rwlock_rdlock.c
index 6764c1e9ad..e225d7030d 100644
--- a/nptl/pthread_rwlock_rdlock.c
+++ b/nptl/pthread_rwlock_rdlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -40,7 +40,7 @@ __pthread_rwlock_rdlock (rwlock)
       if (rwlock->__data.__writer == 0
 	  /* ...and if either no writer is waiting or we prefer readers.  */
 	  && (!rwlock->__data.__nr_writers_queued
-	      || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
+	      || rwlock->__data.__flags == 0))
 	{
 	  /* Increment the reader counter.  Avoid overflow.  */
 	  if (__builtin_expect (++rwlock->__data.__nr_readers == 0, 0))
diff --git a/nptl/pthread_rwlock_timedrdlock.c b/nptl/pthread_rwlock_timedrdlock.c
index 654d628b2f..80ea83a3dd 100644
--- a/nptl/pthread_rwlock_timedrdlock.c
+++ b/nptl/pthread_rwlock_timedrdlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -43,7 +43,7 @@ pthread_rwlock_timedrdlock (rwlock, abstime)
       if (rwlock->__data.__writer == 0
 	  /* ...and if either no writer is waiting or we prefer readers.  */
 	  && (!rwlock->__data.__nr_writers_queued
-	      || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
+	      || rwlock->__data.__flags == 0))
 	{
 	  /* Increment the reader counter.  Avoid overflow.  */
 	  if (++rwlock->__data.__nr_readers == 0)
@@ -114,9 +114,7 @@ pthread_rwlock_timedrdlock (rwlock, abstime)
 
       /* Wait for the writer to finish.  */
       err = lll_futex_timed_wait (&rwlock->__data.__readers_wakeup,
-				  waitval, &rt,
-				  // XYZ check mutex flag
-				  LLL_SHARED);
+				  waitval, &rt);
 
       /* Get the lock.  */
       lll_mutex_lock (rwlock->__data.__lock);
diff --git a/nptl/pthread_rwlock_timedwrlock.c b/nptl/pthread_rwlock_timedwrlock.c
index 354beb0846..97c0598f96 100644
--- a/nptl/pthread_rwlock_timedwrlock.c
+++ b/nptl/pthread_rwlock_timedwrlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -104,9 +104,7 @@ pthread_rwlock_timedwrlock (rwlock, abstime)
 
       /* Wait for the writer or reader(s) to finish.  */
       err = lll_futex_timed_wait (&rwlock->__data.__writer_wakeup,
-				  waitval, &rt,
-				  // XYZ check mutex flag
-				  LLL_SHARED);
+				  waitval, &rt);
 
       /* Get the lock.  */
       lll_mutex_lock (rwlock->__data.__lock);
diff --git a/nptl/pthread_rwlock_tryrdlock.c b/nptl/pthread_rwlock_tryrdlock.c
index df8863bcf8..446af05969 100644
--- a/nptl/pthread_rwlock_tryrdlock.c
+++ b/nptl/pthread_rwlock_tryrdlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -32,7 +32,7 @@ __pthread_rwlock_tryrdlock (rwlock)
 
   if (rwlock->__data.__writer == 0
       && (rwlock->__data.__nr_writers_queued == 0
-	  || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
+	  || rwlock->__data.__flags == 0))
     {
       if (__builtin_expect (++rwlock->__data.__nr_readers == 0, 0))
 	{
diff --git a/nptl/pthread_rwlock_unlock.c b/nptl/pthread_rwlock_unlock.c
index 87a77a94ab..9cae8b6c22 100644
--- a/nptl/pthread_rwlock_unlock.c
+++ b/nptl/pthread_rwlock_unlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -38,18 +38,14 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
 	{
 	  ++rwlock->__data.__writer_wakeup;
 	  lll_mutex_unlock (rwlock->__data.__lock);
-	  lll_futex_wake (&rwlock->__data.__writer_wakeup, 1,
-			  // XYZ check mutex flag
-			  LLL_SHARED);
+	  lll_futex_wake (&rwlock->__data.__writer_wakeup, 1);
 	  return 0;
 	}
       else if (rwlock->__data.__nr_readers_queued)
 	{
 	  ++rwlock->__data.__readers_wakeup;
 	  lll_mutex_unlock (rwlock->__data.__lock);
-	  lll_futex_wake (&rwlock->__data.__readers_wakeup, INT_MAX,
-			  // XYZ check mutex flag
-			  LLL_SHARED);
+	  lll_futex_wake (&rwlock->__data.__readers_wakeup, INT_MAX);
 	  return 0;
 	}
     }
diff --git a/nptl/pthread_setschedparam.c b/nptl/pthread_setschedparam.c
index 8129dec82c..30ac6b3e89 100644
--- a/nptl/pthread_setschedparam.c
+++ b/nptl/pthread_setschedparam.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -39,6 +39,10 @@ __pthread_setschedparam (threadid, policy, param)
 
   int result = 0;
 
+  /* We have to handle cancellation in the following code since we are
+     locking another threads desriptor.  */
+  pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
+
   lll_lock (pd->lock);
 
   struct sched_param p;
@@ -69,6 +73,8 @@ __pthread_setschedparam (threadid, policy, param)
 
   lll_unlock (pd->lock);
 
+  pthread_cleanup_pop (0);
+
   return result;
 }
 strong_alias (__pthread_setschedparam, pthread_setschedparam)
diff --git a/nptl/pthread_setschedprio.c b/nptl/pthread_setschedprio.c
index 59462ec2a1..4a71f6c7b3 100644
--- a/nptl/pthread_setschedprio.c
+++ b/nptl/pthread_setschedprio.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -41,6 +41,10 @@ pthread_setschedprio (threadid, prio)
   struct sched_param param;
   param.sched_priority = prio;
 
+  /* We have to handle cancellation in the following code since we are
+     locking another threads desriptor.  */
+  pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
+
   lll_lock (pd->lock);
 
   /* If the thread should have higher priority because of some
@@ -62,5 +66,7 @@ pthread_setschedprio (threadid, prio)
 
   lll_unlock (pd->lock);
 
+  pthread_cleanup_pop (0);
+
   return result;
 }
diff --git a/nptl/sem_getvalue.c b/nptl/sem_getvalue.c
index 3b17e59629..6bc7ea82b4 100644
--- a/nptl/sem_getvalue.c
+++ b/nptl/sem_getvalue.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -27,11 +27,11 @@ __new_sem_getvalue (sem, sval)
      sem_t *sem;
      int *sval;
 {
-  struct new_sem *isem = (struct new_sem *) sem;
+  struct sem *isem = (struct sem *) sem;
 
   /* XXX Check for valid SEM parameter.  */
 
-  *sval = isem->value;
+  *sval = isem->count;
 
   return 0;
 }
diff --git a/nptl/sem_init.c b/nptl/sem_init.c
index e29d900588..8709911ac3 100644
--- a/nptl/sem_init.c
+++ b/nptl/sem_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -22,7 +22,6 @@
 #include <lowlevellock.h>
 #include <shlib-compat.h>
 #include "semaphoreP.h"
-#include <kernel-features.h>
 
 
 int
@@ -39,50 +38,18 @@ __new_sem_init (sem, pshared, value)
     }
 
   /* Map to the internal type.  */
-  struct new_sem *isem = (struct new_sem *) sem;
+  struct sem *isem = (struct sem *) sem;
 
-  /* Use the values the user provided.  */
-  isem->value = value;
-#ifdef __ASSUME_PRIVATE_FUTEX
-  isem->private = pshared ? 0 : FUTEX_PRIVATE_FLAG;
-#else
-  isem->private = pshared ? 0 : THREAD_GETMEM (THREAD_SELF,
-					       header.private_futex);
-#endif
+  /* Use the value the user provided.  */
+  isem->count = value;
 
-  isem->nwaiters = 0;
+  /* We can completely ignore the PSHARED parameter since inter-process
+     use needs no special preparation.  */
 
   return 0;
 }
 versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1);
-
-
-
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-int
-attribute_compat_text_section
-__old_sem_init (sem, pshared, value)
-     sem_t *sem;
-     int pshared;
-     unsigned int value;
-{
-  /* Parameter sanity check.  */
-  if (__builtin_expect (value > SEM_VALUE_MAX, 0))
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  /* Map to the internal type.  */
-  struct old_sem *isem = (struct old_sem *) sem;
-
-  /* Use the value the user provided.  */
-  isem->value = value;
-
-  /* We cannot store the PSHARED attribute.  So we always use the
-     operations needed for shared semaphores.  */
-
-  return 0;
-}
+strong_alias (__new_sem_init, __old_sem_init)
 compat_symbol (libpthread, __old_sem_init, sem_init, GLIBC_2_0);
 #endif
diff --git a/nptl/sem_open.c b/nptl/sem_open.c
index 27d308e920..66bcb13aec 100644
--- a/nptl/sem_open.c
+++ b/nptl/sem_open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -304,14 +304,12 @@ sem_open (const char *name, int oflag, ...)
       /* Create the initial file content.  */
       sem_t initsem;
 
-      struct new_sem *iinitsem = (struct new_sem *) &initsem;
-      iinitsem->value = value;
-      iinitsem->private = 0;
-      iinitsem->nwaiters = 0;
+      struct sem *iinitsem = (struct sem *) &initsem;
+      iinitsem->count = value;
 
       /* Initialize the remaining bytes as well.  */
-      memset ((char *) &initsem + sizeof (struct new_sem), '\0',
-	      sizeof (sem_t) - sizeof (struct new_sem));
+      memset ((char *) &initsem + sizeof (struct sem), '\0',
+	      sizeof (sem_t) - sizeof (struct sem));
 
       tmpfname = (char *) alloca (mountpoint.dirlen + 6 + 1);
       char *xxxxxx = __mempcpy (tmpfname, mountpoint.dir, mountpoint.dirlen);
diff --git a/nptl/semaphoreP.h b/nptl/semaphoreP.h
index 9659059900..754609a1a8 100644
--- a/nptl/semaphoreP.h
+++ b/nptl/semaphoreP.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -60,10 +60,8 @@ extern int __sem_search (const void *a, const void *b) attribute_hidden;
 
 /* Prototypes of functions with multiple interfaces.  */
 extern int __new_sem_init (sem_t *sem, int pshared, unsigned int value);
-extern int __old_sem_init (sem_t *sem, int pshared, unsigned int value);
 extern int __new_sem_destroy (sem_t *sem);
 extern int __new_sem_post (sem_t *sem);
 extern int __new_sem_wait (sem_t *sem);
-extern int __old_sem_wait (sem_t *sem);
 extern int __new_sem_trywait (sem_t *sem);
 extern int __new_sem_getvalue (sem_t *sem, int *sval);
diff --git a/nptl/sysdeps/alpha/tls.h b/nptl/sysdeps/alpha/tls.h
index 388a399c73..64ddcd5c01 100644
--- a/nptl/sysdeps/alpha/tls.h
+++ b/nptl/sysdeps/alpha/tls.h
@@ -131,7 +131,7 @@ typedef struct
 	= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,	     \
 			       THREAD_GSCOPE_FLAG_UNUSED);		     \
       if (__res == THREAD_GSCOPE_FLAG_WAIT)				     \
-	lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1);	     \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1);		     \
     }									     \
   while (0)
 #define THREAD_GSCOPE_SET_FLAG() \
diff --git a/nptl/sysdeps/i386/tcb-offsets.sym b/nptl/sysdeps/i386/tcb-offsets.sym
index 69f9deb368..7c8d9a5ca5 100644
--- a/nptl/sysdeps/i386/tcb-offsets.sym
+++ b/nptl/sysdeps/i386/tcb-offsets.sym
@@ -12,6 +12,3 @@ CLEANUP			offsetof (struct pthread, cleanup)
 CLEANUP_PREV		offsetof (struct _pthread_cleanup_buffer, __prev)
 MUTEX_FUTEX		offsetof (pthread_mutex_t, __data.__lock)
 POINTER_GUARD		offsetof (tcbhead_t, pointer_guard)
-#ifndef __ASSUME_PRIVATE_FUTEX
-PRIVATE_FUTEX		offsetof (tcbhead_t, private_futex)
-#endif
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index 1ffd4cf494..b97729ce4b 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -27,8 +27,6 @@
 # include <stdint.h>
 # include <stdlib.h>
 # include <list.h>
-# include <sysdep.h>
-# include <kernel-features.h>
 
 
 /* Type for the dtv.  */
@@ -54,9 +52,6 @@ typedef struct
   uintptr_t stack_guard;
   uintptr_t pointer_guard;
   int gscope_flag;
-#ifndef __ASSUME_PRIVATE_FUTEX
-  int private_futex;
-#endif
 } tcbhead_t;
 
 # define TLS_MULTIPLE_THREADS_IN_TCB 1
@@ -449,7 +444,7 @@ union user_desc_init
 		    : "i" (offsetof (struct pthread, header.gscope_flag)),    \
 		      "0" (THREAD_GSCOPE_FLAG_UNUSED));			      \
       if (__res == THREAD_GSCOPE_FLAG_WAIT)				      \
-	lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1);	      \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1);		      \
     }									      \
   while (0)
 #define THREAD_GSCOPE_SET_FLAG() \
diff --git a/nptl/sysdeps/ia64/tls.h b/nptl/sysdeps/ia64/tls.h
index a5b7b76e2a..a144c28b09 100644
--- a/nptl/sysdeps/ia64/tls.h
+++ b/nptl/sysdeps/ia64/tls.h
@@ -173,7 +173,7 @@ register struct pthread *__thread_self __asm__("r13");
 	= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,	     \
 			       THREAD_GSCOPE_FLAG_UNUSED);		     \
       if (__res == THREAD_GSCOPE_FLAG_WAIT)				     \
-	lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1);	     \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1);		     \
     }									     \
   while (0)
 #define THREAD_GSCOPE_SET_FLAG() \
diff --git a/nptl/sysdeps/powerpc/tcb-offsets.sym b/nptl/sysdeps/powerpc/tcb-offsets.sym
index eda43dce8e..4a8671e802 100644
--- a/nptl/sysdeps/powerpc/tcb-offsets.sym
+++ b/nptl/sysdeps/powerpc/tcb-offsets.sym
@@ -15,4 +15,3 @@ MULTIPLE_THREADS_OFFSET		thread_offsetof (header.multiple_threads)
 PID				thread_offsetof (pid)
 TID				thread_offsetof (tid)
 POINTER_GUARD			(offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
-PRIVATE_FUTEX_OFFSET		thread_offsetof (header.private_futex)
diff --git a/nptl/sysdeps/powerpc/tls.h b/nptl/sysdeps/powerpc/tls.h
index 06c60e8ba2..bd9c99e06e 100644
--- a/nptl/sysdeps/powerpc/tls.h
+++ b/nptl/sysdeps/powerpc/tls.h
@@ -190,7 +190,7 @@ register void *__thread_register __asm__ ("r13");
 	= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,	     \
 			       THREAD_GSCOPE_FLAG_UNUSED);		     \
       if (__res == THREAD_GSCOPE_FLAG_WAIT)				     \
-	lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1);	     \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1);		     \
     }									     \
   while (0)
 #define THREAD_GSCOPE_SET_FLAG() \
diff --git a/nptl/sysdeps/pthread/aio_misc.h b/nptl/sysdeps/pthread/aio_misc.h
index 25ab74e272..c5a11f4550 100644
--- a/nptl/sysdeps/pthread/aio_misc.h
+++ b/nptl/sysdeps/pthread/aio_misc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2006 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 @@
 #define AIO_MISC_NOTIFY(waitlist) \
   do {									      \
     if (*waitlist->counterp > 0 && --*waitlist->counterp == 0)		      \
-      lll_private_futex_wake (waitlist->counterp, 1);			      \
+      lll_futex_wake (waitlist->counterp, 1);				      \
   } while (0)
 
 #define AIO_MISC_WAIT(result, futex, timeout, cancel)			      \
@@ -49,8 +49,7 @@
 	int status;							      \
 	do								      \
 	  {								      \
-	    status = lll_private_futex_timed_wait (futexaddr, oldval,	      \
-						   timeout);		      \
+	    status = lll_futex_timed_wait (futexaddr, oldval, timeout);	      \
 	    if (status != -EWOULDBLOCK)					      \
 	      break;							      \
 									      \
diff --git a/nptl/sysdeps/pthread/gai_misc.h b/nptl/sysdeps/pthread/gai_misc.h
index 5f6990040a..9f6a73dad1 100644
--- a/nptl/sysdeps/pthread/gai_misc.h
+++ b/nptl/sysdeps/pthread/gai_misc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@
 #define GAI_MISC_NOTIFY(waitlist) \
   do {									      \
     if (*waitlist->counterp > 0 && --*waitlist->counterp == 0)		      \
-      lll_private_futex_wake (waitlist->counterp, 1);			      \
+      lll_futex_wake (waitlist->counterp, 1);				      \
   } while (0)
 
 #define GAI_MISC_WAIT(result, futex, timeout, cancel) \
@@ -50,8 +50,7 @@
 	int status;							      \
 	do								      \
 	  {								      \
-	    status = lll_private_futex_timed_wait (futexaddr, oldval,	      \
-						   timeout);		      \
+	    status = lll_futex_timed_wait (futexaddr, oldval, timeout);	      \
 	    if (status != -EWOULDBLOCK)					      \
 	      break;							      \
 									      \
diff --git a/nptl/sysdeps/pthread/pt-initfini.c b/nptl/sysdeps/pthread/pt-initfini.c
index 9c00dc0b7d..1e35edd3eb 100644
--- a/nptl/sysdeps/pthread/pt-initfini.c
+++ b/nptl/sysdeps/pthread/pt-initfini.c
@@ -72,7 +72,7 @@ call_initialize_minimal (void)
 }
 
 SECTION (".init");
-extern void __attribute__ ((section (".init"))) _init (void);
+extern void _init (void);
 void
 _init (void)
 {
@@ -93,7 +93,7 @@ asm ("\n/*@_init_EPILOG_ENDS*/");
 asm ("\n/*@_fini_PROLOG_BEGINS*/");
 
 SECTION (".fini");
-extern void __attribute__ ((section (".fini"))) _fini (void);
+extern void _fini (void);
 void
 _fini (void)
 {
diff --git a/nptl/sysdeps/pthread/pthread-functions.h b/nptl/sysdeps/pthread/pthread-functions.h
index 0c404fcbb3..a13b937032 100644
--- a/nptl/sysdeps/pthread/pthread-functions.h
+++ b/nptl/sysdeps/pthread/pthread-functions.h
@@ -97,6 +97,7 @@ struct pthread_functions
   void (*ptr__nptl_deallocate_tsd) (void);
   int (*ptr__nptl_setxid) (struct xid_command *);
   void (*ptr_freeres) (void);
+  void (*ptr_wait_lookup_done) (int);
 };
 
 /* Variable in libc.so.  */
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index d175f312ee..4dc0b2272b 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -21,7 +21,6 @@
 #define _PTHREAD_H	1
 
 #include <features.h>
-#include <endian.h>
 #include <sched.h>
 #include <time.h>
 
@@ -121,23 +120,21 @@ enum
 };
 
 /* Read-write lock initializers.  */
-# define PTHREAD_RWLOCK_INITIALIZER \
+# if __WORDSIZE == 64
+#  define PTHREAD_RWLOCK_INITIALIZER \
   { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+# else
+#  define PTHREAD_RWLOCK_INITIALIZER \
+  { { 0, 0, 0, 0, 0, 0, 0, 0 } }
+# endif
 # ifdef __USE_GNU
 #  if __WORDSIZE == 64
 #   define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
   { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,					      \
       PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
 #  else
-#   if __BYTE_ORDER == __LITTLE_ENDIAN
-#    define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
-  { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \
-      0, 0, 0, 0 } }
-#   else
-#    define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
-  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
-      0 } }
-#   endif
+#   define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+  { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 0 } }
 #  endif
 # endif
 #endif  /* Unix98 or XOpen2K */
diff --git a/nptl/sysdeps/s390/tls.h b/nptl/sysdeps/s390/tls.h
index f10db8f227..251dfd4a46 100644
--- a/nptl/sysdeps/s390/tls.h
+++ b/nptl/sysdeps/s390/tls.h
@@ -27,7 +27,6 @@
 # include <stdint.h>
 # include <stdlib.h>
 # include <list.h>
-# include <kernel-features.h>
 
 
 /* Type for the dtv.  */
@@ -52,9 +51,6 @@ typedef struct
   uintptr_t sysinfo;
   uintptr_t stack_guard;
   int gscope_flag;
-#ifndef __ASSUME_PRIVATE_FUTEX
-  int private_futex;
-#endif
 } tcbhead_t;
 
 # ifndef __s390x__
@@ -183,7 +179,7 @@ typedef struct
 	= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,	     \
 			       THREAD_GSCOPE_FLAG_UNUSED);		     \
       if (__res == THREAD_GSCOPE_FLAG_WAIT)				     \
-	lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1);	     \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1);		     \
     }									     \
   while (0)
 #define THREAD_GSCOPE_SET_FLAG() \
diff --git a/nptl/sysdeps/sh/tcb-offsets.sym b/nptl/sysdeps/sh/tcb-offsets.sym
index 753b72b2dd..4ad866335b 100644
--- a/nptl/sysdeps/sh/tcb-offsets.sym
+++ b/nptl/sysdeps/sh/tcb-offsets.sym
@@ -10,6 +10,3 @@ MULTIPLE_THREADS_OFFSET	offsetof (struct pthread, header.multiple_threads)
 TLS_PRE_TCB_SIZE	sizeof (struct pthread)
 MUTEX_FUTEX		offsetof (pthread_mutex_t, __data.__lock)
 POINTER_GUARD		offsetof (tcbhead_t, pointer_guard)
-#ifndef __ASSUME_PRIVATE_FUTEX
-PRIVATE_FUTEX		offsetof (struct pthread, header.private_futex)
-#endif
diff --git a/nptl/sysdeps/sh/tls.h b/nptl/sysdeps/sh/tls.h
index e07e29f786..6d6eff665f 100644
--- a/nptl/sysdeps/sh/tls.h
+++ b/nptl/sysdeps/sh/tls.h
@@ -26,10 +26,6 @@
 # include <stdbool.h>
 # include <stddef.h>
 # include <stdint.h>
-# include <stdlib.h>
-# include <list.h>
-# include <sysdep.h>
-# include <kernel-features.h>
 
 /* Type for the dtv.  */
 typedef union dtv
@@ -164,7 +160,7 @@ typedef struct
 	= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,	     \
 			       THREAD_GSCOPE_FLAG_UNUSED);		     \
       if (__res == THREAD_GSCOPE_FLAG_WAIT)				     \
-	lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1);	     \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1);		     \
     }									     \
   while (0)
 #define THREAD_GSCOPE_SET_FLAG() \
diff --git a/nptl/sysdeps/sparc/tls.h b/nptl/sysdeps/sparc/tls.h
index 788c974c1c..60e52fd4ea 100644
--- a/nptl/sysdeps/sparc/tls.h
+++ b/nptl/sysdeps/sparc/tls.h
@@ -151,7 +151,7 @@ register struct pthread *__thread_self __asm__("%g7");
 	= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag,	     \
 			       THREAD_GSCOPE_FLAG_UNUSED);		     \
       if (__res == THREAD_GSCOPE_FLAG_WAIT)				     \
-	lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1);	     \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1);		     \
     }									     \
   while (0)
 #define THREAD_GSCOPE_SET_FLAG() \
diff --git a/nptl/sysdeps/unix/sysv/linux/Makefile b/nptl/sysdeps/unix/sysv/linux/Makefile
index ad5ae6ad12..cfcdb6d97f 100644
--- a/nptl/sysdeps/unix/sysv/linux/Makefile
+++ b/nptl/sysdeps/unix/sysv/linux/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -25,8 +25,7 @@ libpthread-sysdep_routines += pt-fork pthread_mutex_cond_lock
 
 gen-as-const-headers += lowlevelcond.sym lowlevelrwlock.sym \
 			lowlevelbarrier.sym unwindbuf.sym \
-			lowlevelrobustlock.sym pthread-pi-defines.sym \
-			structsem.sym
+			lowlevelrobustlock.sym pthread-pi-defines.sym
 endif
 
 ifeq ($(subdir),posix)
diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
index 04ac006400..58b4806eb2 100644
--- a/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 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
@@ -237,6 +237,8 @@ typedef int lll_lock_t;
 #define LLL_LOCK_INITIALIZER		(0)
 #define LLL_LOCK_INITIALIZER_LOCKED	(1)
 
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
 /* The states of a lock are:
     0  -  untaken
     1  -  taken by one user
diff --git a/nptl/sysdeps/unix/sysv/linux/fork.c b/nptl/sysdeps/unix/sysv/linux/fork.c
index c6dadb5683..98bb237c06 100644
--- a/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/nptl/sysdeps/unix/sysv/linux/fork.c
@@ -203,7 +203,7 @@ __libc_fork (void)
 
 	  if (atomic_decrement_and_test (&allp->handler->refcntr)
 	      && allp->handler->need_signal)
-	    lll_private_futex_wake (allp->handler->refcntr, 1);
+	    lll_futex_wake (allp->handler->refcntr, 1);
 
 	  allp = allp->next;
 	}
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
index 9e3e016fb8..f53d0e5a72 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006 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
@@ -128,10 +128,7 @@ typedef union
     unsigned int __nr_writers_queued;
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
-    unsigned char __flags;
-    unsigned char __shared;
-    unsigned char __pad1;
-    unsigned char __pad2;
+    unsigned int __flags;
     int __writer;
   } __data;
   char __size[__SIZEOF_PTHREAD_RWLOCK_T];
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
index 830f628578..88885b735d 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -17,19 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <kernel-features.h>
-
-/* All locks in libc are private.  Use the kernel feature if possible.  */
-#define FUTEX_PRIVATE_FLAG	128
-#ifdef __ASSUME_PRIVATE_FUTEX
-# define FUTEX_WAIT		(0 | FUTEX_PRIVATE_FLAG)
-# define FUTEX_WAKE		(1 | FUTEX_PRIVATE_FLAG)
-#else
-# define LOAD_FUTEX_WAIT(reg) \
-	movl	%gs:PRIVATE_FUTEX, reg
-# define LOAD_FUTEX_WAKE(reg) \
-	movl	%gs:PRIVATE_FUTEX, reg ; \
-	orl	$FUTEX_WAKE, reg
+/* In libc.so we do not unconditionally use the lock prefix.  Only if
+   the application is using threads.  */
+#ifndef UP
+# define LOCK \
+	cmpl	$0, %gs:MULTIPLE_THREADS_OFFSET; 			      \
+	je	0f;							      \
+	lock;								      \
+0:
 #endif
 
 #include "lowlevellock.S"
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
index cfcc7dafc4..e2da5b04cf 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -32,22 +32,8 @@
 
 #define SYS_gettimeofday	__NR_gettimeofday
 #define SYS_futex		240
-#ifndef FUTEX_WAIT
-# define FUTEX_WAIT		0
-# define FUTEX_WAKE		1
-#endif
-
-#ifndef LOAD_FUTEX_WAIT
-# if FUTEX_WAIT == 0
-#  define LOAD_FUTEX_WAIT(reg) \
-	xorl	reg, reg
-# else
-#  define LOAD_FUTEX_WAIT(reg) \
-	movl	$FUTEX_WAIT, reg
-# endif
-# define LOAD_FUTEX_WAKE(reg) \
-	movl	$FUTEX_WAKE, reg
-#endif
+#define FUTEX_WAIT		0
+#define FUTEX_WAKE		1
 
 
 	.globl	__lll_mutex_lock_wait
@@ -69,7 +55,7 @@ __lll_mutex_lock_wait:
 	movl	$2, %edx
 	movl	%ecx, %ebx
 	xorl	%esi, %esi	/* No timeout.  */
-	LOAD_FUTEX_WAIT (%ecx)
+	xorl	%ecx, %ecx	/* movl $FUTEX_WAIT, %ecx */
 
 	cmpl	%edx, %eax	/* NB:	 %edx == 2 */
 	jne 2f
@@ -165,7 +151,7 @@ __lll_mutex_timedlock_wait:
 
 	/* Futex call.  */
 	movl	%esp, %esi
-	LOAD_FUTEX_WAIT (%ecx)
+	xorl	%ecx, %ecx	/* movl $FUTEX_WAIT, %ecx */
 	movl	$SYS_futex, %eax
 	ENTER_KERNEL
 	movl	%eax, %ecx
@@ -219,6 +205,35 @@ __lll_mutex_timedlock_wait:
 #endif
 
 
+#ifdef NOT_IN_libc
+	.globl	lll_unlock_wake_cb
+	.type	lll_unlock_wake_cb,@function
+	.hidden	lll_unlock_wake_cb
+	.align	16
+lll_unlock_wake_cb:
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+
+	movl	20(%esp), %ebx
+	LOCK
+	subl	$1, (%ebx)
+	je	1f
+
+	movl	$FUTEX_WAKE, %ecx
+	movl	$1, %edx	/* Wake one thread.  */
+	movl	$SYS_futex, %eax
+	movl	$0, (%ebx)
+	ENTER_KERNEL
+
+1:	popl	%edx
+	popl	%ecx
+	popl	%ebx
+	ret
+	.size	lll_unlock_wake_cb,.-lll_unlock_wake_cb
+#endif
+
+
 	.globl	__lll_mutex_unlock_wake
 	.type	__lll_mutex_unlock_wake,@function
 	.hidden	__lll_mutex_unlock_wake
@@ -237,7 +252,7 @@ __lll_mutex_unlock_wake:
 
 	movl	%eax, %ebx
 	movl	$0, (%eax)
-	LOAD_FUTEX_WAKE (%ecx)
+	movl	$FUTEX_WAKE, %ecx
 	movl	$1, %edx	/* Wake one thread.  */
 	movl	$SYS_futex, %eax
 	ENTER_KERNEL
@@ -299,8 +314,6 @@ __lll_timedwait_tid:
 	jz	4f
 
 	movl	%esp, %esi
-	/* XXX The kernel so far uses global futex for the wakeup at
-	   all times.  */
 	xorl	%ecx, %ecx	/* movl $FUTEX_WAIT, %ecx */
 	movl	%ebp, %ebx
 	movl	$SYS_futex, %eax
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
index 29857195f0..fe7a8b9c66 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -69,13 +69,7 @@ pthread_barrier_wait:
 
 	/* Wait for the remaining threads.  The call will return immediately
 	   if the CURR_EVENT memory has meanwhile been changed.  */
-7:
-#if FUTEX_WAIT == 0
-	movl	PRIVATE(%ebx), %ecx
-#else
-	movl	$FUTEX_WAIT, %ecx
-	orl	PRIVATE(%ebx), %ecx
-#endif
+7:	xorl	%ecx, %ecx		/* movl $FUTEX_WAIT, %ecx */
 	xorl	%esi, %esi
 8:	movl	$SYS_futex, %eax
 	ENTER_KERNEL
@@ -126,7 +120,6 @@ pthread_barrier_wait:
 	   so 0x7fffffff is the highest value.  */
 	movl	$0x7fffffff, %edx
 	movl	$FUTEX_WAKE, %ecx
-	orl	PRIVATE(%ebx), %ecx
 	movl	$SYS_futex, %eax
 	ENTER_KERNEL
 
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index 93f4d56b32..f481a8e43c 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -87,7 +87,7 @@ __pthread_cond_timedwait:
 	addl	$1, total_seq(%ebx)
 	adcl	$0, total_seq+4(%ebx)
 	addl	$1, cond_futex(%ebx)
-	addl	$(1 << nwaiters_shift), cond_nwaiters(%ebx)
+	addl	$(1 << clock_bits), cond_nwaiters(%ebx)
 
 #define FRAME_SIZE 24
 	subl	$FRAME_SIZE, %esp
@@ -106,7 +106,7 @@ __pthread_cond_timedwait:
 #ifdef __NR_clock_gettime
 	/* Get the clock number.  */
 	movl	cond_nwaiters(%ebx), %ebx
-	andl	$((1 << nwaiters_shift) - 1), %ebx
+	andl	$((1 << clock_bits) - 1), %ebx
 	/* Only clocks 0 and 1 are allowed so far.  Both are handled in the
 	   kernel.  */
 	leal	4(%esp), %ecx
@@ -228,7 +228,7 @@ __pthread_cond_timedwait:
 14:	addl	$1, woken_seq(%ebx)
 	adcl	$0, woken_seq+4(%ebx)
 
-24:	subl	$(1 << nwaiters_shift), cond_nwaiters(%ebx)
+24:	subl	$(1 << clock_bits), cond_nwaiters(%ebx)
 
 	/* Wake up a thread which wants to destroy the condvar object.  */
 	movl	total_seq(%ebx), %eax
@@ -236,7 +236,7 @@ __pthread_cond_timedwait:
 	cmpl	$0xffffffff, %eax
 	jne	25f
 	movl	cond_nwaiters(%ebx), %eax
-	andl	$~((1 << nwaiters_shift) - 1), %eax
+	andl	$~((1 << clock_bits) - 1), %eax
 	jne	25f
 
 	addl	$cond_nwaiters, %ebx
@@ -424,7 +424,7 @@ __condvar_tw_cleanup:
 7:	addl	$1, woken_seq(%ebx)
 	adcl	$0, woken_seq+4(%ebx)
 
-3:	subl	$(1 << nwaiters_shift), cond_nwaiters(%ebx)
+3:	subl	$(1 << clock_bits), cond_nwaiters(%ebx)
 
 	/* Wake up a thread which wants to destroy the condvar object.  */
 	xorl	%edi, %edi
@@ -433,7 +433,7 @@ __condvar_tw_cleanup:
 	cmpl	$0xffffffff, %eax
 	jne	4f
 	movl	cond_nwaiters(%ebx), %eax
-	andl	$~((1 << nwaiters_shift) - 1), %eax
+	andl	$~((1 << clock_bits) - 1), %eax
 	jne	4f
 
 	addl	$cond_nwaiters, %ebx
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
index c92cfbc718..f16c7d9198 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -80,7 +80,7 @@ __pthread_cond_wait:
 	addl	$1, total_seq(%ebx)
 	adcl	$0, total_seq+4(%ebx)
 	addl	$1, cond_futex(%ebx)
-	addl	$(1 << nwaiters_shift), cond_nwaiters(%ebx)
+	addl	$(1 << clock_bits), cond_nwaiters(%ebx)
 
 #define FRAME_SIZE 16
 	subl	$FRAME_SIZE, %esp
@@ -157,7 +157,7 @@ __pthread_cond_wait:
 	adcl	$0, woken_seq+4(%ebx)
 
 	/* Unlock */
-16:	subl	$(1 << nwaiters_shift), cond_nwaiters(%ebx)
+16:	subl	$(1 << clock_bits), cond_nwaiters(%ebx)
 
 	/* Wake up a thread which wants to destroy the condvar object.  */
 	movl	total_seq(%ebx), %eax
@@ -165,7 +165,7 @@ __pthread_cond_wait:
 	cmpl	$0xffffffff, %eax
 	jne	17f
 	movl	cond_nwaiters(%ebx), %eax
-	andl	$~((1 << nwaiters_shift) - 1), %eax
+	andl	$~((1 << clock_bits) - 1), %eax
 	jne	17f
 
 	addl	$cond_nwaiters, %ebx
@@ -315,7 +315,7 @@ __condvar_w_cleanup:
 7:	addl	$1, woken_seq(%ebx)
 	adcl	$0, woken_seq+4(%ebx)
 
-3:	subl	$(1 << nwaiters_shift), cond_nwaiters(%ebx)
+3:	subl	$(1 << clock_bits), cond_nwaiters(%ebx)
 
 	/* Wake up a thread which wants to destroy the condvar object.  */
 	xorl	%edi, %edi
@@ -324,7 +324,7 @@ __condvar_w_cleanup:
 	cmpl	$0xffffffff, %eax
 	jne	4f
 	movl	cond_nwaiters(%ebx), %eax
-	andl	$~((1 << nwaiters_shift) - 1), %eax
+	andl	$~((1 << clock_bits) - 1), %eax
 	jne	4f
 
 	addl	$cond_nwaiters, %ebx
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
index c61c697985..db0639d21c 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -61,7 +61,7 @@ __pthread_rwlock_rdlock:
 	jne	14f
 	cmpl	$0, WRITERS_QUEUED(%ebx)
 	je	5f
-	cmpb	$0, FLAGS(%ebx)
+	cmpl	$0, FLAGS(%ebx)
 	je	5f
 
 3:	addl	$1, READERS_QUEUED(%ebx)
@@ -77,18 +77,8 @@ __pthread_rwlock_rdlock:
 #endif
 	jne	10f
 
-11:
-#if __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%ebx), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-#else
-	movzbl	PSHARED(%ebx), %ecx
-# if FUTEX_WAIT != 0
-	orl	$FUTEX_WAIT, %ecx
-# endif
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
-	addl	$READERS_WAKEUP, %ebx
+11:	addl	$READERS_WAKEUP, %ebx
+	movl	%esi, %ecx	/* movl $FUTEX_WAIT, %ecx */
 	movl	$SYS_futex, %eax
 	ENTER_KERNEL
 
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
index c6a584fed0..eb5665b432 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -65,7 +65,7 @@ pthread_rwlock_timedrdlock:
 	jne	14f
 	cmpl	$0, WRITERS_QUEUED(%ebp)
 	je	5f
-	cmpb	$0, FLAGS(%ebp)
+	cmpl	$0, FLAGS(%ebp)
 	je	5f
 
 	/* Check the value of the timeout parameter.  */
@@ -108,18 +108,8 @@ pthread_rwlock_timedrdlock:
 	/* Futex call.  */
 	movl	%ecx, (%esp)	/* Store relative timeout.  */
 	movl	%edx, 4(%esp)
-
 	movl	%esi, %edx
-#if __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%ebp), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-#else
-	movzbl	PSHARED(%ebp), %ecx
-# if FUTEX_WAIT != 0
-	orl	$FUTEX_WAIT, %ecx
-# endif
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
+	xorl	%ecx, %ecx	/* movl $FUTEX_WAIT, %ecx */
 	movl	%esp, %esi
 	leal	READERS_WAKEUP(%ebp), %ebx
 	movl	$SYS_futex, %eax
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
index 5e9faf93fb..d9db77ba05 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -106,18 +106,8 @@ pthread_rwlock_timedwrlock:
 	/* Futex call.  */
 	movl	%ecx, (%esp)	/* Store relative timeout.  */
 	movl	%edx, 4(%esp)
-
 	movl	%esi, %edx
-#if __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%ebp), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-#else
-	movzbl	PSHARED(%ebp), %ecx
-# if FUTEX_WAIT != 0
-	orl	$FUTEX_WAIT, %ecx
-# endif
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
+	xorl	%ecx, %ecx	/* movl $FUTEX_WAIT, %ecx */
 	movl	%esp, %esi
 	leal	WRITERS_WAKEUP(%ebp), %ebx
 	movl	$SYS_futex, %eax
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
index 35c40c2c1c..64aac3255a 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -61,8 +61,9 @@ __pthread_rwlock_unlock:
 
 5:	movl	$0, WRITER(%edi)
 
-	movl	$1, %edx
+	movl	$1, %ecx
 	leal	WRITERS_WAKEUP(%edi), %ebx
+	movl	%ecx, %edx
 	cmpl	$0, WRITERS_QUEUED(%edi)
 	jne	0f
 
@@ -82,16 +83,7 @@ __pthread_rwlock_unlock:
 #endif
 	jne	7f
 
-8:
-#if __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%edi), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAKE, %ecx
-#else
-	movzbl	PSHARED(%edi), %ecx
-	orl	$FUTEX_WAKE, %ecx
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
-	movl	$SYS_futex, %eax
+8:	movl	$SYS_futex, %eax
 	ENTER_KERNEL
 
 	xorl	%eax, %eax
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
index 88044c040b..ea9cc170db 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -75,18 +75,8 @@ __pthread_rwlock_wrlock:
 #endif
 	jne	10f
 
-11:
-#if __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%ebx), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-#else
-	movzbl	PSHARED(%ebx), %ecx
-# if FUTEX_WAIT != 0
-	orl	$FUTEX_WAIT, %ecx
-# endif
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
-	addl	$WRITERS_WAKEUP, %ebx
+11:	addl	$WRITERS_WAKEUP, %ebx
+	movl	%esi, %ecx	/* movl $FUTEX_WAIT, %ecx */
 	movl	$SYS_futex, %eax
 	ENTER_KERNEL
 
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
index 280dc2fe27..71e96d2228 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -20,7 +20,6 @@
 #include <sysdep.h>
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
-#include <structsem.h>
 
 #ifndef UP
 # define LOCK lock
@@ -41,27 +40,19 @@ __new_sem_post:
 	pushl	%ebx
 
 	movl	8(%esp), %ebx
-
+	movl	$1, %edx
 	LOCK
-#if VALUE == 0
-	addl	$1, (%ebx)
-#else
-	addl	$1, VALUE(%ebx)
-#endif
+	xaddl	%edx, (%ebx)
 
-	cmpl	$0, NWAITERS(%ebx)
-	je	2f
-
-	movl	$FUTEX_WAKE, %ecx
-	orl	PRIVATE(%ebx), %ecx
-	movl	$1, %edx
 	movl	$SYS_futex, %eax
+	movl	$FUTEX_WAKE, %ecx
+	addl	$1, %edx
 	ENTER_KERNEL
 
 	testl	%eax, %eax
 	js	1f
 
-2:	xorl	%eax, %eax
+	xorl	%eax, %eax
 	popl	%ebx
 	ret
 
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
index 57b5b58186..bf70e17fca 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
@@ -20,7 +20,6 @@
 #include <sysdep.h>
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
-#include <structsem.h>
 
 #ifndef UP
 # define LOCK lock
@@ -30,12 +29,7 @@
 
 #define SYS_gettimeofday	__NR_gettimeofday
 #define SYS_futex		240
-#define FUTEX_WAIT		0
-
-
-#if VALUE != 0
-# error "code needs to be rewritten for VALUE != 0"
-#endif
+#define FUTEX_WAKE		1
 
 
 	.text
@@ -43,8 +37,14 @@
 	.globl	sem_timedwait
 	.type	sem_timedwait,@function
 	.align	16
+	cfi_startproc
 sem_timedwait:
-.LSTARTCODE:
+	/* First check for cancellation.  */
+	movl	%gs:CANCELHANDLING, %eax
+	andl	$0xfffffff9, %eax
+	cmpl	$8, %eax
+	je	10f
+
 	movl	4(%esp), %ecx
 
 	movl	(%ecx), %eax
@@ -61,24 +61,24 @@ sem_timedwait:
 
 	/* Check whether the timeout value is valid.  */
 1:	pushl	%esi
-.Lpush_esi:
+	cfi_adjust_cfa_offset(4)
 	pushl	%edi
-.Lpush_edi:
+	cfi_adjust_cfa_offset(4)
 	pushl	%ebx
-.Lpush_ebx:
+	cfi_adjust_cfa_offset(4)
 	subl	$12, %esp
-.Lsub_esp:
+	cfi_adjust_cfa_offset(12)
 
 	movl	32(%esp), %edi
+	cfi_offset(7, -12)		/* %edi */
 
 	/* Check for invalid nanosecond field.  */
 	cmpl	$1000000000, 4(%edi)
 	movl	$EINVAL, %esi
+	cfi_offset(6, -8)		/* %esi */
 	jae	6f
 
-	LOCK
-	incl	NWAITERS(%ecx)
-
+	cfi_offset(3, -16)		/* %ebx */
 7:	xorl	%ecx, %ecx
 	movl	%esp, %ebx
 	movl	%ecx, %edx
@@ -103,26 +103,19 @@ sem_timedwait:
 	movl	%ecx, (%esp)	/* Store relative timeout.  */
 	movl	%edx, 4(%esp)
 
-.LcleanupSTART:
 	call	__pthread_enable_asynccancel
 	movl	%eax, 8(%esp)
 
-	movl	28(%esp), %ebx	/* Load semaphore address.  */
-#if FUTEX_WAIT == 0
-	movl	PRIVATE(%ebx), %ecx
-#else
-	movl	$FUTEX_WAIT, %ecx
-	orl	PRIVATE(%ebx), %ecx
-#endif
+	movl	28(%esp), %ebx
+	xorl	%ecx, %ecx
 	movl	%esp, %esi
-	xorl	%edx, %edx
 	movl	$SYS_futex, %eax
+	xorl	%edx, %edx
 	ENTER_KERNEL
 	movl	%eax, %esi
 
 	movl	8(%esp), %eax
 	call	__pthread_disable_asynccancel
-.LcleanupEND:
 
 	testl	%esi, %esi
 	je	9f
@@ -138,22 +131,24 @@ sem_timedwait:
 	cmpxchgl %ecx, (%ebx)
 	jne	8b
 
-	xorl	%eax, %eax
-
-10:	LOCK
-	decl	NWAITERS(%ebx)
-
 	addl	$12, %esp
-.Ladd_esp:
+	cfi_adjust_cfa_offset(-12)
+	xorl	%eax, %eax
 	popl	%ebx
-.Lpop_ebx:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(3)
 	popl	%edi
-.Lpop_edi:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(7)
 	popl	%esi
-.Lpop_esi:
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(6)
 	ret
 
-.Lafter_ret:
+	cfi_adjust_cfa_offset(24)
+	cfi_offset(6, -8)		/* %esi */
+	cfi_offset(7, -12)	 	/* %edi */
+	cfi_offset(3, -16)		/* %ebx */
 3:	negl	%esi
 6:
 #ifdef PIC
@@ -177,163 +172,25 @@ sem_timedwait:
 	movl	%esi, (%eax)
 #endif
 
-	movl	28(%esp), %ebx	/* Load semaphore address.  */
+	addl	$12, %esp
+	cfi_adjust_cfa_offset(-12)
 	orl	$-1, %eax
-	jmp	10b
-	.size	sem_timedwait,.-sem_timedwait
-
+	popl	%ebx
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(3)
+	popl	%edi
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(7)
+	popl	%esi
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(6)
+	ret
 
-	.type	sem_wait_cleanup,@function
-sem_wait_cleanup:
+10:	/* Canceled.  */
+	movl	$0xffffffff, %gs:RESULT
 	LOCK
-	decl	NWAITERS(%ebx)
-	movl	%eax, (%esp)
-.LcallUR:
-	call	_Unwind_Resume@PLT
-	hlt
-.LENDCODE:
-	.size	sem_wait_cleanup,.-sem_wait_cleanup
-
-
-	.section .gcc_except_table,"a",@progbits
-.LexceptSTART:
-	.byte	0xff				# @LPStart format (omit)
-	.byte	0xff				# @TType format (omit)
-	.byte	0x01				# call-site format
-						# DW_EH_PE_uleb128
-	.uleb128 .Lcstend-.Lcstbegin
-.Lcstbegin:
-	.uleb128 .LcleanupSTART-.LSTARTCODE
-	.uleb128 .LcleanupEND-.LcleanupSTART
-	.uleb128 sem_wait_cleanup-.LSTARTCODE
-	.uleb128  0
-	.uleb128 .LcallUR-.LSTARTCODE
-	.uleb128 .LENDCODE-.LcallUR
-	.uleb128 0
-	.uleb128  0
-.Lcstend:
-
-
-	.section .eh_frame,"a",@progbits
-.LSTARTFRAME:
-	.long	.LENDCIE-.LSTARTCIE		# Length of the CIE.
-.LSTARTCIE:
-	.long	0				# CIE ID.
-	.byte	1				# Version number.
-#ifdef SHARED
-	.string	"zPLR"				# NUL-terminated augmentation
-						# string.
-#else
-	.string	"zPL"				# NUL-terminated augmentation
-						# string.
-#endif
-	.uleb128 1				# Code alignment factor.
-	.sleb128 -4				# Data alignment factor.
-	.byte	8				# Return address register
-						# column.
-#ifdef SHARED
-	.uleb128 7				# Augmentation value length.
-	.byte	0x9b				# Personality: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4
-						# + DW_EH_PE_indirect
-	.long	DW.ref.__gcc_personality_v0-.
-	.byte	0x1b				# LSDA Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-	.byte	0x1b				# FDE Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-#else
-	.uleb128 6				# Augmentation value length.
-	.byte	0x0				# Personality: absolute
-	.long	__gcc_personality_v0
-	.byte	0x0				# LSDA Encoding: absolute
-#endif
-	.byte 0x0c				# DW_CFA_def_cfa
-	.uleb128 4
-	.uleb128 4
-	.byte	0x88				# DW_CFA_offset, column 0x10
-	.uleb128 1
-	.align 4
-.LENDCIE:
-
-	.long	.LENDFDE-.LSTARTFDE		# Length of the FDE.
-.LSTARTFDE:
-	.long	.LSTARTFDE-.LSTARTFRAME		# CIE pointer.
-#ifdef SHARED
-	.long	.LSTARTCODE-.			# PC-relative start address
-						# of the code.
-#else
-	.long	.LSTARTCODE			# Start address of the code.
-#endif
-	.long	.LENDCODE-.LSTARTCODE		# Length of the code.
-	.uleb128 4				# Augmentation size
-#ifdef SHARED
-	.long	.LexceptSTART-.
-#else
-	.long	.LexceptSTART
-#endif
-
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_esi-.LSTARTCODE
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte   0x86				# DW_CFA_offset %esi
-        .uleb128 2
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_edi-.Lpush_esi
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte   0x87				# DW_CFA_offset %edi
-        .uleb128 3
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_ebx-.Lpush_edi
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte   0x83				# DW_CFA_offset %ebx
-        .uleb128 4
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lsub_esp-.Lpush_ebx
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 28
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Ladd_esp-.Lsub_esp
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpop_ebx-.Ladd_esp
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte	0xc3				# DW_CFA_restore %ebx
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpop_edi-.Lpop_ebx
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte	0xc7				# DW_CFA_restore %edi
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpop_esi-.Lpop_edi
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 4
-	.byte	0xc6				# DW_CFA_restore %esi
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lafter_ret-.Lpop_esi
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 28
-	.byte   0x86				# DW_CFA_offset %esi
-        .uleb128 2
-	.byte   0x87				# DW_CFA_offset %edi
-        .uleb128 3
-	.byte   0x83				# DW_CFA_offset %ebx
-        .uleb128 4
-	.align	4
-.LENDFDE:
-
-
-#ifdef SHARED
-	.hidden	DW.ref.__gcc_personality_v0
-	.weak	DW.ref.__gcc_personality_v0
-	.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
-	.align	4
-	.type	DW.ref.__gcc_personality_v0, @object
-	.size	DW.ref.__gcc_personality_v0, 4
-DW.ref.__gcc_personality_v0:
-	.long	__gcc_personality_v0
-#endif
+	orl	$0x10, %gs:CANCELHANDLING
+	movl	%gs:CLEANUP_JMP_BUF, %eax
+	jmp	HIDDEN_JUMPTARGET (__pthread_unwind)
+	cfi_endproc
+	.size	sem_timedwait,.-sem_timedwait
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
index d0eef75144..b1296275d0 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -20,7 +20,6 @@
 #include <sysdep.h>
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
-#include <structsem.h>
 
 #ifndef UP
 # define LOCK lock
@@ -29,261 +28,22 @@
 #endif
 
 #define SYS_futex		240
-#define FUTEX_WAIT		0
+#define FUTEX_WAKE		1
 
 
-#if VALUE != 0
-# error "code needs to be rewritten for VALUE != 0"
-#endif
-
 	.text
 
 	.globl	__new_sem_wait
 	.type	__new_sem_wait,@function
 	.align	16
+	cfi_startproc
 __new_sem_wait:
-.LSTARTCODE:
-	pushl	%ebx
-.Lpush_ebx:
-	pushl	%esi
-.Lpush_esi:
-	subl	$4, %esp
-.Lsub_esp:
-
-	movl	16(%esp), %ebx
-
-	movl	(%ebx), %eax
-2:	testl	%eax, %eax
-	je	1f
-
-	leal	-1(%eax), %edx
-	LOCK
-	cmpxchgl %edx, (%ebx)
-	jne	2b
-7:	xorl	%eax, %eax
-
-9:	movl	4(%esp), %esi
-	movl	8(%esp), %ebx
-	addl	$12, %esp
-.Ladd_esp:
-	ret
-
-.Lafter_ret:
-1:	LOCK
-	incl	NWAITERS(%ebx)
-
-.LcleanupSTART:
-6:	call	__pthread_enable_asynccancel
-	movl	%eax, (%esp)
-
-#if FUTEX_WAIT == 0
-	movl	PRIVATE(%ebx), %ecx
-#else
-	movl	$FUTEX_WAIT, %ecx
-	orl	PRIVATE(%ebx), %ecx
-#endif
-	xorl	%esi, %esi
-	xorl	%edx, %edx
-	movl	$SYS_futex, %eax
-	ENTER_KERNEL
-	movl	%eax, %esi
-
-	movl	(%esp), %eax
-	call	__pthread_disable_asynccancel
-.LcleanupEND:
-
-	testl	%esi, %esi
-	je	3f
-	cmpl	$-EWOULDBLOCK, %esi
-	jne	4f
-
-3:
-	movl	(%ebx), %eax
-5:	testl	%eax, %eax
-	je	6b
-
-	leal	-1(%eax), %edx
-	LOCK
-	cmpxchgl %edx, (%ebx)
-	jne	5b
-
-	LOCK
-	decl	NWAITERS(%ebx)
-	jmp	7b
-
-4:	LOCK
-	decl	NWAITERS(%ebx)
-
-	negl	%esi
-#ifdef PIC
-	call	__i686.get_pc_thunk.bx
-#else
-	movl	$8f, %ebx
-8:
-#endif
-	addl	$_GLOBAL_OFFSET_TABLE_, %ebx
-#if USE___THREAD
-# ifdef NO_TLS_DIRECT_SEG_REFS
-	movl	errno@gotntpoff(%ebx), %edx
-	addl	%gs:0, %edx
-	movl	%esi, (%edx)
-# else
-	movl	errno@gotntpoff(%ebx), %edx
-	movl	%esi, %gs:(%edx)
-# endif
-#else
-	call	__errno_location@plt
-	movl	%esi, (%eax)
-#endif
-	orl	$-1, %eax
-
-	jmp	9b
-	.size	__new_sem_wait,.-__new_sem_wait
-	versioned_symbol(libpthread, __new_sem_wait, sem_wait, GLIBC_2_1)
-
-
-	.type	sem_wait_cleanup,@function
-sem_wait_cleanup:
-	LOCK
-	decl	NWAITERS(%ebx)
-	movl	%eax, (%esp)
-.LcallUR:
-	call	_Unwind_Resume@PLT
-	hlt
-.LENDCODE:
-	.size	sem_wait_cleanup,.-sem_wait_cleanup
-
-
-	.section .gcc_except_table,"a",@progbits
-.LexceptSTART:
-	.byte	0xff				# @LPStart format (omit)
-	.byte	0xff				# @TType format (omit)
-	.byte	0x01				# call-site format
-						# DW_EH_PE_uleb128
-	.uleb128 .Lcstend-.Lcstbegin
-.Lcstbegin:
-	.uleb128 .LcleanupSTART-.LSTARTCODE
-	.uleb128 .LcleanupEND-.LcleanupSTART
-	.uleb128 sem_wait_cleanup-.LSTARTCODE
-	.uleb128  0
-	.uleb128 .LcallUR-.LSTARTCODE
-	.uleb128 .LENDCODE-.LcallUR
-	.uleb128 0
-	.uleb128  0
-.Lcstend:
-
-
-	.section .eh_frame,"a",@progbits
-.LSTARTFRAME:
-	.long	.LENDCIE-.LSTARTCIE		# Length of the CIE.
-.LSTARTCIE:
-	.long	0				# CIE ID.
-	.byte	1				# Version number.
-#ifdef SHARED
-	.string	"zPLR"				# NUL-terminated augmentation
-						# string.
-#else
-	.string	"zPL"				# NUL-terminated augmentation
-						# string.
-#endif
-	.uleb128 1				# Code alignment factor.
-	.sleb128 -4				# Data alignment factor.
-	.byte	8				# Return address register
-						# column.
-#ifdef SHARED
-	.uleb128 7				# Augmentation value length.
-	.byte	0x9b				# Personality: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4
-						# + DW_EH_PE_indirect
-	.long	DW.ref.__gcc_personality_v0-.
-	.byte	0x1b				# LSDA Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-	.byte	0x1b				# FDE Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-#else
-	.uleb128 6				# Augmentation value length.
-	.byte	0x0				# Personality: absolute
-	.long	__gcc_personality_v0
-	.byte	0x0				# LSDA Encoding: absolute
-#endif
-	.byte 0x0c				# DW_CFA_def_cfa
-	.uleb128 4
-	.uleb128 4
-	.byte	0x88				# DW_CFA_offset, column 0x10
-	.uleb128 1
-	.align 4
-.LENDCIE:
-
-	.long	.LENDFDE-.LSTARTFDE		# Length of the FDE.
-.LSTARTFDE:
-	.long	.LSTARTFDE-.LSTARTFRAME		# CIE pointer.
-#ifdef SHARED
-	.long	.LSTARTCODE-.			# PC-relative start address
-						# of the code.
-#else
-	.long	.LSTARTCODE			# Start address of the code.
-#endif
-	.long	.LENDCODE-.LSTARTCODE		# Length of the code.
-	.uleb128 4				# Augmentation size
-#ifdef SHARED
-	.long	.LexceptSTART-.
-#else
-	.long	.LexceptSTART
-#endif
+	/* First check for cancellation.  */
+	movl	%gs:CANCELHANDLING, %eax
+	andl	$0xfffffff9, %eax
+	cmpl	$8, %eax
+	je	5f
 
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_ebx-.LSTARTCODE
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte   0x83				# DW_CFA_offset %ebx
-        .uleb128 2
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_esi-.Lpush_ebx
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte   0x86				# DW_CFA_offset %esi
-        .uleb128 3
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lsub_esp-.Lpush_esi
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Ladd_esp-.Lsub_esp
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 4
-	.byte	0xc3				# DW_CFA_restore %ebx
-	.byte	0xc6				# DW_CFA_restore %esi
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lafter_ret-.Ladd_esp
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte   0x83				# DW_CFA_offset %ebx
-        .uleb128 2
-	.byte   0x86				# DW_CFA_offset %esi
-        .uleb128 3
-	.align	4
-.LENDFDE:
-
-
-#ifdef SHARED
-	.hidden	DW.ref.__gcc_personality_v0
-	.weak	DW.ref.__gcc_personality_v0
-	.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
-	.align	4
-	.type	DW.ref.__gcc_personality_v0, @object
-	.size	DW.ref.__gcc_personality_v0, 4
-DW.ref.__gcc_personality_v0:
-	.long	__gcc_personality_v0
-#endif
-
-
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-	.section ".text.compat", "ax"
-	.global	__old_sem_wait
-	.type	__old_sem_wait,@function
-	.align	16
-	cfi_startproc
-__old_sem_wait:
 	pushl	%ebx
 	cfi_adjust_cfa_offset(4)
 	pushl	%esi
@@ -292,9 +52,9 @@ __old_sem_wait:
 	cfi_adjust_cfa_offset(4)
 
 	movl	16(%esp), %ebx
-	cfi_offset(ebx, -8)
+	cfi_offset(3, -8)		/* %ebx */
 
-	cfi_offset(esi, -12)
+	cfi_offset(6, -12)		/* %esi */
 3:	movl	(%ebx), %eax
 2:	testl	%eax, %eax
 	je	1f
@@ -305,17 +65,17 @@ __old_sem_wait:
 	jne	2b
 	xorl	%eax, %eax
 
-5:	movl	4(%esp), %esi
+	movl	4(%esp), %esi
+	cfi_restore(6)
 	movl	8(%esp), %ebx
+	cfi_restore(3)
 	addl	$12, %esp
-	cfi_restore(ebx)
-	cfi_restore(esi)
 	cfi_adjust_cfa_offset(-12)
 	ret
 
 	cfi_adjust_cfa_offset(12)
-	cfi_offset(ebx, -8)
-	cfi_offset(esi, -12)
+	cfi_offset(3, -8)		/* %ebx */
+	cfi_offset(6, -12)		/* %esi */
 1:	call	__pthread_enable_asynccancel
 	movl	%eax, (%esp)
 
@@ -355,8 +115,25 @@ __old_sem_wait:
 	movl	%esi, (%eax)
 #endif
 	orl	$-1, %eax
-	jmp	5b
+	movl	4(%esp), %esi
+	cfi_restore(6)
+	movl	8(%esp), %ebx
+	cfi_restore(3)
+	addl	$12, %esp
+	cfi_adjust_cfa_offset(-12)
+	ret
+
+5:	/* Canceled.  */
+	movl	$0xffffffff, %gs:RESULT
+	LOCK
+	orl	$0x10, %gs:CANCELHANDLING
+	movl	%gs:CLEANUP_JMP_BUF, %eax
+	jmp	HIDDEN_JUMPTARGET (__pthread_unwind)
 	cfi_endproc
-	.size	__old_sem_wait,.-__old_sem_wait
+	.size	__new_sem_wait,.-__new_sem_wait
+	versioned_symbol(libpthread, __new_sem_wait, sem_wait, GLIBC_2_1)
+#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
+	.global	__old_sem_wait
+__old_sem_wait = __new_sem_wait
 	compat_symbol(libpthread, __old_sem_wait, sem_wait, GLIBC_2_0)
 #endif
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
index 474b39ae18..21de09fe91 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -23,8 +23,6 @@
 #include <time.h>
 #include <sys/param.h>
 #include <bits/pthreadtypes.h>
-#include <kernel-features.h>
-#include <tcb-offsets.h>
 
 #ifndef LOCK_INSTR
 # ifdef UP
@@ -40,14 +38,6 @@
 #define FUTEX_LOCK_PI		6
 #define FUTEX_UNLOCK_PI		7
 #define FUTEX_TRYLOCK_PI	8
-#define FUTEX_PRIVATE_FLAG	128
-
-
-/* Values for 'private' parameter of locking macros.  Yes, the
-   definition seems to be backwards.  But it is not.  The bit will be
-   reversed before passing to the system call.  */
-#define LLL_PRIVATE	0
-#define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
 /* Initializer for compatibility lock.  */
@@ -154,11 +144,7 @@ LLL_STUB_UNWIND_INFO_START					\
 LLL_STUB_UNWIND_INFO_END
 
 
-#define lll_futex_wait(futex, val, private) \
-  lll_futex_timed_wait (futex, val, NULL, private)
-
-
-#define lll_futex_timed_wait(futex, val, timeout, private) \
+#define lll_futex_wait(futex, val) \
   ({									      \
     int __status;							      \
     register __typeof (val) _val asm ("edx") = (val);			      \
@@ -166,7 +152,7 @@ LLL_STUB_UNWIND_INFO_END
 		      LLL_ENTER_KERNEL					      \
 		      LLL_EBX_LOAD					      \
 		      : "=a" (__status)					      \
-		      : "0" (SYS_futex), LLL_EBX_REG (futex), "S" (timeout),  \
+		      : "0" (SYS_futex), LLL_EBX_REG (futex), "S" (0),	      \
 			"c" (FUTEX_WAIT), "d" (_val),			      \
 			"i" (offsetof (tcbhead_t, sysinfo))		      \
 		      : "memory");					      \
@@ -174,27 +160,7 @@ LLL_STUB_UNWIND_INFO_END
   })
 
 
-#define lll_futex_wake(futex, nr, private) \
-  do {									      \
-    int __ignore;							      \
-    register __typeof (nr) _nr asm ("edx") = (nr);			      \
-    __asm __volatile (LLL_EBX_LOAD					      \
-		      LLL_ENTER_KERNEL					      \
-		      LLL_EBX_LOAD					      \
-		      : "=a" (__ignore)					      \
-		      : "0" (SYS_futex), LLL_EBX_REG (futex),		      \
-			"c" (FUTEX_WAKE), "d" (_nr),			      \
-			"i" (0) /* phony, to align next arg's number */,      \
-			"i" (offsetof (tcbhead_t, sysinfo)));		      \
-  } while (0)
-
-
-#define lll_private_futex_wait(futex, val) \
-  lll_private_futex_timed_wait (futex, val, NULL)
-
-
-#ifdef __ASSUME_PRIVATE_FUTEX
-# define lll_private_futex_timed_wait(futex, val, timeout) \
+#define lll_futex_timed_wait(futex, val, timeout)			      \
   ({									      \
     int __status;							      \
     register __typeof (val) _val asm ("edx") = (val);			      \
@@ -203,14 +169,14 @@ LLL_STUB_UNWIND_INFO_END
 		      LLL_EBX_LOAD					      \
 		      : "=a" (__status)					      \
 		      : "0" (SYS_futex), LLL_EBX_REG (futex), "S" (timeout),  \
-			"c" (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)), "d" (_val),   \
+			"c" (FUTEX_WAIT), "d" (_val),			      \
 			"i" (offsetof (tcbhead_t, sysinfo))		      \
 		      : "memory");					      \
     __status;								      \
   })
 
 
-# define lll_private_futex_wake(futex, nr) \
+#define lll_futex_wake(futex, nr) \
   do {									      \
     int __ignore;							      \
     register __typeof (nr) _nr asm ("edx") = (nr);			      \
@@ -219,45 +185,10 @@ LLL_STUB_UNWIND_INFO_END
 		      LLL_EBX_LOAD					      \
 		      : "=a" (__ignore)					      \
 		      : "0" (SYS_futex), LLL_EBX_REG (futex),		      \
-			"c" (FUTEX_WAKE | FUTEX_PRIVATE_FLAG), "d" (_nr),     \
+			"c" (FUTEX_WAKE), "d" (_nr),			      \
 			"i" (0) /* phony, to align next arg's number */,      \
 			"i" (offsetof (tcbhead_t, sysinfo)));		      \
   } while (0)
-#else
-# define lll_private_futex_timed_wait(futex, val, timeout) \
-  ({									      \
-    int __status;							      \
-    int __ignore;							      \
-    register __typeof (val) _val asm ("edx") = (val);			      \
-    __asm __volatile ("movl %%gs:%P7, %%ecx\n\t"			      \
-		      LLL_EBX_LOAD					      \
-		      LLL_ENTER_KERNEL					      \
-		      LLL_EBX_LOAD					      \
-		      : "=a" (__status), "=c" (__ignore)		      \
-		      : LLL_EBX_REG (futex), "0" (SYS_futex), "S" (timeout),  \
-			"d" (_val), "i" (offsetof (tcbhead_t, sysinfo)),      \
-			"i" (PRIVATE_FUTEX)				      \
-		      : "memory");					      \
-    __status;								      \
-  })
-
-
-# define lll_private_futex_wake(futex, nr) \
-  do {									      \
-    int __ignore;							      \
-    int __ignore2;							      \
-    register __typeof (nr) _nr asm ("edx") = (nr);			      \
-    __asm __volatile ("orl %%gs:%P7, %%ecx\n\t"				      \
-		      LLL_EBX_LOAD					      \
-		      LLL_ENTER_KERNEL					      \
-		      LLL_EBX_LOAD					      \
-		      : "=a" (__ignore), "=c" (__ignore2)		      \
-		      : LLL_EBX_REG (futex), "0" (SYS_futex),		      \
-			"1" (FUTEX_WAKE), "d" (_nr),			      \
-			"i" (offsetof (tcbhead_t, sysinfo)),		      \
-			"i" (PRIVATE_FUTEX));				      \
-  } while (0)
-#endif
 
 
 /* Does not preserve %eax and %ecx.  */
@@ -483,6 +414,21 @@ extern int __lll_mutex_unlock_wake (int *__futex)
 				"i" (offsetof (tcbhead_t, sysinfo))); })
 
 
+#define lll_futex_wake(futex, nr) \
+  do {									      \
+    int __ignore;							      \
+    register __typeof (nr) _nr asm ("edx") = (nr);			      \
+    __asm __volatile (LLL_EBX_LOAD					      \
+		      LLL_ENTER_KERNEL					      \
+		      LLL_EBX_LOAD					      \
+		      : "=a" (__ignore)					      \
+		      : "0" (SYS_futex), LLL_EBX_REG (futex),		      \
+			"c" (FUTEX_WAKE), "d" (_nr),			      \
+			"i" (0) /* phony, to align next arg's number */,      \
+			"i" (offsetof (tcbhead_t, sysinfo)));		      \
+  } while (0)
+
+
 #define lll_mutex_islocked(futex) \
   (futex != 0)
 
@@ -502,6 +448,7 @@ extern int __lll_lock_wait (int val, int *__futex)
      __attribute ((regparm (2))) attribute_hidden;
 extern int __lll_unlock_wake (int *__futex)
      __attribute ((regparm (1))) attribute_hidden;
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
 
 
 /* The states of a lock are:
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S b/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
index 8ff0dad27f..312933c5e4 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -19,8 +19,6 @@
 
 #include <unwindbuf.h>
 #include <sysdep.h>
-#include <kernel-features.h>
-
 
 #ifndef UP
 # define LOCK lock
@@ -28,10 +26,8 @@
 # define LOCK
 #endif
 
-#define SYS_futex		240
-#define FUTEX_WAIT		0
-#define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
+#define SYS_futex	240
+#define FUTEX_WAKE	1
 
 	.comm	__fork_generation, 4, 4
 
@@ -94,16 +90,7 @@ __pthread_once:
 	jnz	3f	/* Different for generation -> run initializer.  */
 
 	/* Somebody else got here first.  Wait.  */
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_WAIT|FUTEX_PRIVATE_FLAG, %ecx
-#else
-# if FUTEX_WAIT == 0
-	movl	%gs:PRIVATE_FUTEX, %ecx
-# else
-	movl	$FUTEX_WAIT, %ecx
-	orl	%gs:PRIVATE_FUTEX, %ecx
-# endif
-#endif
+	movl	%esi, %ecx		/* movl $FUTEX_WAIT, %ecx */
 	movl	$SYS_futex, %eax
 	ENTER_KERNEL
 	jmp	6b
@@ -144,12 +131,7 @@ __pthread_once:
 
 	/* Wake up all other threads.  */
 	movl	$0x7fffffff, %edx
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_WAKE|FUTEX_PRIVATE_FLAG, %ecx
-#else
 	movl	$FUTEX_WAKE, %ecx
-	orl	%gs:PRIVATE_FUTEX, %ecx
-#endif
 	movl	$SYS_futex, %eax
 	ENTER_KERNEL
 
@@ -170,12 +152,7 @@ __pthread_once:
 	movl	$0, (%ebx)
 
 	movl	$0x7fffffff, %edx
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_WAKE|FUTEX_PRIVATE_FLAG, %ecx
-#else
 	movl	$FUTEX_WAKE, %ecx
-	orl	%gs:PRIVATE_FUTEX, %ecx
-#endif
 	movl	$SYS_futex, %eax
 	ENTER_KERNEL
 
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
index 17093471d3..8df997a262 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -226,6 +226,8 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
 /* Type for lock object.  */
 typedef int lll_lock_t;
 
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
 /* Initializers for lock.  */
 #define LLL_LOCK_INITIALIZER		(0)
 #define LLL_LOCK_INITIALIZER_LOCKED	(1)
diff --git a/nptl/sysdeps/unix/sysv/linux/internaltypes.h b/nptl/sysdeps/unix/sysv/linux/internaltypes.h
index add20b6f72..1dec19e57d 100644
--- a/nptl/sysdeps/unix/sysv/linux/internaltypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/internaltypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -76,11 +76,9 @@ struct pthread_condattr
 
 
 /* The __NWAITERS field is used as a counter and to house the number
-   of bits for other purposes.  COND_CLOCK_BITS is the number
-   of bits needed to represent the ID of the clock.  COND_NWAITERS_SHIFT
-   is the number of bits reserved for other purposes like the clock.  */
-#define COND_CLOCK_BITS		1
-#define COND_NWAITERS_SHIFT	1
+   of bits which represent the clock.  COND_CLOCK_BITS is the number
+   of bits reserved for the clock.  */
+#define COND_CLOCK_BITS	1
 
 
 /* Read-write lock variable attribute data structure.  */
@@ -98,7 +96,6 @@ struct pthread_barrier
   int lock;
   unsigned int left;
   unsigned int init_count;
-  int private;
 };
 
 
@@ -140,16 +137,9 @@ struct pthread_key_struct
 
 
 /* Semaphore variable structure.  */
-struct new_sem
+struct sem
 {
-  unsigned int value;
-  int private;
-  unsigned long int nwaiters;
-};
-
-struct old_sem
-{
-  unsigned int value;
+  unsigned int count;
 };
 
 
diff --git a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
index 4b614bd1a6..92a188a2f3 100644
--- a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
+++ b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
@@ -26,7 +26,6 @@
 #include <pthreadP.h>
 #include <bits/libc-lock.h>
 #include <sysdep.h>
-#include <ldsodefs.h>
 
 
 #ifdef TLS_MULTIPLE_THREADS_IN_TCB
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.sym b/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.sym
index cfe22b0892..36e28eb2a6 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.sym
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.sym
@@ -9,4 +9,3 @@ CURR_EVENT		offsetof (struct pthread_barrier, curr_event)
 MUTEX			offsetof (struct pthread_barrier, lock)
 LEFT			offsetof (struct pthread_barrier, left)
 INIT_COUNT		offsetof (struct pthread_barrier, init_count)
-PRIVATE			offsetof (struct pthread_barrier, private)
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevelcond.sym b/nptl/sysdeps/unix/sysv/linux/lowlevelcond.sym
index 18e1adad43..c5e7978069 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevelcond.sym
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevelcond.sym
@@ -13,4 +13,4 @@ wakeup_seq	offsetof (pthread_cond_t, __data.__wakeup_seq)
 woken_seq	offsetof (pthread_cond_t, __data.__woken_seq)
 dep_mutex	offsetof (pthread_cond_t, __data.__mutex)
 broadcast_seq	offsetof (pthread_cond_t, __data.__broadcast_seq)
-nwaiters_shift	COND_NWAITERS_SHIFT
+clock_bits	COND_CLOCK_BITS
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
index ab7f605f0c..932e27300f 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
@@ -1,5 +1,5 @@
 /* low level locking for pthread library.  Generic futex-using version.
-   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
 
@@ -31,9 +31,7 @@ __lll_lock_wait (int *futex)
     {
       int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
       if (oldval != 0)
-	lll_futex_wait (futex, 2,
-			// XYZ check mutex flag
-			LLL_SHARED);
+	lll_futex_wait (futex, 2);
     }
   while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
 }
@@ -70,9 +68,7 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime)
       /* Wait.  */
       int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
       if (oldval != 0)
-	lll_futex_timed_wait (futex, 2, &rt,
-			      // XYZ check mutex flag
-			      LLL_SHARED);
+	lll_futex_timed_wait (futex, 2, &rt);
     }
   while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
 
@@ -80,9 +76,21 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime)
 }
 
 
-/* This function doesn't get included in libc.so  */
+/* These don't get included in libc.so  */
 #ifdef IS_IN_libpthread
 int
+lll_unlock_wake_cb (int *futex)
+{
+  int val = atomic_exchange_rel (futex, 0);
+
+  if (__builtin_expect (val > 1, 0))
+    lll_futex_wake (futex, 1);
+
+  return 0;
+}
+
+
+int
 __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
 {
   int tid;
@@ -112,12 +120,12 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
       if (rt.tv_sec < 0)
 	return ETIMEDOUT;
 
-      /* Wait until thread terminates.  The kernel so far does not use
-	 the private futex operations for this.  */
-      if (lll_futex_timed_wait (tidp, tid, &rt, LLL_SHARED) == -ETIMEDOUT)
+      /* Wait until thread terminates.  */
+      if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT)
 	return ETIMEDOUT;
     }
 
   return 0;
 }
+
 #endif
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c b/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c
index 54cee0859b..30ef991bd0 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c
@@ -44,9 +44,7 @@ __lll_robust_lock_wait (int *futex)
 	  && atomic_compare_and_exchange_bool_acq (futex, newval, oldval))
 	continue;
 
-      lll_futex_wait (futex, newval,
-		      // XYZ check mutex flag
-		      LLL_SHARED);
+      lll_futex_wait (futex, newval);
 
     try:
       ;
@@ -102,9 +100,7 @@ __lll_robust_timedlock_wait (int *futex, const struct timespec *abstime)
 	  && atomic_compare_and_exchange_bool_acq (futex, newval, oldval))
 	continue;
 
-      lll_futex_timed_wait (futex, newval, &rt,
-			    // XYZ check mutex flag
-			    LLL_SHARED);
+      lll_futex_timed_wait (futex, newval, &rt);
 
     try:
       ;
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevelrwlock.sym b/nptl/sysdeps/unix/sysv/linux/lowlevelrwlock.sym
index f50b25bfb8..e82c878d39 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevelrwlock.sym
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevelrwlock.sym
@@ -1,7 +1,6 @@
 #include <stddef.h>
 #include <stdio.h>
 #include <bits/pthreadtypes.h>
-#include <bits/wordsize.h>
 
 --
 
@@ -13,4 +12,3 @@ READERS_QUEUED	offsetof (pthread_rwlock_t, __data.__nr_readers_queued)
 WRITERS_QUEUED	offsetof (pthread_rwlock_t, __data.__nr_writers_queued)
 FLAGS		offsetof (pthread_rwlock_t, __data.__flags)
 WRITER		offsetof (pthread_rwlock_t, __data.__writer)
-PSHARED		offsetof (pthread_rwlock_t, __data.__shared)
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
index c0b59c336f..a7150f6aef 100644
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
@@ -1,5 +1,5 @@
 /* Machine-specific pthread type layouts.  PowerPC version.
-   Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
 
@@ -160,9 +160,9 @@ typedef union
     unsigned int __nr_readers_queued;
     unsigned int __nr_writers_queued;
     int __writer;
-    int __shared;
-    unsigned long int __pad1;
+    int __pad1;
     unsigned long int __pad2;
+    unsigned long int __pad3;
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
     unsigned int __flags;
@@ -176,12 +176,9 @@ typedef union
     unsigned int __writer_wakeup;
     unsigned int __nr_readers_queued;
     unsigned int __nr_writers_queued;
-    unsigned char __pad1;
-    unsigned char __pad2;
-    unsigned char __shared;
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
-    unsigned char __flags;
+    unsigned int __flags;
     int __writer;
   } __data;
 # endif
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
index 20547f94f2..239f4ddf55 100644
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
@@ -37,8 +37,6 @@
 #define FUTEX_LOCK_PI		6
 #define FUTEX_UNLOCK_PI		7
 #define FUTEX_TRYLOCK_PI	8
-#define FUTEX_PRIVATE_FLAG	128
-
 
 /* Initializer for compatibility lock.	*/
 #define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -263,6 +261,8 @@ typedef int lll_lock_t;
 #define LLL_LOCK_INITIALIZER		(0)
 #define LLL_LOCK_INITIALIZER_LOCKED	(1)
 
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
 /* The states of a lock are:
     0  -  untaken
     1  -  taken by one user
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c b/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c
index 6fedac1b33..9472dd17ef 100644
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c
@@ -1,4 +1,3 @@
-#include <unistd.h>	/* For __getpagesize.  */
 #define NEW_VERNUM GLIBC_2_6
 #define STACKSIZE_ADJUST \
   do {									      \
diff --git a/nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h b/nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h
index 1aeff8fb39..6b3d3682da 100644
--- a/nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h
+++ b/nptl/sysdeps/unix/sysv/linux/rtld-lowlevel.h
@@ -1,5 +1,5 @@
 /* Defintions for lowlevel handling in ld.so.
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,115 @@
 #include <lowlevellock.h>
 
 
+/* Special multi-reader lock used in ld.so.  */
+#define __RTLD_MRLOCK_WRITER 1
+#define __RTLD_MRLOCK_RWAIT 2
+#define __RTLD_MRLOCK_WWAIT 4
+#define __RTLD_MRLOCK_RBITS \
+  ~(__RTLD_MRLOCK_WRITER | __RTLD_MRLOCK_RWAIT | __RTLD_MRLOCK_WWAIT)
+#define __RTLD_MRLOCK_INC 8
+#define __RTLD_MRLOCK_TRIES 5
+
+
+typedef int __rtld_mrlock_t;
+
+
+#define __rtld_mrlock_define(CLASS,NAME) \
+  CLASS __rtld_mrlock_t NAME;
+
+
+#define _RTLD_MRLOCK_INITIALIZER 0
+#define __rtld_mrlock_initialize(NAME) \
+  (void) ((NAME) = 0)
+
+
+#define __rtld_mrlock_lock(lock) \
+  do {									      \
+    __label__ out;							      \
+    while (1)								      \
+      {									      \
+	int oldval;							      \
+	for (int tries = 0; tries < __RTLD_MRLOCK_TRIES; ++tries)	      \
+	  {								      \
+	    oldval = lock;						      \
+	    while (__builtin_expect ((oldval				      \
+				      & (__RTLD_MRLOCK_WRITER		      \
+					 | __RTLD_MRLOCK_WWAIT))	      \
+				     == 0, 1))				      \
+	      {								      \
+		int newval = ((oldval & __RTLD_MRLOCK_RBITS)		      \
+			      + __RTLD_MRLOCK_INC);			      \
+		int ret = atomic_compare_and_exchange_val_acq (&(lock),	      \
+							       newval,	      \
+							       oldval);	      \
+		if (__builtin_expect (ret == oldval, 1))		      \
+		  goto out;						      \
+		oldval = ret;						      \
+	      }								      \
+	    atomic_delay ();						      \
+	  }								      \
+	if ((oldval & __RTLD_MRLOCK_RWAIT) == 0)			      \
+	  {								      \
+	    atomic_or (&(lock), __RTLD_MRLOCK_RWAIT);			      \
+	    oldval |= __RTLD_MRLOCK_RWAIT;				      \
+	  }								      \
+	lll_futex_wait (lock, oldval);					      \
+      }									      \
+  out:;									      \
+  } while (0)
+
+
+#define __rtld_mrlock_unlock(lock) \
+  do {									      \
+    int oldval = atomic_exchange_and_add (&(lock), -__RTLD_MRLOCK_INC);	      \
+    if (__builtin_expect ((oldval					      \
+			   & (__RTLD_MRLOCK_RBITS | __RTLD_MRLOCK_WWAIT))     \
+			  == (__RTLD_MRLOCK_INC | __RTLD_MRLOCK_WWAIT), 0))   \
+      /* We have to wake all threads since there might be some queued	      \
+	 readers already.  */						      \
+      lll_futex_wake (&(lock), 0x7fffffff);				      \
+  } while (0)
+
+
+/* There can only ever be one thread trying to get the exclusive lock.  */
+#define __rtld_mrlock_change(lock) \
+  do {									      \
+    __label__ out;							      \
+    while (1)								      \
+      {									      \
+	int oldval;							      \
+	for (int tries = 0; tries < __RTLD_MRLOCK_TRIES; ++tries)	      \
+	  {								      \
+	    oldval = lock;						      \
+	    while (__builtin_expect ((oldval & __RTLD_MRLOCK_RBITS) == 0, 1)) \
+	      {								      \
+		int newval = ((oldval & __RTLD_MRLOCK_RWAIT)		      \
+			      + __RTLD_MRLOCK_WRITER);			      \
+		int ret = atomic_compare_and_exchange_val_acq (&(lock),	      \
+							       newval,	      \
+							       oldval);	      \
+		if (__builtin_expect (ret == oldval, 1))		      \
+		  goto out;						      \
+		oldval = ret;						      \
+	      }								      \
+	    atomic_delay ();						      \
+	  }								      \
+	atomic_or (&(lock), __RTLD_MRLOCK_WWAIT);			      \
+	oldval |= __RTLD_MRLOCK_WWAIT;					      \
+	lll_futex_wait (lock, oldval);					      \
+      }									      \
+  out:;									      \
+  } while (0)
+
+
+#define __rtld_mrlock_done(lock) \
+  do {				 \
+    int oldval = atomic_exchange_and_add (&(lock), -__RTLD_MRLOCK_WRITER);    \
+    if (__builtin_expect ((oldval & __RTLD_MRLOCK_RWAIT) != 0, 0))	      \
+      lll_futex_wake (&(lock), 0x7fffffff);				      \
+  } while (0)
+
+
 /* Function to wait for variable become zero.  Used in ld.so for
    reference counters.  */
 #define __rtld_waitzero(word) \
@@ -33,12 +142,12 @@
 	int val = word;							      \
 	if (val == 0)							      \
 	  break;							      \
-	lll_private_futex_wait (&(word), val);				      \
+	lll_futex_wait (&(word), val);					      \
       }									      \
   } while (0)
 
 
 #define __rtld_notify(word) \
-  lll_private_futex_wake (&(word), 1)
+  lll_futex_wake (&(word), 1)
 
 #endif
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
index d915facba1..38d9f2ac41 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -321,6 +321,8 @@ typedef int lll_lock_t;
 #define lll_unlock(futex)       lll_mutex_unlock (futex)
 #define lll_islocked(futex)     lll_mutex_islocked (futex)
 
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
 /* The states of a lock are:
     1  -  untaken
     0  -  taken by one user
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_post.c b/nptl/sysdeps/unix/sysv/linux/sem_post.c
index 7f90325585..671b43f7f7 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_post.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_post.c
@@ -1,5 +1,5 @@
 /* sem_post -- post to a POSIX semaphore.  Generic futex-using version.
-   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -29,36 +29,10 @@
 int
 __new_sem_post (sem_t *sem)
 {
-  struct new_sem *isem = (struct new_sem *) sem;
-
-  int nr = atomic_increment_val (&isem->value);
-  atomic_full_barrier ();
-  if (isem->nwaiters > 0)
-    {
-      int err = lll_futex_wake (&isem->value, 1,
-				// XYZ check mutex flag
-				LLL_SHARED);
-      if (__builtin_expect (err, 0) < 0)
-	{
-	  __set_errno (-err);
-	  return -1;
-	}
-    }
-  return 0;
-}
-versioned_symbol (libpthread, __new_sem_post, sem_post, GLIBC_2_1);
-
-
-#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
-int
-attribute_compat_text_section
-__old_sem_post (sem_t *sem)
-{
   int *futex = (int *) sem;
 
   int nr = atomic_increment_val (futex);
-  /* We always have to assume it is a shared semaphore.  */
-  int err = lll_futex_wake (futex, 1, LLL_SHARED);
+  int err = lll_futex_wake (futex, nr);
   if (__builtin_expect (err, 0) < 0)
     {
       __set_errno (-err);
@@ -66,5 +40,8 @@ __old_sem_post (sem_t *sem)
     }
   return 0;
 }
+versioned_symbol (libpthread, __new_sem_post, sem_post, GLIBC_2_1);
+#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
+strong_alias (__new_sem_post, __old_sem_post)
 compat_symbol (libpthread, __old_sem_post, sem_post, GLIBC_2_0);
 #endif
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
index 8f92d78abe..ef897c1e93 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
@@ -1,5 +1,5 @@
 /* sem_timedwait -- wait on a semaphore.  Generic futex-using version.
-   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
 
@@ -28,29 +28,28 @@
 #include <shlib-compat.h>
 
 
-extern void __sem_wait_cleanup (void *arg) attribute_hidden;
-
-
 int
 sem_timedwait (sem_t *sem, const struct timespec *abstime)
 {
-  struct new_sem *isem = (struct new_sem *) sem;
-  int err;
+  /* First check for cancellation.  */
+  CANCELLATION_P (THREAD_SELF);
 
-  if (atomic_decrement_if_positive (&isem->value) > 0)
-    return 0;
+  int *futex = (int *) sem;
+  int val;
+  int err;
 
-  if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+  if (*futex > 0)
     {
-      __set_errno (EINVAL);
-      return -1;
+      val = atomic_decrement_if_positive (futex);
+      if (val > 0)
+	return 0;
     }
 
-  atomic_increment (&isem->nwaiters);
-
-  pthread_cleanup_push (__sem_wait_cleanup, isem);
+  err = -EINVAL;
+  if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+    goto error_return;
 
-  while (1)
+  do
     {
       struct timeval tv;
       struct timespec rt;
@@ -71,11 +70,7 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
       /* Already timed out?  */
       err = -ETIMEDOUT;
       if (sec < 0)
-	{
-	  __set_errno (ETIMEDOUT);
-	  err = -1;
-	  break;
-	}
+	goto error_return;
 
       /* Do wait.  */
       rt.tv_sec = sec;
@@ -84,30 +79,21 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
       /* Enable asynchronous cancellation.  Required by the standard.  */
       int oldtype = __pthread_enable_asynccancel ();
 
-      err = lll_futex_timed_wait (&isem->value, 0, &rt,
-				  // XYZ check mutex flag
-				  LLL_SHARED);
+      err = lll_futex_timed_wait (futex, 0, &rt);
 
       /* Disable asynchronous cancellation.  */
       __pthread_disable_asynccancel (oldtype);
 
       if (err != 0 && err != -EWOULDBLOCK)
-	{
-	  __set_errno (-err);
-	  err = -1;
-	  break;
-	}
+	goto error_return;
 
-      if (atomic_decrement_if_positive (&isem->value) > 0)
-	{
-	  err = 0;
-	  break;
-	}
+      val = atomic_decrement_if_positive (futex);
     }
+  while (val <= 0);
 
-  pthread_cleanup_pop (0);
-
-  atomic_decrement (&isem->nwaiters);
+  return 0;
 
-  return err;
+ error_return:
+  __set_errno (-err);
+  return -1;
 }
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_wait.c b/nptl/sysdeps/unix/sysv/linux/sem_wait.c
index 12f3f16c2d..e6733e88a3 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_wait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_wait.c
@@ -1,5 +1,5 @@
 /* sem_wait -- wait on a semaphore.  Generic futex-using version.
-   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
 
@@ -28,69 +28,12 @@
 #include <shlib-compat.h>
 
 
-void
-attribute_hidden
-__sem_wait_cleanup (void *arg)
-{
-  struct new_sem *isem = (struct new_sem *) arg;
-
-  atomic_decrement (&isem->nwaiters);
-}
-
-
 int
 __new_sem_wait (sem_t *sem)
 {
-  struct new_sem *isem = (struct new_sem *) sem;
-  int err;
-
-  if (atomic_decrement_if_positive (&isem->value) > 0)
-    return 0;
-
-  atomic_increment (&isem->nwaiters);
+  /* First check for cancellation.  */
+  CANCELLATION_P (THREAD_SELF);
 
-  pthread_cleanup_push (__sem_wait_cleanup, isem);
-
-  while (1)
-    {
-      /* Enable asynchronous cancellation.  Required by the standard.  */
-      int oldtype = __pthread_enable_asynccancel ();
-
-      err = lll_futex_wait (&isem->value, 0,
-			    // XYZ check mutex flag
-			    LLL_SHARED);
-
-      /* Disable asynchronous cancellation.  */
-      __pthread_disable_asynccancel (oldtype);
-
-      if (err != 0 && err != -EWOULDBLOCK)
-	{
-	  __set_errno (-err);
-	  err = -1;
-	  break;
-	}
-
-      if (atomic_decrement_if_positive (&isem->value) > 0)
-	{
-	  err = 0;
-	  break;
-	}
-    }
-
-  pthread_cleanup_pop (0);
-
-  atomic_decrement (&isem->nwaiters);
-
-  return err;
-}
-versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1);
-
-
-#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
-int
-attribute_compat_text_section
-__old_sem_wait (sem_t *sem)
-{
   int *futex = (int *) sem;
   int err;
 
@@ -102,8 +45,7 @@ __old_sem_wait (sem_t *sem)
       /* Enable asynchronous cancellation.  Required by the standard.  */
       int oldtype = __pthread_enable_asynccancel ();
 
-      /* Always assume the semaphore is shared.  */
-      err = lll_futex_wait (futex, 0, LLL_SHARED);
+      err = lll_futex_wait (futex, 0);
 
       /* Disable asynchronous cancellation.  */
       __pthread_disable_asynccancel (oldtype);
@@ -114,5 +56,8 @@ __old_sem_wait (sem_t *sem)
   return -1;
 }
 
+versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1);
+#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
+strong_alias (__new_sem_wait, __old_sem_wait)
 compat_symbol (libpthread, __old_sem_wait, sem_wait, GLIBC_2_0);
 #endif
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
index badcda5701..969686dd5a 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
-   Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -21,8 +20,6 @@
 #ifndef _BITS_PTHREADTYPES_H
 #define _BITS_PTHREADTYPES_H	1
 
-#include <endian.h>
-
 #define __SIZEOF_PTHREAD_ATTR_T 36
 #define __SIZEOF_PTHREAD_MUTEX_T 24
 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4
@@ -130,21 +127,9 @@ typedef union
     unsigned int __writer_wakeup;
     unsigned int __nr_readers_queued;
     unsigned int __nr_writers_queued;
-#if __BYTE_ORDER == __BIG_ENDIAN
-    unsigned char __pad1;
-    unsigned char __pad2;
-    unsigned char __shared;
-    /* FLAGS must stay at this position in the structure to maintain
-       binary compatibility.  */
-    unsigned char __flags;
-#else
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
-    unsigned char __flags;
-    unsigned char __shared;
-    unsigned char __pad1;
-    unsigned char __pad2;
-#endif
+    unsigned int __flags;
     pthread_t __writer;
   } __data;
   char __size[__SIZEOF_PTHREAD_RWLOCK_T];
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S
index be85ab7414..94a24b46ee 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* 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
@@ -16,32 +16,4 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <kernel-features.h>
-
-/* All locks in libc are private.  Use the kernel feature if possible.  */
-#define FUTEX_PRIVATE_FLAG	128
-#ifdef __ASSUME_PRIVATE_FUTEX
-# define FUTEX_WAIT		(0 | FUTEX_PRIVATE_FLAG)
-# define FUTEX_WAKE		(1 | FUTEX_PRIVATE_FLAG)
-#else
-# define LOAD_FUTEX_WAIT(reg,tmp) \
-	stc	gbr, tmp	; \
-	mov.w	99f, reg	; \
-	add	reg, tmp 	; \
-	bra	98f		; \
-	 mov.l	@tmp, reg	; \
-99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
-98:
-	
-# define LOAD_FUTEX_WAKE(reg,tmp) \
-	stc	gbr, tmp	; \
-	mov.w	99f, reg	; \
-	add	reg, tmp 	; \
-	mov.l	@tmp, reg	; \
-	bra	98f		; \
-	 mov	#FUTEX_WAKE, tmp ; \
-99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
-98:	or	tmp, reg
-#endif
-
 #include "lowlevellock.S"
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
index b10903bcd7..ac3169889f 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -24,24 +24,8 @@
 
 #define SYS_gettimeofday	__NR_gettimeofday
 #define SYS_futex		240
-#ifndef FUTEX_WAIT
-# define FUTEX_WAIT		0
-# define FUTEX_WAKE		1
-#endif
-
-#ifndef LOAD_FUTEX_WAIT
-# if FUTEX_WAIT == 0
-#  define LOAD_FUTEX_WAIT(reg,tmp) \
-	xor	reg, reg
-# else
-#  define LOAD_FUTEX_WAIT(reg,tmp) \
-	mov	#FUTEX_WAIT, reg; \
-	extu.b	reg, reg
-# endif
-# define LOAD_FUTEX_WAKE(reg,tmp) \
-	mov	#FUTEX_WAKE, reg; \
-	extu.b	reg, reg
-#endif
+#define FUTEX_WAIT		0
+#define FUTEX_WAKE		1
 
 
 	.globl	__lll_mutex_lock_wait
@@ -56,7 +40,7 @@ __lll_mutex_lock_wait:
 	mov	r4, r6
 	mov	r5, r8
 	mov	#0, r7		/* No timeout.  */
-	LOAD_FUTEX_WAIT (r5, r0)
+	mov	#FUTEX_WAIT, r5
 
 	mov	#2, r4
 	cmp/eq	r4, r6
@@ -149,7 +133,7 @@ __lll_mutex_timedlock_wait:
 	bt	8f
 
 	mov	r8, r4
-	LOAD_FUTEX_WAIT (r5, r0)
+	mov	#FUTEX_WAIT, r5
 	mov	r10, r6
 	mov	r15, r7
 	mov	#SYS_futex, r3
@@ -202,13 +186,41 @@ __lll_mutex_timedlock_wait:
 #endif
 
 
+#ifdef NOT_IN_libc
+	.globl	lll_unlock_wake_cb
+	.type	lll_unlock_wake_cb,@function
+	.hidden	lll_unlock_wake_cb
+	.align	5
+	cfi_startproc
+lll_unlock_wake_cb:
+	DEC	(@r4, r2)
+	tst	r2, r2
+	bt	1f
+
+	mov	#FUTEX_WAKE, r5
+	mov	#1, r6		/* Wake one thread.  */
+	mov	#0, r7
+	mov.l	r7, @r4		/* Stores 0.  */
+	mov	#SYS_futex, r3
+	extu.b	r3, r3
+	trapa	#0x14
+	SYSCALL_INST_PAD
+
+1:	
+	rts
+	 nop
+	cfi_endproc
+	.size	lll_unlock_wake_cb,.-lll_unlock_wake_cb
+#endif
+
+
 	.globl	__lll_mutex_unlock_wake
 	.type	__lll_mutex_unlock_wake,@function
 	.hidden	__lll_mutex_unlock_wake
 	.align	5
 	cfi_startproc
 __lll_mutex_unlock_wake:
-	LOAD_FUTEX_WAKE (r5, r0)
+	mov	#FUTEX_WAKE, r5
 	mov	#1, r6		/* Wake one thread.  */
 	mov	#0, r7
 	mov.l	r7, @r4		/* Stores 0.  */
@@ -277,10 +289,7 @@ __lll_timedwait_tid:
 	bt	4f
 
 	mov	r8, r4
-	/* XXX The kernel so far uses global futex for the wakeup at
-	   all times.  */
-	mov	#0, r5
-	extu.b	r5, r5
+	mov	#FUTEX_WAIT, r5
 	mov	r2, r6
 	mov	r15, r7
 	mov	#SYS_futex, r3
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
index 3092b27642..0eb1f0114c 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@
 #include <time.h>
 #include <sys/param.h>
 #include <bits/pthreadtypes.h>
-#include <kernel-features.h>
 
 #define SYS_futex		240
 #define FUTEX_WAIT		0
@@ -30,14 +29,6 @@
 #define FUTEX_LOCK_PI		6
 #define FUTEX_UNLOCK_PI		7
 #define FUTEX_TRYLOCK_PI	8
-#define FUTEX_PRIVATE_FLAG	128
-
-
-/* Values for 'private' parameter of locking macros.  Yes, the
-   definition seems to be backwards.  But it is not.  The bit will be
-   reversed before passing to the system call.  */
-#define LLL_PRIVATE    0
-#define LLL_SHARED     FUTEX_PRIVATE_FLAG
 
 
 /* Initializer for compatibility lock.  */
@@ -260,7 +251,7 @@ extern int __lll_mutex_unlock_wake (int *__futex) attribute_hidden;
 		and %2,%0\n\
 		mov.l %0,@%1\n\
 	     1: mov r1,r15"\
-		: "=&r" (__result) : "r" (__futex), "r" (FUTEX_WAITERS) \
+		: "=&r" (__result) : "r" (__futex), "r" (FUTEX_TID_MASK) \
 		: "r0", "r1", "memory");	\
 	    if (__result) \
 	      __lll_mutex_unlock_wake (__futex); })
@@ -278,7 +269,7 @@ extern int __lll_mutex_unlock_wake (int *__futex) attribute_hidden;
 	     1: mov r1,r15"\
 		: "=&r" (__ignore) : "r" (__futex), "r" (FUTEX_OWNER_DIED) \
 		: "r0", "r1", "memory");	\
-	    lll_futex_wake (__futex, 1, 0); })
+	    lll_futex_wake (__futex, 1); })
 
 #define lll_mutex_islocked(futex) \
   (futex != 0)
@@ -303,57 +294,15 @@ typedef int lll_lock_t;
 	trapa #0x14"
 # endif
 
-#define lll_futex_wait(futex, val, private) \
-  lll_futex_timed_wait (futex, val, NULL, private)
-
-
-#define lll_futex_timed_wait(futex, val, timeout, private) \
+#define lll_futex_wait(futex, val) \
   ({									      \
     int __status;							      \
     register unsigned long __r3 asm ("r3") = SYS_futex;			      \
     register unsigned long __r4 asm ("r4") = (unsigned long) (futex);	      \
     register unsigned long __r5 asm ("r5") = FUTEX_WAIT;		      \
     register unsigned long __r6 asm ("r6") = (unsigned long) (val);	      \
-    register unsigned long __r7 asm ("r7") = (timeout);			      \
-    __asm __volatile (SYSCALL_WITH_INST_PAD				      \
-		      : "=z" (__status)					      \
-		      : "r" (__r3), "r" (__r4), "r" (__r5),		      \
-			"r" (__r6), "r" (__r7)				      \
-		      : "memory", "t");					      \
-    __status;								      \
-  })
-
-
-#define lll_futex_wake(futex, nr, private) \
-  do {									      \
-    int __ignore;							      \
-    register unsigned long __r3 asm ("r3") = SYS_futex;			      \
-    register unsigned long __r4 asm ("r4") = (unsigned long) (futex);	      \
-    register unsigned long __r5 asm ("r5") = FUTEX_WAKE;		      \
-    register unsigned long __r6 asm ("r6") = (unsigned long) (nr);	      \
     register unsigned long __r7 asm ("r7") = 0;				      \
     __asm __volatile (SYSCALL_WITH_INST_PAD				      \
-		      : "=z" (__ignore)					      \
-		      : "r" (__r3), "r" (__r4), "r" (__r5),		      \
-			"r" (__r6), "r" (__r7)				      \
-		      : "memory", "t");					      \
-  } while (0)
-
-
-#define lll_private_futex_wait(futex, val) \
-  lll_private_futex_timed_wait (futex, val, NULL)
-
-
-#ifdef __ASSUME_PRIVATE_FUTEX
-# define lll_private_futex_timed_wait(futex, val, timeout) \
-  ({									      \
-    int __status;							      \
-    register unsigned long __r3 asm ("r3") = SYS_futex;			      \
-    register unsigned long __r4 asm ("r4") = (unsigned long) (futex);	      \
-    register unsigned long __r5 asm ("r5") = FUTEX_WAIT | FUTEX_PRIVATE_FLAG; \
-    register unsigned long __r6 asm ("r6") = (unsigned long) (val);	      \
-    register unsigned long __r7 asm ("r7") = (timeout);			      \
-    __asm __volatile (SYSCALL_WITH_INST_PAD				      \
 		      : "=z" (__status)					      \
 		      : "r" (__r3), "r" (__r4), "r" (__r5),		      \
 			"r" (__r6), "r" (__r7)				      \
@@ -362,32 +311,14 @@ typedef int lll_lock_t;
   })
 
 
-# define lll_private_futex_wake(futex, nr) \
-  do {									      \
-    int __ignore;							      \
-    register unsigned long __r3 asm ("r3") = SYS_futex;			      \
-    register unsigned long __r4 asm ("r4") = (unsigned long) (futex);	      \
-    register unsigned long __r5 asm ("r5") = FUTEX_WAKE | FUTEX_PRIVATE_FLAG; \
-    register unsigned long __r6 asm ("r6") = (unsigned long) (nr);	      \
-    register unsigned long __r7 asm ("r7") = 0;				      \
-    __asm __volatile (SYSCALL_WITH_INST_PAD				      \
-		      : "=z" (__ignore)					      \
-		      : "r" (__r3), "r" (__r4), "r" (__r5),		      \
-			"r" (__r6), "r" (__r7)				      \
-		      : "memory", "t");					      \
-  } while (0)
-
-
-#else
-# define lll_private_futex_timed_wait(futex, val, timeout) \
+#define lll_futex_timed_wait(futex, val, timeout) \
   ({									      \
     int __status;							      \
     register unsigned long __r3 asm ("r3") = SYS_futex;			      \
     register unsigned long __r4 asm ("r4") = (unsigned long) (futex);	      \
-    register unsigned long __r5 asm ("r5");				      \
+    register unsigned long __r5 asm ("r5") = FUTEX_WAIT;		      \
     register unsigned long __r6 asm ("r6") = (unsigned long) (val);	      \
     register unsigned long __r7 asm ("r7") = (timeout);			      \
-    __r5 = THREAD_GETMEM (THREAD_SELF, header.private_futex);		      \
     __asm __volatile (SYSCALL_WITH_INST_PAD				      \
 		      : "=z" (__status)					      \
 		      : "r" (__r3), "r" (__r4), "r" (__r5),		      \
@@ -397,7 +328,7 @@ typedef int lll_lock_t;
   })
 
 
-# define lll_private_futex_wake(futex, nr) \
+#define lll_futex_wake(futex, nr) \
   do {									      \
     int __ignore;							      \
     register unsigned long __r3 asm ("r3") = SYS_futex;			      \
@@ -405,14 +336,15 @@ typedef int lll_lock_t;
     register unsigned long __r5 asm ("r5") = FUTEX_WAKE;		      \
     register unsigned long __r6 asm ("r6") = (unsigned long) (nr);	      \
     register unsigned long __r7 asm ("r7") = 0;				      \
-    __r5 |= THREAD_GETMEM (THREAD_SELF,	header.private_futex);		      \
     __asm __volatile (SYSCALL_WITH_INST_PAD				      \
 		      : "=z" (__ignore)					      \
 		      : "r" (__r3), "r" (__r4), "r" (__r5),		      \
 			"r" (__r6), "r" (__r7)				      \
 		      : "memory", "t");					      \
   } while (0)
-#endif
+
+
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
 
 
 /* The states of a lock are:
@@ -438,7 +370,7 @@ extern int __lll_wait_tid (int *tid) attribute_hidden;
   do {									      \
     __typeof (tid) *__tid = &(tid);					      \
     while (*__tid != 0)							      \
-      lll_futex_wait (__tid, *__tid, 0);				      \
+      lll_futex_wait (__tid, *__tid);					      \
   } while (0)
 
 extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
index 35dd607fc1..1fbb23a5a6 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* 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
@@ -65,13 +65,7 @@ pthread_barrier_wait:
 #if CURR_EVENT != 0
 	add	#CURR_EVENT, r4
 #endif
-#if FUTEX_WAIT == 0
-	mov.l	@(PRIVATE,r8), r5
-#else
 	mov	#FUTEX_WAIT, r5
-	mov.l	@(PRIVATE,r8), r0
-	or	r0, r5
-#endif
 	mov	#0, r7
 8:
 	mov	#SYS_futex, r3
@@ -124,8 +118,6 @@ pthread_barrier_wait:
 #endif
 	mov	#0, r7
 	mov	#FUTEX_WAKE, r5
-	mov.l	@(PRIVATE,r8), r0
-	or	r0, r5
 	mov	#SYS_futex, r3
 	extu.b	r3, r3
 	trapa	#0x14
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
index 0173cfb7d8..6c782c8a76 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 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
@@ -120,7 +120,7 @@ __pthread_cond_timedwait:
 	mov.l	@(cond_futex,r8), r0
 	add	r2, r0
 	mov.l	r0, @(cond_futex,r8)
-	mov	#(1 << nwaiters_shift), r2
+	mov	#(1 << clock_bits), r2
 	mov.l	@(cond_nwaiters,r8), r0
 	add	r2, r0
 	mov.l	r0, @(cond_nwaiters,r8)
@@ -136,7 +136,7 @@ __pthread_cond_timedwait:
 #ifdef __NR_clock_gettime
 	/* Get the clock number.	 */
 	mov.l	@(cond_nwaiters,r8), r4
-	mov	#((1 << nwaiters_shift) - 1), r0
+	mov	#((1 << clock_bits) - 1), r0
 	and	r0, r4
 	/* Only clocks 0 and 1 are allowed.  Both are handled in the
 	   kernel.  */
@@ -323,7 +323,7 @@ __pthread_cond_timedwait:
 	mov.l	r1,@(woken_seq+4,r8)
 
 24:
-	mov	#(1 << nwaiters_shift), r2
+	mov	#(1 << clock_bits), r2
 	mov.l	@(cond_nwaiters,r8),r0
 	sub	r2, r0
 	mov.l	r0,@(cond_nwaiters,r8)
@@ -335,7 +335,7 @@ __pthread_cond_timedwait:
 	not	r0, r0
 	cmp/eq	#0, r0
 	bf/s	25f
-	 mov	#((1 << nwaiters_shift) - 1), r1
+	 mov	#((1 << clock_bits) - 1), r1
 	not	r1, r1
 	mov.l	@(cond_nwaiters,r8),r0
 	tst	r1, r0
@@ -557,7 +557,7 @@ __condvar_tw_cleanup:
 	mov.l	r1,@(woken_seq+4,r8)
 
 3:
-	mov	#(1 << nwaiters_shift), r2
+	mov	#(1 << clock_bits), r2
 	mov.l	@(cond_nwaiters,r8),r0
 	sub	r2, r0
 	mov.l	r0,@(cond_nwaiters,r8)
@@ -570,7 +570,7 @@ __condvar_tw_cleanup:
 	not	r0, r0
 	cmp/eq	#0, r0
 	bf/s	4f
-	 mov	#((1 << nwaiters_shift) - 1), r1
+	 mov	#((1 << clock_bits) - 1), r1
 	not	r1, r1
 	mov.l	@(cond_nwaiters,r8),r0
 	tst	r1, r0
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
index 5eb332e484..6c59f3e6c0 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 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
@@ -107,7 +107,7 @@ __pthread_cond_wait:
 	mov.l	@(cond_futex,r8),r0
 	add	r2, r0
 	mov.l	r0,@(cond_futex,r8)
-	mov	#(1 << nwaiters_shift), r2
+	mov	#(1 << clock_bits), r2
 	mov.l	@(cond_nwaiters,r8), r0
 	add	r2, r0
 	mov.l	r0, @(cond_nwaiters,r8)
@@ -197,7 +197,7 @@ __pthread_cond_wait:
 	mov.l	r1,@(woken_seq+4,r8)
 
 16:
-	mov	#(1 << nwaiters_shift), r2
+	mov	#(1 << clock_bits), r2
 	mov.l	@(cond_nwaiters,r8),r0
 	sub	r2, r0
 	mov.l	r0,@(cond_nwaiters,r8)
@@ -209,7 +209,7 @@ __pthread_cond_wait:
 	not	r0, r0
 	cmp/eq	#0, r0
 	bf/s	17f
-	 mov	#((1 << nwaiters_shift) - 1), r1
+	 mov	#((1 << clock_bits) - 1), r1
 	not	r1, r1
 	mov.l	@(cond_nwaiters,r8),r0
 	tst	r1, r0
@@ -421,7 +421,7 @@ __condvar_w_cleanup:
 	mov.l	r1,@(woken_seq+4,r8)
 
 3:
-	mov	#(1 << nwaiters_shift), r2
+	mov	#(1 << clock_bits), r2
 	mov.l	@(cond_nwaiters,r8),r0
 	sub	r2, r0
 	mov.l	r0,@(cond_nwaiters,r8)
@@ -434,7 +434,7 @@ __condvar_w_cleanup:
 	not	r0, r0
 	cmp/eq	#0, r0
 	bf/s	4f
-	 mov	#((1 << nwaiters_shift) - 1), r1
+	 mov	#((1 << clock_bits) - 1), r1
 	not	r1, r1
 	mov.l	@(cond_nwaiters,r8),r0
 	tst	r1, r0
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
index 3d694d8376..02af56b4c7 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* 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
@@ -18,13 +18,11 @@
 
 #include <unwindbuf.h>
 #include <sysdep.h>
-#include <kernel-features.h>
 #include "lowlevel-atomic.h"
 
-#define SYS_futex		240
-#define FUTEX_WAIT		0
-#define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
+#define SYS_futex	240
+#define FUTEX_WAIT	0
+#define FUTEX_WAKE	1
 
 	.comm	__fork_generation, 4, 4
 
@@ -97,19 +95,7 @@ __pthread_once:
 	bf	3f	/* Different for generation -> run initializer.  */
 
 	/* Somebody else got here first.  Wait.  */
-#if __ASSUME_PRIVATE_FUTEX
-	mov	#(FUTEX_PRIVATE_FLAG|FUTEX_WAIT), r5
-	extu.b	r5, r5
-#else
-	stc	gbr, r1
-	mov.w	.Lpfoff, r2
-	add	r2, r1
-	mov.l	@r1, r5
-# if FUTEX_WAIT != 0
-	mov	#FUTEX_WAIT, r0
-	or	r0, r5
-# endif
-#endif
+	mov	#FUTEX_WAIT, r5
 	mov	r3, r6
 	mov	#0, r7
 	mov	#SYS_futex, r3
@@ -171,17 +157,7 @@ __pthread_once:
 	INC (@r9, r2)
 	/* Wake up all other threads.  */
 	mov	r9, r4
-#if __ASSUME_PRIVATE_FUTEX
-	mov	#(FUTEX_PRIVATE_FLAG|FUTEX_WAKE), r5
-	extu.b	r5, r5
-#else
-	stc	gbr, r1
-	mov.w	.Lpfoff, r2
-	add	r2, r1
-	mov.l	@r1, r5
-	mov	#FUTEX_WAKE, r0
-	or	r0, r5
-#endif
+	mov	#FUTEX_WAKE, r5
 	mov	#-1, r6
 	shlr	r6		/* r6 = 0x7fffffff */
 	mov	#0, r7
@@ -216,17 +192,7 @@ __pthread_once:
 	mov	#0, r7
 	mov.l	r7, @r9
 	mov	r9, r4
-#if __ASSUME_PRIVATE_FUTEX
-	mov	#(FUTEX_PRIVATE_FLAG|FUTEX_WAKE), r5
-#else
-	stc	gbr, r1
-	mov.w	.Lpfoff, r2
-	add	r2, r1
-	mov.l	@r1, r5
-	mov	#FUTEX_WAKE, r0
-	or	r0, r5
-#endif
-	extu.b	r5, r5
+	mov	#FUTEX_WAKE, r5
 	mov	#-1, r6
 	shlr	r6		/* r6 = 0x7fffffff */
 	mov	#SYS_futex, r3
@@ -242,10 +208,6 @@ __pthread_once:
 	sleep
 	cfi_endproc
 
-#if !__ASSUME_PRIVATE_FUTEX
-.Lpfoff:
-	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE
-#endif
 	.align	2
 .Lsigsetjmp:
 	.long	__sigsetjmp@PLT-(.Lsigsetjmp0-.)
@@ -262,3 +224,23 @@ __pthread_once_internal = __pthread_once
 
 	.globl	pthread_once
 pthread_once = __pthread_once
+
+
+	.type	clear_once_control,@function
+	.align	5
+clear_once_control:
+	mov	#0, r0
+	mov.l	r0, @r4
+
+	mov	#FUTEX_WAKE, r5
+	mov	#-1, r6
+	shlr	r6		/* r6 = 0x7fffffff */
+	mov	#0, r7
+	mov	#SYS_futex, r3
+	extu.b	r3, r3
+	trapa	#0x14
+	SYSCALL_INST_PAD
+
+	rts
+	 nop
+	.size	clear_once_control,.-clear_once_control
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
index f1795131f8..f64c7217c9 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* 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
@@ -20,13 +20,11 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <tcb-offsets.h>
-#include <kernel-features.h>
 #include "lowlevel-atomic.h"
 
 #define SYS_futex		240
 #define FUTEX_WAIT		0
 #define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
 
 
 	.text
@@ -57,8 +55,7 @@ __pthread_rwlock_rdlock:
 	mov.l	@(WRITERS_QUEUED,r8), r0
 	tst	r0, r0
 	bt	5f
-	mov	#FLAGS, r0
-	mov.b	@(r0,r8), r0
+	mov.l	@(FLAGS,r8), r0
 	tst	r0, r0
 	bt	5f
 3:
@@ -78,28 +75,9 @@ __pthread_rwlock_rdlock:
 	tst	r2, r2
 	bf	10f
 11:
-#if __ASSUME_PRIVATE_FUTEX
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	mov	#(FUTEX_PRIVATE_FLAG|FUTEX_WAIT), r0
-	xor	r0, r5
-	extu.b	r5, r5
-#else
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	extu.b	r5, r5
-# if FUTEX_WAIT != 0
-	mov	#FUTEX_WAIT, r0
-	or	r0, r5
-# endif
-	stc	gbr, r1
-	mov.w	.Lpfoff, r2
-	add	r2, r1
-	mov.l	@r1, r0
-	xor	r0, r5
-#endif
 	mov	r8, r4
 	add	#READERS_WAKEUP, r4
+	mov	#FUTEX_WAIT, r5
 	mov	r9, r6
 	mov	#0, r7
 	mov	#SYS_futex, r3
@@ -146,11 +124,6 @@ __pthread_rwlock_rdlock:
 	rts
 	 mov	r3, r0
 
-#if !__ASSUME_PRIVATE_FUTEX
-.Lpfoff:
-	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE
-#endif
-
 1:
 	mov	r8, r5
 #if MUTEX != 0
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
index e87326e9bd..633a14b1aa 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* 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
@@ -20,14 +20,12 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <tcb-offsets.h>
-#include <kernel-features.h>
 #include "lowlevel-atomic.h"
 
 #define SYS_gettimeofday	__NR_gettimeofday
 #define SYS_futex		240
 #define FUTEX_WAIT		0
 #define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
 
 
 	.text
@@ -61,8 +59,7 @@ pthread_rwlock_timedrdlock:
 	mov.l	@(WRITERS_QUEUED,r8), r0
 	tst	r0, r0
 	bt	5f
-	mov	#FLAGS, r0
-	mov.b	@(r0,r8), r0
+	mov.l	@(FLAGS,r8), r0
 	tst	r0, r0
 	bt	5f
 3:
@@ -120,26 +117,7 @@ pthread_rwlock_timedrdlock:
 
 	/* Futex call.  */
 	mov	r15, r7
-#if __ASSUME_PRIVATE_FUTEX
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	mov	#(FUTEX_PRIVATE_FLAG|FUTEX_WAIT), r0
-	xor	r0, r5
-	extu.b	r5, r5
-#else
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	extu.b	r5, r5
-# if FUTEX_WAIT != 0
-	mov	#FUTEX_WAIT, r0
-	or	r0, r5
-# endif
-	stc	gbr, r1
-	mov.w	.Lpfoff, r2
-	add	r2, r1
-	mov.l	@r1, r0
-	xor	r0, r5
-#endif
+	mov	#FUTEX_WAIT, r5
 	mov	r10, r6
 	mov	r8, r4
 	add	#READERS_WAKEUP, r4
@@ -198,10 +176,6 @@ pthread_rwlock_timedrdlock:
 	rts
 	 mov	r3, r0
 
-#if !__ASSUME_PRIVATE_FUTEX
-.Lpfoff:
-	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE
-#endif
 	.align	2
 .L1k0:
 	.long	1000
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
index 18641fe9df..29e29b6f65 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* 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
@@ -20,14 +20,12 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <tcb-offsets.h>
-#include <kernel-features.h>
 #include "lowlevel-atomic.h"
 
 #define SYS_gettimeofday	__NR_gettimeofday
 #define SYS_futex		240
 #define FUTEX_WAIT		0
 #define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG    128
 
 
 	.text
@@ -116,26 +114,7 @@ pthread_rwlock_timedwrlock:
 
 	/* Futex call.  */
 	mov	r15, r7
-#if __ASSUME_PRIVATE_FUTEX
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	mov	#(FUTEX_PRIVATE_FLAG|FUTEX_WAIT), r0
-	xor	r0, r5
-	extu.b	r5, r5
-#else
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	extu.b	r5, r5
-# if FUTEX_WAIT != 0
-	mov	#FUTEX_WAIT, r0
-	or	r0, r5
-# endif
-	stc	gbr, r1
-	mov.w	.Lpfoff, r2
-	add	r2, r1
-	mov.l	@r1, r0
-	xor	r0, r5
-#endif
+	mov	#FUTEX_WAIT, r5
 	mov	r10, r6
 	mov	r8, r4
 	add	#WRITERS_WAKEUP, r4
@@ -196,10 +175,6 @@ pthread_rwlock_timedwrlock:
 	rts
 	 mov	r3, r0
 
-#if !__ASSUME_PRIVATE_FUTEX
-.Lpfoff:
-	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE
-#endif
 .L1k1:
 	.word	1000
 	.align	2
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
index df4df60d7f..172689bec3 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* 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
@@ -18,13 +18,11 @@
 
 #include <sysdep.h>
 #include <lowlevelrwlock.h>
-#include <kernel-features.h>
 #include "lowlevel-atomic.h"
 
 #define SYS_futex		240
 #define FUTEX_WAIT		0
 #define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
 
 
 	.text
@@ -89,24 +87,7 @@ __pthread_rwlock_unlock:
 	bf	7f
 
 8:
-#if __ASSUME_PRIVATE_FUTEX
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	mov	#(FUTEX_PRIVATE_FLAG|FUTEX_WAKE), r0
-	xor	r0, r5
-	extu.b	r5, r5
-#else
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	extu.b	r5, r5
-	mov	#FUTEX_WAKE, r0
-	or	r0, r5
-	stc	gbr, r1
-	mov.w	.Lpfoff, r2
-	add	r2, r1
-	mov.l	@r1, r0
-	xor	r0, r5
-#endif
+	mov	#FUTEX_WAKE, r5
 	mov	#SYS_futex, r3
 	mov	#0, r7
 	extu.b	r3, r3
@@ -173,10 +154,6 @@ __pthread_rwlock_unlock:
 	bra	8b
 	 mov.l	@r15+, r4
 
-#if !__ASSUME_PRIVATE_FUTEX
-.Lpfoff:
-	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE
-#endif
 	.align	2
 .Lwait8:	
 	.long	__lll_mutex_lock_wait-.Lwait8b
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
index 13a2fda9fd..995d823e80 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* 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
@@ -20,13 +20,11 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <tcb-offsets.h>
-#include <kernel-features.h>
 #include "lowlevel-atomic.h"
 
 #define SYS_futex		240
 #define FUTEX_WAIT		0
 #define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
 
 
 	.text
@@ -76,26 +74,7 @@ __pthread_rwlock_wrlock:
 11:
 	mov	r8, r4
 	add	#WRITERS_WAKEUP, r4
-#if __ASSUME_PRIVATE_FUTEX
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	mov	#(FUTEX_PRIVATE_FLAG|FUTEX_WAIT), r0
-	xor	r0, r5
-	extu.b	r5, r5
-#else
-	mov	#PSHARED, r0
-	mov.b	@(r0,r8), r5
-	extu.b	r5, r5
-# if FUTEX_WAIT != 0
-	mov	#FUTEX_WAIT, r0
-	or	r0, r5
-# endif
-	stc	gbr, r1
-	mov.w	.Lpfoff, r2
-	add	r2, r1
-	mov.l	@r1, r0
-	xor	r0, r5
-#endif
+	mov	#FUTEX_WAIT, r5
 	mov	r9, r6
 	mov	#0, r7
 	mov	#SYS_futex, r3
@@ -173,10 +152,6 @@ __pthread_rwlock_wrlock:
 	bra	7b
 	 mov	#0, r3
 
-#if !__ASSUME_PRIVATE_FUTEX
-.Lpfoff:
-	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE
-#endif
 .Ltidoff:
 	.word	TID - TLS_PRE_TCB_SIZE
 
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
index a63233feab..9bc12da7e0 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* 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
@@ -19,7 +19,6 @@
 #include <sysdep.h>
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
-#include <structsem.h>
 #include "lowlevel-atomic.h"
 
 
@@ -35,14 +34,11 @@
 	.align	5
 __new_sem_post:
 	mov	#1, r3
-	XADD (r3, @(VALUE,r4), r2)
-	mov.l	@(NWAITERS,r4), r2
-	tst	r2, r2
-	bt	2f
+	XADD (r3, @r4, r2)
+
 	mov	#FUTEX_WAKE, r5
-	mov.l	@(PRIVATE,r4), r1
-	or	r1, r5
-	mov	#1, r6
+	mov	r2, r6
+	add	#1, r6
 	mov	#0, r7
 	mov	#SYS_futex, r3
 	extu.b	r3, r3
@@ -51,7 +47,6 @@ __new_sem_post:
 
 	cmp/pz	r0
 	bf	1f
-2:
 	rts
 	 mov	#0, r0
 
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
index e5e064b3a5..acb7d0f78b 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* 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
@@ -20,25 +20,32 @@
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
 #include <tcb-offsets.h>
-#include <structsem.h>
 #include "lowlevel-atomic.h"
 
 
 #define SYS_gettimeofday	__NR_gettimeofday
 #define SYS_futex		240
 #define FUTEX_WAIT		0
-
-#if VALUE != 0
-# error "code needs to be rewritten for VALUE != 0"
-#endif
+#define FUTEX_WAKE		1
 
 	.text
 
 	.globl	sem_timedwait
 	.type	sem_timedwait,@function
 	.align	5
+	cfi_startproc
 sem_timedwait:
-.LSTARTCODE:
+	/* First check for cancellation.  */
+	stc	gbr, r0
+	mov.w	.Lchand, r1
+	mov.l	@(r0,r1), r0
+	mov	#0xf9, r1
+	and	r1, r0
+	cmp/eq	#8, r0
+	bf	0f
+	bra	10f
+	 stc	gbr, r0
+0:
 	mov.l	@r4, r0
 2:
 	tst	r0, r0
@@ -55,17 +62,22 @@ sem_timedwait:
 1:
 	/* Check whether the timeout value is valid.  */
 	mov.l	r8, @-r15
-.Lpush_r8:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r8, 0)
 	mov.l	r9, @-r15
-.Lpush_r9:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r9, 0)
 	mov.l	r10, @-r15
-.Lpush_r10:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r10, 0)
 	mov.l	r12, @-r15
-.Lpush_r12:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r12, 0)
 	sts.l	pr, @-r15
-.Lpush_pr:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (pr, 0)
 	add	#-8, r15
-.Lalloc:
+	cfi_adjust_cfa_offset(8)
 	mov	r4, r8
 	mov	r5, r9
 
@@ -75,9 +87,13 @@ sem_timedwait:
 	cmp/hs	r1, r0
 	bt/s	6f
 	 mov	#EINVAL, r0
-	INC (@(NWAITERS,r8),r2)
-
 7:
+	mov.l	.Lenable0, r1
+	bsrf	r1
+	 nop
+.Lenable0b:
+	mov	r0, r10
+
 	/* Compute relative timeout.  */
 	mov	r15, r4
 	mov	#0, r5
@@ -108,21 +124,9 @@ sem_timedwait:
 	mov.l	r2, @r15
 	mov.l	r3, @(4,r15)
 
-.LcleanupSTART:
-	mov.l	.Lenable0, r1
-	bsrf	r1
-	 nop
-.Lenable0b:
-	mov	r0, r10
-
+	/* Futex call.  */
 	mov	r8, r4
-#if FUTEX_WAIT == 0
-	mov.l	@(PRIVATE,r8), r5
-#else
-	mov.l	@(PRIVATE,r8), r5
-	mov	#FUTEX_WAIT, r0
-	or	r0, r5
-#endif
+	mov	#FUTEX_WAIT, r5
 	mov	#0, r6
 	mov	r15, r7
 	mov	#SYS_futex, r3
@@ -136,7 +140,6 @@ sem_timedwait:
 	 mov	r0, r10
 .Ldisable0b:	
 	mov	r10, r0
-.LcleanupEND:
 
 	tst	r0, r0
 	bt	9f
@@ -155,10 +158,6 @@ sem_timedwait:
 	bf/s	8b
 	 mov	r2, r0
 
-	DEC (@(NWAITERS,r8), r2)
-	mov	#0, r0
-
-10:
 	add	#8, r15
 	lds.l	@r15+, pr
 	mov.l	@r15+, r12
@@ -166,12 +165,12 @@ sem_timedwait:
 	mov.l	@r15+, r9
 	mov.l	@r15+, r8
 	rts
-	 nop
+	 mov	#0, r0
 
 3:
 	neg	r0, r0
 6:
-	mov	r0, r10
+	mov	r0, r8
 	mova	.Lgot2, r0
 	mov.l	.Lgot2, r12
 	add	r0, r12
@@ -181,20 +180,46 @@ sem_timedwait:
 	stc	gbr, r1
 	mov.l	@(r0, r12), r0
 	add	r1, r0
-	mov.l	r10, @r0
+	mov.l	r8, @r0
 #else
 	mov.l	.Lerrloc2, r1
 	bsrf	r1
 	 nop
 .Lerrloc2b:
-	mov.l	r10, @r0
+	mov.l	r8, @r0
 #endif
-	DEC (@(NWAITERS,r8), r2)
-	bra	10b
+	add	#8, r15
+	lds.l	@r15+, pr
+	mov.l	@r15+, r12
+	mov.l	@r15+, r10
+	mov.l	@r15+, r9
+	mov.l	@r15+, r8
+	rts
 	 mov	#-1, r0
 
+10:
+	/* Canceled.  */
+	mov.w	.Lresult, r1
+	mov	#-1, r2
+	mov.l	r2, @(r0,r1)
+	mov.w	.Lchand, r0
+	or.b	#0x10, @(r0,gbr)
+	stc	gbr, r0
+	mov.w	.Lclbuf, r1
+	mov.l	.Lunwind, r2
+	braf	r2
+	 mov.l	@(r0,r1), r4
+.Lunwindb:
+	cfi_endproc
+
 .L1k:
 	.word	1000
+.Lchand:
+	.word	CANCELHANDLING - TLS_PRE_TCB_SIZE
+.Lresult:
+	.word	RESULT - TLS_PRE_TCB_SIZE
+.Lclbuf:
+	.word	CLEANUP_JMP_BUF - TLS_PRE_TCB_SIZE
 	.align	2
 .L1g:
 	.long	1000000000
@@ -211,151 +236,6 @@ sem_timedwait:
 	.long	__pthread_enable_asynccancel-.Lenable0b
 .Ldisable0:
 	.long	__pthread_disable_asynccancel-.Ldisable0b
+.Lunwind:
+	.long	HIDDEN_JUMPTARGET (__pthread_unwind)-.Lunwindb
 	.size	sem_timedwait,.-sem_timedwait
-
-	.type	sem_wait_cleanup,@function
-sem_wait_cleanup:
- 	DEC (@(NWAITERS,r8), r2)
-.LcallUR:
-	mov.l	.Lresume, r1
-#ifdef PIC
-	add	r12, r1
-#endif
-	jsr	@r1
-	 nop
-	sleep
-
-	.align	2
-.Lresume:
-#ifdef PIC
-	.long	_Unwind_Resume@GOTOFF
-#else
-	.long	_Unwind_Resume
-#endif
-.LENDCODE:
-	.size	sem_wait_cleanup,.-sem_wait_cleanup
-
-
-	.section .gcc_except_table,"a",@progbits
-.LexceptSTART:
-	.byte	0xff				! @LPStart format (omit)
-	.byte	0xff				! @TType format (omit)
-	.byte	0x01				! call-site format
-						! DW_EH_PE_uleb128
-	.uleb128 .Lcstend-.Lcstbegin
-.Lcstbegin:
-	.uleb128 .LcleanupSTART-.LSTARTCODE
-	.uleb128 .LcleanupEND-.LcleanupSTART
-	.uleb128 sem_wait_cleanup-.LSTARTCODE
-	.uleb128  0
-	.uleb128 .LcallUR-.LSTARTCODE
-	.uleb128 .LENDCODE-.LcallUR
-	.uleb128 0
-	.uleb128  0
-.Lcstend:
-
-
-	.section .eh_frame,"a",@progbits
-.LSTARTFRAME:
-	.ualong	.LENDCIE-.LSTARTCIE		! Length of the CIE.
-.LSTARTCIE:
-	.ualong	0				! CIE ID.
-	.byte	1				! Version number.
-#ifdef SHARED
-	.string	"zPLR"				! NUL-terminated augmentation
-						! string.
-#else
-	.string	"zPL"				! NUL-terminated augmentation
-						! string.
-#endif
-	.uleb128 1				! Code alignment factor.
-	.sleb128 -4				! Data alignment factor.
-	.byte	0x11				! Return address register
-						! column.
-#ifdef SHARED
-	.uleb128 7				! Augmentation value length.
-	.byte	0x9b				! Personality: DW_EH_PE_pcrel
-						! + DW_EH_PE_sdata4
-						! + DW_EH_PE_indirect
-	.ualong	DW.ref.__gcc_personality_v0-.
-	.byte	0x1b				! LSDA Encoding: DW_EH_PE_pcrel
-						! + DW_EH_PE_sdata4.
-	.byte	0x1b				! FDE Encoding: DW_EH_PE_pcrel
-						! + DW_EH_PE_sdata4.
-#else
-	.uleb128 6				! Augmentation value length.
-	.byte	0x0				! Personality: absolute
-	.ualong	__gcc_personality_v0
-	.byte	0x0				! LSDA Encoding: absolute
-#endif
-	.byte 0x0c				! DW_CFA_def_cfa
-	.uleb128 0xf
-	.uleb128 0
-	.align 4
-.LENDCIE:
-
-	.ualong	.LENDFDE-.LSTARTFDE		! Length of the FDE.
-.LSTARTFDE:
-	.ualong	.LSTARTFDE-.LSTARTFRAME		! CIE pointer.
-#ifdef SHARED
-	.ualong	.LSTARTCODE-.			! PC-relative start address
-						! of the code.
-#else
-	.ualong	.LSTARTCODE			! Start address of the code.
-#endif
-	.ualong	.LENDCODE-.LSTARTCODE		! Length of the code.
-	.uleb128 4				! Augmentation size
-#ifdef SHARED
-	.ualong	.LexceptSTART-.
-#else
-	.ualong	.LexceptSTART
-#endif
-
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_r8-.LSTARTCODE
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 4
-	.byte   0x88				! DW_CFA_offset r8
-        .uleb128 1
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_r9-.Lpush_r8
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte   0x89				! DW_CFA_offset r9
-        .uleb128 2
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_r10-.Lpush_r9
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte   0x8a				! DW_CFA_offset r10
-        .uleb128 3
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_r12-.Lpush_r10
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte   0x8c				! DW_CFA_offset r12
-        .uleb128 4
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_pr-.Lpush_r12
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 20
-	.byte	0x91				! DW_CFA_offset pr
-	.uleb128 5
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lalloc-.Lpush_pr
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 28
-	.align	4
-.LENDFDE:
-
-
-#ifdef SHARED
-	.hidden	DW.ref.__gcc_personality_v0
-	.weak	DW.ref.__gcc_personality_v0
-	.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
-	.align	4
-	.type	DW.ref.__gcc_personality_v0, @object
-	.size	DW.ref.__gcc_personality_v0, 4
-DW.ref.__gcc_personality_v0:
-	.long	__gcc_personality_v0
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S
index 85ce909259..9ceb8f1c24 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S
@@ -20,35 +20,44 @@
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
 #include <tcb-offsets.h>
-#include <structsem.h>
 #include "lowlevel-atomic.h"
 
 
 #define SYS_gettimeofday	__NR_gettimeofday
 #define SYS_futex		240
 #define FUTEX_WAIT		0
-
-#if VALUE != 0
-# error "code needs to be rewritten for VALUE != 0"
-#endif
+#define FUTEX_WAKE		1
 
 	.text
 
 	.globl	__new_sem_wait
 	.type	__new_sem_wait,@function
 	.align	5
+	cfi_startproc
 __new_sem_wait:
-.LSTARTCODE:
+	/* First check for cancellation.  */
+	stc	gbr, r0
+	mov.w	.Lchand, r1
+	mov.l	@(r0,r1), r0
+	mov	#0xf9, r1
+	and	r1, r0
+	cmp/eq	#8, r0
+	bt	5f
+
 	mov.l	r8, @-r15
-.Lpush_r8:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r8, 0)
 	mov.l	r10, @-r15
-.Lpush_r10:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r10, 0)
 	mov.l	r12, @-r15
-.Lpush_r12:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (r12, 0)
 	sts.l	pr, @-r15
-.Lpush_pr:
+	cfi_adjust_cfa_offset(4)
+	cfi_rel_offset (pr, 0)
 	mov	r4, r8
-
+3:
 	mov.l	@r8, r0
 2:
 	tst	r0, r0
@@ -59,21 +68,10 @@ __new_sem_wait:
 	CMPXCHG (r4, @r8, r3, r2)
 	bf/s	2b
 	 mov	r2, r0
-7:
-	mov	#0, r0
-9:
-	lds.l	@r15+, pr
-	mov.l	@r15+, r12
-	mov.l	@r15+, r10
-	rts
-	 mov.l	@r15+, r8
+	bra	9f
+	 mov	#0, r0
 
-.Lafter_ret:
 1:
-	INC (@(NWAITERS,r8),r2)
-	
-.LcleanupSTART:
-6:
 	mov.l	.Lenable0, r1
 	bsrf	r1
 	 nop
@@ -81,13 +79,7 @@ __new_sem_wait:
 	mov	r0, r10
 
 	mov	r8, r4
-#if FUTEX_WAIT == 0
-	mov.l	@(PRIVATE,r8), r5
-#else
-	mov.l	@(PRIVATE,r8), r5
-	mov	#FUTEX_WAIT, r0
-	or	r0, r5
-#endif
+	mov	#FUTEX_WAIT, r5
 	mov	#0, r6
 	mov	#0, r7
 	mov	#SYS_futex, r3
@@ -101,35 +93,14 @@ __new_sem_wait:
 	 mov	r0, r10
 .Ldisable0b:	
 	mov	r10, r0
-.LcleanupEND:
 
 	tst	r0, r0
-	bt	3f
+	bt	3b
 	cmp/eq	#-EWOULDBLOCK, r0
-	bf	4f
-
-3:
-	mov.l	@r8, r0
-5:
-	tst	r0, r0
-	bt	6b
-
-	mov	r0, r3
-	mov	r0, r4
-	add	#-1, r3
-	CMPXCHG (r4, @r8, r3, r2)
-	bf/s	5b
-	 mov	r2, r0
-
-	DEC (@(NWAITERS,r8), r2)
-	bra	7b
-	 nop
-
-4:
+	bt	3b
 	neg	r0, r0
-	mov	r0, r4
-	DEC (@(NWAITERS,r8), r2)
-	mov	r4, r8
+
+	mov	r0, r8
 	mova	.Lgot0, r0
 	mov.l	.Lgot0, r12
 	add	r0, r12
@@ -147,9 +118,36 @@ __new_sem_wait:
 .Lerrloc0b:
 	mov.l	r8, @r0
 #endif
-	bra	9b
-	 mov	#-1, r0
-
+	mov	#-1, r0
+9:
+	lds.l	@r15+, pr
+	mov.l	@r15+, r12
+	mov.l	@r15+, r10
+	rts
+	 mov.l	@r15+, r8
+5:
+	/* Canceled.  */
+	stc	gbr, r0
+	mov.w	.Lresult, r1
+	mov	#-1, r2
+	mov.l	r2, @(r0,r1)
+	mov.w	.Lchand, r0
+	or.b	#0x10, @(r0,gbr)
+	stc	gbr, r0
+	mov.w	.Lclbuf, r1
+	mov.l	.Lunwind, r2
+	braf	r2
+	 mov.l	@(r0,r1), r4
+.Lunwindb:
+	cfi_endproc
+
+.Lchand:
+	.word	CANCELHANDLING - TLS_PRE_TCB_SIZE
+.Lresult:
+	.word	RESULT - TLS_PRE_TCB_SIZE
+.Lclbuf:
+	.word	CLEANUP_JMP_BUF - TLS_PRE_TCB_SIZE
+	.align	2
 .Lgot0:
 	.long	_GLOBAL_OFFSET_TABLE_
 #if USE___THREAD
@@ -163,143 +161,7 @@ __new_sem_wait:
 	.long	__pthread_enable_asynccancel-.Lenable0b
 .Ldisable0:
 	.long	__pthread_disable_asynccancel-.Ldisable0b
+.Lunwind:
+	.long	HIDDEN_JUMPTARGET (__pthread_unwind)-.Lunwindb
 	.size	__new_sem_wait,.-__new_sem_wait
 	versioned_symbol(libpthread, __new_sem_wait, sem_wait, GLIBC_2_1)
-
-
-	.type	sem_wait_cleanup,@function
-sem_wait_cleanup:
- 	DEC (@(NWAITERS,r8), r2)
-.LcallUR:
-	mov.l	.Lresume, r1
-#ifdef PIC
-	add	r12, r1
-#endif
-	jsr	@r1
-	 nop
-	sleep
-
-	.align	2
-.Lresume:
-#ifdef PIC
-	.long	_Unwind_Resume@GOTOFF
-#else
-	.long	_Unwind_Resume
-#endif
-.LENDCODE:
-	.size	sem_wait_cleanup,.-sem_wait_cleanup
-
-
-	.section .gcc_except_table,"a",@progbits
-.LexceptSTART:
-	.byte	0xff				! @LPStart format (omit)
-	.byte	0xff				! @TType format (omit)
-	.byte	0x01				! call-site format
-						! DW_EH_PE_uleb128
-	.uleb128 .Lcstend-.Lcstbegin
-.Lcstbegin:
-	.uleb128 .LcleanupSTART-.LSTARTCODE
-	.uleb128 .LcleanupEND-.LcleanupSTART
-	.uleb128 sem_wait_cleanup-.LSTARTCODE
-	.uleb128  0
-	.uleb128 .LcallUR-.LSTARTCODE
-	.uleb128 .LENDCODE-.LcallUR
-	.uleb128 0
-	.uleb128  0
-.Lcstend:
-
-
-	.section .eh_frame,"a",@progbits
-.LSTARTFRAME:
-	.ualong	.LENDCIE-.LSTARTCIE		! Length of the CIE.
-.LSTARTCIE:
-	.ualong	0				! CIE ID.
-	.byte	1				! Version number.
-#ifdef SHARED
-	.string	"zPLR"				! NUL-terminated augmentation
-						! string.
-#else
-	.string	"zPL"				! NUL-terminated augmentation
-						! string.
-#endif
-	.uleb128 1				! Code alignment factor.
-	.sleb128 -4				! Data alignment factor.
-	.byte	0x11				! Return address register
-						! column.
-#ifdef SHARED
-	.uleb128 7				! Augmentation value length.
-	.byte	0x9b				! Personality: DW_EH_PE_pcrel
-						! + DW_EH_PE_sdata4
-						! + DW_EH_PE_indirect
-	.ualong	DW.ref.__gcc_personality_v0-.
-	.byte	0x1b				! LSDA Encoding: DW_EH_PE_pcrel
-						! + DW_EH_PE_sdata4.
-	.byte	0x1b				! FDE Encoding: DW_EH_PE_pcrel
-						! + DW_EH_PE_sdata4.
-#else
-	.uleb128 6				! Augmentation value length.
-	.byte	0x0				! Personality: absolute
-	.ualong	__gcc_personality_v0
-	.byte	0x0				! LSDA Encoding: absolute
-#endif
-	.byte 0x0c				! DW_CFA_def_cfa
-	.uleb128 0xf
-	.uleb128 0
-	.align 4
-.LENDCIE:
-
-	.ualong	.LENDFDE-.LSTARTFDE		! Length of the FDE.
-.LSTARTFDE:
-	.ualong	.LSTARTFDE-.LSTARTFRAME		! CIE pointer.
-#ifdef SHARED
-	.ualong	.LSTARTCODE-.			! PC-relative start address
-						! of the code.
-#else
-	.ualong	.LSTARTCODE			! Start address of the code.
-#endif
-	.ualong	.LENDCODE-.LSTARTCODE		! Length of the code.
-	.uleb128 4				! Augmentation size
-#ifdef SHARED
-	.ualong	.LexceptSTART-.
-#else
-	.ualong	.LexceptSTART
-#endif
-
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_r8-.LSTARTCODE
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 4
-	.byte   0x88				! DW_CFA_offset r8
-        .uleb128 1
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_r10-.Lpush_r8
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte   0x8a				! DW_CFA_offset r10
-        .uleb128 2
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_r12-.Lpush_r10
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 12
-	.byte   0x8c				! DW_CFA_offset r12
-        .uleb128 3
-	.byte	4				! DW_CFA_advance_loc4
-	.ualong	.Lpush_pr-.Lpush_r12
-	.byte	14				! DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte   0x91				! DW_CFA_offset pr
-        .uleb128 4
-	.align	4
-.LENDFDE:
-
-
-#ifdef SHARED
-	.hidden	DW.ref.__gcc_personality_v0
-	.weak	DW.ref.__gcc_personality_v0
-	.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
-	.align	4
-	.type	DW.ref.__gcc_personality_v0, @object
-	.size	DW.ref.__gcc_personality_v0, 4
-DW.ref.__gcc_personality_v0:
-	.long	__gcc_personality_v0
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
index 6548970663..5013922a2f 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -240,6 +240,8 @@ __lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
 /* Type for lock object.  */
 typedef int lll_lock_t;
 
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
 /* Initializers for lock.  */
 #define LLL_LOCK_INITIALIZER		(0)
 #define LLL_LOCK_INITIALIZER_LOCKED	(1)
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c
index 83fedef8e8..3b07cc127d 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -30,7 +30,7 @@ clear_once_control (void *arg)
   pthread_once_t *once_control = (pthread_once_t *) arg;
 
   *once_control = 0;
-  lll_private_futex_wake (once_control, INT_MAX);
+  lll_futex_wake (once_control, INT_MAX);
 }
 
 
@@ -84,7 +84,7 @@ __pthread_once (once_control, init_routine)
       atomic_increment (once_control);
 
       /* Wake up all other threads.  */
-      lll_private_futex_wake (once_control, INT_MAX);
+      lll_futex_wake (once_control, INT_MAX);
       break;
     }
 
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
index cb9578b47b..a7611d6a88 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
@@ -1,5 +1,5 @@
 /* low level locking for pthread library.  SPARC version.
-   Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
 
@@ -76,9 +76,21 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime)
 }
 
 
-/* This function doesn't get included in libc.so  */
+/* These don't get included in libc.so  */
 #ifdef IS_IN_libpthread
 int
+lll_unlock_wake_cb (int *futex)
+{
+  int val = atomic_exchange_24_rel (futex, 0);
+
+  if (__builtin_expect (val > 1, 0))
+    lll_futex_wake (futex, 1);
+
+  return 0;
+}
+
+
+int
 __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
 {
   int tid;
@@ -115,4 +127,5 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
 
   return 0;
 }
+
 #endif
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
index 868e0d2819..4dfd11dcbe 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -52,9 +52,7 @@ pthread_barrier_wait (barrier)
       ++ibarrier->b.curr_event;
 
       /* Wake up everybody.  */
-      lll_futex_wake (&ibarrier->b.curr_event, INT_MAX,
-		      // XYZ check mutex flag
-		      LLL_SHARED);
+      lll_futex_wake (&ibarrier->b.curr_event, INT_MAX);
 
       /* This is the thread which finished the serialization.  */
       result = PTHREAD_BARRIER_SERIAL_THREAD;
@@ -70,9 +68,7 @@ pthread_barrier_wait (barrier)
 
       /* Wait for the event counter of the barrier to change.  */
       do
-	lll_futex_wait (&ibarrier->b.curr_event, event,
-			// XYZ check mutex flag
-			LLL_SHARED);
+	lll_futex_wait (&ibarrier->b.curr_event, event);
       while (event == ibarrier->b.curr_event);
     }
 
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c
index 527aedfdc7..be1cc60b11 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c
@@ -1,5 +1,5 @@
 /* sem_post -- post to a POSIX semaphore.  SPARC version.
-   Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
@@ -39,9 +39,7 @@ __new_sem_post (sem_t *sem)
       nr = ++*futex;
       __sparc32_atomic_do_unlock24 (futex + 1);
     }
-  int err = lll_futex_wake (futex, nr,
-			    // XYZ check mutex flag
-			    LLL_SHARED);
+  int err = lll_futex_wake (futex, nr);
   if (__builtin_expect (err, 0) < 0)
     {
       __set_errno (-err);
diff --git a/nptl/sysdeps/unix/sysv/linux/structsem.sym b/nptl/sysdeps/unix/sysv/linux/structsem.sym
deleted file mode 100644
index 4f32c68da5..0000000000
--- a/nptl/sysdeps/unix/sysv/linux/structsem.sym
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stddef.h>
-#include <sched.h>
-#include <bits/pthreadtypes.h>
-#include "internaltypes.h"
-
---
-
-VALUE		offsetof (struct new_sem, value)
-PRIVATE		offsetof (struct new_sem, private)
-NWAITERS	offsetof (struct new_sem, nwaiters)
diff --git a/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c b/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
index 240ce597f9..964f5b7094 100644
--- a/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
+++ b/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -104,7 +104,7 @@ __unregister_atfork (dso_handle)
       atomic_decrement (&deleted->handler->refcntr);
       unsigned int val;
       while ((val = deleted->handler->refcntr) != 0)
-	lll_private_futex_wait (&deleted->handler->refcntr, val);
+	lll_futex_wait (&deleted->handler->refcntr, val);
 
       deleted = deleted->next;
     }
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
index 7a09c81194..693387a266 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -159,9 +159,9 @@ typedef union
     unsigned int __nr_readers_queued;
     unsigned int __nr_writers_queued;
     int __writer;
-    int __shared;
-    unsigned long int __pad1;
+    int __pad1;
     unsigned long int __pad2;
+    unsigned long int __pad3;
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
     unsigned int __flags;
@@ -177,10 +177,7 @@ typedef union
     unsigned int __nr_writers_queued;
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
-    unsigned char __flags;
-    unsigned char __shared;
-    unsigned char __pad1;
-    unsigned char __pad2;
+    unsigned int __flags;
     int __writer;
   } __data;
 # endif
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S
index 3265eee0ed..3621efa4fc 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -17,19 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <kernel-features.h>
-
-/* All locks in libc are private.  Use the kernel feature if possible.  */
-#define FUTEX_PRIVATE_FLAG	128
-#ifdef __ASSUME_PRIVATE_FUTEX
-# define FUTEX_WAIT		(0 | FUTEX_PRIVATE_FLAG)
-# define FUTEX_WAKE		(1 | FUTEX_PRIVATE_FLAG)
-#else
-# define LOAD_FUTEX_WAIT(reg) \
-	movl	%fs:PRIVATE_FUTEX, reg
-# define LOAD_FUTEX_WAKE(reg) \
-	movl	%fs:PRIVATE_FUTEX, reg ; \
-	orl	$FUTEX_WAKE, reg
+/* In libc.so we do not unconditionally use the lock prefix.  Only if
+   the application is using threads.  */
+#ifndef UP
+# define LOCK \
+	cmpl	$0, __libc_multiple_threads(%rip); 			      \
+	je	0f;							      \
+	lock;								      \
+0:
 #endif
 
 #include "lowlevellock.S"
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index 502f1d442f..6724ded762 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -31,23 +31,8 @@
 #endif
 
 #define SYS_futex		202
-#ifndef FUTEX_WAIT
-# define FUTEX_WAIT		0
-# define FUTEX_WAKE		1
-#endif
-
-#ifndef LOAD_FUTEX_WAIT
-# if FUTEX_WAIT == 0
-#  define LOAD_FUTEX_WAIT(reg) \
-	xorl	reg, reg
-# else
-#  define LOAD_FUTEX_WAIT(reg) \
-	movl	$FUTEX_WAIT, reg
-# endif
-# define LOAD_FUTEX_WAKE(reg) \
-	movl	$FUTEX_WAKE, reg
-#endif
-
+#define FUTEX_WAIT		0
+#define FUTEX_WAKE		1
 
 /* For the calculation see asm/vsyscall.h.  */
 #define VSYSCALL_ADDR_vgettimeofday	0xffffffffff600000
@@ -67,7 +52,11 @@ __lll_mutex_lock_wait:
 	cfi_offset(%rdx, -24)
 	xorq	%r10, %r10	/* No timeout.  */
 	movl	$2, %edx
-	LOAD_FUTEX_WAIT (%esi)
+#if FUTEX_WAIT == 0
+	xorl	%esi, %esi
+#else
+	movl	$FUTEX_WAIT, %esi
+#endif
 
 	cmpl	%edx, %eax	/* NB:	 %edx == 2 */
 	jne	2f
@@ -162,7 +151,11 @@ __lll_mutex_timedlock_wait:
 	je	8f
 
 	movq	%rsp, %r10
-	LOAD_FUTEX_WAIT (%esi)
+#if FUTEX_WAIT == 0
+	xorl	%esi, %esi
+#else
+	movl	$FUTEX_WAIT, %esi
+#endif
 	movq	%r12, %rdi
 	movl	$SYS_futex, %eax
 	syscall
@@ -220,6 +213,26 @@ __lll_mutex_timedlock_wait:
 #endif
 
 
+#ifdef NOT_IN_libc
+	.globl	lll_unlock_wake_cb
+	.type	lll_unlock_wake_cb,@function
+	.hidden	lll_unlock_wake_cb
+	.align	16
+lll_unlock_wake_cb:
+	pushq	%rsi
+	pushq	%rdx
+
+	LOCK
+	addl	$1, (%rdi)
+	jng	1f
+
+	popq	%rdx
+	popq	%rsi
+	retq
+	.size	lll_unlock_wake_cb,.-lll_unlock_wake_cb
+#endif
+
+
 	.globl	__lll_mutex_unlock_wake
 	.type	__lll_mutex_unlock_wake,@function
 	.hidden	__lll_mutex_unlock_wake
@@ -234,7 +247,7 @@ __lll_mutex_unlock_wake:
 	cfi_offset(%rdx, -24)
 
 	movl	$0, (%rdi)
-	LOAD_FUTEX_WAKE (%esi)
+	movl	$FUTEX_WAKE, %esi
 	movl	$1, %edx	/* Wake one thread.  */
 	movl	$SYS_futex, %eax
 	syscall
@@ -298,8 +311,6 @@ __lll_timedwait_tid:
 	jz	4f
 
 	movq	%rsp, %r10
-	/* XXX The kernel so far uses global futex for the wakeup at
-	   all times.  */
 #if FUTEX_WAIT == 0
 	xorl	%esi, %esi
 #else
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index b86d95e93d..bb988f3b2b 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -23,8 +23,6 @@
 #include <time.h>
 #include <sys/param.h>
 #include <bits/pthreadtypes.h>
-#include <kernel-features.h>
-#include <tcb-offsets.h>
 
 #ifndef LOCK_INSTR
 # ifdef UP
@@ -41,14 +39,6 @@
 #define FUTEX_LOCK_PI		6
 #define FUTEX_UNLOCK_PI		7
 #define FUTEX_TRYLOCK_PI	8
-#define FUTEX_PRIVATE_FLAG	128
-
-
-/* Values for 'private' parameter of locking macros.  Yes, the
-   definition seems to be backwards.  But it is not.  The bit will be
-   reversed before passing to the system call.  */
-#define LLL_PRIVATE	0
-#define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 
 /* Initializer for compatibility lock.  */
@@ -158,97 +148,44 @@ LLL_STUB_UNWIND_INFO_START					\
 LLL_STUB_UNWIND_INFO_END
 
 
-#define lll_futex_wait(futex, val, private) \
-  lll_futex_timed_wait(futex, val, NULL, private)
-
-
-#define lll_futex_timed_wait(futex, val, timeout, private) \
+#define lll_futex_wait(futex, val) \
   ({									      \
-    register const struct timespec *__to __asm ("r10") = timeout;	      \
     int __status;							      \
     register __typeof (val) _val __asm ("edx") = (val);			      \
-    __asm __volatile ("syscall"						      \
+    __asm __volatile ("xorq %%r10, %%r10\n\t"				      \
+		      "syscall"						      \
 		      : "=a" (__status)					      \
 		      : "0" (SYS_futex), "D" (futex), "S" (FUTEX_WAIT),	      \
-		        "d" (_val), "r" (__to)				      \
-		      : "memory", "cc", "r11", "cx");			      \
+			"d" (_val)					      \
+		      : "memory", "cc", "r10", "r11", "cx");		      \
     __status;								      \
   })
 
 
-#define lll_futex_wake(futex, nr, private) \
-  do {									      \
-    int __ignore;							      \
-    register __typeof (nr) _nr __asm ("edx") = (nr);			      \
-    __asm __volatile ("syscall"						      \
-		      : "=a" (__ignore)					      \
-		      : "0" (SYS_futex), "D" (futex), "S" (FUTEX_WAKE),	      \
-			"d" (_nr)					      \
-		      : "memory", "cc", "r10", "r11", "cx");		      \
-  } while (0)
-
-
-#define lll_private_futex_wait(futex, val) \
-  lll_private_futex_timed_wait (futex, val, NULL)
-
-
-#ifdef __ASSUME_PRIVATE_FUTEX
-# define lll_private_futex_timed_wait(futex, val, timeout) \
+#define lll_futex_timed_wait(futex, val, timeout)			      \
   ({									      \
     register const struct timespec *__to __asm ("r10") = timeout;	      \
     int __status;							      \
     register __typeof (val) _val __asm ("edx") = (val);			      \
     __asm __volatile ("syscall"						      \
 		      : "=a" (__status)					      \
-		      : "0" (SYS_futex), "D" (futex),			      \
-			"S" (FUTEX_WAIT | FUTEX_PRIVATE_FLAG),		      \
+		      : "0" (SYS_futex), "D" (futex), "S" (FUTEX_WAIT),	      \
 		        "d" (_val), "r" (__to)				      \
 		      : "memory", "cc", "r11", "cx");			      \
     __status;								      \
   })
 
 
-# define lll_private_futex_wake(futex, nr) \
+#define lll_futex_wake(futex, nr) \
   do {									      \
     int __ignore;							      \
     register __typeof (nr) _nr __asm ("edx") = (nr);			      \
     __asm __volatile ("syscall"						      \
 		      : "=a" (__ignore)					      \
-		      : "0" (SYS_futex), "D" (futex),			      \
-			"S" (FUTEX_WAKE | FUTEX_PRIVATE_FLAG),		      \
+		      : "0" (SYS_futex), "D" (futex), "S" (FUTEX_WAKE),	      \
 			"d" (_nr)					      \
 		      : "memory", "cc", "r10", "r11", "cx");		      \
   } while (0)
-#else
-# define lll_private_futex_timed_wait(futex, val, timeout) \
-  ({									      \
-    register const struct timespec *__to __asm ("r10") = timeout;	      \
-    int __status;							      \
-    int __ignore;							      \
-    register __typeof (val) _val __asm ("edx") = (val);			      \
-    __asm __volatile ("movl %%fs:%P3, %%esi\n\t"			      \
-		      "syscall"						      \
-		      : "=a" (__status), "=S" (__ignore)		      \
-		      : "0" (SYS_futex), "i" (PRIVATE_FUTEX), "D" (futex),    \
-		        "d" (_val), "r" (__to)				      \
-		      : "memory", "cc", "r11", "cx");			      \
-    __status;								      \
-  })
-
-
-# define lll_private_futex_wake(futex, nr) \
-  do {									      \
-    int __ignore;							      \
-    int __ignore2;							      \
-    register __typeof (nr) _nr __asm ("edx") = (nr);			      \
-    __asm __volatile ("orl %%fs:%P3, %%esi\n\t"				      \
-		      "syscall"						      \
-		      : "=a" (__ignore), "=S" (__ignore2)		      \
-		      : "0" (SYS_futex), "i" (PRIVATE_FUTEX), "D" (futex),    \
-			"1" (FUTEX_WAKE), "d" (_nr)			      \
-		      : "memory", "cc", "r10", "r11", "cx");		      \
-  } while (0)
-#endif
 
 
 /* Does not preserve %eax and %ecx.  */
@@ -517,6 +454,9 @@ typedef int lll_lock_t;
 #define LLL_LOCK_INITIALIZER_LOCKED	(1)
 
 
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
+
 /* The states of a lock are:
     0  -  untaken
     1  -  taken by one user
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
index 63771b3840..fa8125dd87 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -65,10 +65,9 @@ pthread_barrier_wait:
 	   if the CURR_EVENT memory has meanwhile been changed.  */
 7:
 #if FUTEX_WAIT == 0
-	movl	PRIVATE(%rdi), %esi
+	xorl	%esi, %esi
 #else
 	movl	$FUTEX_WAIT, %esi
-	orl	PRIVATE(%rdi), %esi
 #endif
 	xorq	%r10, %r10
 8:	movl	$SYS_futex, %eax
@@ -117,7 +116,6 @@ pthread_barrier_wait:
 	   so 0x7fffffff is the highest value.  */
 	movl	$0x7fffffff, %edx
 	movl	$FUTEX_WAKE, %esi
-	orl	PRIVATE(%rdi), %esi
 	movl	$SYS_futex, %eax
 	syscall
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index 2afd601b8c..ad3ae1e76e 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -111,7 +111,7 @@ __pthread_cond_timedwait:
 	movq	8(%rsp), %rdi
 	incq	total_seq(%rdi)
 	incl	cond_futex(%rdi)
-	addl	$(1 << nwaiters_shift), cond_nwaiters(%rdi)
+	addl	$(1 << clock_bits), cond_nwaiters(%rdi)
 
 	/* Install cancellation handler.  */
 #ifdef PIC
@@ -137,7 +137,7 @@ __pthread_cond_timedwait:
 	   structure stores the number minus 1.  */
 	movq	8(%rsp), %rdi
 	movl	cond_nwaiters(%rdi), %edi
-	andl	$((1 << nwaiters_shift) - 1), %edi
+	andl	$((1 << clock_bits) - 1), %edi
 	/* Only clocks 0 and 1 are allowed so far.  Both are handled in the
 	   kernel.  */
 	leaq	24(%rsp), %rsi
@@ -250,13 +250,13 @@ __pthread_cond_timedwait:
 9:	xorq	%r14, %r14
 14:	incq	woken_seq(%rdi)
 
-24:	subl	$(1 << nwaiters_shift), cond_nwaiters(%rdi)
+24:	subl	$(1 << clock_bits), cond_nwaiters(%rdi)
 
 	/* Wake up a thread which wants to destroy the condvar object.  */
 	cmpq	$0xffffffffffffffff, total_seq(%rdi)
 	jne	25f
 	movl	cond_nwaiters(%rdi), %eax
-	andl	$~((1 << nwaiters_shift) - 1), %eax
+	andl	$~((1 << clock_bits) - 1), %eax
 	jne	25f
 
 	addq	$cond_nwaiters, %rdi
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
index aaad22e020..969e80da2a 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -77,14 +77,14 @@ __condvar_cleanup:
 	incl	cond_futex(%rdi)
 6:	incq	woken_seq(%rdi)
 
-3:	subl	$(1 << nwaiters_shift), cond_nwaiters(%rdi)
+3:	subl	$(1 << clock_bits), cond_nwaiters(%rdi)
 
 	/* Wake up a thread which wants to destroy the condvar object.  */
 	xorq	%r12, %r12
 	cmpq	$0xffffffffffffffff, total_seq(%rdi)
 	jne	4f
 	movl	cond_nwaiters(%rdi), %eax
-	andl	$~((1 << nwaiters_shift) - 1), %eax
+	andl	$~((1 << clock_bits) - 1), %eax
 	jne	4f
 
 	addq	$cond_nwaiters, %rdi
@@ -185,7 +185,7 @@ __pthread_cond_wait:
 	movq	8(%rsp), %rdi
 	incq	total_seq(%rdi)
 	incl	cond_futex(%rdi)
-	addl	$(1 << nwaiters_shift), cond_nwaiters(%rdi)
+	addl	$(1 << clock_bits), cond_nwaiters(%rdi)
 
 	/* Install cancellation handler.  */
 #ifdef PIC
@@ -262,13 +262,13 @@ __pthread_cond_wait:
 	incq	woken_seq(%rdi)
 
 	/* Unlock */
-16:	subl	$(1 << nwaiters_shift), cond_nwaiters(%rdi)
+16:	subl	$(1 << clock_bits), cond_nwaiters(%rdi)
 
 	/* Wake up a thread which wants to destroy the condvar object.  */
 	cmpq	$0xffffffffffffffff, total_seq(%rdi)
 	jne	17f
 	movl	cond_nwaiters(%rdi), %eax
-	andl	$~((1 << nwaiters_shift) - 1), %eax
+	andl	$~((1 << clock_bits) - 1), %eax
 	jne	17f
 
 	addq	$cond_nwaiters, %rdi
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S
index 7740c599d1..9db5516913 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -17,19 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <kernel-features.h>
-#include <tcb-offsets.h>
-
 #ifndef UP
 # define LOCK lock
 #else
 # define LOCK
 #endif
 
-#define SYS_futex		202
-#define FUTEX_WAIT		0
-#define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
+#define SYS_futex	202
+#define FUTEX_WAKE	1
 
 	.comm	__fork_generation, 4, 4
 
@@ -79,15 +74,10 @@ __pthread_once:
 	jnz	3f	/* Different for generation -> run initializer.  */
 
 	/* Somebody else got here first.  Wait.  */
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_WAIT|FUTEX_PRIVATE_FLAG, %esi
+#if FUTEX_WAIT == 0
+	xorl	%esi, %esi
 #else
-# if FUTEX_WAIT == 0
-	movl	%fs:PRIVATE_FUTEX, %esi
-# else
 	movl	$FUTEX_WAIT, %esi
-	orl	%fs:PRIVATE_FUTEX, %esi
-# endif
 #endif
 	movl	$SYS_futex, %eax
 	syscall
@@ -116,12 +106,7 @@ __pthread_once:
 
 	/* Wake up all other threads.  */
 	movl	$0x7fffffff, %edx
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_WAKE|FUTEX_PRIVATE_FLAG, %esi
-#else
 	movl	$FUTEX_WAKE, %esi
-	orl	%fs:PRIVATE_FUTEX, %esi
-#endif
 	movl	$SYS_futex, %eax
 	syscall
 
@@ -148,12 +133,7 @@ clear_once_control:
 	movl	$0, (%rdi)
 
 	movl	$0x7fffffff, %edx
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_WAKE|FUTEX_PRIVATE_FLAG, %esi
-#else
 	movl	$FUTEX_WAKE, %esi
-	orl	%fs:PRIVATE_FUTEX, %esi
-#endif
 	movl	$SYS_futex, %eax
 	syscall
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
index da98ab3d49..5e9d8fb1d6 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -20,13 +20,11 @@
 #include <sysdep.h>
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
-#include <kernel-features.h>
 
 
 #define SYS_futex		202
 #define FUTEX_WAIT		0
 #define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
 
 #ifndef UP
 # define LOCK lock
@@ -75,20 +73,12 @@ __pthread_rwlock_rdlock:
 #endif
 	jne	10f
 
-11:
-#if __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %esi
-	xorl	PSHARED(%rdi), %esi
+11:	addq	$READERS_WAKEUP, %rdi
+#if FUTEX_WAIT == 0
+	xorl	%esi, %esi
 #else
-# if FUTEX_WAIT == 0
-	movl	PSHARED(%rdi), %esi
-# else
 	movl	$FUTEX_WAIT, %esi
-	orl	PSHARED(%rdi), %esi
-# endif
-	xorl	%fs:PRIVATE_FUTEX, %esi
 #endif
-	addq	$READERS_WAKEUP, %rdi
 	movl	$SYS_futex, %eax
 	syscall
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
index 19ad27aab8..b44660418a 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -112,17 +112,10 @@ pthread_rwlock_timedrdlock:
 	movq	%rcx, (%rsp)	/* Store relative timeout.  */
 	movq	%rdi, 8(%rsp)
 
-#if __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %esi
-	xorl	PSHARED(%rdi), %esi
+#if FUTEX_WAIT == 0
+	xorl	%esi, %esi
 #else
-# if FUTEX_WAIT == 0
-	movl	PSHARED(%r12), %esi
-# else
 	movl	$FUTEX_WAIT, %esi
-	orl	PSHARED(%r12), %esi
-# endif
-	xorl	%fs:PRIVATE_FUTEX, %esi
 #endif
 	movq	%rsp, %r10
 	movl	%r14d, %edx
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
index 4c3e7413a8..525e5b6b93 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -108,17 +108,10 @@ pthread_rwlock_timedwrlock:
 	movq	%rcx, (%rsp)	/* Store relative timeout.  */
 	movq	%rdi, 8(%rsp)
 
-#if __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %esi
-	xorl	PSHARED(%rdi), %esi
+#if FUTEX_WAIT == 0
+	xorl	%esi, %esi
 #else
-# if FUTEX_WAIT == 0
-	movl	PSHARED(%r12), %esi
-# else
 	movl	$FUTEX_WAIT, %esi
-	orl	PSHARED(%r12), %esi
-# endif
-	xorl	%fs:PRIVATE_FUTEX, %esi
 #endif
 	movq	%rsp, %r10
 	movl	%r14d, %edx
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
index bf688252c8..3a6b9f0bad 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -56,8 +56,9 @@ __pthread_rwlock_unlock:
 
 5:	movl	$0, WRITER(%rdi)
 
-	movl	$1, %edx
+	movl	$1, %esi
 	leaq	WRITERS_WAKEUP(%rdi), %r10
+	movq	%rsi, %rdx
 	cmpl	$0, WRITERS_QUEUED(%rdi)
 	jne	0f
 
@@ -77,16 +78,7 @@ __pthread_rwlock_unlock:
 #endif
 	jne	7f
 
-8:
-#if __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAKE, %esi
-	xorl	PSHARED(%rdi), %esi
-#else
-	movl	$FUTEX_WAKE, %esi
-	orl	PSHARED(%rdi), %esi
-	xorl	%fs:PRIVATE_FUTEX, %esi
-#endif
-	movl	$SYS_futex, %eax
+8:	movl	$SYS_futex, %eax
 	movq	%r10, %rdi
 	syscall
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
index 46d97e033e..0e82f890aa 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -71,20 +71,12 @@ __pthread_rwlock_wrlock:
 #endif
 	jne	10f
 
-11:
-#if __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %esi
-	xorl	PSHARED(%rdi), %esi
+11:	addq	$WRITERS_WAKEUP, %rdi
+#if FUTEX_WAIT == 0
+	xorl	%esi, %esi
 #else
-# if FUTEX_WAIT == 0
-	movl	PSHARED(%rdi), %esi
-# else
 	movl	$FUTEX_WAIT, %esi
-	orl	PSHARED(%rdi), %esi
-# endif
-	xorl	%fs:PRIVATE_FUTEX, %esi
 #endif
-	addq	$WRITERS_WAKEUP, %rdi
 	movl	$SYS_futex, %eax
 	syscall
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
index 4919c11fd2..7f608a5974 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -20,7 +20,6 @@
 #include <sysdep.h>
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
-#include <structsem.h>
 
 #ifndef UP
 # define LOCK lock
@@ -38,26 +37,19 @@
 	.type	sem_post,@function
 	.align	16
 sem_post:
+	movl	$1, %edx
 	LOCK
-#if VALUE == 0
-	addl	$1, (%rdi)
-#else
-	addl	$1, VALUE(%rdi)
-#endif
-
-	cmpq	$0, NWAITERS(%rdi)
-	je	2f
+	xaddl	%edx, (%rdi)
 
 	movl	$SYS_futex, %eax
 	movl	$FUTEX_WAKE, %esi
-	orl	PRIVATE(%rdi), %esi
-	movl	$1, %edx
+	incl	%edx
 	syscall
 
 	testq	%rax, %rax
 	js	1f
 
-2:	xorl	%eax, %eax
+	xorl	%eax, %eax
 	retq
 
 1:
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
index 4068a1b6b8..8c5c2a6974 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
@@ -20,7 +20,6 @@
 #include <sysdep.h>
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
-#include <structsem.h>
 
 #ifndef UP
 # define LOCK lock
@@ -29,7 +28,6 @@
 #endif
 
 #define SYS_futex		202
-#define FUTEX_WAIT		0
 
 /* For the calculation see asm/vsyscall.h.  */
 #define VSYSCALL_ADDR_vgettimeofday	0xffffffffff600000
@@ -40,23 +38,15 @@
 	.globl	sem_timedwait
 	.type	sem_timedwait,@function
 	.align	16
+	cfi_startproc
 sem_timedwait:
-.LSTARTCODE:
-#if VALUE == 0
 	movl	(%rdi), %eax
-#else
-	movl	VALUE(%rdi), %eax
-#endif
 2:	testl	%eax, %eax
 	je	1f
 
 	leaq	-1(%rax), %rdx
 	LOCK
-#if VALUE == 0
 	cmpxchgl %edx, (%rdi)
-#else
-	cmpxchgl %edx, VALUE(%rdi)
-#endif
 	jne	2b
 
 	xorl	%eax, %eax
@@ -64,25 +54,25 @@ sem_timedwait:
 
 	/* Check whether the timeout value is valid.  */
 1:	pushq	%r12
-.Lpush_r12:
+	cfi_adjust_cfa_offset(8)
 	pushq	%r13
-.Lpush_r13:
+	cfi_adjust_cfa_offset(8)
 	pushq	%r14
-.Lpush_r14:
+	cfi_adjust_cfa_offset(8)
 	subq	$24, %rsp
-.Lsubq:
+	cfi_adjust_cfa_offset(24)
 
 	movq	%rdi, %r12
+	cfi_offset(12, -16)		/* %r12 */
 	movq	%rsi, %r13
+	cfi_offset(13, -24)		/* %r13 */
 
 	/* Check for invalid nanosecond field.  */
 	cmpq	$1000000000, 8(%r13)
 	movl	$EINVAL, %r14d
+	cfi_offset(14, -24)		/* %r14 */
 	jae	6f
 
-	LOCK
-	addq	$1, NWAITERS(%r12)
-
 7:	xorl	%esi, %esi
 	movq	%rsp, %rdi
 	movq	$VSYSCALL_ADDR_vgettimeofday, %rax
@@ -106,22 +96,12 @@ sem_timedwait:
 	movq	%rdi, (%rsp)	/* Store relative timeout.  */
 	movq	%rsi, 8(%rsp)
 
-.LcleanupSTART:
 	call	__pthread_enable_asynccancel
 	movl	%eax, 16(%rsp)
 
 	movq	%rsp, %r10
-#if VALUE == 0
 	movq	%r12, %rdi
-#else
-	leaq	VALUE(%r12), %rdi
-#endif
-#if FUTEX_WAIT == 0
-	movl	PRIVATE(%rdi), %esi
-#else
-	movl	$FUTEX_WAIT, %esi
-	orl	PRIVATE(%rdi), %esi
-#endif
+	xorl	%esi, %esi
 	movl	$SYS_futex, %eax
 	xorl	%edx, %edx
 	syscall
@@ -129,47 +109,39 @@ sem_timedwait:
 
 	movl	16(%rsp), %edi
 	call	__pthread_disable_asynccancel
-.LcleanupEND:
 
 	testq	%r14, %r14
 	je	9f
 	cmpq	$-EWOULDBLOCK, %r14
 	jne	3f
 
-9:
-#if VALUE == 0
-	movl	(%r12), %eax
-#else
-	movl	VALUE(%r12), %eax
-#endif
+9:	movl	(%r12), %eax
 8:	testl	%eax, %eax
 	je	7b
 
 	leaq	-1(%rax), %rcx
 	LOCK
-#if VALUE == 0
 	cmpxchgl %ecx, (%r12)
-#else
-	cmpxchgl %ecx, VALUE(%r12)
-#endif
 	jne	8b
 
 	xorl	%eax, %eax
-
-10:	LOCK
-	subq	$1, NWAITERS(%r12)
-
-	addq	$24, %rsp
-.Laddq:
+10:	addq	$24, %rsp
+	cfi_adjust_cfa_offset(-24)
 	popq	%r14
-.Lpop_r14:
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(14)
 	popq	%r13
-.Lpop_r13:
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(13)
 	popq	%r12
-.Lpop_r12:
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(12)
 	retq
 
-.Lafter_retq:
+	cfi_adjust_cfa_offset(48)
+	cfi_offset(12, -16)		/* %r12 */
+	cfi_offset(13, -24)		/* %r13 */
+	cfi_offset(14, -32)		/* %r14 */
 3:	negq	%r14
 6:
 #if USE___THREAD
@@ -182,159 +154,5 @@ sem_timedwait:
 
 	orl	$-1, %eax
 	jmp	10b
+	cfi_endproc
 	.size	sem_timedwait,.-sem_timedwait
-
-
-	.type	sem_timedwait_cleanup,@function
-sem_timedwait_cleanup:
-	LOCK
-	subq	$1, NWAITERS(%r12)
-	movq	%rax, %rdi
-.LcallUR:
-	call	_Unwind_Resume@PLT
-	hlt
-.LENDCODE:
-	.size	sem_timedwait_cleanup,.-sem_timedwait_cleanup
-
-
-	.section .gcc_except_table,"a",@progbits
-.LexceptSTART:
-	.byte	0xff				# @LPStart format (omit)
-	.byte	0xff				# @TType format (omit)
-	.byte	0x01				# call-site format
-						# DW_EH_PE_uleb128
-	.uleb128 .Lcstend-.Lcstbegin
-.Lcstbegin:
-	.uleb128 .LcleanupSTART-.LSTARTCODE
-	.uleb128 .LcleanupEND-.LcleanupSTART
-	.uleb128 sem_timedwait_cleanup-.LSTARTCODE
-	.uleb128  0
-	.uleb128 .LcallUR-.LSTARTCODE
-	.uleb128 .LENDCODE-.LcallUR
-	.uleb128 0
-	.uleb128  0
-.Lcstend:
-
-
-	.section .eh_frame,"a",@progbits
-.LSTARTFRAME:
-	.long	.LENDCIE-.LSTARTCIE		# Length of the CIE.
-.LSTARTCIE:
-	.long	0				# CIE ID.
-	.byte	1				# Version number.
-#ifdef SHARED
-	.string	"zPLR"				# NUL-terminated augmentation
-						# string.
-#else
-	.string	"zPL"				# NUL-terminated augmentation
-						# string.
-#endif
-	.uleb128 1				# Code alignment factor.
-	.sleb128 -8				# Data alignment factor.
-	.byte	16				# Return address register
-						# column.
-#ifdef SHARED
-	.uleb128 7				# Augmentation value length.
-	.byte	0x9b				# Personality: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4
-						# + DW_EH_PE_indirect
-	.long	DW.ref.__gcc_personality_v0-.
-	.byte	0x1b				# LSDA Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-	.byte	0x1b				# FDE Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-#else
-	.uleb128 10				# Augmentation value length.
-	.byte	0x0				# Personality: absolute
-	.quad	__gcc_personality_v0
-	.byte	0x0				# LSDA Encoding: absolute
-#endif
-	.byte 0x0c				# DW_CFA_def_cfa
-	.uleb128 7
-	.uleb128 8
-	.byte	0x90				# DW_CFA_offset, column 0x10
-	.uleb128 1
-	.align 8
-.LENDCIE:
-
-	.long	.LENDFDE-.LSTARTFDE		# Length of the FDE.
-.LSTARTFDE:
-	.long	.LSTARTFDE-.LSTARTFRAME		# CIE pointer.
-#ifdef SHARED
-	.long	.LSTARTCODE-.			# PC-relative start address
-						# of the code.
-	.long	.LENDCODE-.LSTARTCODE		# Length of the code.
-	.uleb128 4				# Augmentation size
-	.long	.LexceptSTART-.
-#else
-	.quad	.LSTARTCODE			# Start address of the code.
-	.quad	.LENDCODE-.LSTARTCODE		# Length of the code.
-	.uleb128 8				# Augmentation size
-	.quad	.LexceptSTART
-#endif
-
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_r12-.LSTARTCODE
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte   0x8c				# DW_CFA_offset %r12
-        .uleb128 2
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_r13-.Lpush_r12
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 24
-	.byte   0x8d				# DW_CFA_offset %r13
-        .uleb128 3
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_r14-.Lpush_r13
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 32
-	.byte   0x8e				# DW_CFA_offset %r14
-        .uleb128 4
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lsubq-.Lpush_r14
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 56
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Laddq-.Lsubq
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 32
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpop_r14-.Laddq
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 24
-	.byte	0xce				# DW_CFA_restore %r14
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpop_r13-.Lpop_r14
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	0xcd				# DW_CFA_restore %r13
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpop_r12-.Lpop_r13
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte	0xcc				# DW_CFA_restore %r12
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lafter_retq-.Lpop_r12
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 56
-	.byte   0x8c				# DW_CFA_offset %r12
-        .uleb128 2
-	.byte   0x8d				# DW_CFA_offset %r13
-        .uleb128 3
-	.byte   0x8e				# DW_CFA_offset %r14
-        .uleb128 4
-	.align	8
-.LENDFDE:
-
-
-#ifdef SHARED
-	.hidden	DW.ref.__gcc_personality_v0
-	.weak	DW.ref.__gcc_personality_v0
-	.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
-	.align	8
-	.type	DW.ref.__gcc_personality_v0, @object
-	.size	DW.ref.__gcc_personality_v0, 8
-DW.ref.__gcc_personality_v0:
-	.quad	__gcc_personality_v0
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S
index 643090f065..6b77dfc0d8 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -37,7 +37,7 @@ sem_trywait:
 2:	testl	%eax, %eax
 	jz	1f
 
-	leal	-1(%rax), %edx
+	leaq	-1(%rax), %rdx
 	LOCK
 	cmpxchgl %edx, (%rdi)
 	jne	2b
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S
index e099ede029..5bd78eb944 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S
@@ -20,7 +20,6 @@
 #include <sysdep.h>
 #include <shlib-compat.h>
 #include <pthread-errnos.h>
-#include <structsem.h>
 
 #ifndef UP
 # define LOCK lock
@@ -29,7 +28,6 @@
 #endif
 
 #define SYS_futex		202
-#define FUTEX_WAIT		0
 
 
 	.text
@@ -37,93 +35,57 @@
 	.globl	sem_wait
 	.type	sem_wait,@function
 	.align	16
+	cfi_startproc
 sem_wait:
-.LSTARTCODE:
 	pushq	%r12
-.Lpush_r12:
+	cfi_adjust_cfa_offset(8)
+	cfi_offset(12, -16)
 	pushq	%r13
-.Lpush_r13:
+	cfi_adjust_cfa_offset(8)
 	movq	%rdi, %r13
+	cfi_offset(13, -24)
 
-#if VALUE == 0
-	movl	(%r13), %eax
-#else
-	movl	VALUE(%r13), %eax
-#endif
+3:	movl	(%r13), %eax
 2:	testl	%eax, %eax
 	je	1f
 
-	leal	-1(%rax), %edx
+	leaq	-1(%rax), %rdx
 	LOCK
-#if VALUE == 0
 	cmpxchgl %edx, (%r13)
-#else
-	cmpxchgl %edx, VALUE(%r13)
-#endif
 	jne	2b
+	xorl	%eax, %eax
 
-7:	xorl	%eax, %eax
-
-9:	popq	%r13
-.Lpop_r13:
+	popq	%r13
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(13)
 	popq	%r12
-.Lpop_r12:
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(12)
 
 	retq
 
-.Lafter_retq:
-1:	LOCK
-	addq	$1, NWAITERS(%r13)
-
-.LcleanupSTART:
-6:	call	__pthread_enable_asynccancel
+	cfi_adjust_cfa_offset(16)
+	cfi_offset(12, -16)
+	cfi_offset(13, -24)
+1:	call	__pthread_enable_asynccancel
 	movl	%eax, %r8d
 
 	xorq	%r10, %r10
 	movl	$SYS_futex, %eax
 	movq	%r13, %rdi
-#if FUTEX_WAIT == 0
-	movl	PRIVATE(%rdi), %esi
-#else
-	movl	$FUTEX_WAIT, %esi
-	orl	PRIVATE(%rdi), %esi
-#endif
-	xorl	%edx, %edx
+	movq	%r10, %rsi
+	movq	%r10, %rdx
 	syscall
 	movq	%rax, %r12
 
 	movl	%r8d, %edi
 	call	__pthread_disable_asynccancel
-.LcleanupEND:
 
 	testq	%r12, %r12
-	je	3f
+	je	3b
 	cmpq	$-EWOULDBLOCK, %r12
-	jne	4f
-
-3:
-#if VALUE == 0
-	movl	(%r13), %eax
-#else
-	movl	VALUE(%r13), %eax
-#endif
-5:	testl	%eax, %eax
-	je	6b
-
-	leal	-1(%rax), %edx
-	LOCK
-#if VALUE == 0
-	cmpxchgl %edx, (%r13)
-#else
-	cmpxchgl %edx, VALUE(%r13)
-#endif
-	jne	5b
-
-	LOCK
-	subq	$1, NWAITERS(%r13)
-	jmp	7b
-
-4:	negq	%r12
+	je	3b
+	negq	%r12
 #if USE___THREAD
 	movq	errno@gottpoff(%rip), %rdx
 	movl	%r12d, %fs:(%rdx)
@@ -133,142 +95,13 @@ sem_wait:
 #endif
 	orl	$-1, %eax
 
-	LOCK
-	subq	$1, NWAITERS(%r13)
+	popq	%r13
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(13)
+	popq	%r12
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(12)
 
-	jmp 9b
+	retq
+	cfi_endproc
 	.size	sem_wait,.-sem_wait
-
-
-	.type	sem_wait_cleanup,@function
-sem_wait_cleanup:
-	LOCK
-	subq	$1, NWAITERS(%r13)
-	movq	%rax, %rdi
-.LcallUR:
-	call	_Unwind_Resume@PLT
-	hlt
-.LENDCODE:
-	.size	sem_wait_cleanup,.-sem_wait_cleanup
-
-
-	.section .gcc_except_table,"a",@progbits
-.LexceptSTART:
-	.byte	0xff				# @LPStart format (omit)
-	.byte	0xff				# @TType format (omit)
-	.byte	0x01				# call-site format
-						# DW_EH_PE_uleb128
-	.uleb128 .Lcstend-.Lcstbegin
-.Lcstbegin:
-	.uleb128 .LcleanupSTART-.LSTARTCODE
-	.uleb128 .LcleanupEND-.LcleanupSTART
-	.uleb128 sem_wait_cleanup-.LSTARTCODE
-	.uleb128  0
-	.uleb128 .LcallUR-.LSTARTCODE
-	.uleb128 .LENDCODE-.LcallUR
-	.uleb128 0
-	.uleb128  0
-.Lcstend:
-
-
-	.section .eh_frame,"a",@progbits
-.LSTARTFRAME:
-	.long	.LENDCIE-.LSTARTCIE		# Length of the CIE.
-.LSTARTCIE:
-	.long	0				# CIE ID.
-	.byte	1				# Version number.
-#ifdef SHARED
-	.string	"zPLR"				# NUL-terminated augmentation
-						# string.
-#else
-	.string	"zPL"				# NUL-terminated augmentation
-						# string.
-#endif
-	.uleb128 1				# Code alignment factor.
-	.sleb128 -8				# Data alignment factor.
-	.byte	16				# Return address register
-						# column.
-#ifdef SHARED
-	.uleb128 7				# Augmentation value length.
-	.byte	0x9b				# Personality: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4
-						# + DW_EH_PE_indirect
-	.long	DW.ref.__gcc_personality_v0-.
-	.byte	0x1b				# LSDA Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-	.byte	0x1b				# FDE Encoding: DW_EH_PE_pcrel
-						# + DW_EH_PE_sdata4.
-#else
-	.uleb128 10				# Augmentation value length.
-	.byte	0x0				# Personality: absolute
-	.quad	__gcc_personality_v0
-	.byte	0x0				# LSDA Encoding: absolute
-#endif
-	.byte 0x0c				# DW_CFA_def_cfa
-	.uleb128 7
-	.uleb128 8
-	.byte	0x90				# DW_CFA_offset, column 0x10
-	.uleb128 1
-	.align 8
-.LENDCIE:
-
-	.long	.LENDFDE-.LSTARTFDE		# Length of the FDE.
-.LSTARTFDE:
-	.long	.LSTARTFDE-.LSTARTFRAME		# CIE pointer.
-#ifdef SHARED
-	.long	.LSTARTCODE-.			# PC-relative start address
-						# of the code.
-	.long	.LENDCODE-.LSTARTCODE		# Length of the code.
-	.uleb128 4				# Augmentation size
-	.long	.LexceptSTART-.
-#else
-	.quad	.LSTARTCODE			# Start address of the code.
-	.quad	.LENDCODE-.LSTARTCODE		# Length of the code.
-	.uleb128 8				# Augmentation size
-	.quad	.LexceptSTART
-#endif
-
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_r12-.LSTARTCODE
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte   0x8c				# DW_CFA_offset %r12
-        .uleb128 2
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpush_r13-.Lpush_r12
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 24
-	.byte   0x8d				# DW_CFA_offset %r13
-        .uleb128 3
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpop_r13-.Lpush_r13
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 16
-	.byte	0xcd				# DW_CFA_restore %r13
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lpop_r12-.Lpop_r13
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 8
-	.byte	0xcc				# DW_CFA_restore %r12
-	.byte	4				# DW_CFA_advance_loc4
-	.long	.Lafter_retq-.Lpop_r12
-	.byte	14				# DW_CFA_def_cfa_offset
-	.uleb128 24
-	.byte   0x8c				# DW_CFA_offset %r12
-        .uleb128 2
-	.byte   0x8d				# DW_CFA_offset %r13
-        .uleb128 3
-	.align	8
-.LENDFDE:
-
-
-#ifdef SHARED
-	.hidden	DW.ref.__gcc_personality_v0
-	.weak	DW.ref.__gcc_personality_v0
-	.section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
-	.align	8
-	.type	DW.ref.__gcc_personality_v0, @object
-	.size	DW.ref.__gcc_personality_v0, 8
-DW.ref.__gcc_personality_v0:
-	.quad	__gcc_personality_v0
-#endif
diff --git a/nptl/sysdeps/x86_64/tcb-offsets.sym b/nptl/sysdeps/x86_64/tcb-offsets.sym
index 1c70c6bde7..21274ecab9 100644
--- a/nptl/sysdeps/x86_64/tcb-offsets.sym
+++ b/nptl/sysdeps/x86_64/tcb-offsets.sym
@@ -12,6 +12,3 @@ MUTEX_FUTEX		offsetof (pthread_mutex_t, __data.__lock)
 MULTIPLE_THREADS_OFFSET	offsetof (tcbhead_t, multiple_threads)
 POINTER_GUARD		offsetof (tcbhead_t, pointer_guard)
 VGETCPU_CACHE_OFFSET	offsetof (tcbhead_t, vgetcpu_cache)
-#ifndef __ASSUME_PRIVATE_FUTEX
-PRIVATE_FUTEX		offsetof (tcbhead_t, private_futex)
-#endif
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 029848a8fa..4a614c02af 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -26,8 +26,6 @@
 # include <stddef.h>
 # include <stdint.h>
 # include <stdlib.h>
-# include <sysdep.h>
-# include <kernel-features.h>
 
 
 /* Type for the dtv.  */
@@ -54,9 +52,6 @@ typedef struct
   uintptr_t stack_guard;
   uintptr_t pointer_guard;
   unsigned long int vgetcpu_cache[2];
-#ifndef __ASSUME_PRIVATE_FUTEX
-  int private_futex;
-#endif
 } tcbhead_t;
 
 #else /* __ASSEMBLER__ */
@@ -355,7 +350,7 @@ typedef struct
 		    : "i" (offsetof (struct pthread, header.gscope_flag)),    \
 		      "0" (THREAD_GSCOPE_FLAG_UNUSED));			      \
       if (__res == THREAD_GSCOPE_FLAG_WAIT)				      \
-	lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1);	      \
+	lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1);		      \
     }									      \
   while (0)
 #define THREAD_GSCOPE_SET_FLAG() \
diff --git a/nptl/tst-initializers1.c b/nptl/tst-initializers1.c
index 9036e6eac3..eacee35c61 100644
--- a/nptl/tst-initializers1.c
+++ b/nptl/tst-initializers1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2005.
 
@@ -37,15 +37,15 @@ main (void)
   if (mtx_normal.__data.__kind != PTHREAD_MUTEX_TIMED_NP)
     return 1;
   if (mtx_recursive.__data.__kind != PTHREAD_MUTEX_RECURSIVE_NP)
-    return 2;
+    return 1;
   if (mtx_errorchk.__data.__kind != PTHREAD_MUTEX_ERRORCHECK_NP)
-    return 3;
+    return 1;
   if (mtx_adaptive.__data.__kind != PTHREAD_MUTEX_ADAPTIVE_NP)
-    return 4;
+    return 1;
   if (rwl_normal.__data.__flags != PTHREAD_RWLOCK_PREFER_READER_NP)
-    return 5;
+    return 1;
   if (rwl_writer.__data.__flags
       != PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)
-    return 6;
+    return 1;
   return 0;
 }
diff --git a/nptl/tst-sem11.c b/nptl/tst-sem11.c
deleted file mode 100644
index 6633ddd1f3..0000000000
--- a/nptl/tst-sem11.c
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <semaphore.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <internaltypes.h>
-
-#ifndef SEM_WAIT
-# define SEM_WAIT(s) sem_wait (s)
-#endif
-
-static void *
-tf (void *arg)
-{
-#ifdef PREPARE
-  PREPARE
-#endif
-  SEM_WAIT (arg);
-  return NULL;
-}
-
-int
-main (void)
-{
-  int tries = 5;
-  pthread_t th;
-  sem_t s;
- again:
-  if (sem_init (&s, 0, 0) != 0)
-    {
-      puts ("sem_init failed");
-      return 1;
-    }
-
-  struct new_sem *is = (struct new_sem *) &s;
-
-  if (is->nwaiters != 0)
-    {
-      puts ("nwaiters not initialized");
-      return 1;
-    }
-
-  if (pthread_create (&th, NULL, tf, &s) != 0)
-    {
-      puts ("pthread_create failed");
-      return 1;
-    }
-
-  sleep (1);
-
-  if (pthread_cancel (th) != 0)
-    {
-      puts ("pthread_cancel failed");
-      return 1;
-    }
-
-  void *r;
-  if (pthread_join (th, &r) != 0)
-    {
-      puts ("pthread_join failed");
-      return 1;
-    }
-  if (r != PTHREAD_CANCELED && --tries > 0)
-    {
-      /* Maybe we get the scheduling right the next time.  */
-      sem_destroy (&s);
-      goto again;
-    }
-
-  if (is->nwaiters != 0)
-    {
-      puts ("nwaiters not reset");
-      return 1;
-    }
-
-  return 0;
-}
diff --git a/nptl/tst-sem12.c b/nptl/tst-sem12.c
deleted file mode 100644
index 71d02b70e9..0000000000
--- a/nptl/tst-sem12.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <time.h>
-#include <sys/time.h>
-
-
-#define PREPARE \
-  struct timespec ts; \
-  struct timeval tv; \
-  gettimeofday (&tv, NULL); \
-  TIMEVAL_TO_TIMESPEC (&tv, &ts); \
-  ts.tv_sec += 60;
-
-#define SEM_WAIT(s) sem_timedwait (s, &ts)
-
-#include "tst-sem11.c"
diff --git a/nptl/tst-typesizes.c b/nptl/tst-typesizes.c
index 17a1e297d3..db8936f5f4 100644
--- a/nptl/tst-typesizes.c
+++ b/nptl/tst-typesizes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2005.
 
@@ -59,8 +59,7 @@ do_test (void)
   TEST_TYPE2 (pthread_rwlockattr_t, struct pthread_rwlockattr);
   TEST_TYPE2 (pthread_barrier_t, struct pthread_barrier);
   TEST_TYPE2 (pthread_barrierattr_t, struct pthread_barrierattr);
-  TEST_TYPE2 (sem_t, struct new_sem);
-  TEST_TYPE2 (sem_t, struct old_sem);
+  TEST_TYPE2 (sem_t, struct sem);
 
   return result;
 }
diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog
index b4e3110294..3a8c3c68e8 100644
--- a/nptl_db/ChangeLog
+++ b/nptl_db/ChangeLog
@@ -1,26 +1,3 @@
-2007-05-16  Roland McGrath  <roland@redhat.com>
-
-	* td_thr_get_info.c: Fake the results for TH->th_unique == 0.
-	* td_thr_validate.c: Likewise.
-	* td_thr_setgregs.c: Likewise.
-	* td_thr_setfpregs.c: Likewise.
-	* td_thr_getgregs.c: Likewise.
-	* td_thr_getfpregs.c: Likewise.
-	* td_thr_tlsbase.c: Likewise.
-
-	* structs.def: Add DB_VARIABLE (__nptl_initial_report_events).
-	* db_info.c: Add necessary declaration.
-	* td_thr_event_enable.c: Set __nptl_initial_report_events too.
-
-	* td_ta_thr_iter.c (iterate_thread_list): Make FAKE_EMPTY bool.
-	Use th_unique=0 in fake descriptor before initialization.
-
-	* td_ta_map_lwp2thr.c (__td_ta_lookup_th_unique): New function, broken
-	out of ...
-	(td_ta_map_lwp2thr): ... here, call it.  But don't before __stack_user
-	is initialized, then fake a handle with th_unique=0.
-	* thread_dbP.h: Declare it.
-
 2006-10-26  Pete Eberlein  <eberlein@us.ibm.com>
 
 	* nptl_db/db_info.c [TLS_DTV_AT_TP]: Fixed size init for dtvp
diff --git a/nptl_db/db_info.c b/nptl_db/db_info.c
index 25b5ccdf90..6d5eb4b1d8 100644
--- a/nptl_db/db_info.c
+++ b/nptl_db/db_info.c
@@ -1,7 +1,7 @@
 /* This file is included by pthread_create.c to define in libpthread
    all the magic symbols required by libthread_db.
 
-   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+   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
@@ -38,8 +38,6 @@ typedef struct
 
 typedef struct link_map link_map;
 
-/* Actually static in nptl/init.c, but we only need it for typeof.  */
-extern bool __nptl_initial_report_events;
 
 #define schedparam_sched_priority schedparam.sched_priority
 
diff --git a/nptl_db/structs.def b/nptl_db/structs.def
index f5559ccb06..20fa014909 100644
--- a/nptl_db/structs.def
+++ b/nptl_db/structs.def
@@ -1,5 +1,5 @@
 /* List of types and symbols in libpthread examined by libthread_db.
-   Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -56,7 +56,6 @@ DB_FUNCTION (__nptl_death_event)
 DB_SYMBOL (__nptl_threads_events)
 DB_VARIABLE (__nptl_nthreads)
 DB_VARIABLE (__nptl_last_event)
-DB_VARIABLE (__nptl_initial_report_events)
 
 DB_ARRAY_VARIABLE (__pthread_keys)
 DB_STRUCT (pthread_key_struct)
diff --git a/nptl_db/td_ta_map_lwp2thr.c b/nptl_db/td_ta_map_lwp2thr.c
index 78cfcab769..1e93210b93 100644
--- a/nptl_db/td_ta_map_lwp2thr.c
+++ b/nptl_db/td_ta_map_lwp2thr.c
@@ -1,5 +1,5 @@
 /* Which thread is running on an LWP?
-   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+   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
@@ -24,8 +24,8 @@
 
 
 td_err_e
-__td_ta_lookup_th_unique (const td_thragent_t *ta_arg,
-			  lwpid_t lwpid, td_thrhandle_t *th)
+td_ta_map_lwp2thr (const td_thragent_t *ta_arg,
+		   lwpid_t lwpid, td_thrhandle_t *th)
 {
   td_thragent_t *const ta = (td_thragent_t *) ta_arg;
   ps_err_e err;
@@ -118,6 +118,9 @@ __td_ta_lookup_th_unique (const td_thragent_t *ta_arg,
 
   switch (ta->ta_howto)
     {
+    case ta_howto_unknown:
+      return TD_DBERR;
+
     default:
       return TD_DBERR;
 
@@ -129,7 +132,6 @@ __td_ta_lookup_th_unique (const td_thragent_t *ta_arg,
 				    0, regs, &addr);
       if (terr != TD_OK)
 	return terr;
-
       /* In this descriptor the nelem word is overloaded as the bias.  */
       addr += (int32_t) DB_DESC_NELEM (ta->ta_howto_data.reg);
       th->th_unique = addr;
@@ -141,22 +143,22 @@ __td_ta_lookup_th_unique (const td_thragent_t *ta_arg,
       if (&ps_get_thread_area == NULL)
 	return TD_NOCAPAB;
 
-      /* A la x86-64, there is a magic index for get_thread_area.  */
-      if (ps_get_thread_area (ta->ph, lwpid,
-			      ta->ta_howto_data.const_thread_area,
-			      &th->th_unique) != PS_OK)
-	return TD_ERR;	/* XXX Other error value?  */
-      break;
+       /* A la x86-64, there is a constant magic index for get_thread_area.  */
+       if (ps_get_thread_area (ta->ph, lwpid,
+			       ta->ta_howto_data.const_thread_area,
+			       &th->th_unique) != PS_OK)
+	 return TD_ERR;	/* XXX Other error value?  */
+       break;
 
-    case ta_howto_reg_thread_area:
+     case ta_howto_reg_thread_area:
       if (&ps_get_thread_area == NULL)
 	return TD_NOCAPAB;
 
-      /* A la i386, a register holds the index for get_thread_area.  */
-      if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK)
-	return TD_ERR;
-      terr = _td_fetch_value_local (ta, ta->ta_howto_data.reg_thread_area,
-				    -1, 0, regs, &addr);
+       /* A la i386, there is a register with an index for get_thread_area.  */
+       if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK)
+	 return TD_ERR;
+       terr = _td_fetch_value_local (ta, ta->ta_howto_data.reg_thread_area, -1,
+				     0, regs, &addr);
       if (terr != TD_OK)
 	return terr;
       /* In this descriptor the nelem word is overloaded as scale factor.  */
@@ -170,40 +172,7 @@ __td_ta_lookup_th_unique (const td_thragent_t *ta_arg,
     }
 
   /* Found it.  Now complete the `td_thrhandle_t' object.  */
-  th->th_ta_p = ta;
+  th->th_ta_p = (td_thragent_t *) ta;
 
   return TD_OK;
 }
-
-td_err_e
-td_ta_map_lwp2thr (const td_thragent_t *ta_arg,
-		   lwpid_t lwpid, td_thrhandle_t *th)
-{
-  td_thragent_t *const ta = (td_thragent_t *) ta_arg;
-
-  /* We cannot rely on thread registers and such information at all
-     before __pthread_initialize_minimal has gotten far enough.  They
-     sometimes contain garbage that would confuse us, left by the kernel
-     at exec.  So if it looks like initialization is incomplete, we only
-     fake a special descriptor for the initial thread.  */
-
-  psaddr_t list;
-  td_err_e err = DB_GET_SYMBOL (list, ta, __stack_user);
-  if (err != TD_OK)
-    return err;
-
-  err = DB_GET_FIELD (list, ta, list, list_t, next, 0);
-  if (err != TD_OK)
-    return err;
-
-  if (list == 0)
-    {
-      if (ps_getpid (ta->ph) != lwpid)
-	return TD_ERR;
-      th->th_ta_p = ta;
-      th->th_unique = 0;
-      return TD_OK;
-    }
-
-  return __td_ta_lookup_th_unique (ta_arg, lwpid, th);
-}
diff --git a/nptl_db/td_ta_thr_iter.c b/nptl_db/td_ta_thr_iter.c
index c82f39cb78..66e4376659 100644
--- a/nptl_db/td_ta_thr_iter.c
+++ b/nptl_db/td_ta_thr_iter.c
@@ -1,6 +1,5 @@
 /* Iterate over a process's threads.
-   Copyright (C) 1999,2000,2001,2002,2003,2004,2007
-	Free Software Foundation, Inc.
+   Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -25,7 +24,7 @@
 static td_err_e
 iterate_thread_list (td_thragent_t *ta, td_thr_iter_f *callback,
 		     void *cbdata_p, td_thr_state_e state, int ti_pri,
-		     psaddr_t head, bool fake_empty)
+		     psaddr_t head, int fake_empty)
 {
   td_err_e err;
   psaddr_t next, ofs;
@@ -42,13 +41,13 @@ iterate_thread_list (td_thragent_t *ta, td_thr_iter_f *callback,
 
   if (next == 0 && fake_empty)
     {
-      /* __pthread_initialize_minimal has not run.  There is just the main
-	 thread to return.  We cannot rely on its thread register.  They
-	 sometimes contain garbage that would confuse us, left by the
-	 kernel at exec.  So if it looks like initialization is incomplete,
-	 we only fake a special descriptor for the initial thread.  */
-      td_thrhandle_t th = { ta, 0 };
-      return callback (&th, cbdata_p) != 0 ? TD_DBERR : TD_OK;
+      /* __pthread_initialize_minimal has not run.
+	 There is just the main thread to return.  */
+      td_thrhandle_t th;
+      err = td_ta_map_lwp2thr (ta, ps_getpid (ta->ph), &th);
+      if (err == TD_OK)
+	err = callback (&th, cbdata_p) != 0 ? TD_DBERR : TD_OK;
+      return err;
     }
 
   /* Cache the offset from struct pthread to its list_t member.  */
@@ -137,15 +136,13 @@ td_ta_thr_iter (const td_thragent_t *ta_arg, td_thr_iter_f *callback,
 
   err = DB_GET_SYMBOL (list, ta, __stack_user);
   if (err == TD_OK)
-    err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri,
-			       list, true);
+    err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri, list, 1);
 
   /* And the threads with stacks allocated by the implementation.  */
   if (err == TD_OK)
     err = DB_GET_SYMBOL (list, ta, stack_used);
   if (err == TD_OK)
-    err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri,
-			       list, false);
+    err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri, list, 0);
 
   return err;
 }
diff --git a/nptl_db/td_thr_event_enable.c b/nptl_db/td_thr_event_enable.c
index c8b2cd463d..a02be5da44 100644
--- a/nptl_db/td_thr_event_enable.c
+++ b/nptl_db/td_thr_event_enable.c
@@ -1,5 +1,5 @@
 /* Enable event process-wide.
-   Copyright (C) 1999, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -28,25 +28,7 @@ td_thr_event_enable (th, onoff)
 {
   LOG ("td_thr_event_enable");
 
-  if (th->th_unique != 0)
-    {
-      /* Write the new value into the thread data structure.  */
-      td_err_e err = DB_PUT_FIELD (th->th_ta_p, th->th_unique, pthread,
-				   report_events, 0,
-				   (psaddr_t) 0 + (onoff != 0));
-      if (err != TD_OK)
-	return err;
-
-      /* Just in case we are in the window between initializing __stack_user
-	 and copying from __nptl_initial_report_events, we set it too.
-	 It doesn't hurt to do this for non-initial threads, since it
-	 won't be consulted again anyway.  It would take another fetch
-	 to get the tid and determine this isn't the initial thread,
-	 so just do it always.  */
-    }
-
-  /* We are faking it for the initial thread before its thread
-     descriptor is set up.  */
-  return DB_PUT_VALUE (th->th_ta_p, __nptl_initial_report_events, 0,
+  /* Write the new value into the thread data structure.  */
+  return DB_PUT_FIELD (th->th_ta_p, th->th_unique, pthread, report_events, 0,
 		       (psaddr_t) 0 + (onoff != 0));
 }
diff --git a/nptl_db/td_thr_get_info.c b/nptl_db/td_thr_get_info.c
index 99e5e19bf9..bb13888045 100644
--- a/nptl_db/td_thr_get_info.c
+++ b/nptl_db/td_thr_get_info.c
@@ -1,5 +1,5 @@
 /* Get thread information.
-   Copyright (C) 1999,2000,2001,2002,2003,2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -32,49 +32,35 @@ td_thr_get_info (const td_thrhandle_t *th, td_thrinfo_t *infop)
 
   LOG ("td_thr_get_info");
 
-  if (th->th_unique == 0)
-    {
-      /* Special case for the main thread before initialization.  */
-      copy = NULL;
-      tls = 0;
-      cancelhandling = 0;
-      schedprio = 0;
-      tid = 0;
-      err = DB_GET_VALUE (report_events, th->th_ta_p,
-			  __nptl_initial_report_events, 0);
-    }
-  else
-    {
-      /* Copy the whole descriptor in once so we can access the several
-	 fields locally.  Excess copying in one go is much better than
-	 multiple ps_pdread calls.  */
-      err = DB_GET_STRUCT (copy, th->th_ta_p, th->th_unique, pthread);
-      if (err != TD_OK)
-	return err;
-
-      err = DB_GET_FIELD_ADDRESS (tls, th->th_ta_p, th->th_unique,
-				  pthread, specific, 0);
-      if (err != TD_OK)
-	return err;
-
-      err = DB_GET_FIELD_LOCAL (schedpolicy, th->th_ta_p, copy, pthread,
-				schedpolicy, 0);
-      if (err != TD_OK)
-	return err;
-      err = DB_GET_FIELD_LOCAL (schedprio, th->th_ta_p, copy, pthread,
-				schedparam_sched_priority, 0);
-      if (err != TD_OK)
-	return err;
-      err = DB_GET_FIELD_LOCAL (tid, th->th_ta_p, copy, pthread, tid, 0);
-      if (err != TD_OK)
-	return err;
-      err = DB_GET_FIELD_LOCAL (cancelhandling, th->th_ta_p, copy, pthread,
-				cancelhandling, 0);
-      if (err != TD_OK)
-	return err;
-      err = DB_GET_FIELD_LOCAL (report_events, th->th_ta_p, copy, pthread,
-				report_events, 0);
-    }
+  /* Copy the whole descriptor in once so we can access the several
+     fields locally.  Excess copying in one go is much better than
+     multiple ps_pdread calls.  */
+  err = DB_GET_STRUCT (copy, th->th_ta_p, th->th_unique, pthread);
+  if (err != TD_OK)
+    return err;
+
+  err = DB_GET_FIELD_ADDRESS (tls, th->th_ta_p, th->th_unique,
+			      pthread, specific, 0);
+  if (err != TD_OK)
+    return err;
+
+  err = DB_GET_FIELD_LOCAL (schedpolicy, th->th_ta_p, copy, pthread,
+			    schedpolicy, 0);
+  if (err != TD_OK)
+    return err;
+  err = DB_GET_FIELD_LOCAL (schedprio, th->th_ta_p, copy, pthread,
+			    schedparam_sched_priority, 0);
+  if (err != TD_OK)
+    return err;
+  err = DB_GET_FIELD_LOCAL (tid, th->th_ta_p, copy, pthread, tid, 0);
+  if (err != TD_OK)
+    return err;
+  err = DB_GET_FIELD_LOCAL (cancelhandling, th->th_ta_p, copy, pthread,
+			    cancelhandling, 0);
+  if (err != TD_OK)
+    return err;
+  err = DB_GET_FIELD_LOCAL (report_events, th->th_ta_p, copy, pthread,
+			    report_events, 0);
   if (err != TD_OK)
     return err;
 
@@ -101,10 +87,9 @@ td_thr_get_info (const td_thrhandle_t *th, td_thrinfo_t *infop)
   infop->ti_lid = tid == 0 ? ps_getpid (th->th_ta_p->ph) : (uintptr_t) tid;
   infop->ti_traceme = report_events != 0;
 
-  if (copy != NULL)
-    err = DB_GET_FIELD_LOCAL (infop->ti_startfunc, th->th_ta_p, copy, pthread,
-			      start_routine, 0);
-  if (copy != NULL && err == TD_OK)
+  err = DB_GET_FIELD_LOCAL (infop->ti_startfunc, th->th_ta_p, copy, pthread,
+			    start_routine, 0);
+  if (err == TD_OK)
     {
       uint32_t idx;
       for (idx = 0; idx < TD_EVENTSIZE; ++idx)
diff --git a/nptl_db/td_thr_getfpregs.c b/nptl_db/td_thr_getfpregs.c
index f943fd6995..7760512ebb 100644
--- a/nptl_db/td_thr_getfpregs.c
+++ b/nptl_db/td_thr_getfpregs.c
@@ -1,5 +1,5 @@
 /* Get a thread's floating-point register set.
-   Copyright (C) 1999, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -29,11 +29,6 @@ td_thr_getfpregs (const td_thrhandle_t *th, prfpregset_t *regset)
 
   LOG ("td_thr_getfpregs");
 
-  if (th->th_unique == 0)
-    /* Special case for the main thread before initialization.  */
-    return ps_lgetfpregs (th->th_ta_p->ph, ps_getpid (th->th_ta_p->ph),
-			  regset) != PS_OK ? TD_ERR : TD_OK;
-
   /* We have to get the state and the PID for this thread.  */
   err = DB_GET_FIELD (cancelhandling, th->th_ta_p, th->th_unique, pthread,
 		      cancelhandling, 0);
diff --git a/nptl_db/td_thr_getgregs.c b/nptl_db/td_thr_getgregs.c
index 8d83a800f6..4c2373ef6c 100644
--- a/nptl_db/td_thr_getgregs.c
+++ b/nptl_db/td_thr_getgregs.c
@@ -1,5 +1,5 @@
 /* Get a thread's general register set.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -29,11 +29,6 @@ td_thr_getgregs (const td_thrhandle_t *th, prgregset_t regset)
 
   LOG ("td_thr_getgregs");
 
-  if (th->th_unique == 0)
-    /* Special case for the main thread before initialization.  */
-    return ps_lgetregs (th->th_ta_p->ph, ps_getpid (th->th_ta_p->ph),
-			regset) != PS_OK ? TD_ERR : TD_OK;
-
   /* We have to get the state and the PID for this thread.  */
   err = DB_GET_FIELD (cancelhandling, th->th_ta_p, th->th_unique, pthread,
 		      cancelhandling, 0);
diff --git a/nptl_db/td_thr_setfpregs.c b/nptl_db/td_thr_setfpregs.c
index 1ec4b1ff26..01bdb53231 100644
--- a/nptl_db/td_thr_setfpregs.c
+++ b/nptl_db/td_thr_setfpregs.c
@@ -1,5 +1,5 @@
 /* Set a thread's floating-point register set.
-   Copyright (C) 1999, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -29,11 +29,6 @@ td_thr_setfpregs (const td_thrhandle_t *th, const prfpregset_t *fpregs)
 
   LOG ("td_thr_setfpregs");
 
-  if (th->th_unique == 0)
-    /* Special case for the main thread before initialization.  */
-    return ps_lsetfpregs (th->th_ta_p->ph, ps_getpid (th->th_ta_p->ph),
-			  fpregs) != PS_OK ? TD_ERR : TD_OK;
-
   /* We have to get the state and the PID for this thread.  */
   err = DB_GET_FIELD (cancelhandling, th->th_ta_p, th->th_unique, pthread,
 		      cancelhandling, 0);
diff --git a/nptl_db/td_thr_setgregs.c b/nptl_db/td_thr_setgregs.c
index f842f7c7aa..2a9ce7e01c 100644
--- a/nptl_db/td_thr_setgregs.c
+++ b/nptl_db/td_thr_setgregs.c
@@ -1,5 +1,5 @@
 /* Set a thread's general register set.
-   Copyright (C) 1999, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -29,11 +29,6 @@ td_thr_setgregs (const td_thrhandle_t *th, prgregset_t gregs)
 
   LOG ("td_thr_setgregs");
 
-  if (th->th_unique == 0)
-    /* Special case for the main thread before initialization.  */
-    return ps_lsetregs (th->th_ta_p->ph, ps_getpid (th->th_ta_p->ph),
-			gregs) != PS_OK ? TD_ERR : TD_OK;
-
   /* We have to get the state and the PID for this thread.  */
   err = DB_GET_FIELD (cancelhandling, th->th_ta_p, th->th_unique, pthread,
 		      cancelhandling, 0);
diff --git a/nptl_db/td_thr_tlsbase.c b/nptl_db/td_thr_tlsbase.c
index 85c7f01dda..aaeda6f3c6 100644
--- a/nptl_db/td_thr_tlsbase.c
+++ b/nptl_db/td_thr_tlsbase.c
@@ -1,5 +1,5 @@
 /* Locate TLS data for a thread.
-   Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 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,29 +30,8 @@ td_thr_tlsbase (const td_thrhandle_t *th,
   if (modid < 1)
     return TD_NOTLS;
 
-  psaddr_t pd = th->th_unique;
-  if (pd == 0)
-    {
-      /* This is the fake handle for the main thread before libpthread
-	 initialization.  We are using 0 for its th_unique because we can't
-	 trust that its thread register has been initialized.  But we need
-	 a real pointer to have any TLS access work.  In case of dlopen'd
-	 libpthread, initialization might not be for quite some time.  So
-	 try looking up the thread register now.  Worst case, it's nonzero
-	 uninitialized garbage and we get bogus results for TLS access
-	 attempted too early.  Tough.  */
-
-      td_thrhandle_t main_th;
-      err = __td_ta_lookup_th_unique (th->th_ta_p, ps_getpid (th->th_ta_p->ph),
-				      &main_th);
-      if (err == 0)
-	pd = main_th.th_unique;
-      if (pd == 0)
-	return TD_TLSDEFER;
-    }
-
   /* Get the DTV pointer from the thread descriptor.  */
-  err = DB_GET_FIELD (dtv, th->th_ta_p, pd, pthread, dtvp, 0);
+  err = DB_GET_FIELD (dtv, th->th_ta_p, th->th_unique, pthread, dtvp, 0);
   if (err != TD_OK)
     return err;
 
diff --git a/nptl_db/td_thr_validate.c b/nptl_db/td_thr_validate.c
index 9a77250d48..3d560a621b 100644
--- a/nptl_db/td_thr_validate.c
+++ b/nptl_db/td_thr_validate.c
@@ -1,5 +1,5 @@
 /* Validate a thread handle.
-   Copyright (C) 1999,2001,2002,2003,2004,2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
 
@@ -75,10 +75,16 @@ td_thr_validate (const td_thrhandle_t *th)
       if (err == TD_OK)
 	err = check_thread_list (th, list, &uninit);
 
-      if (err == TD_NOTHR && uninit && th->th_unique == 0)
-	/* __pthread_initialize_minimal has not run yet.
-	   There is only the special case thread handle.  */
-	err = TD_OK;
+      if (err == TD_NOTHR && uninit)
+	{
+	  /* __pthread_initialize_minimal has not run yet.
+	     But the main thread still has a valid ID.  */
+	  td_thrhandle_t main_th;
+	  err = td_ta_map_lwp2thr (th->th_ta_p,
+				   ps_getpid (th->th_ta_p->ph), &main_th);
+	  if (err == TD_OK && th->th_unique != main_th.th_unique)
+	    err = TD_NOTHR;
+	}
     }
 
   return err;
diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h
index e5db9bf94b..c53d1ed940 100644
--- a/nptl_db/thread_dbP.h
+++ b/nptl_db/thread_dbP.h
@@ -1,5 +1,5 @@
 /* Private header for thread debug library
-   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+   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
@@ -251,7 +251,4 @@ extern td_err_e _td_store_value_local (td_thragent_t *ta,
 extern td_err_e _td_check_sizeof (td_thragent_t *ta, uint32_t *sizep,
 				  int sizep_name) attribute_hidden;
 
-extern td_err_e __td_ta_lookup_th_unique (const td_thragent_t *ta,
-					  lwpid_t lwpid, td_thrhandle_t *th);
-
 #endif /* thread_dbP.h */
diff --git a/nscd/aicache.c b/nscd/aicache.c
index bccac3abbc..4640b4df94 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -1,5 +1,5 @@
 /* Cache handling for host lookup.
-   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -78,6 +78,15 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
 	dbg_log (_("Reloading \"%s\" in hosts cache!"), (char *) key);
     }
 
+#if 0
+  uid_t oldeuid = 0;
+  if (db->secure)
+    {
+      oldeuid = geteuid ();
+      pthread_seteuid_np (uid);
+    }
+#endif
+
   static service_user *hosts_database;
   service_user *nip = NULL;
   int no_more;
@@ -254,10 +263,8 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
 
 	      total = sizeof (*dataset) + naddrs + addrslen + canonlen;
 
-	      /* Now we can allocate the data structure.  If the TTL
-		 of the entry is reported as zero do not cache the
-		 entry at all.  */
-	      if (ttl != 0 && he == NULL)
+	      /* Now we can allocate the data structure.  */
+	      if (he == NULL)
 		{
 		  dataset = (struct dataset *) mempool_alloc (db,
 							      total
@@ -446,6 +453,11 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
  out:
   _res.options = old_res_options;
 
+#if 0
+  if (db->secure)
+    pthread_seteuid_np (oldeuid);
+#endif
+
   if (dataset != NULL && !alloca_used)
     {
       /* If necessary, we also propagate the data to disk.  */
diff --git a/po/Makefile b/po/Makefile
index 11f92adee5..cbbd9ab848 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996,1997,1998,1999,2001,2002,2006,2007
+# Copyright (C) 1996,1997,1998,1999,2001,2002,2006
 #	Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
@@ -71,12 +71,11 @@ ifeq ($(with-cvs),yes)
 	test ! -d CVS || cvs $(CVSOPTS) ci -m'Regenerated from source files' $@
 endif
 
-po-sed-cmd = \
-  '/\/tst-/d;$(foreach S,[ch] cxx sh bash,$(subst .,\.,/.$S\(.in\)*$$/p;))'
-
 # Omit tst-* files, and get only files with the given suffixes.
 libc.pot.files: FORCE
-	$(..)scripts/list-sources.sh .. | sed -n $(po-sed-cmd) > $@.new
+	$(..)scripts/list-sources.sh .. | sed -n '/\/tst-/d;\
+	  $(foreach S,[ch] cxx sh bash,$(subst .,\.,/.$S\(.in\)*$$/p;))' \
+	  > $@.new
 	mv -f $@.new $@
 
 .SUFFIXES: .mo .po .pot
diff --git a/posix/sched_cpucount.c b/posix/sched_cpucount.c
index 331c0b8dfc..d7f6b7b49f 100644
--- a/posix/sched_cpucount.c
+++ b/posix/sched_cpucount.c
@@ -21,39 +21,31 @@
 
 
 int
-__sched_cpucount (size_t setsize, const cpu_set_t *setp)
+__sched_cpucount (size_t setsize, cpu_set_t *setp)
 {
   int s = 0;
-  const __cpu_mask *p = setp->__bits;
-  const __cpu_mask *end = &setp->__bits[setsize / sizeof (__cpu_mask)];
-
-  while (p < end)
+  for (unsigned int j = 0; j < setsize / sizeof (__cpu_mask); ++j)
     {
-      __cpu_mask l = *p++;
-
-#ifdef POPCNT
-      s += POPCNT (l);
-#else
+      __cpu_mask l = setp->__bits[j];
       if (l == 0)
 	continue;
 
-# if LONG_BIT > 32
+#if LONG_BIT > 32
       l = (l & 0x5555555555555555ul) + ((l >> 1) & 0x5555555555555555ul);
       l = (l & 0x3333333333333333ul) + ((l >> 2) & 0x3333333333333333ul);
       l = (l & 0x0f0f0f0f0f0f0f0ful) + ((l >> 4) & 0x0f0f0f0f0f0f0f0ful);
       l = (l & 0x00ff00ff00ff00fful) + ((l >> 8) & 0x00ff00ff00ff00fful);
       l = (l & 0x0000ffff0000fffful) + ((l >> 16) & 0x0000ffff0000fffful);
       l = (l & 0x00000000fffffffful) + ((l >> 32) & 0x00000000fffffffful);
-# else
+#else
       l = (l & 0x55555555ul) + ((l >> 1) & 0x55555555ul);
       l = (l & 0x33333333ul) + ((l >> 2) & 0x33333333ul);
       l = (l & 0x0f0f0f0ful) + ((l >> 4) & 0x0f0f0f0ful);
       l = (l & 0x00ff00fful) + ((l >> 8) & 0x00ff00fful);
       l = (l & 0x0000fffful) + ((l >> 16) & 0x0000fffful);
-# endif
+#endif
 
       s += l;
-#endif
     }
 
   return s;
diff --git a/resolv/res_init.c b/resolv/res_init.c
index d1a5681a93..640e087920 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -241,8 +241,8 @@ __res_vinit(res_state statp, int preinit) {
 	 line[sizeof(name) - 1] == '\t'))
 
 	if ((fp = fopen(_PATH_RESCONF, "rc")) != NULL) {
-	    /* No threads use this stream.  */
-	    __fsetlocking (fp, FSETLOCKING_BYCALLER);
+		/* No threads use this stream.  */
+		__fsetlocking (fp, FSETLOCKING_BYCALLER);
 	    /* read the config file */
 	    while (fgets_unlocked(buf, sizeof(buf), fp) != NULL) {
 		/* skip comments */
@@ -397,11 +397,8 @@ __res_vinit(res_state statp, int preinit) {
 	    if (nserv > 1)
 		statp->nscount = nserv;
 #ifdef _LIBC
-	    if (nservall - nserv > 0) {
+	    if (nservall - nserv > 0)
 		statp->_u._ext.nscount6 = nservall - nserv;
-		/* We try IPv6 servers again.  */
-		statp->ipv6_unavail = false;
-	    }
 #endif
 #ifdef RESOLVSORT
 	    statp->nsort = nsort;
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 27dd1d4351..f38c399ffd 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -813,20 +813,17 @@ send_dg(res_state statp,
 	struct pollfd pfd[1];
         int ptimeout;
 	struct sockaddr_in6 from;
+	static int socket_pf = 0;
 	socklen_t fromlen;
 	int resplen, seconds, n;
 
 	if (EXT(statp).nssocks[ns] == -1) {
 		/* only try IPv6 if IPv6 NS and if not failed before */
-		if ((EXT(statp).nscount6 > 0) && !statp->ipv6_unavail) {
+		if ((EXT(statp).nscount6 > 0) && (socket_pf != PF_INET)) {
 			EXT(statp).nssocks[ns] =
 			    socket(PF_INET6, SOCK_DGRAM, 0);
-			if (EXT(statp).nssocks[ns] < 0)
-			    statp->ipv6_unavail = errno == EAFNOSUPPORT;
-			/* If IPv6 socket and nsap is IPv4, make it
-			   IPv4-mapped */
-			else if (nsap->sin6_family == AF_INET)
-			    convaddr4to6(nsap);
+			socket_pf = EXT(statp).nssocks[ns] < 0 ? PF_INET
+			                                       : PF_INET6;
 		}
 		if (EXT(statp).nssocks[ns] < 0)
 			EXT(statp).nssocks[ns] = socket(PF_INET, SOCK_DGRAM, 0);
@@ -835,7 +832,9 @@ send_dg(res_state statp,
 			Perror(statp, stderr, "socket(dg)", errno);
 			return (-1);
 		}
-
+		/* If IPv6 socket and nsap is IPv4, make it IPv4-mapped */
+		if ((socket_pf == PF_INET6) && (nsap->sin6_family == AF_INET))
+			convaddr4to6(nsap);
 		/*
 		 * On a 4.3BSD+ machine (client and server,
 		 * actually), sending to a nameserver datagram
diff --git a/resolv/resolv.h b/resolv/resolv.h
index 105631ee7d..9aa09b8701 100644
--- a/resolv/resolv.h
+++ b/resolv/resolv.h
@@ -110,25 +110,21 @@ struct __res_state {
 		nsaddr_list[MAXNS];	/* address of name server */
 # define nsaddr	nsaddr_list[0]		/* for backward compatibility */
 	u_short	id;			/* current message id */
-	/* 2 byte hole here.  */
 	char	*dnsrch[MAXDNSRCH+1];	/* components of domain to search */
 	char	defdname[256];		/* default domain (deprecated) */
 	u_long	pfcode;			/* RES_PRF_ flags - see below. */
 	unsigned ndots:4;		/* threshold for initial abs. query */
 	unsigned nsort:4;		/* number of elements in sort_list[] */
-	unsigned ipv6_unavail:1;	/* connecting to IPv6 server failed */
-	unsigned unused:23;
+	char	unused[3];
 	struct {
 		struct in_addr	addr;
 		u_int32_t	mask;
 	} sort_list[MAXRESOLVSORT];
-	/* 4 byte hole here on 64-bit architectures.  */
 	res_send_qhook qhook;		/* query hook */
 	res_send_rhook rhook;		/* response hook */
 	int	res_h_errno;		/* last one set for this context */
 	int	_vcsock;		/* PRIVATE: for res_send VC i/o */
 	u_int	_flags;			/* PRIVATE: see below */
-	/* 4 byte hole here on 64-bit architectures.  */
 	union {
 		char	pad[52];	/* On an i386 this means 512b total. */
 		struct {
diff --git a/soft-fp/eqdf2.c b/soft-fp/eqdf2.c
index 82a885834c..efa769e986 100644
--- a/soft-fp/eqdf2.c
+++ b/soft-fp/eqdf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "double.h"
 
-CMPtype __eqdf2(DFtype a, DFtype b)
+int __eqdf2(DFtype a, DFtype b)
 {
   FP_DECL_EX;
   FP_DECL_D(A); FP_DECL_D(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
diff --git a/soft-fp/eqsf2.c b/soft-fp/eqsf2.c
index 0a1180f876..7e01c01d2f 100644
--- a/soft-fp/eqsf2.c
+++ b/soft-fp/eqsf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "single.h"
 
-CMPtype __eqsf2(SFtype a, SFtype b)
+int __eqsf2(SFtype a, SFtype b)
 {
   FP_DECL_EX;
   FP_DECL_S(A); FP_DECL_S(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
diff --git a/soft-fp/eqtf2.c b/soft-fp/eqtf2.c
index 46240b7355..fd6ffd1ebe 100644
--- a/soft-fp/eqtf2.c
+++ b/soft-fp/eqtf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 otherwise
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "quad.h"
 
-CMPtype __eqtf2(TFtype a, TFtype b)
+int __eqtf2(TFtype a, TFtype b)
 {
   FP_DECL_EX;
   FP_DECL_Q(A); FP_DECL_Q(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
diff --git a/soft-fp/gedf2.c b/soft-fp/gedf2.c
index 17a0453adc..e0dc8620ee 100644
--- a/soft-fp/gedf2.c
+++ b/soft-fp/gedf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "double.h"
 
-CMPtype __gedf2(DFtype a, DFtype b)
+int __gedf2(DFtype a, DFtype b)
 {
   FP_DECL_EX;
   FP_DECL_D(A); FP_DECL_D(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
diff --git a/soft-fp/gesf2.c b/soft-fp/gesf2.c
index 609a61f31d..d1f3ba2f9f 100644
--- a/soft-fp/gesf2.c
+++ b/soft-fp/gesf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "single.h"
 
-CMPtype __gesf2(SFtype a, SFtype b)
+int __gesf2(SFtype a, SFtype b)
 {
   FP_DECL_EX;
   FP_DECL_S(A); FP_DECL_S(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
diff --git a/soft-fp/getf2.c b/soft-fp/getf2.c
index eb52d05a4c..82ff283d0d 100644
--- a/soft-fp/getf2.c
+++ b/soft-fp/getf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "quad.h"
 
-CMPtype __getf2(TFtype a, TFtype b)
+int __getf2(TFtype a, TFtype b)
 {
   FP_DECL_EX;
   FP_DECL_Q(A); FP_DECL_Q(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
diff --git a/soft-fp/ledf2.c b/soft-fp/ledf2.c
index b8ba4400d3..528a9819ce 100644
--- a/soft-fp/ledf2.c
+++ b/soft-fp/ledf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "double.h"
 
-CMPtype __ledf2(DFtype a, DFtype b)
+int __ledf2(DFtype a, DFtype b)
 {
   FP_DECL_EX;
   FP_DECL_D(A); FP_DECL_D(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
diff --git a/soft-fp/lesf2.c b/soft-fp/lesf2.c
index cb359c9103..c564bd9539 100644
--- a/soft-fp/lesf2.c
+++ b/soft-fp/lesf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "single.h"
 
-CMPtype __lesf2(SFtype a, SFtype b)
+int __lesf2(SFtype a, SFtype b)
 {
   FP_DECL_EX;
   FP_DECL_S(A); FP_DECL_S(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
diff --git a/soft-fp/letf2.c b/soft-fp/letf2.c
index c7d2f8e079..35e03aaacf 100644
--- a/soft-fp/letf2.c
+++ b/soft-fp/letf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
-   Copyright (C) 1997,1999,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,11 +32,11 @@
 #include "soft-fp.h"
 #include "quad.h"
 
-CMPtype __letf2(TFtype a, TFtype b)
+int __letf2(TFtype a, TFtype b)
 {
   FP_DECL_EX;
   FP_DECL_Q(A); FP_DECL_Q(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h
index 3cc8433332..dbf080e7f4 100644
--- a/soft-fp/soft-fp.h
+++ b/soft-fp/soft-fp.h
@@ -1,5 +1,5 @@
 /* Software floating-point emulation.
-   Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006,2007
+   Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
@@ -189,10 +189,6 @@ typedef unsigned int UHWtype __attribute__((mode(HI)));
 typedef USItype UHWtype;
 #endif
 
-#ifndef CMPtype
-#define CMPtype		int
-#endif
-
 #define SI_BITS		(__CHAR_BIT__ * (int)sizeof(SItype))
 #define DI_BITS		(__CHAR_BIT__ * (int)sizeof(DItype))
 
diff --git a/soft-fp/unorddf2.c b/soft-fp/unorddf2.c
index 5ea63e2b97..c83a563275 100644
--- a/soft-fp/unorddf2.c
+++ b/soft-fp/unorddf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (joseph@codesourcery.com).
 
@@ -31,10 +31,11 @@
 #include "soft-fp.h"
 #include "double.h"
 
-CMPtype __unorddf2(DFtype a, DFtype b)
+int
+__unorddf2(DFtype a, DFtype b)
 {
   FP_DECL_D(A); FP_DECL_D(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
diff --git a/soft-fp/unordsf2.c b/soft-fp/unordsf2.c
index 6d0afe853e..8de7563566 100644
--- a/soft-fp/unordsf2.c
+++ b/soft-fp/unordsf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (joseph@codesourcery.com).
 
@@ -31,11 +31,12 @@
 #include "soft-fp.h"
 #include "single.h"
 
-CMPtype __unordsf2(SFtype a, SFtype b)
+int
+__unordsf2(SFtype a, SFtype b)
 {
   FP_DECL_S(A);
   FP_DECL_S(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
diff --git a/soft-fp/unordtf2.c b/soft-fp/unordtf2.c
index 9d1bd916c8..134b1d09b8 100644
--- a/soft-fp/unordtf2.c
+++ b/soft-fp/unordtf2.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return 1 iff a or b is a NaN, 0 otherwise.
-   Copyright (C) 2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Joseph Myers (joseph@codesourcery.com).
 
@@ -31,11 +31,12 @@
 #include "soft-fp.h"
 #include "quad.h"
 
-CMPtype __unordtf2(TFtype a, TFtype b)
+int
+__unordtf2(TFtype a, TFtype b)
 {
   FP_DECL_Q(A);
   FP_DECL_Q(B);
-  CMPtype r;
+  int r;
 
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
diff --git a/sysdeps/generic/initfini.c b/sysdeps/generic/initfini.c
index d5ef778367..2b8412a428 100644
--- a/sysdeps/generic/initfini.c
+++ b/sysdeps/generic/initfini.c
@@ -81,7 +81,7 @@ call_gmon_start(void)
 }
 
 SECTION (".init");
-extern void __attribute__ ((section (".init"))) _init (void);
+extern void _init (void);
 void
 _init (void)
 {
@@ -107,7 +107,7 @@ asm ("\n/*@_init_EPILOG_ENDS*/");
 asm ("\n/*@_fini_PROLOG_BEGINS*/");
 
 SECTION (".fini");
-extern void __attribute__ ((section (".fini"))) _fini (void);
+extern void _fini (void);
 void
 _fini (void)
 {
diff --git a/sysdeps/powerpc/powerpc32/970/Implies b/sysdeps/powerpc/powerpc32/970/Implies
deleted file mode 100644
index 4e3a983426..0000000000
--- a/sysdeps/powerpc/powerpc32/970/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc32/power4
diff --git a/sysdeps/powerpc/powerpc32/970/fpu/Implies b/sysdeps/powerpc/powerpc32/970/fpu/Implies
deleted file mode 100644
index 7c16e45c29..0000000000
--- a/sysdeps/powerpc/powerpc32/970/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc32/power4/fpu
diff --git a/sysdeps/powerpc/powerpc32/power4/Makefile b/sysdeps/powerpc/powerpc32/power4/Makefile
deleted file mode 100644
index 60aa508ba4..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# Makefile fragment for POWER4/5/5+.
-
-ifeq ($(subdir),string)
-CFLAGS-wordcopy.c += --param max-variable-expansions-in-unroller=2 --param max-unroll-times=2 -funroll-loops -fpeel-loops -ftree-loop-linear
-CFLAGS-memmove.c += --param max-variable-expansions-in-unroller=2 --param max-unroll-times=2 -funroll-loops -fpeel-loops -ftree-loop-linear
-endif
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/Makefile
deleted file mode 100644
index a6fa75ecbc..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# Makefile fragment for POWER4/5/5+ with FPU.
-
-ifeq ($(subdir),math)
-CFLAGS-mpa.c += --param max-unroll-times=4 -funroll-loops -fpeel-loops -ftree-loop-linear 
-endif
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
deleted file mode 100644
index 4a232e27bf..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
+++ /dev/null
@@ -1,549 +0,0 @@
-
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001, 2006 Free Software Foundation
- *
- * This program 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 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-/************************************************************************/
-/*  MODULE_NAME: mpa.c                                                  */
-/*                                                                      */
-/*  FUNCTIONS:                                                          */
-/*               mcr                                                    */
-/*               acr                                                    */
-/*               cr                                                     */
-/*               cpy                                                    */
-/*               cpymn                                                  */
-/*               norm                                                   */
-/*               denorm                                                 */
-/*               mp_dbl                                                 */
-/*               dbl_mp                                                 */
-/*               add_magnitudes                                         */
-/*               sub_magnitudes                                         */
-/*               add                                                    */
-/*               sub                                                    */
-/*               mul                                                    */
-/*               inv                                                    */
-/*               dvd                                                    */
-/*                                                                      */
-/* Arithmetic functions for multiple precision numbers.                 */
-/* Relative errors are bounded                                          */
-/************************************************************************/
-
-
-#include "endian.h"
-#include "mpa.h"
-#include "mpa2.h"
-#include <sys/param.h>	/* For MIN() */
-/* mcr() compares the sizes of the mantissas of two multiple precision  */
-/* numbers. Mantissas are compared regardless of the signs of the       */
-/* numbers, even if x->d[0] or y->d[0] are zero. Exponents are also     */
-/* disregarded.                                                         */
-static int mcr(const mp_no *x, const mp_no *y, int p) {
-  long i;
-  long p2 = p;
-  for (i=1; i<=p2; i++) {
-    if      (X[i] == Y[i])  continue;
-    else if (X[i] >  Y[i])  return  1;
-    else                    return -1; }
-  return 0;
-}
-
-
-
-/* acr() compares the absolute values of two multiple precision numbers */
-int __acr(const mp_no *x, const mp_no *y, int p) {
-  long i;
-
-  if      (X[0] == ZERO) {
-    if    (Y[0] == ZERO) i= 0;
-    else                 i=-1;
-  }
-  else if (Y[0] == ZERO) i= 1;
-  else {
-    if      (EX >  EY)   i= 1;
-    else if (EX <  EY)   i=-1;
-    else                 i= mcr(x,y,p);
-  }
-
-  return i;
-}
-
-
-/* cr90 compares the values of two multiple precision numbers           */
-int  __cr(const mp_no *x, const mp_no *y, int p) {
-  int i;
-
-  if      (X[0] > Y[0])  i= 1;
-  else if (X[0] < Y[0])  i=-1;
-  else if (X[0] < ZERO ) i= __acr(y,x,p);
-  else                   i= __acr(x,y,p);
-
-  return i;
-}
-
-
-/* Copy a multiple precision number. Set *y=*x. x=y is permissible.      */
-void __cpy(const mp_no *x, mp_no *y, int p) {
-  long i;
-
-  EY = EX;
-  for (i=0; i <= p; i++)    Y[i] = X[i];
-
-  return;
-}
-
-
-/* Copy a multiple precision number x of precision m into a */
-/* multiple precision number y of precision n. In case n>m, */
-/* the digits of y beyond the m'th are set to zero. In case */
-/* n<m, the digits of x beyond the n'th are ignored.        */
-/* x=y is permissible.                                      */
-
-void __cpymn(const mp_no *x, int m, mp_no *y, int n) {
-
-  long i,k;
-  long n2 = n;
-  long m2 = m;
-
-  EY = EX;     k=MIN(m2,n2);
-  for (i=0; i <= k; i++)    Y[i] = X[i];
-  for (   ; i <= n2; i++)    Y[i] = ZERO;
-
-  return;
-}
-
-/* Convert a multiple precision number *x into a double precision */
-/* number *y, normalized case  (|x| >= 2**(-1022))) */
-static void norm(const mp_no *x, double *y, int p)
-{
-  #define R  radixi.d
-  long i;
-#if 0
-  int k;
-#endif
-  double a,c,u,v,z[5];
-  if (p<5) {
-    if      (p==1) c = X[1];
-    else if (p==2) c = X[1] + R* X[2];
-    else if (p==3) c = X[1] + R*(X[2]  +   R* X[3]);
-    else if (p==4) c =(X[1] + R* X[2]) + R*R*(X[3] + R*X[4]);
-  }
-  else {
-    for (a=ONE, z[1]=X[1]; z[1] < TWO23; )
-        {a *= TWO;   z[1] *= TWO; }
-
-    for (i=2; i<5; i++) {
-      z[i] = X[i]*a;
-      u = (z[i] + CUTTER)-CUTTER;
-      if  (u > z[i])  u -= RADIX;
-      z[i] -= u;
-      z[i-1] += u*RADIXI;
-    }
-
-    u = (z[3] + TWO71) - TWO71;
-    if (u > z[3])   u -= TWO19;
-    v = z[3]-u;
-
-    if (v == TWO18) {
-      if (z[4] == ZERO) {
-        for (i=5; i <= p; i++) {
-          if (X[i] == ZERO)   continue;
-          else                {z[3] += ONE;   break; }
-        }
-      }
-      else              z[3] += ONE;
-    }
-
-    c = (z[1] + R *(z[2] + R * z[3]))/a;
-  }
-
-  c *= X[0];
-
-  for (i=1; i<EX; i++)   c *= RADIX;
-  for (i=1; i>EX; i--)   c *= RADIXI;
-
-  *y = c;
-  return;
-#undef R
-}
-
-/* Convert a multiple precision number *x into a double precision */
-/* number *y, denormalized case  (|x| < 2**(-1022))) */
-static void denorm(const mp_no *x, double *y, int p)
-{
-  long i,k;
-  long p2 = p;
-  double c,u,z[5];
-#if 0
-  double a,v;
-#endif
-
-#define R  radixi.d
-  if (EX<-44 || (EX==-44 && X[1]<TWO5))
-     { *y=ZERO; return; }
-
-  if      (p2==1) {
-    if      (EX==-42) {z[1]=X[1]+TWO10;  z[2]=ZERO;  z[3]=ZERO;  k=3;}
-    else if (EX==-43) {z[1]=     TWO10;  z[2]=X[1];  z[3]=ZERO;  k=2;}
-    else              {z[1]=     TWO10;  z[2]=ZERO;  z[3]=X[1];  k=1;}
-  }
-  else if (p2==2) {
-    if      (EX==-42) {z[1]=X[1]+TWO10;  z[2]=X[2];  z[3]=ZERO;  k=3;}
-    else if (EX==-43) {z[1]=     TWO10;  z[2]=X[1];  z[3]=X[2];  k=2;}
-    else              {z[1]=     TWO10;  z[2]=ZERO;  z[3]=X[1];  k=1;}
-  }
-  else {
-    if      (EX==-42) {z[1]=X[1]+TWO10;  z[2]=X[2];  k=3;}
-    else if (EX==-43) {z[1]=     TWO10;  z[2]=X[1];  k=2;}
-    else              {z[1]=     TWO10;  z[2]=ZERO;  k=1;}
-    z[3] = X[k];
-  }
-
-  u = (z[3] + TWO57) - TWO57;
-  if  (u > z[3])   u -= TWO5;
-
-  if (u==z[3]) {
-    for (i=k+1; i <= p2; i++) {
-      if (X[i] == ZERO)   continue;
-      else {z[3] += ONE;   break; }
-    }
-  }
-
-  c = X[0]*((z[1] + R*(z[2] + R*z[3])) - TWO10);
-
-  *y = c*TWOM1032;
-  return;
-
-#undef R
-}
-
-/* Convert a multiple precision number *x into a double precision number *y. */
-/* The result is correctly rounded to the nearest/even. *x is left unchanged */
-
-void __mp_dbl(const mp_no *x, double *y, int p) {
-#if 0
-  int i,k;
-  double a,c,u,v,z[5];
-#endif
-
-  if (X[0] == ZERO)  {*y = ZERO;  return; }
-
-  if      (EX> -42)                 norm(x,y,p);
-  else if (EX==-42 && X[1]>=TWO10)  norm(x,y,p);
-  else                              denorm(x,y,p);
-}
-
-
-/* dbl_mp() converts a double precision number x into a multiple precision  */
-/* number *y. If the precision p is too small the result is truncated. x is */
-/* left unchanged.                                                          */
-
-void __dbl_mp(double x, mp_no *y, int p) {
-
-  long i,n;
-  long p2 = p;
-  double u;
-
-  /* Sign */
-  if      (x == ZERO)  {Y[0] = ZERO;  return; }
-  else if (x >  ZERO)   Y[0] = ONE;
-  else                 {Y[0] = MONE;  x=-x;   }
-
-  /* Exponent */
-  for (EY=ONE; x >= RADIX; EY += ONE)   x *= RADIXI;
-  for (      ; x <  ONE;   EY -= ONE)   x *= RADIX;
-
-  /* Digits */
-  n=MIN(p2,4);
-  for (i=1; i<=n; i++) {
-    u = (x + TWO52) - TWO52;
-    if (u>x)   u -= ONE;
-    Y[i] = u;     x -= u;    x *= RADIX; }
-  for (   ; i<=p2; i++)     Y[i] = ZERO;
-  return;
-}
-
-
-/*  add_magnitudes() adds the magnitudes of *x & *y assuming that           */
-/*  abs(*x) >= abs(*y) > 0.                                                 */
-/* The sign of the sum *z is undefined. x&y may overlap but not x&z or y&z. */
-/* No guard digit is used. The result equals the exact sum, truncated.      */
-/* *x & *y are left unchanged.                                              */
-
-static void add_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  long i,j,k;
-  long p2 = p;
-
-  EZ = EX;
-
-  i=p2;    j=p2+ EY - EX;    k=p2+1;
-
-  if (j<1)
-     {__cpy(x,z,p);  return; }
-  else   Z[k] = ZERO;
-
-  for (; j>0; i--,j--) {
-    Z[k] += X[i] + Y[j];
-    if (Z[k] >= RADIX) {
-      Z[k]  -= RADIX;
-      Z[--k] = ONE; }
-    else
-      Z[--k] = ZERO;
-  }
-
-  for (; i>0; i--) {
-    Z[k] += X[i];
-    if (Z[k] >= RADIX) {
-      Z[k]  -= RADIX;
-      Z[--k] = ONE; }
-    else
-      Z[--k] = ZERO;
-  }
-
-  if (Z[1] == ZERO) {
-    for (i=1; i<=p2; i++)    Z[i] = Z[i+1]; }
-  else   EZ += ONE;
-}
-
-
-/*  sub_magnitudes() subtracts the magnitudes of *x & *y assuming that      */
-/*  abs(*x) > abs(*y) > 0.                                                  */
-/* The sign of the difference *z is undefined. x&y may overlap but not x&z  */
-/* or y&z. One guard digit is used. The error is less than one ulp.         */
-/* *x & *y are left unchanged.                                              */
-
-static void sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  long i,j,k;
-  long p2 = p;
-
-  EZ = EX;
-
-  if (EX == EY) {
-    i=j=k=p2;
-    Z[k] = Z[k+1] = ZERO; }
-  else {
-    j= EX - EY;
-    if (j > p2)  {__cpy(x,z,p);  return; }
-    else {
-      i=p2;   j=p2+1-j;   k=p2;
-      if (Y[j] > ZERO) {
-        Z[k+1] = RADIX - Y[j--];
-        Z[k]   = MONE; }
-      else {
-        Z[k+1] = ZERO;
-        Z[k]   = ZERO;   j--;}
-    }
-  }
-
-  for (; j>0; i--,j--) {
-    Z[k] += (X[i] - Y[j]);
-    if (Z[k] < ZERO) {
-      Z[k]  += RADIX;
-      Z[--k] = MONE; }
-    else
-      Z[--k] = ZERO;
-  }
-
-  for (; i>0; i--) {
-    Z[k] += X[i];
-    if (Z[k] < ZERO) {
-      Z[k]  += RADIX;
-      Z[--k] = MONE; }
-    else
-      Z[--k] = ZERO;
-  }
-
-  for (i=1; Z[i] == ZERO; i++) ;
-  EZ = EZ - i + 1;
-  for (k=1; i <= p2+1; )
-    Z[k++] = Z[i++];
-  for (; k <= p2; )
-    Z[k++] = ZERO;
-
-  return;
-}
-
-
-/* Add two multiple precision numbers. Set *z = *x + *y. x&y may overlap  */
-/* but not x&z or y&z. One guard digit is used. The error is less than    */
-/* one ulp. *x & *y are left unchanged.                                   */
-
-void __add(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  int n;
-
-  if      (X[0] == ZERO)     {__cpy(y,z,p);  return; }
-  else if (Y[0] == ZERO)     {__cpy(x,z,p);  return; }
-
-  if (X[0] == Y[0])   {
-    if (__acr(x,y,p) > 0)      {add_magnitudes(x,y,z,p);  Z[0] = X[0]; }
-    else                     {add_magnitudes(y,x,z,p);  Z[0] = Y[0]; }
-  }
-  else                       {
-    if ((n=__acr(x,y,p)) == 1) {sub_magnitudes(x,y,z,p);  Z[0] = X[0]; }
-    else if (n == -1)        {sub_magnitudes(y,x,z,p);  Z[0] = Y[0]; }
-    else                      Z[0] = ZERO;
-  }
-  return;
-}
-
-
-/* Subtract two multiple precision numbers. *z is set to *x - *y. x&y may */
-/* overlap but not x&z or y&z. One guard digit is used. The error is      */
-/* less than one ulp. *x & *y are left unchanged.                         */
-
-void __sub(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  int n;
-
-  if      (X[0] == ZERO)     {__cpy(y,z,p);  Z[0] = -Z[0];  return; }
-  else if (Y[0] == ZERO)     {__cpy(x,z,p);                 return; }
-
-  if (X[0] != Y[0])    {
-    if (__acr(x,y,p) > 0)      {add_magnitudes(x,y,z,p);  Z[0] =  X[0]; }
-    else                     {add_magnitudes(y,x,z,p);  Z[0] = -Y[0]; }
-  }
-  else                       {
-    if ((n=__acr(x,y,p)) == 1) {sub_magnitudes(x,y,z,p);  Z[0] =  X[0]; }
-    else if (n == -1)        {sub_magnitudes(y,x,z,p);  Z[0] = -Y[0]; }
-    else                      Z[0] = ZERO;
-  }
-  return;
-}
-
-
-/* Multiply two multiple precision numbers. *z is set to *x * *y. x&y      */
-/* may overlap but not x&z or y&z. In case p=1,2,3 the exact result is     */
-/* truncated to p digits. In case p>3 the error is bounded by 1.001 ulp.   */
-/* *x & *y are left unchanged.                                             */
-
-void __mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  long i, i1, i2, j, k, k2;
-  long p2 = p;
-  double u, zk, zk2;
-
-                      /* Is z=0? */
-  if (X[0]*Y[0]==ZERO)
-     { Z[0]=ZERO;  return; }
-
-                       /* Multiply, add and carry */
-  k2 = (p2<3) ? p2+p2 : p2+3;
-  zk = Z[k2]=ZERO;
-  for (k=k2; k>1; ) {
-    if (k > p2)  {i1=k-p2; i2=p2+1; }
-    else        {i1=1;   i2=k;   }
-#if 1
-    /* rearange this inner loop to allow the fmadd instructions to be
-       independent and execute in parallel on processors that have
-       dual symetrical FP pipelines.  */
-    if (i1 < (i2-1))
-    {
-	/* make sure we have at least 2 iterations */
-	if (((i2 - i1) & 1L) == 1L)
-	{
-                /* Handle the odd iterations case.  */
-		zk2 = x->d[i2-1]*y->d[i1];
-	}
-	else
-		zk2 = zero.d;
-	/* Do two multiply/adds per loop iteration, using independent
-           accumulators; zk and zk2.  */
-	for (i=i1,j=i2-1; i<i2-1; i+=2,j-=2) 
-	{
-		zk += x->d[i]*y->d[j];
-		zk2 += x->d[i+1]*y->d[j-1];
-	}
-	zk += zk2; /* final sum.  */
-    }
-    else
-    {
-        /* Special case when iterations is 1.  */
-	zk += x->d[i1]*y->d[i1];
-    }
-#else
-    /* The orginal code.  */
-    for (i=i1,j=i2-1; i<i2; i++,j--)  zk += X[i]*Y[j];
-#endif
-
-    u = (zk + CUTTER)-CUTTER;
-    if  (u > zk)  u -= RADIX;
-    Z[k]  = zk - u;
-    zk = u*RADIXI;
-    --k;
-  }
-  Z[k] = zk;
-
-                 /* Is there a carry beyond the most significant digit? */
-  if (Z[1] == ZERO) {
-    for (i=1; i<=p2; i++)  Z[i]=Z[i+1];
-    EZ = EX + EY - 1; }
-  else
-    EZ = EX + EY;
-
-  Z[0] = X[0] * Y[0];
-  return;
-}
-
-
-/* Invert a multiple precision number. Set *y = 1 / *x.                     */
-/* Relative error bound = 1.001*r**(1-p) for p=2, 1.063*r**(1-p) for p=3,   */
-/* 2.001*r**(1-p) for p>3.                                                  */
-/* *x=0 is not permissible. *x is left unchanged.                           */
-
-void __inv(const mp_no *x, mp_no *y, int p) {
-  long i;
-#if 0
-  int l;
-#endif
-  double t;
-  mp_no z,w;
-  static const int np1[] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,3,
-                            4,4,4,4,4,4,4,4,4,4,4,4,4,4,4};
-  const mp_no mptwo = {1,{1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-                         0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-                         0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-                         0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
-
-  __cpy(x,&z,p);  z.e=0;  __mp_dbl(&z,&t,p);
-  t=ONE/t;   __dbl_mp(t,y,p);    EY -= EX;
-
-  for (i=0; i<np1[p]; i++) {
-    __cpy(y,&w,p);
-    __mul(x,&w,y,p);
-    __sub(&mptwo,y,&z,p);
-    __mul(&w,&z,y,p);
-  }
-  return;
-}
-
-
-/* Divide one multiple precision number by another.Set *z = *x / *y. *x & *y */
-/* are left unchanged. x&y may overlap but not x&z or y&z.                   */
-/* Relative error bound = 2.001*r**(1-p) for p=2, 2.063*r**(1-p) for p=3     */
-/* and 3.001*r**(1-p) for p>3. *y=0 is not permissible.                      */
-
-void __dvd(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  mp_no w;
-
-  if (X[0] == ZERO)    Z[0] = ZERO;
-  else                {__inv(y,&w,p);   __mul(x,&w,z,p);}
-  return;
-}
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S
deleted file mode 100644
index ad3cd2769b..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Round double to long int.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-
-/* long long int[r3, r4] __llrint (double x[fp1])  */
-ENTRY (__llrint)	
-	CALL_MCOUNT
-	stwu	r1,-16(r1)
-	cfi_adjust_cfa_offset (16)
-	fctid	fp13,fp1
-	stfd	fp13,8(r1)
-	nop	/* Insure the following load is in a different dispatch group */
-	nop	/* to avoid pipe stall on POWER4&5.  */
-	nop
-	lwz	r3,8(r1)
-	lwz	r4,12(r1)
-	addi	r1,r1,16	
-	blr
-	END (__llrint)
-
-weak_alias (__llrint, llrint)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__llrint, __llrintl)
-weak_alias (__llrint, llrintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S
deleted file mode 100644
index 21353ffb5b..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Round float to long int.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-
-/* long long int[r3, r4] __llrintf (float x[fp1])  */
-ENTRY (__llrintf)	
-	CALL_MCOUNT
-	stwu	r1,-16(r1)
-	cfi_adjust_cfa_offset (16)
-	fctid	fp13,fp1
-	stfd	fp13,8(r1)
-	nop	/* Insure the following load is in a different dispatch group */
-	nop	/* to avoid pipe stall on POWER4&5.  */
-	nop
-	lwz	r3,8(r1)
-	lwz	r4,12(r1)
-	addi	r1,r1,16	
-	blr
-	END (__llrintf)
-
-weak_alias (__llrintf, llrintf)
-
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
deleted file mode 100644
index 952d2aa6a5..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
+++ /dev/null
@@ -1,97 +0,0 @@
-/* llround function.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004, 2006 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., 1 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-
-	.section	.rodata.cst8,"aM",@progbits,8
-	.align	2
-.LC0:	/* 0.0 */
-	.long 0x00000000
-.LC1:	/* 0.5 */
-	.long 0x3f000000
-
-	.section	".text"
-	
-/* long [r3] lround (float x [fp1])
-   IEEE 1003.1 lround function.  IEEE specifies "round to the nearest 
-   integer value, rounding halfway cases away from zero, regardless of
-   the current rounding mode."  However PowerPC Architecture defines
-   "round to Nearest" as "Choose the best approximation. In case of a 
-   tie, choose the one that is even (least significant bit o).". 
-   So we can't use the PowerPC "round to Nearest" mode. Instead we set
-   "round toward Zero" mode and round by adding +-0.5 before rounding
-   to the integer value.  */
-
-ENTRY (__llround)
-	stwu    r1,-16(r1)
-	cfi_adjust_cfa_offset (16)
-#ifdef SHARED
-	mflr	r11
-	cfi_register(lr,r11)
-# ifdef HAVE_ASM_PPC_REL16
-	bcl	20,31,1f
-1:	mflr	r9
-	addis	r9,r9,.LC0-1b@ha
-	addi	r9,r9,.LC0-1b@l
-# else
-	bl	_GLOBAL_OFFSET_TABLE_@local-4
-	mflr	r10
-	lwz	r9,.LC0@got(10)
-# endif
-	mtlr	r11
-	cfi_same_value (lr)
-	lfs	fp12,0(r9)
-	lfs	fp10,.LC1-.LC0(r9)
-#else
-	lis	r9,.LC0@ha
-	lis	r10,.LC1@ha
-	lfs	fp12,.LC0@l(r9)
-	lfs	fp10,.LC1@l(r10)
-#endif
-	fcmpu	cr6,fp1,fp12	/* if (x > 0.0)  */
-	ble-	cr6,.L4
-	fadd	fp1,fp1,fp10	/* x+= 0.5;  */
-.L9:
-	fctidz	fp2,fp1		/* Convert To Integer DW round toward 0.  */
-	stfd	fp2,8(r1)
-	nop	/* Ensure the following load is in a different dispatch  */
-	nop	/* group to avoid pipe stall on POWER4&5.  */
-	nop
-	lwz	r4,12(r1)
-	lwz	r3,8(r1)
-	addi	r1,r1,16
-	blr
-.L4:
-	fsub	fp1,fp1,fp10	/* x-= 0.5;  */
-	b	.L9
-	END (__llround)
-
-weak_alias (__llround, llround)
-
-strong_alias (__llround, __llroundf)
-weak_alias (__llround, llroundf)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__llround, llroundl)
-strong_alias (__llround, __llroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llround, llroundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llroundf.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llroundf.S
deleted file mode 100644
index 72d6181541..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llroundf.S
+++ /dev/null
@@ -1 +0,0 @@
-/* __llroundf is in s_llround.S */
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c b/sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c
deleted file mode 100644
index b22b0dfeab..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001, 2007 Free Software Foundation
- *
- * This program 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 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-/**************************************************************************/
-/*  MODULE_NAME:slowexp.c                                                 */
-/*                                                                        */
-/*  FUNCTION:slowexp                                                      */
-/*                                                                        */
-/*  FILES NEEDED:mpa.h                                                    */
-/*               mpa.c mpexp.c                                            */
-/*                                                                        */
-/*Converting from double precision to Multi-precision and calculating     */
-/* e^x                                                                    */
-/**************************************************************************/
-#include "math_private.h"
-
-#ifdef NO_LONG_DOUBLE
-#include "mpa.h"
-void __mpexp(mp_no *x, mp_no *y, int p);
-#endif
-
-/*Converting from double precision to Multi-precision and calculating  e^x */
-double __slowexp(double x) {
-#ifdef NO_LONG_DOUBLE
-  double w,z,res,eps=3.0e-26;
-  int p;
-  mp_no mpx, mpy, mpz,mpw,mpeps,mpcor;
-
-  p=6;
-  __dbl_mp(x,&mpx,p); /* Convert a double precision number  x               */
-                    /* into a multiple precision number mpx with prec. p. */
-  __mpexp(&mpx, &mpy, p); /* Multi-Precision exponential function */
-  __dbl_mp(eps,&mpeps,p);
-  __mul(&mpeps,&mpy,&mpcor,p);
-  __add(&mpy,&mpcor,&mpw,p);
-  __sub(&mpy,&mpcor,&mpz,p);
-  __mp_dbl(&mpw, &w, p);
-  __mp_dbl(&mpz, &z, p);
-  if (w == z) return w;
-  else  {                   /* if calculating is not exactly   */
-    p = 32;
-    __dbl_mp(x,&mpx,p);
-    __mpexp(&mpx, &mpy, p);
-    __mp_dbl(&mpy, &res, p);
-    return res;
-  }
-#else
-  return (double) __ieee754_expl((long double)x);
-#endif
-}
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c b/sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c
deleted file mode 100644
index ad147a89a6..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001, 2006 Free Software Foundation
- *
- * This program 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 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-/*************************************************************************/
-/* MODULE_NAME:slowpow.c                                                 */
-/*                                                                       */
-/* FUNCTION:slowpow                                                      */
-/*                                                                       */
-/*FILES NEEDED:mpa.h                                                     */
-/*             mpa.c mpexp.c mplog.c halfulp.c                           */
-/*                                                                       */
-/* Given two IEEE double machine numbers y,x , routine  computes the     */
-/* correctly  rounded (to nearest) value of x^y. Result calculated  by   */
-/* multiplication (in halfulp.c) or if result isn't accurate enough      */
-/* then routine converts x and y into multi-precision doubles and        */
-/* recompute.                                                            */
-/*************************************************************************/
-
-#include "mpa.h"
-#include "math_private.h"
-
-void __mpexp (mp_no * x, mp_no * y, int p);
-void __mplog (mp_no * x, mp_no * y, int p);
-double ulog (double);
-double __halfulp (double x, double y);
-
-double
-__slowpow (double x, double y, double z)
-{
-  double res, res1;
-  long double ldw, ldz, ldpp;
-  static const long double ldeps = 0x4.0p-96;
-
-  res = __halfulp (x, y);	/* halfulp() returns -10 or x^y             */
-  if (res >= 0)
-    return res;			/* if result was really computed by halfulp */
-  /*  else, if result was not really computed by halfulp */
-
-  /* Compute pow as long double, 106 bits */
-  ldz = __ieee754_logl ((long double) x);
-  ldw = (long double) y *ldz;
-  ldpp = __ieee754_expl (ldw);
-  res = (double) (ldpp + ldeps);
-  res1 = (double) (ldpp - ldeps);
-
-  if (res != res1)		/* if result still not accurate enough */
-    {				/* use mpa for higher persision.  */
-      mp_no mpx, mpy, mpz, mpw, mpp, mpr, mpr1;
-      static const mp_no eps = { -3, {1.0, 4.0} };
-      int p;
-
-      p = 10;			/*  p=precision 240 bits  */
-      __dbl_mp (x, &mpx, p);
-      __dbl_mp (y, &mpy, p);
-      __dbl_mp (z, &mpz, p);
-      __mplog (&mpx, &mpz, p);		/* log(x) = z   */
-      __mul (&mpy, &mpz, &mpw, p);	/*  y * z =w    */
-      __mpexp (&mpw, &mpp, p);		/*  e^w =pp     */
-      __add (&mpp, &eps, &mpr, p);	/*  pp+eps =r   */
-      __mp_dbl (&mpr, &res, p);
-      __sub (&mpp, &eps, &mpr1, p);	/*  pp -eps =r1 */
-      __mp_dbl (&mpr1, &res1, p);	/*  converting into double precision */
-      if (res == res1)
-	return res;
-
-      /* if we get here result wasn't calculated exactly, continue for
-         more exact calculation using 768 bits.  */
-      p = 32;
-      __dbl_mp (x, &mpx, p);
-      __dbl_mp (y, &mpy, p);
-      __dbl_mp (z, &mpz, p);
-      __mplog (&mpx, &mpz, p);		/* log(c)=z  */
-      __mul (&mpy, &mpz, &mpw, p);	/* y*z =w    */
-      __mpexp (&mpw, &mpp, p);		/* e^w=pp    */
-      __mp_dbl (&mpp, &res, p);		/* converting into double precision */
-    }
-  return res;
-}
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.c b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.c
deleted file mode 100644
index f59c193934..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Double-precision floating point square root wrapper.
-   Copyright (C) 2004, 2007 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 <math_ldbl_opt.h>
-#include "math.h"
-#include "math_private.h"
-#include <fenv_libc.h>
-
-#ifdef __STDC__
-double
-__sqrt (double x)		/* wrapper sqrt */
-#else
-double
-__sqrt (x)			/* wrapper sqrt */
-     double x;
-#endif
-{
-  double z;
-/* Power4 (ISA V2.0) and above implement sqrt in hardware.  */
-   __asm __volatile (
-	"	fsqrt	%0,%1\n"
-		: "=f" (z)
-		: "f" (x));
-#ifdef _IEEE_LIBM
-  return z;
-#else
-  if (__builtin_expect (_LIB_VERSION == _IEEE_, 0))
-    return z;
-    
-  if (__builtin_expect (x != x, 0))
-    return z;
-
-  if  (__builtin_expect (x < 0.0, 0))
-    return __kernel_standard (x, x, 26);	/* sqrt(negative) */
-  else
-    return z;
-#endif
-}
-
-weak_alias (__sqrt, sqrt)
-#ifdef NO_LONG_DOUBLE
-  strong_alias (__sqrt, __sqrtl) weak_alias (__sqrt, sqrtl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.c b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.c
deleted file mode 100644
index 4784869f07..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Single-precision floating point square root wrapper.
-   Copyright (C) 2004, 2007 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 "math.h"
-#include "math_private.h"
-#include <fenv_libc.h>
-
-#include <sysdep.h>
-#include <ldsodefs.h>
-
-#ifdef __STDC__
-float
-__sqrtf (float x)		/* wrapper sqrtf */
-#else
-float
-__sqrtf (x)			/* wrapper sqrtf */
-     float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-  return __ieee754_sqrtf (x);
-#else
-  float z;
-/* Power4 (ISA V2.0) and above implement sqrtf in hardware.  */
-   __asm __volatile (
-	"	fsqrts	%0,%1\n"
-		: "=f" (z)
-		: "f" (x));
-
-  if (__builtin_expect (_LIB_VERSION == _IEEE_, 0))
-    return z;
-    
-  if (__builtin_expect (x != x, 0))
-    return z;
-    
-  if  (__builtin_expect (x < 0.0, 0))
-    /* sqrtf(negative) */
-    return (float) __kernel_standard ((double) x, (double) x, 126);
-  else
-    return z;
-#endif
-}
-
-weak_alias (__sqrtf, sqrtf)
diff --git a/sysdeps/powerpc/powerpc32/power4/memcmp.S b/sysdeps/powerpc/powerpc32/power4/memcmp.S
deleted file mode 100644
index 4715302739..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/memcmp.S
+++ /dev/null
@@ -1,985 +0,0 @@
-/* Optimized strcmp implementation for PowerPC64.
-   Copyright (C) 2003, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* int [r3] memcmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5])  */
-
-EALIGN (BP_SYM(memcmp), 4, 0)
-	CALL_MCOUNT
-
-#define rTMP	r0
-#define rRTN	r3
-#define rSTR1	r3	/* first string arg */
-#define rSTR2	r4	/* second string arg */
-#define rN	r5	/* max string length */
-#define rWORD1	r6	/* current word in s1 */
-#define rWORD2	r7	/* current word in s2 */
-#define rWORD3	r8	/* next word in s1 */
-#define rWORD4	r9	/* next word in s2 */
-#define rWORD5	r10	/* next word in s1 */
-#define rWORD6	r11	/* next word in s2 */
-#define rBITDIF	r12	/* bits that differ in s1 & s2 words */
-#define rWORD7	r30	/* next word in s1 */
-#define rWORD8	r31	/* next word in s2 */
-
-	xor	rTMP, rSTR2, rSTR1
-	cmplwi	cr6, rN, 0
-	cmplwi	cr1, rN, 12
-	clrlwi.	rTMP, rTMP, 30
-	clrlwi	rBITDIF, rSTR1, 30
-	cmplwi	cr5, rBITDIF, 0
-	beq-	cr6, L(zeroLength)
-	dcbt	0,rSTR1
-	dcbt	0,rSTR2
-/* If less than 8 bytes or not aligned, use the unaligned
-   byte loop.  */
-	blt	cr1, L(bytealigned)
-        stwu    1,-64(1)
-	cfi_adjust_cfa_offset(64)
-        stw     r31,48(1)	
-	cfi_offset(31,(48-64))
-        stw     r30,44(1)	
-	cfi_offset(30,(44-64))
-	bne	L(unaligned)
-/* At this point we know both strings have the same alignment and the
-   compare length is at least 8 bytes.  rBITDIF contains the low order
-   2 bits of rSTR1 and cr5 contains the result of the logical compare
-   of rBITDIF to 0.  If rBITDIF == 0 then we are already word 
-   aligned and can perform the word aligned loop.
-  
-   Otherwise we know the two strings have the same alignment (but not
-   yet word aligned).  So we force the string addresses to the next lower
-   word boundary and special case this first word using shift left to
-   eliminate bits preceeding the first byte.  Since we want to join the
-   normal (word aligned) compare loop, starting at the second word,
-   we need to adjust the length (rN) and special case the loop
-   versioning for the first word. This insures that the loop count is
-   correct and the first word (shifted) is in the expected register pair. */
-	.align 4
-L(samealignment):
-	clrrwi	rSTR1, rSTR1, 2
-	clrrwi	rSTR2, rSTR2, 2
-	beq	cr5, L(Waligned)
-	add	rN, rN, rBITDIF
-	slwi	r11, rBITDIF, 3
-	srwi	rTMP, rN, 4	 /* Divide by 16 */
-	andi.	rBITDIF, rN, 12  /* Get the word remainder */
-	lwz	rWORD1, 0(rSTR1)
-	lwz	rWORD2, 0(rSTR2)
-	cmplwi	cr1, rBITDIF, 8
-	cmplwi	cr7, rN, 16
-	clrlwi	rN, rN, 30
-	beq	L(dPs4)
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	bgt	cr1, L(dPs3)
-	beq	cr1, L(dPs2)
-
-/* Remainder is 4 */
-	.align 3
-L(dsP1):
-	slw	rWORD5, rWORD1, r11
-	slw	rWORD6, rWORD2, r11
-	cmplw	cr5, rWORD5, rWORD6
-	blt	cr7, L(dP1x)
-/* Do something useful in this cycle since we have to branch anyway.  */
-	lwz	rWORD1, 4(rSTR1)
-	lwz	rWORD2, 4(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-	b	L(dP1e)
-/* Remainder is 8 */
-	.align 4
-L(dPs2):
-	slw	rWORD5, rWORD1, r11
-	slw	rWORD6, rWORD2, r11
-	cmplw	cr6, rWORD5, rWORD6
-	blt	cr7, L(dP2x)
-/* Do something useful in this cycle since we have to branch anyway.  */
-	lwz	rWORD7, 4(rSTR1)
-	lwz	rWORD8, 4(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-	b	L(dP2e)
-/* Remainder is 12 */
-	.align 4
-L(dPs3):
-	slw	rWORD3, rWORD1, r11
-	slw	rWORD4, rWORD2, r11
-	cmplw	cr1, rWORD3, rWORD4
-	b	L(dP3e)
-/* Count is a multiple of 16, remainder is 0 */
-	.align 4
-L(dPs4):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	slw	rWORD1, rWORD1, r11
-	slw	rWORD2, rWORD2, r11
-	cmplw	cr0, rWORD1, rWORD2
-	b	L(dP4e)
-
-/* At this point we know both strings are word aligned and the
-   compare length is at least 8 bytes.  */
-	.align 4
-L(Waligned):
-	andi.	rBITDIF, rN, 12  /* Get the word remainder */
-	srwi	rTMP, rN, 4	 /* Divide by 16 */
-	cmplwi	cr1, rBITDIF, 8
-	cmplwi	cr7, rN, 16
-	clrlwi	rN, rN, 30
-	beq	L(dP4)
-	bgt	cr1, L(dP3)
-	beq	cr1, L(dP2)
-		
-/* Remainder is 4 */
-	.align 4
-L(dP1):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-/* Normally we'd use rWORD7/rWORD8 here, but since we might exit early
-   (8-15 byte compare), we want to use only volatile registers.  This
-   means we can avoid restoring non-volatile registers since we did not
-   change any on the early exit path.  The key here is the non-early
-   exit path only cares about the condition code (cr5), not about which 
-   register pair was used.  */
-	lwz	rWORD5, 0(rSTR1)
-	lwz	rWORD6, 0(rSTR2)
-	cmplw	cr5, rWORD5, rWORD6
-	blt	cr7, L(dP1x)
-	lwz	rWORD1, 4(rSTR1)
-	lwz	rWORD2, 4(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-L(dP1e):
-	lwz	rWORD3, 8(rSTR1)
-	lwz	rWORD4, 8(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-	lwz	rWORD5, 12(rSTR1)
-	lwz	rWORD6, 12(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	bne	cr5, L(dLcr5)
-	bne	cr0, L(dLcr0)
-	
-	lwzu	rWORD7, 16(rSTR1)
-	lwzu	rWORD8, 16(rSTR2)
-	bne	cr1, L(dLcr1)
-	cmplw	cr5, rWORD7, rWORD8
-	bdnz	L(dLoop)
-	bne	cr6, L(dLcr6)
-        lwz     r30,44(1)
-        lwz     r31,48(1)
-	.align 3
-L(dP1x):
-	slwi.	r12, rN, 3
-	bne	cr5, L(dLcr5)
-	subfic	rN, r12, 32	/* Shift count is 32 - (rN * 8).  */
-        lwz     1,0(1)
-	bne	L(d00)
-	li	rRTN, 0
-	blr
-		
-/* Remainder is 8 */
-	.align 4
-L(dP2):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	lwz	rWORD5, 0(rSTR1)
-	lwz	rWORD6, 0(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	blt	cr7, L(dP2x)
-	lwz	rWORD7, 4(rSTR1)
-	lwz	rWORD8, 4(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-L(dP2e):
-	lwz	rWORD1, 8(rSTR1)
-	lwz	rWORD2, 8(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-	lwz	rWORD3, 12(rSTR1)
-	lwz	rWORD4, 12(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-	addi	rSTR1, rSTR1, 4
-	addi	rSTR2, rSTR2, 4
-	bne	cr6, L(dLcr6)
-	bne	cr5, L(dLcr5)
-	b	L(dLoop2)
-/* Again we are on a early exit path (16-23 byte compare), we want to
-   only use volatile registers and avoid restoring non-volatile
-   registers.  */
-	.align 4
-L(dP2x):
-	lwz	rWORD3, 4(rSTR1)
-	lwz	rWORD4, 4(rSTR2)
-	cmplw	cr5, rWORD3, rWORD4
-	slwi.	r12, rN, 3
-	bne	cr6, L(dLcr6)
-	addi	rSTR1, rSTR1, 4
-	addi	rSTR2, rSTR2, 4
-	bne	cr5, L(dLcr5)
-	subfic	rN, r12, 32	/* Shift count is 32 - (rN * 8).  */
-        lwz     1,0(1)
-	bne	L(d00)
-	li	rRTN, 0
-	blr
-		
-/* Remainder is 12 */
-	.align 4
-L(dP3):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	lwz	rWORD3, 0(rSTR1)
-	lwz	rWORD4, 0(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-L(dP3e):
-	lwz	rWORD5, 4(rSTR1)
-	lwz	rWORD6, 4(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	blt	cr7, L(dP3x)
-	lwz	rWORD7, 8(rSTR1)
-	lwz	rWORD8, 8(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-	lwz	rWORD1, 12(rSTR1)
-	lwz	rWORD2, 12(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-	addi	rSTR1, rSTR1, 8
-	addi	rSTR2, rSTR2, 8
-	bne	cr1, L(dLcr1)
-	bne	cr6, L(dLcr6)
-	b	L(dLoop1)
-/* Again we are on a early exit path (24-31 byte compare), we want to
-   only use volatile registers and avoid restoring non-volatile
-   registers.  */
-	.align 4
-L(dP3x):
-	lwz	rWORD1, 8(rSTR1)
-	lwz	rWORD2, 8(rSTR2)
-	cmplw	cr5, rWORD1, rWORD2
-	slwi.	r12, rN, 3
-	bne	cr1, L(dLcr1)
-	addi	rSTR1, rSTR1, 8
-	addi	rSTR2, rSTR2, 8
-	bne	cr6, L(dLcr6)
-	subfic	rN, r12, 32	/* Shift count is 32 - (rN * 8).  */
-	bne	cr5, L(dLcr5)
-        lwz     1,0(1)
-	bne	L(d00)
-	li	rRTN, 0
-	blr
-	
-/* Count is a multiple of 16, remainder is 0 */
-	.align 4
-L(dP4):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	lwz	rWORD1, 0(rSTR1)
-	lwz	rWORD2, 0(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-L(dP4e):
-	lwz	rWORD3, 4(rSTR1)
-	lwz	rWORD4, 4(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-	lwz	rWORD5, 8(rSTR1)
-	lwz	rWORD6, 8(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	lwzu	rWORD7, 12(rSTR1)
-	lwzu	rWORD8, 12(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-	bne	cr0, L(dLcr0)
-	bne	cr1, L(dLcr1)
-	bdz-	L(d24)		/* Adjust CTR as we start with +4 */
-/* This is the primary loop */
-	.align 4
-L(dLoop):
-	lwz	rWORD1, 4(rSTR1)
-	lwz	rWORD2, 4(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-	bne	cr6, L(dLcr6)
-L(dLoop1):
-	lwz	rWORD3, 8(rSTR1)
-	lwz	rWORD4, 8(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	bne	cr5, L(dLcr5)
-L(dLoop2):
-	lwz	rWORD5, 12(rSTR1)
-	lwz	rWORD6, 12(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-	bne	cr0, L(dLcr0)
-L(dLoop3):
-	lwzu	rWORD7, 16(rSTR1)
-	lwzu	rWORD8, 16(rSTR2)
-	bne-	cr1, L(dLcr1)
-	cmplw	cr0, rWORD1, rWORD2
-	bdnz+	L(dLoop)	
-	
-L(dL4):
-	cmplw	cr1, rWORD3, rWORD4
-	bne	cr6, L(dLcr6)
-	cmplw	cr6, rWORD5, rWORD6
-	bne	cr5, L(dLcr5)
-	cmplw	cr5, rWORD7, rWORD8
-L(d44):
-	bne	cr0, L(dLcr0)
-L(d34):
-	bne	cr1, L(dLcr1)
-L(d24):
-	bne	cr6, L(dLcr6)
-L(d14):
-	slwi.	r12, rN, 3
-	bne	cr5, L(dLcr5) 
-L(d04):
-        lwz     r30,44(1)
-        lwz     r31,48(1)
-        lwz     1,0(1)
-	subfic	rN, r12, 32	/* Shift count is 32 - (rN * 8).  */
-	beq	L(zeroLength)
-/* At this point we have a remainder of 1 to 3 bytes to compare.  Since
-   we are aligned it is safe to load the whole word, and use
-   shift right to eliminate bits beyond the compare length. */ 
-L(d00):
-	lwz	rWORD1, 4(rSTR1)
-	lwz	rWORD2, 4(rSTR2) 
-	srw	rWORD1, rWORD1, rN
-	srw	rWORD2, rWORD2, rN
-        cmplw   rWORD1,rWORD2
-        li      rRTN,0
-        beqlr
-        li      rRTN,1
-        bgtlr
-        li      rRTN,-1
-        blr
-
-	.align 4
-L(dLcr0):
-        lwz     r30,44(1)
-        lwz     r31,48(1)
-	li	rRTN, 1
-        lwz     1,0(1)
-	bgtlr	cr0
-	li	rRTN, -1
-	blr
-	.align 4
-L(dLcr1):
-        lwz     r30,44(1)
-        lwz     r31,48(1)
-	li	rRTN, 1
-        lwz     1,0(1)
-	bgtlr	cr1
-	li	rRTN, -1
-	blr
-	.align 4
-L(dLcr6):
-        lwz     r30,44(1)
-        lwz     r31,48(1)
-	li	rRTN, 1
-        lwz     1,0(1)
-	bgtlr	cr6
-	li	rRTN, -1
-	blr
-	.align 4
-L(dLcr5):
-        lwz     r30,44(1)
-        lwz     r31,48(1)
-L(dLcr5x):
-	li	rRTN, 1
-        lwz     1,0(1)
-	bgtlr	cr5
-	li	rRTN, -1
-	blr
-	
-	.align 4
-L(bytealigned):
-	cfi_adjust_cfa_offset(-64)
-	mtctr   rN	/* Power4 wants mtctr 1st in dispatch group */
-
-/* We need to prime this loop.  This loop is swing modulo scheduled
-   to avoid pipe delays.  The dependent instruction latencies (load to 
-   compare to conditional branch) is 2 to 3 cycles.  In this loop each
-   dispatch group ends in a branch and takes 1 cycle.  Effectively
-   the first iteration of the loop only serves to load operands and 
-   branches based on compares are delayed until the next loop. 
-
-   So we must precondition some registers and condition codes so that
-   we don't exit the loop early on the first iteration.  */
-   
-	lbz	rWORD1, 0(rSTR1)
-	lbz	rWORD2, 0(rSTR2)
-	bdz-	L(b11)
-	cmplw	cr0, rWORD1, rWORD2
-	lbz	rWORD3, 1(rSTR1)
-	lbz	rWORD4, 1(rSTR2)
-	bdz-	L(b12)
-	cmplw	cr1, rWORD3, rWORD4
-	lbzu	rWORD5, 2(rSTR1)
-	lbzu	rWORD6, 2(rSTR2)
-	bdz-	L(b13)
-	.align 4
-L(bLoop):
-	lbzu	rWORD1, 1(rSTR1)
-	lbzu	rWORD2, 1(rSTR2)
-	bne-	cr0, L(bLcr0)
-
-	cmplw	cr6, rWORD5, rWORD6
-	bdz-	L(b3i)
-	
-	lbzu	rWORD3, 1(rSTR1)
-	lbzu	rWORD4, 1(rSTR2)
-	bne-	cr1, L(bLcr1)
-
-	cmplw	cr0, rWORD1, rWORD2
-	bdz-	L(b2i)
-
-	lbzu	rWORD5, 1(rSTR1)
-	lbzu	rWORD6, 1(rSTR2)
-	bne-	cr6, L(bLcr6)
-
-	cmplw	cr1, rWORD3, rWORD4
-	bdnz+	L(bLoop)
-	
-/* We speculatively loading bytes before we have tested the previous
-   bytes.  But we must avoid overrunning the length (in the ctr) to
-   prevent these speculative loads from causing a segfault.  In this 
-   case the loop will exit early (before the all pending bytes are
-   tested.  In this case we must complete the pending operations
-   before returning.  */
-L(b1i):
-	bne-	cr0, L(bLcr0)
-	bne-	cr1, L(bLcr1)
-	b	L(bx56)
-	.align 4
-L(b2i):
-	bne-	cr6, L(bLcr6)
-	bne-	cr0, L(bLcr0)
-	b	L(bx34)
-	.align 4
-L(b3i):
-	bne-	cr1, L(bLcr1)
-	bne-	cr6, L(bLcr6)
-	b	L(bx12)
-	.align 4
-L(bLcr0):
-	li	rRTN, 1
-	bgtlr	cr0
-	li	rRTN, -1
-	blr
-L(bLcr1):
-	li	rRTN, 1
-	bgtlr	cr1
-	li	rRTN, -1
-	blr
-L(bLcr6):
-	li	rRTN, 1
-	bgtlr	cr6
-	li	rRTN, -1
-	blr
-
-L(b13):
-	bne-	cr0, L(bx12)
-	bne-	cr1, L(bx34)
-L(bx56):
-	sub	rRTN, rWORD5, rWORD6
-	blr
-	nop
-L(b12):
-	bne-	cr0, L(bx12)
-L(bx34):	
-	sub	rRTN, rWORD3, rWORD4
-	blr
-
-L(b11):
-L(bx12):
-	sub	rRTN, rWORD1, rWORD2
-	blr
-
-	.align 4 
-L(zeroLengthReturn):
-
-L(zeroLength):
-	li	rRTN, 0
-	blr
-
-	cfi_adjust_cfa_offset(64)
-	.align 4
-/* At this point we know the strings have different alignment and the
-   compare length is at least 8 bytes.  rBITDIF contains the low order
-   2 bits of rSTR1 and cr5 contains the result of the logical compare
-   of rBITDIF to 0.  If rBITDIF == 0 then rStr1 is word aligned and can 
-   perform the Wunaligned loop.
-  
-   Otherwise we know that rSTR1 is not aready word aligned yet.
-   So we can force the string addresses to the next lower word
-   boundary and special case this first word using shift left to
-   eliminate bits preceeding the first byte.  Since we want to join the
-   normal (Wualigned) compare loop, starting at the second word,
-   we need to adjust the length (rN) and special case the loop
-   versioning for the first W. This insures that the loop count is
-   correct and the first W (shifted) is in the expected resister pair.  */
-#define rSHL		r29	/* Unaligned shift left count.  */
-#define rSHR		r28	/* Unaligned shift right count.  */
-#define rB		r27	/* Left rotation temp for rWORD2.  */
-#define rD		r26	/* Left rotation temp for rWORD4.  */
-#define rF		r25	/* Left rotation temp for rWORD6.  */
-#define rH		r24	/* Left rotation temp for rWORD8.  */
-#define rA		r0	/* Right rotation temp for rWORD2.  */
-#define rC		r12	/* Right rotation temp for rWORD4.  */
-#define rE		r0	/* Right rotation temp for rWORD6.  */
-#define rG		r12	/* Right rotation temp for rWORD8.  */
-L(unaligned):
-	stw     r29,40(r1)	
-	cfi_offset(r29,(40-64))	
-	clrlwi	rSHL, rSTR2, 30
-        stw     r28,36(r1)	
-	cfi_offset(r28,(36-64))
-	beq	cr5, L(Wunaligned)
-        stw     r27,32(r1)	
-	cfi_offset(r27,(32-64))
-/* Adjust the logical start of rSTR2 to compensate for the extra bits
-   in the 1st rSTR1 W.  */
-	sub	r27, rSTR2, rBITDIF
-/* But do not attempt to address the W before that W that contains
-   the actual start of rSTR2.  */
-	clrrwi	rSTR2, rSTR2, 2
-        stw     r26,28(r1)	
-	cfi_offset(r26,(28-64))
-/* Compute the left/right shift counts for the unalign rSTR2,
-   compensating for the logical (W aligned) start of rSTR1.  */ 
-	clrlwi	rSHL, r27, 30
-	clrrwi	rSTR1, rSTR1, 2	
-        stw     r25,24(r1)	
-	cfi_offset(r25,(24-64))
-	slwi	rSHL, rSHL, 3
-	cmplw	cr5, r27, rSTR2
-	add	rN, rN, rBITDIF
-	slwi	r11, rBITDIF, 3
-        stw     r24,20(r1)	
-	cfi_offset(r24,(20-64))
-	subfic	rSHR, rSHL, 32
-	srwi	rTMP, rN, 4      /* Divide by 16 */
-	andi.	rBITDIF, rN, 12  /* Get the W remainder */
-/* We normally need to load 2 Ws to start the unaligned rSTR2, but in
-   this special case those bits may be discarded anyway.  Also we
-   must avoid loading a W where none of the bits are part of rSTR2 as
-   this may cross a page boundary and cause a page fault.  */
-	li	rWORD8, 0
-	blt	cr5, L(dus0)
-	lwz	rWORD8, 0(rSTR2)
-	la	rSTR2, 4(rSTR2)
-	slw	rWORD8, rWORD8, rSHL
-
-L(dus0):
-	lwz	rWORD1, 0(rSTR1)
-	lwz	rWORD2, 0(rSTR2)
-	cmplwi	cr1, rBITDIF, 8
-	cmplwi	cr7, rN, 16
-	srw	rG, rWORD2, rSHR
-	clrlwi	rN, rN, 30
-	beq	L(duPs4)
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	or	rWORD8, rG, rWORD8
-	bgt	cr1, L(duPs3)
-	beq	cr1, L(duPs2)
-
-/* Remainder is 4 */
-	.align 4
-L(dusP1):
-	slw	rB, rWORD2, rSHL
-	slw	rWORD7, rWORD1, r11
-	slw	rWORD8, rWORD8, r11
-	bge	cr7, L(duP1e)
-/* At this point we exit early with the first word compare
-   complete and remainder of 0 to 3 bytes.  See L(du14) for details on
-   how we handle the remaining bytes.  */
-	cmplw	cr5, rWORD7, rWORD8
-	slwi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-	cmplw	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	lwz	rWORD2, 4(rSTR2)
-	srw	rA, rWORD2, rSHR
-	b	L(dutrim)
-/* Remainder is 8 */
-	.align 4
-L(duPs2):
-	slw	rH, rWORD2, rSHL
-	slw	rWORD5, rWORD1, r11
-	slw	rWORD6, rWORD8, r11
-	b	L(duP2e)
-/* Remainder is 12 */
-	.align 4
-L(duPs3):
-	slw	rF, rWORD2, rSHL
-	slw	rWORD3, rWORD1, r11
-	slw	rWORD4, rWORD8, r11
-	b	L(duP3e)
-/* Count is a multiple of 16, remainder is 0 */
-	.align 4
-L(duPs4):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	or	rWORD8, rG, rWORD8
-	slw	rD, rWORD2, rSHL
-	slw	rWORD1, rWORD1, r11
-	slw	rWORD2, rWORD8, r11
-	b	L(duP4e)
-
-/* At this point we know rSTR1 is word aligned and the
-   compare length is at least 8 bytes.  */
-	.align 4
-L(Wunaligned):
-        stw     r27,32(r1)	
-	cfi_offset(r27,(32-64))
-	clrrwi	rSTR2, rSTR2, 2
-        stw     r26,28(r1)	
-	cfi_offset(r26,(28-64))
-	srwi	rTMP, rN, 4	 /* Divide by 16 */
-        stw     r25,24(r1)	
-	cfi_offset(r25,(24-64))
-	andi.	rBITDIF, rN, 12  /* Get the W remainder */
-        stw     r24,20(r1)	
-	cfi_offset(r24,(24-64))
-	slwi	rSHL, rSHL, 3
-	lwz	rWORD6, 0(rSTR2)
-	lwzu	rWORD8, 4(rSTR2)
-	cmplwi	cr1, rBITDIF, 8
-	cmplwi	cr7, rN, 16
-	clrlwi	rN, rN, 30
-	subfic	rSHR, rSHL, 32
-	slw	rH, rWORD6, rSHL
-	beq	L(duP4)
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	bgt	cr1, L(duP3)
-	beq	cr1, L(duP2)
-		
-/* Remainder is 4 */
-	.align 4
-L(duP1):
-	srw	rG, rWORD8, rSHR
-	lwz	rWORD7, 0(rSTR1)
-	slw	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	blt	cr7, L(duP1x)
-L(duP1e):
-	lwz	rWORD1, 4(rSTR1)
-	lwz	rWORD2, 4(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-	srw	rA, rWORD2, rSHR
-	slw	rD, rWORD2, rSHL
-	or	rWORD2, rA, rB
-	lwz	rWORD3, 8(rSTR1)
-	lwz	rWORD4, 8(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-	srw	rC, rWORD4, rSHR
-	slw	rF, rWORD4, rSHL
-	bne	cr5, L(duLcr5)
-	or	rWORD4, rC, rD
-	lwz	rWORD5, 12(rSTR1)
-	lwz	rWORD6, 12(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-	srw	rE, rWORD6, rSHR
-	slw	rH, rWORD6, rSHL
-	bne	cr0, L(duLcr0)
-	or	rWORD6, rE, rF
-	cmplw	cr6, rWORD5, rWORD6
-	b	L(duLoop3)	
-	.align 4
-/* At this point we exit early with the first word compare
-   complete and remainder of 0 to 3 bytes.  See L(du14) for details on
-   how we handle the remaining bytes.  */
-L(duP1x):
-	cmplw	cr5, rWORD7, rWORD8
-	slwi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-	cmplw	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	ld	rWORD2, 8(rSTR2)
-	srw	rA, rWORD2, rSHR
-	b	L(dutrim)
-/* Remainder is 8 */
-	.align 4
-L(duP2):
-	srw	rE, rWORD8, rSHR
-	lwz	rWORD5, 0(rSTR1)
-	or	rWORD6, rE, rH
-	slw	rH, rWORD8, rSHL
-L(duP2e):
-	lwz	rWORD7, 4(rSTR1)
-	lwz	rWORD8, 4(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	srw	rG, rWORD8, rSHR
-	slw	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	blt	cr7, L(duP2x)
-	lwz	rWORD1, 8(rSTR1)
-	lwz	rWORD2, 8(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-	bne	cr6, L(duLcr6)
-	srw	rA, rWORD2, rSHR
-	slw	rD, rWORD2, rSHL
-	or	rWORD2, rA, rB
-	lwz	rWORD3, 12(rSTR1)
-	lwz	rWORD4, 12(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-	bne	cr5, L(duLcr5)
-	srw	rC, rWORD4, rSHR
-	slw	rF, rWORD4, rSHL
-	or	rWORD4, rC, rD
-	addi	rSTR1, rSTR1, 4
-	addi	rSTR2, rSTR2, 4
-	cmplw	cr1, rWORD3, rWORD4
-	b	L(duLoop2)
-	.align 4
-L(duP2x):
-	cmplw	cr5, rWORD7, rWORD8
-	addi	rSTR1, rSTR1, 4
-	addi	rSTR2, rSTR2, 4
-	bne	cr6, L(duLcr6)
-	slwi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-	cmplw	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	lwz	rWORD2, 4(rSTR2)
-	srw	rA, rWORD2, rSHR
-	b	L(dutrim)
-		
-/* Remainder is 12 */
-	.align 4
-L(duP3):
-	srw	rC, rWORD8, rSHR
-	lwz	rWORD3, 0(rSTR1)
-	slw	rF, rWORD8, rSHL
-	or	rWORD4, rC, rH
-L(duP3e):
-	lwz	rWORD5, 4(rSTR1)
-	lwz	rWORD6, 4(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-	srw	rE, rWORD6, rSHR
-	slw	rH, rWORD6, rSHL
-	or	rWORD6, rE, rF
-	lwz	rWORD7, 8(rSTR1)
-	lwz	rWORD8, 8(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	bne	cr1, L(duLcr1)
-	srw	rG, rWORD8, rSHR
-	slw	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	blt	cr7, L(duP3x)
-	lwz	rWORD1, 12(rSTR1)
-	lwz	rWORD2, 12(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-	bne	cr6, L(duLcr6)
-	srw	rA, rWORD2, rSHR
-	slw	rD, rWORD2, rSHL
-	or	rWORD2, rA, rB
-	addi	rSTR1, rSTR1, 8
-	addi	rSTR2, rSTR2, 8
-	cmplw	cr0, rWORD1, rWORD2
-	b	L(duLoop1)
-	.align 4
-L(duP3x):
-	addi	rSTR1, rSTR1, 8
-	addi	rSTR2, rSTR2, 8
-	bne	cr1, L(duLcr1)
-	cmplw	cr5, rWORD7, rWORD8
-	bne	cr6, L(duLcr6)
-	slwi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-	cmplw	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	lwz	rWORD2, 4(rSTR2)
-	srw	rA, rWORD2, rSHR
-	b	L(dutrim)
-	
-/* Count is a multiple of 16, remainder is 0 */
-	.align 4
-L(duP4):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	srw	rA, rWORD8, rSHR
-	lwz	rWORD1, 0(rSTR1)
-	slw	rD, rWORD8, rSHL
-	or	rWORD2, rA, rH
-L(duP4e):
-	lwz	rWORD3, 4(rSTR1)
-	lwz	rWORD4, 4(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-	srw	rC, rWORD4, rSHR
-	slw	rF, rWORD4, rSHL
-	or	rWORD4, rC, rD
-	lwz	rWORD5, 8(rSTR1)
-	lwz	rWORD6, 8(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-	bne	cr0, L(duLcr0)
-	srw	rE, rWORD6, rSHR
-	slw	rH, rWORD6, rSHL
-	or	rWORD6, rE, rF
-	lwzu	rWORD7, 12(rSTR1)
-	lwzu	rWORD8, 12(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	bne	cr1, L(duLcr1)
-	srw	rG, rWORD8, rSHR
-	slw	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	cmplw	cr5, rWORD7, rWORD8
-	bdz-	L(du24)		/* Adjust CTR as we start with +4 */
-/* This is the primary loop */
-	.align 4
-L(duLoop):
-	lwz	rWORD1, 4(rSTR1)
-	lwz	rWORD2, 4(rSTR2)
-	cmplw	cr1, rWORD3, rWORD4
-	bne	cr6, L(duLcr6)
-	srw	rA, rWORD2, rSHR
-	slw	rD, rWORD2, rSHL
-	or	rWORD2, rA, rB
-L(duLoop1):
-	lwz	rWORD3, 8(rSTR1)
-	lwz	rWORD4, 8(rSTR2)
-	cmplw	cr6, rWORD5, rWORD6
-	bne	cr5, L(duLcr5)
-	srw	rC, rWORD4, rSHR
-	slw	rF, rWORD4, rSHL
-	or	rWORD4, rC, rD
-L(duLoop2):
-	lwz	rWORD5, 12(rSTR1)
-	lwz	rWORD6, 12(rSTR2)
-	cmplw	cr5, rWORD7, rWORD8
-	bne	cr0, L(duLcr0)
-	srw	rE, rWORD6, rSHR
-	slw	rH, rWORD6, rSHL
-	or	rWORD6, rE, rF
-L(duLoop3):
-	lwzu	rWORD7, 16(rSTR1)
-	lwzu	rWORD8, 16(rSTR2)
-	cmplw	cr0, rWORD1, rWORD2
-	bne-	cr1, L(duLcr1)
-	srw	rG, rWORD8, rSHR
-	slw	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	bdnz+	L(duLoop)	
-	
-L(duL4):
-	bne	cr1, L(duLcr1)
-	cmplw	cr1, rWORD3, rWORD4
-	bne	cr6, L(duLcr6)
-	cmplw	cr6, rWORD5, rWORD6
-	bne	cr5, L(duLcr5)
-	cmplw	cr5, rWORD7, rWORD8
-L(du44):
-	bne	cr0, L(duLcr0)
-L(du34):
-	bne	cr1, L(duLcr1)
-L(du24):
-	bne	cr6, L(duLcr6)
-L(du14):
-	slwi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-/* At this point we have a remainder of 1 to 3 bytes to compare.  We use
-   shift right to eliminate bits beyond the compare length. 
-
-   However it may not be safe to load rWORD2 which may be beyond the 
-   string length. So we compare the bit length of the remainder to
-   the right shift count (rSHR). If the bit count is less than or equal
-   we do not need to load rWORD2 (all significant bits are already in
-   rB).  */
-	cmplw	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	lwz	rWORD2, 4(rSTR2)
-	srw	rA, rWORD2, rSHR
-	.align 4
-L(dutrim):
-	lwz	rWORD1, 4(rSTR1)
-        lwz     r31,48(1)
-	subfic	rN, rN, 32	/* Shift count is 32 - (rN * 8).  */ 
-	or	rWORD2, rA, rB
-        lwz     r30,44(1)
-        lwz     r29,40(r1)
-	srw	rWORD1, rWORD1, rN
-	srw	rWORD2, rWORD2, rN
-        lwz     r28,36(r1)	
-        lwz     r27,32(r1)
-        cmplw   rWORD1,rWORD2
-        li      rRTN,0
-        beq     L(dureturn26)
-        li      rRTN,1
-        bgt     L(dureturn26)
-        li      rRTN,-1
-	b    L(dureturn26)
-	.align 4
-L(duLcr0):
-        lwz     r31,48(1)
-        lwz     r30,44(1)
-	li	rRTN, 1
-	bgt	cr0, L(dureturn29)	
-	lwz     r29,40(r1)
-        lwz     r28,36(r1)	
-	li	rRTN, -1
-	b	L(dureturn27)
-	.align 4
-L(duLcr1):
-        lwz     r31,48(1)
-        lwz     r30,44(1)
-	li	rRTN, 1
-	bgt	cr1, L(dureturn29)	
-        lwz     r29,40(r1)
-        lwz     r28,36(r1)	
-	li	rRTN, -1
-	b	L(dureturn27)
-	.align 4
-L(duLcr6):
-        lwz     r31,48(1)
-        lwz     r30,44(1)
-	li	rRTN, 1
-	bgt	cr6, L(dureturn29)	
-        lwz     r29,40(r1)
-        lwz     r28,36(r1)	
-	li	rRTN, -1
-	b	L(dureturn27)
-	.align 4
-L(duLcr5):
-        lwz     r31,48(1)
-        lwz     r30,44(1)
-	li	rRTN, 1
-	bgt	cr5, L(dureturn29)	
-        lwz     r29,40(r1)
-        lwz     r28,36(r1)	
-	li	rRTN, -1
-	b	L(dureturn27)
-	.align	3
-L(duZeroReturn):
-	li	rRTN,0
-	.align	4
-L(dureturn):
-        lwz     r31,48(1)
-        lwz     r30,44(1)
-L(dureturn29):	
-        lwz     r29,40(r1)
-        lwz     r28,36(r1)	
-L(dureturn27):	
-        lwz     r27,32(r1)
-L(dureturn26):	
-        lwz     r26,28(r1)
-L(dureturn25):	
-        lwz     r25,24(r1)
-        lwz     r24,20(r1)
-        lwz     1,0(1)
-	blr
-END (BP_SYM (memcmp))
-
-libc_hidden_builtin_def (memcmp)
-weak_alias (memcmp, bcmp)
diff --git a/sysdeps/powerpc/powerpc32/power4/memcopy.h b/sysdeps/powerpc/powerpc32/power4/memcopy.h
deleted file mode 100644
index c05208da55..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/memcopy.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* memcopy.h -- definitions for memory copy functions.  Generic C version.
-   Copyright (C) 1991, 1992, 1993, 1997, 2004, 2006 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.  */
-
-/* The strategy of the memory functions is:
-
-     1. Copy bytes until the destination pointer is aligned.
-
-     2. Copy words in unrolled loops.  If the source and destination
-     are not aligned in the same way, use word memory operations,
-     but shift and merge two read words before writing.
-
-     3. Copy the few remaining bytes.
-
-   This is fast on processors that have at least 10 registers for
-   allocation by GCC, and that can access memory at reg+const in one
-   instruction.
-
-   I made an "exhaustive" test of this memmove when I wrote it,
-   exhaustive in the sense that I tried all alignment and length
-   combinations, with and without overlap.  */
-
-#include <sysdeps/generic/memcopy.h>
-
-/* The macros defined in this file are:
-
-   BYTE_COPY_FWD(dst_beg_ptr, src_beg_ptr, nbytes_to_copy)
-
-   BYTE_COPY_BWD(dst_end_ptr, src_end_ptr, nbytes_to_copy)
-
-   WORD_COPY_FWD(dst_beg_ptr, src_beg_ptr, nbytes_remaining, nbytes_to_copy)
-
-   WORD_COPY_BWD(dst_end_ptr, src_end_ptr, nbytes_remaining, nbytes_to_copy)
-
-   MERGE(old_word, sh_1, new_word, sh_2)
-     [I fail to understand.  I feel stupid.  --roland]
-*/
-
-
-/* Threshold value for when to enter the unrolled loops.  */
-#undef	OP_T_THRES
-#define OP_T_THRES 16
-
-/* Copy exactly NBYTES bytes from SRC_BP to DST_BP,
-   without any assumptions about alignment of the pointers.  */
-#undef BYTE_COPY_FWD
-#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes)				      \
-  do									      \
-    {									      \
-      size_t __nbytes = (nbytes);					      \
-      if (__nbytes & 1)							      \
-        {								      \
-	  ((byte *) dst_bp)[0] =  ((byte *) src_bp)[0];			      \
-	  src_bp += 1;							      \
-	  dst_bp += 1;							      \
-	  __nbytes -= 1;						      \
-        }								      \
-      while (__nbytes > 0)						      \
-	{								      \
-	  byte __x = ((byte *) src_bp)[0];				      \
-	  byte __y = ((byte *) src_bp)[1];				      \
-	  src_bp += 2;							      \
-	  __nbytes -= 2;						      \
-	  ((byte *) dst_bp)[0] = __x;					      \
-	  ((byte *) dst_bp)[1] = __y;					      \
-	  dst_bp += 2;							      \
-	}								      \
-    } while (0)
-
-/* Copy exactly NBYTES_TO_COPY bytes from SRC_END_PTR to DST_END_PTR,
-   beginning at the bytes right before the pointers and continuing towards
-   smaller addresses.  Don't assume anything about alignment of the
-   pointers.  */
-#undef BYTE_COPY_BWD
-#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes)				      \
-  do									      \
-    {									      \
-      size_t __nbytes = (nbytes);					      \
-      if (__nbytes & 1)							      \
-        {								      \
-	  src_ep -= 1;							      \
-	  dst_ep -= 1;							      \
-	  ((byte *) dst_ep)[0] =  ((byte *) src_ep)[0];			      \
-	  __nbytes -= 1;						      \
-        }								      \
-      while (__nbytes > 0)						      \
-	{								      \
-	  byte __x, __y;						      \
-	  src_ep -= 2;							      \
-	  __y = ((byte *) src_ep)[1];					      \
-	  __x = ((byte *) src_ep)[0];					      \
-	  dst_ep -= 2;							      \
-	  __nbytes -= 2;						      \
-	  ((byte *) dst_ep)[1] = __y;					      \
-	  ((byte *) dst_ep)[0] = __x;					      \
-	}								      \
-    } while (0)
diff --git a/sysdeps/powerpc/powerpc32/power4/memcpy.S b/sysdeps/powerpc/powerpc32/power4/memcpy.S
deleted file mode 100644
index c48db2f3df..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/memcpy.S
+++ /dev/null
@@ -1,425 +0,0 @@
-/* Optimized memcpy implementation for PowerPC32 on PowerPC64.
-   Copyright (C) 2003, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
-   Returns 'dst'.
-
-   Memcpy handles short copies (< 32-bytes) using a binary move blocks 
-   (no loops) of lwz/stw.  The tail (remaining 1-3) bytes is handled 
-   with the appropriate combination of byte and halfword load/stores. 
-   There is minimal effort to optimize the alignment of short moves.  
-
-   Longer moves (>= 32-bytes) justify the effort to get at least the
-   destination word (4-byte) aligned.  Further optimization is
-   possible when both source and destination are word aligned.
-   Each case has an optimized unrolled loop.   */
-
-EALIGN (BP_SYM (memcpy), 5, 0)
-	CALL_MCOUNT
-
-    stwu  1,-32(1)
-    cfi_adjust_cfa_offset(32)
-    stw   30,20(1)
-    cfi_offset(30,(20-32))
-    mr    30,3
-    cmplwi cr1,5,31     
-    stw   31,24(1)
-    cfi_offset(31,(24-32))
-    neg   0,3
-    andi. 11,3,3	/* check alignment of dst.  */
-    clrlwi 0,0,30	/* Number of bytes until the 1st word of dst.  */
-    clrlwi 10,4,30	/* check alignment of src.  */
-    cmplwi cr6,5,8
-    ble-  cr1,.L2	/* If move < 32 bytes use short move code.  */
-    cmplw cr6,10,11  
-    mr    12,4
-    srwi  9,5,2		/* Number of full words remaining.  */
-    mtcrf 0x01,0
-    mr    31,5
-    beq   .L0
-  
-    subf  31,0,5
-  /* Move 0-3 bytes as needed to get the destination word aligned.  */
-1:  bf    31,2f
-    lbz   6,0(12)
-    addi  12,12,1
-    stb   6,0(3)
-    addi  3,3,1
-2:  bf    30,0f
-    lhz   6,0(12)
-    addi  12,12,2
-    sth   6,0(3)
-    addi  3,3,2
-0:
-    clrlwi 10,12,30	/* check alignment of src again.  */     
-    srwi  9,31,2	/* Number of full words remaining.  */
-    
-  /* Copy words from source to destination, assuming the destination is 
-     aligned on a word boundary.
-
-     At this point we know there are at least 25 bytes left (32-7) to copy.
-     The next step is to determine if the source is also word aligned. 
-     If not branch to the unaligned move code at .L6. which uses
-     a load, shift, store strategy.
-     
-     Otherwise source and destination are word aligned, and we can use
-     the optimized word copy loop.  */
-.L0:
-    clrlwi	11,31,30  /* calculate the number of tail bytes */
-    mtcrf 0x01,9
-    bne-  cr6,.L6   /* If source is not word aligned.  */
-
-  /* Move words where destination and source are word aligned.
-     Use an unrolled loop to copy 4 words (16-bytes) per iteration.
-     If the the copy is not an exact multiple of 16 bytes, 1-3 
-     words are copied as needed to set up the main loop.  After
-     the main loop exits there may be a tail of 1-3 bytes. These bytes are 
-     copied a halfword/byte at a time as needed to preserve alignment.  */
-
-    srwi  8,31,4    /* calculate the 16 byte loop count */
-    cmplwi	cr1,9,4
-    cmplwi	cr6,11,0
-    mr    11,12
-    
-    bf    30,1f
-    lwz   6,0(12)
-    lwz   7,4(12)
-    addi  11,12,8
-    mtctr 8
-    stw   6,0(3)
-    stw   7,4(3)
-    addi  10,3,8
-    bf    31,4f
-    lwz   0,8(12)
-    stw   0,8(3)    
-    blt   cr1,3f
-    addi  11,12,12
-    addi  10,3,12
-    b     4f
-    .align  4
-1:
-    mr    10,3
-    mtctr 8
-    bf    31,4f
-    lwz   6,0(12)
-    addi  11,12,4
-    stw   6,0(3)
-    addi  10,3,4
-    
-    .align  4
-4:
-    lwz   6,0(11)
-    lwz   7,4(11)
-    lwz   8,8(11)
-    lwz   0,12(11)
-    stw   6,0(10)
-    stw   7,4(10)
-    stw   8,8(10)
-    stw   0,12(10)
-    addi  11,11,16
-    addi  10,10,16
-    bdnz  4b
-3:  
-    clrrwi 0,31,2
-    mtcrf 0x01,31
-    beq   cr6,0f
-.L9:
-    add   3,3,0
-    add   12,12,0
-    
-/*  At this point we have a tail of 0-3 bytes and we know that the
-    destination is word aligned.  */
-2:  bf    30,1f
-    lhz   6,0(12)
-    addi  12,12,2
-    sth   6,0(3)
-    addi  3,3,2
-1:  bf    31,0f
-    lbz   6,0(12)
-    stb   6,0(3)
-0:
-  /* Return original dst pointer.  */
-    mr  3,30
-    lwz 30,20(1)
-    lwz 31,24(1)
-    addi 1,1,32
-    blr
-       
-/* Copy up to 31 bytes.  This is divided into two cases 0-8 bytes and 
-   9-31 bytes.  Each case is handled without loops, using binary 
-   (1,2,4,8) tests.  
-   
-   In the short (0-8 byte) case no attempt is made to force alignment
-   of either source or destination.  The hardware will handle the 
-   unaligned load/stores with small delays for crossing 32- 64-byte, and 
-   4096-byte boundaries. Since these short moves are unlikely to be
-   unaligned or cross these boundaries, the overhead to force 
-   alignment is not justified.
-   
-   The longer (9-31 byte) move is more likely to cross 32- or 64-byte
-   boundaries.  Since only loads are sensitive to the 32-/64-byte
-   boundaries it is more important to align the source than the 
-   destination.  If the source is not already word aligned, we first
-   move 1-3 bytes as needed.  While the destination and stores may 
-   still be unaligned, this is only an issue for page (4096 byte
-   boundary) crossing, which should be rare for these short moves.  
-   The hardware handles this case automatically with a small delay.  */ 
-   
-    .align  4
-.L2:
-    mtcrf 0x01,5
-    neg   8,4
-    clrrwi 11,4,2
-    andi. 0,8,3
-    ble   cr6,.LE8	/* Handle moves of 0-8 bytes.  */
-/* At least 9 bytes left.  Get the source word aligned.  */
-    cmplwi	cr1,5,16
-    mr    10,5
-    mr    12,4
-    cmplwi	cr6,0,2
-    beq   .L3	/* If the source is already word aligned skip this.  */
-/* Copy 1-3 bytes to get source address word aligned.  */
-    lwz   6,0(11)
-    subf  10,0,5
-    add   12,4,0
-    blt   cr6,5f
-    srwi  7,6,16
-    bgt	  cr6,3f
-    sth   6,0(3)
-    b     7f
-    .align  4
-3:
-    stb   7,0(3)
-    sth   6,1(3)
-    b     7f
-    .align  4
-5:
-    stb   6,0(3)
-7:
-    cmplwi	cr1,10,16
-    add   3,3,0
-    mtcrf 0x01,10
-    .align  4
-.L3:
-/* At least 6 bytes left and the source is word aligned.  */
-    blt   cr1,8f
-16: /* Move 16 bytes.  */
-    lwz   6,0(12)
-    lwz   7,4(12)
-    stw   6,0(3)
-    lwz   6,8(12)
-    stw   7,4(3)
-    lwz   7,12(12)
-    addi  12,12,16
-    stw   6,8(3)
-    stw   7,12(3)
-    addi  3,3,16
-8:  /* Move 8 bytes.  */
-    bf    28,4f
-    lwz   6,0(12)
-    lwz   7,4(12)
-    addi  12,12,8
-    stw   6,0(3)
-    stw   7,4(3)
-    addi  3,3,8
-4:  /* Move 4 bytes.  */
-    bf    29,2f
-    lwz   6,0(12)
-    addi  12,12,4
-    stw   6,0(3)
-    addi  3,3,4    
-2:  /* Move 2-3 bytes.  */
-    bf    30,1f
-    lhz   6,0(12)
-    sth   6,0(3) 
-    bf    31,0f
-    lbz   7,2(12)
-    stb   7,2(3)
-    mr    3,30
-    lwz   30,20(1)
-    addi  1,1,32
-    blr
-1:  /* Move 1 byte.  */
-    bf    31,0f
-    lbz   6,0(12)
-    stb   6,0(3)
-0:
-  /* Return original dst pointer.  */
-    mr   3,30
-    lwz  30,20(1)
-    addi 1,1,32
-    blr
-
-/* Special case to copy 0-8 bytes.  */
-    .align  4
-.LE8:
-    mr    12,4
-    bne   cr6,4f
-    lwz   6,0(4)
-    lwz   7,4(4)
-    stw   6,0(3)
-    stw   7,4(3)
-  /* Return original dst pointer.  */
-    mr    3,30
-    lwz   30,20(1)
-    addi  1,1,32
-    blr
-    .align  4
-4:  bf    29,2b
-    lwz   6,0(4)
-    stw   6,0(3)
-6:
-    bf    30,5f
-    lhz   7,4(4)
-    sth   7,4(3) 
-    bf    31,0f
-    lbz   8,6(4)
-    stb   8,6(3)
-    mr    3,30
-    lwz   30,20(1)
-    addi  1,1,32
-    blr
-    .align  4
-5:  
-    bf    31,0f
-    lbz   6,4(4)
-    stb   6,4(3)
-    .align  4
-0:
-  /* Return original dst pointer.  */
-    mr   3,30
-    lwz  30,20(1)
-    addi 1,1,32
-    blr
-
-    .align  4
-.L6:
-
-  /* Copy words where the destination is aligned but the source is
-     not.  Use aligned word loads from the source, shifted to realign
-     the data, to allow aligned destination stores.  
-     Use an unrolled loop to copy 4 words (16-bytes) per iteration.
-     A single word is retained for storing at loop exit to avoid walking
-     off the end of a page within the loop.
-     If the copy is not an exact multiple of 16 bytes, 1-3 
-     words are copied as needed to set up the main loop.  After
-     the main loop exits there may be a tail of 1-3 bytes. These bytes are 
-     copied a halfword/byte at a time as needed to preserve alignment.  */
-    
-
-    cmplwi  cr6,11,0  /* are there tail bytes left ? */
-    subf    5,10,12   /* back up src pointer to prev word alignment */
-    slwi    10,10,3   /* calculate number of bits to shift 1st word left */
-    addi    11,9,-1   /* we move one word after the loop */
-    srwi    8,11,2    /* calculate the 16 byte loop count */
-    lwz     6,0(5)    /* load 1st src word into R6 */
-    mr      4,3
-    lwz     7,4(5)    /* load 2nd src word into R7 */
-    mtcrf   0x01,11
-    subfic  9,10,32   /* number of bits to shift 2nd word right */
-    mtctr   8
-    bf      30,1f
-
-    /* there are at least two words to copy, so copy them */
-    slw   0,6,10  /* shift 1st src word to left align it in R0 */
-    srw   8,7,9   /* shift 2nd src word to right align it in R8 */
-    or    0,0,8   /* or them to get word to store */
-    lwz   6,8(5)  /* load the 3rd src word */
-    stw   0,0(4)  /* store the 1st dst word */
-    slw   0,7,10  /* now left align 2nd src word into R0 */
-    srw   8,6,9   /* shift 3rd src word to right align it in R8 */
-    or    0,0,8   /* or them to get word to store */
-    lwz   7,12(5)
-    stw   0,4(4)  /* store the 2nd dst word */
-    addi  4,4,8
-    addi  5,5,16
-    bf    31,4f
-    /* there is a third word to copy, so copy it */
-    slw   0,6,10  /* shift 3rd src word to left align it in R0 */
-    srw   8,7,9   /* shift 4th src word to right align it in R8 */
-    or    0,0,8   /* or them to get word to store */
-    stw   0,0(4)  /* store 3rd dst word */
-    mr    6,7
-    lwz   7,0(5)
-    addi  5,5,4
-    addi  4,4,4
-    b     4f
-    .align 4
-1:
-    slw     0,6,10  /* shift 1st src word to left align it in R0 */
-    srw     8,7,9   /* shift 2nd src word to right align it in R8 */
-    addi  5,5,8
-    or    0,0,8   /* or them to get word to store */
-    bf    31,4f
-    mr    6,7
-    lwz   7,0(5)
-    addi  5,5,4
-    stw   0,0(4)  /* store the 1st dst word */
-    addi  4,4,4
-
-    .align  4
-4:
-    /* copy 16 bytes at a time */
-    slw   0,6,10 
-    srw   8,7,9 
-    or    0,0,8
-    lwz   6,0(5)
-    stw   0,0(4)
-    slw   0,7,10
-    srw   8,6,9
-    or    0,0,8
-    lwz   7,4(5)
-    stw   0,4(4)
-    slw   0,6,10 
-    srw   8,7,9 
-    or    0,0,8
-    lwz   6,8(5)
-    stw   0,8(4)
-    slw   0,7,10
-    srw   8,6,9 
-    or    0,0,8
-    lwz   7,12(5)
-    stw   0,12(4)
-    addi  5,5,16
-    addi  4,4,16
-    bdnz+ 4b
-8:
-    /* calculate and store the final word */
-    slw   0,6,10 
-    srw   8,7,9 
-    or    0,0,8
-    stw   0,0(4)
-3:
-    clrrwi 0,31,2
-    mtcrf 0x01,31
-    bne   cr6,.L9	/* If the tail is 0 bytes we are done!  */
-
-  /* Return original dst pointer.  */
-    mr   3,30
-    lwz  30,20(1)
-    lwz  31,24(1)
-    addi 1,1,32
-    blr
-END (BP_SYM (memcpy))
-
-libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc32/power4/memset.S b/sysdeps/powerpc/powerpc32/power4/memset.S
deleted file mode 100644
index b07ed3c2d3..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/memset.S
+++ /dev/null
@@ -1,228 +0,0 @@
-/* Optimized memset implementation for PowerPC64.
-   Copyright (C) 1997,99, 2000,02,03, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
-   Returns 's'.
-
-   The memset is done in three sizes: byte (8 bits), word (32 bits),
-   cache line (1024 bits). There is a special case for setting cache lines
-   to 0, to take advantage of the dcbz instruction.  */
-
-EALIGN (BP_SYM (memset), 5, 0)
-	CALL_MCOUNT
-
-#define rTMP	r0
-#define rRTN	r3	/* Initial value of 1st argument.  */
-#define rMEMP0	r3	/* Original value of 1st arg.  */
-#define rCHR	r4	/* Char to set in each byte.  */
-#define rLEN	r5	/* Length of region to set.  */
-#define rMEMP	r6	/* Address at which we are storing.  */
-#define rALIGN	r7	/* Number of bytes we are setting now (when aligning). */
-#define rMEMP2	r8
-
-#define rNEG64	r8	/* Constant -64 for clearing with dcbz.  */
-#define rCLS	r8	/* Cache line size (known to be 128).  */
-#define rCLM	r9	/* Cache line size mask to check for cache alignment.  */
-L(_memset):
-/* Take care of case for size <= 4.  */
-	cmplwi	cr1, rLEN, 4
-	andi.	rALIGN, rMEMP0, 3
-	mr	rMEMP, rMEMP0
-	ble-	cr1, L(small)
-
-/* Align to word boundary.  */
-	cmplwi	cr5, rLEN, 31
-	rlwimi	rCHR, rCHR, 8, 16, 23 /* Replicate byte to halfword.  */
-	beq+	L(aligned)
-	mtcrf	0x01, rMEMP0
-	subfic	rALIGN, rALIGN, 4
-	add	rMEMP, rMEMP, rALIGN
-	sub	rLEN, rLEN, rALIGN
-	bf+	31, L(g0)
-	stb	rCHR, 0(rMEMP0)
-	bt	30, L(aligned)
-L(g0):
-	sth	rCHR, -2(rMEMP)
-
-/* Handle the case of size < 31.  */
-L(aligned):
-	mtcrf	0x01, rLEN
-	rlwimi	rCHR, rCHR, 16, 0, 15 /* Replicate halfword to word.  */
-	ble	cr5, L(medium)
-/* Align to 32-byte boundary.  */
-	andi.	rALIGN, rMEMP, 0x1C
-	subfic	rALIGN, rALIGN, 0x20
-	beq	L(caligned)
-	mtcrf	0x01, rALIGN
-	add	rMEMP, rMEMP, rALIGN
-	sub	rLEN, rLEN, rALIGN
-	cmplwi	cr1, rALIGN, 0x10
-	mr	rMEMP2, rMEMP
-	bf	28, L(a1)
-        stw     rCHR, -4(rMEMP2)
-	stwu	rCHR, -8(rMEMP2)
-L(a1):	blt	cr1, L(a2)
-        stw     rCHR, -4(rMEMP2)
-	stw	rCHR, -8(rMEMP2)
-	stw	rCHR, -12(rMEMP2)
-	stwu	rCHR, -16(rMEMP2)
-L(a2):  bf      29, L(caligned)
-        stw     rCHR, -4(rMEMP2)
-
-/* Now aligned to a 32 byte boundary.  */
-L(caligned):
-	cmplwi	cr1, rCHR, 0
-	clrrwi.	rALIGN, rLEN, 5
-	mtcrf	0x01, rLEN
-	beq	cr1, L(zloopstart) /* Special case for clearing memory using dcbz.  */
-L(nondcbz):
-	srwi	rTMP, rALIGN, 5
-	mtctr	rTMP
-	beq	L(medium)	/* We may not actually get to do a full line.  */
-	clrlwi.	rLEN, rLEN, 27
-	add	rMEMP, rMEMP, rALIGN
-	li	rNEG64, -0x40
-	bdz	L(cloopdone)
-
-        .align 4
-L(c3): 	dcbtst	rNEG64, rMEMP
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-        stw     rCHR, -12(rMEMP)
-	stw	rCHR, -16(rMEMP)
-        stw     rCHR, -20(rMEMP)
-	stw	rCHR, -24(rMEMP)
-        stw     rCHR, -28(rMEMP)
-	stwu	rCHR, -32(rMEMP)
-	bdnz	L(c3)
-L(cloopdone):
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-        stw     rCHR, -12(rMEMP)
-	stw	rCHR, -16(rMEMP)
-	cmplwi	cr1, rLEN, 16
-        stw     rCHR, -20(rMEMP)
-	stw	rCHR, -24(rMEMP)
-        stw     rCHR, -28(rMEMP)
-	stwu	rCHR, -32(rMEMP)
-	beqlr
-	add	rMEMP, rMEMP, rALIGN
-	b	L(medium_tail2)
-
-	.align 5
-/* Clear lines of memory in 128-byte chunks.  */
-L(zloopstart):
-/* If the remaining length is less the 32 bytes, don't bother getting
-	 the cache line size.  */
-	beq	L(medium)
-	li      rCLS,128  /* cache line size is 128 */
-	dcbt	0,rMEMP
-L(getCacheAligned):
-	cmplwi	cr1,rLEN,32
-	andi.	rTMP,rMEMP,127
-	blt	cr1,L(handletail32)
-	beq	L(cacheAligned)
-	addi	rMEMP,rMEMP,32
-	addi	rLEN,rLEN,-32
-	stw	rCHR,-32(rMEMP)
-        stw     rCHR,-28(rMEMP)
-	stw	rCHR,-24(rMEMP)
-	stw     rCHR,-20(rMEMP)
-	stw	rCHR,-16(rMEMP)
-        stw     rCHR,-12(rMEMP)
-	stw	rCHR,-8(rMEMP)
-        stw     rCHR,-4(rMEMP)
-	b	L(getCacheAligned)
-
-/* Now we are aligned to the cache line and can use dcbz.  */
-        .align 4
-L(cacheAligned):
-	cmplw	cr1,rLEN,rCLS
-	blt	cr1,L(handletail32)
-	dcbz	0,rMEMP
-	subf	rLEN,rCLS,rLEN
-	add	rMEMP,rMEMP,rCLS
-	b	L(cacheAligned)
-
-/* We are here because the cache line size was set and the remainder 
-  (rLEN) is less than the actual cache line size.
-   So set up the preconditions for L(nondcbz) and go there.  */
-L(handletail32):
-	clrrwi.	rALIGN, rLEN, 5
-	b		L(nondcbz)
-
-	.align 5
-L(small):
-/* Memset of 4 bytes or less.  */
-	cmplwi	cr5, rLEN, 1
-	cmplwi	cr1, rLEN, 3
-	bltlr	cr5
-	stb	rCHR, 0(rMEMP)
-	beqlr	cr5
-	stb	rCHR, 1(rMEMP)
-	bltlr	cr1
-	stb	rCHR, 2(rMEMP)
-	beqlr	cr1
-	stb	rCHR, 3(rMEMP)
-	blr
-
-/* Memset of 0-31 bytes.  */
-	.align 5
-L(medium):
-	cmplwi	cr1, rLEN, 16
-L(medium_tail2):
-	add	rMEMP, rMEMP, rLEN
-L(medium_tail):
-	bt-	31, L(medium_31t)
-	bt-	30, L(medium_30t)
-L(medium_30f):
-	bt-	29, L(medium_29t)
-L(medium_29f):
-	bge-	cr1, L(medium_27t)
-	bflr-	28
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-	blr
-
-L(medium_31t):
-	stbu	rCHR, -1(rMEMP)
-	bf-	30, L(medium_30f)
-L(medium_30t):
-	sthu	rCHR, -2(rMEMP)
-	bf-	29, L(medium_29f)
-L(medium_29t):
-	stwu	rCHR, -4(rMEMP)
-	blt-	cr1, L(medium_27f)
-L(medium_27t):
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-        stw     rCHR, -12(rMEMP)
-	stwu	rCHR, -16(rMEMP)
-L(medium_27f):
-	bflr-	28
-L(medium_28t):
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-	blr
-END (BP_SYM (memset))
-libc_hidden_builtin_def (memset)
diff --git a/sysdeps/powerpc/powerpc32/power4/strncmp.S b/sysdeps/powerpc/powerpc32/power4/strncmp.S
deleted file mode 100644
index fc0835ebe0..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/strncmp.S
+++ /dev/null
@@ -1,176 +0,0 @@
-/* Optimized strcmp implementation for PowerPC32.
-   Copyright (C) 2003, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* See strlen.s for comments on how the end-of-string testing works.  */
-
-/* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5])  */
-
-EALIGN (BP_SYM(strncmp), 4, 0)
-
-#define rTMP	r0
-#define rRTN	r3
-#define rSTR1	r3	/* first string arg */
-#define rSTR2	r4	/* second string arg */
-#define rN	r5	/* max string length */
-/* Note:  The Bounded pointer support in this code is broken.  This code
-   was inherited from PPC32 and and that support was never completed.  
-   Current PPC gcc does not support -fbounds-check or -fbounded-pointers.  */
-#define rWORD1	r6	/* current word in s1 */
-#define rWORD2	r7	/* current word in s2 */
-#define rWORD3  r10
-#define rWORD4  r11
-#define rFEFE	r8	/* constant 0xfefefeff (-0x01010101) */
-#define r7F7F	r9	/* constant 0x7f7f7f7f */
-#define rNEG	r10	/* ~(word in s1 | 0x7f7f7f7f) */
-#define rBITDIF	r11	/* bits that differ in s1 & s2 words */
-
-	dcbt	0,rSTR1
-	or	rTMP, rSTR2, rSTR1
-	lis	r7F7F, 0x7f7f
-	dcbt	0,rSTR2
-	clrlwi.	rTMP, rTMP, 30
-	cmplwi	cr1, rN, 0
-	lis	rFEFE, -0x101
-	bne	L(unaligned)
-/* We are word alligned so set up for two loops.  first a word
-   loop, then fall into the byte loop if any residual.  */
-	srwi.	rTMP, rN, 2
-	clrlwi	rN, rN, 30
-	addi	rFEFE, rFEFE, -0x101
-	addi	r7F7F, r7F7F, 0x7f7f
-	cmplwi	cr1, rN, 0	
-	beq	L(unaligned)
-
-	mtctr	rTMP	/* Power4 wants mtctr 1st in dispatch group.  */
-	lwz	rWORD1, 0(rSTR1)
-	lwz	rWORD2, 0(rSTR2)
-	b	L(g1)
-
-L(g0):	
-	lwzu	rWORD1, 4(rSTR1)
-	bne-	cr1, L(different)
-	lwzu	rWORD2, 4(rSTR2)
-L(g1):	add	rTMP, rFEFE, rWORD1
-	nor	rNEG, r7F7F, rWORD1
-	bdz	L(tail)
-	and.	rTMP, rTMP, rNEG
-	cmpw	cr1, rWORD1, rWORD2
-	beq+	L(g0)
-	
-/* OK. We've hit the end of the string. We need to be careful that
-   we don't compare two strings as different because of gunk beyond
-   the end of the strings...  */
-	
-L(endstring):
-	and	rTMP, r7F7F, rWORD1
-	beq	cr1, L(equal)
-	add	rTMP, rTMP, r7F7F
-	xor.	rBITDIF, rWORD1, rWORD2
-
-	andc	rNEG, rNEG, rTMP
-	blt-	L(highbit)
-	cntlzw	rBITDIF, rBITDIF
-	cntlzw	rNEG, rNEG
-	addi	rNEG, rNEG, 7
-	cmpw	cr1, rNEG, rBITDIF
-	sub	rRTN, rWORD1, rWORD2
-	blt-	cr1, L(equal)
-	srawi	rRTN, rRTN, 31
-	ori	rRTN, rRTN, 1
-	blr
-L(equal):
-	li	rRTN, 0
-	blr
-
-L(different):
-	lwzu	rWORD1, -4(rSTR1)
-	xor.	rBITDIF, rWORD1, rWORD2
-	sub	rRTN, rWORD1, rWORD2
-	blt-	L(highbit)
-	srawi	rRTN, rRTN, 31
-	ori	rRTN, rRTN, 1
-	blr
-L(highbit):
-	srwi	rWORD2, rWORD2, 24
-	srwi	rWORD1, rWORD1, 24
-	sub	rRTN, rWORD1, rWORD2
-	blr
-
-
-/* Oh well.  In this case, we just do a byte-by-byte comparison.  */
-	.align 4
-L(tail):
-	and.	rTMP, rTMP, rNEG
-	cmpw	cr1, rWORD1, rWORD2
-	bne-	L(endstring)
-	addi	rSTR1, rSTR1, 4
-	bne-	cr1, L(different)
-	addi	rSTR2, rSTR2, 4
-	cmplwi	cr1, rN, 0
-L(unaligned):
-	mtctr   rN	/* Power4 wants mtctr 1st in dispatch group */
-	ble	cr1, L(ux)
-L(uz):
-	lbz	rWORD1, 0(rSTR1)
-	lbz	rWORD2, 0(rSTR2)
-	.align 4
-L(u1):
-	cmpwi	cr1, rWORD1, 0
-	bdz	L(u4)
-	cmpw	rWORD1, rWORD2
-	beq-	cr1, L(u4)
-	lbzu    rWORD3, 1(rSTR1)
-	lbzu	rWORD4, 1(rSTR2)
-	bne-	L(u4)
-	cmpwi	cr1, rWORD3, 0
-	bdz	L(u3)
-	cmpw	rWORD3, rWORD4
-	beq-    cr1, L(u3)
-	lbzu	rWORD1, 1(rSTR1)
-	lbzu	rWORD2, 1(rSTR2)
-	bne-    L(u3)
-	cmpwi	cr1, rWORD1, 0
-	bdz	L(u4)
-	cmpw	rWORD1, rWORD2
-	beq-	cr1, L(u4)
-	lbzu	rWORD3, 1(rSTR1)
-	lbzu	rWORD4, 1(rSTR2)
-	bne-	L(u4)
-	cmpwi	cr1, rWORD3, 0
-	bdz	L(u3)
-	cmpw	rWORD3, rWORD4
-	beq-    cr1, L(u3)
-	lbzu	rWORD1, 1(rSTR1)
-	lbzu	rWORD2, 1(rSTR2)
-	beq+    L(u1)
-
-L(u3):  sub     rRTN, rWORD3, rWORD4
-        blr
-L(u4):	sub	rRTN, rWORD1, rWORD2
-	blr
-L(ux):
-	li	rRTN, 0
-	blr
-END (BP_SYM (strncmp))
-libc_hidden_builtin_def (strncmp)
-
diff --git a/sysdeps/powerpc/powerpc32/power4/wordcopy.c b/sysdeps/powerpc/powerpc32/power4/wordcopy.c
deleted file mode 100644
index f71b41dc42..0000000000
--- a/sysdeps/powerpc/powerpc32/power4/wordcopy.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* _memcopy.c -- subroutines for memory copy functions.
-   Copyright (C) 1991, 1996 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.  */
-
-/* BE VERY CAREFUL IF YOU CHANGE THIS CODE...!  */
-
-#include <stddef.h>
-#include <memcopy.h>
-
-/* _wordcopy_fwd_aligned -- Copy block beginning at SRCP to
-   block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
-   Both SRCP and DSTP should be aligned for memory operations on `op_t's.  */
-
-void
-_wordcopy_fwd_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1;
-
-  if (len & 1)
-  {
-    ((op_t *) dstp)[0] = ((op_t *) srcp)[0];
-    
-    if (len == 1)
-      return;
-    srcp += OPSIZ;
-    dstp += OPSIZ;
-    len -= 1;
-  }
-
-  do
-    {
-      a0 = ((op_t *) srcp)[0];
-      a1 = ((op_t *) srcp)[1];
-      ((op_t *) dstp)[0] = a0;
-      ((op_t *) dstp)[1] = a1;
-
-      srcp += 2 * OPSIZ;
-      dstp += 2 * OPSIZ;
-      len -= 2;
-    }
-  while (len != 0);
-}
-
-/* _wordcopy_fwd_dest_aligned -- Copy block beginning at SRCP to
-   block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
-   DSTP should be aligned for memory operations on `op_t's, but SRCP must
-   *not* be aligned.  */
-
-void
-_wordcopy_fwd_dest_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1, a2;
-  int sh_1, sh_2;
-
-  /* Calculate how to shift a word read at the memory operation
-     aligned srcp to make it aligned for copy.  */
-
-  sh_1 = 8 * (srcp % OPSIZ);
-  sh_2 = 8 * OPSIZ - sh_1;
-
-  /* Make SRCP aligned by rounding it down to the beginning of the `op_t'
-     it points in the middle of.  */
-  srcp &= -OPSIZ;
-  a0 = ((op_t *) srcp)[0];
-
-  if (len & 1)
-  {
-    a1 = ((op_t *) srcp)[1];
-    ((op_t *) dstp)[0] = MERGE (a0, sh_1, a1, sh_2);
-    
-    if (len == 1)
-      return;
-    
-    a0 = a1;
-    srcp += OPSIZ;
-    dstp += OPSIZ;
-    len -= 1;
-  }
-
-  do
-    {
-      a1 = ((op_t *) srcp)[1];
-      a2 = ((op_t *) srcp)[2];
-      ((op_t *) dstp)[0] = MERGE (a0, sh_1, a1, sh_2);
-      ((op_t *) dstp)[1] = MERGE (a1, sh_1, a2, sh_2);
-      a0 = a2;
-
-      srcp += 2 * OPSIZ;
-      dstp += 2 * OPSIZ;
-      len -= 2;
-    }
-  while (len != 0);
-}
-
-/* _wordcopy_bwd_aligned -- Copy block finishing right before
-   SRCP to block finishing right before DSTP with LEN `op_t' words
-   (not LEN bytes!).  Both SRCP and DSTP should be aligned for memory
-   operations on `op_t's.  */
-
-void
-_wordcopy_bwd_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1;
-
-  if (len & 1)
-  {
-    srcp -= OPSIZ;
-    dstp -= OPSIZ;
-    ((op_t *) dstp)[0] = ((op_t *) srcp)[0];
-    
-    if (len == 1)
-      return;
-    len -= 1;
-  }
-
-  do
-    {
-      srcp -= 2 * OPSIZ;
-      dstp -= 2 * OPSIZ;
-
-      a1 = ((op_t *) srcp)[1];
-      a0 = ((op_t *) srcp)[0];
-      ((op_t *) dstp)[1] = a1;
-      ((op_t *) dstp)[0] = a0;
-
-      len -= 2;
-    }
-  while (len != 0);
-}
-
-/* _wordcopy_bwd_dest_aligned -- Copy block finishing right
-   before SRCP to block finishing right before DSTP with LEN `op_t'
-   words (not LEN bytes!).  DSTP should be aligned for memory
-   operations on `op_t', but SRCP must *not* be aligned.  */
-
-void
-_wordcopy_bwd_dest_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1, a2;
-  int sh_1, sh_2;
-
-  /* Calculate how to shift a word read at the memory operation
-     aligned srcp to make it aligned for copy.  */
-
-  sh_1 = 8 * (srcp % OPSIZ);
-  sh_2 = 8 * OPSIZ - sh_1;
-
-  /* Make srcp aligned by rounding it down to the beginning of the op_t
-     it points in the middle of.  */
-  srcp &= -OPSIZ;
-  a2 = ((op_t *) srcp)[0];
-
-  if (len & 1)
-  {
-    srcp -= OPSIZ;
-    dstp -= OPSIZ;
-    a1 = ((op_t *) srcp)[0];
-    ((op_t *) dstp)[0] = MERGE (a1, sh_1, a2, sh_2);
-
-    if (len == 1)
-      return;
-
-    a2 = a1;
-    len -= 1;
-  }
-
-  do
-    {
-      srcp -= 2 * OPSIZ;
-      dstp -= 2 * OPSIZ;
-
-      a1 = ((op_t *) srcp)[1];
-      a0 = ((op_t *) srcp)[0];
-      ((op_t *) dstp)[1] = MERGE (a1, sh_1, a2, sh_2);
-      ((op_t *) dstp)[0] = MERGE (a0, sh_1, a1, sh_2);
-      a2 = a0;
-
-      len -= 2;
-    }
-  while (len != 0);
-}
diff --git a/sysdeps/powerpc/powerpc32/power5+/Implies b/sysdeps/powerpc/powerpc32/power5+/Implies
deleted file mode 100644
index 4e3a983426..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc32/power4
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/Implies b/sysdeps/powerpc/powerpc32/power5+/fpu/Implies
deleted file mode 100644
index 7c16e45c29..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc32/power4/fpu
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S
deleted file mode 100644
index 99cd6cc969..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/* ceil function.  PowerPC32/power5+ version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power5"
-EALIGN (__ceil, 4, 0)
-	frip	fp1, fp1
-	blr
-	END (__ceil)
-
-weak_alias (__ceil, ceil)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__ceil, ceill)
-strong_alias (__ceil, __ceill)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __ceil, ceill, GLIBC_2_0)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S
deleted file mode 100644
index 0a844b6f47..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* ceilf function.  PowerPC32/power5+ version.
-   Copyright (C) 2006 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>
-
-	.machine	"power5"
-EALIGN (__ceilf, 4, 0)
-	frip	fp1, fp1	/* The rounding instructions are double.  */
-	frsp	fp1, fp1	/* But we need to set ooverflow for float.  */
-	blr
-	END (__ceilf)
-
-weak_alias (__ceilf, ceilf)
-
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S
deleted file mode 100644
index 3b1d26f9fc..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/* floor function.  PowerPC32/power5+ version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power5"
-EALIGN (__floor, 4, 0)
-	frim	fp1, fp1
-	blr
-	END (__floor)
-
-weak_alias (__floor, floor)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__floor, floorl)
-strong_alias (__floor, __floorl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __floor, floorl, GLIBC_2_0)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S
deleted file mode 100644
index 640140c334..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* floorf function.  PowerPC32/power5+ version.
-   Copyright (C) 2006 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>
-
-	.machine	"power5"
-EALIGN (__floorf, 4, 0)
-	frim	fp1, fp1	/* The rounding instructions are double.  */
-	frsp	fp1, fp1	/* But we need to set ooverflow for float.  */
-	blr
-	END (__floorf)
-
-weak_alias (__floorf, floorf)
-
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S
deleted file mode 100644
index a2171fe09a..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S
+++ /dev/null
@@ -1,60 +0,0 @@
-/* lround function.  POWER5+, PowerPC32 version.
-   Copyright (C) 2006 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., 1 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-	
-/* long [r3] llround (float x [fp1])
-   IEEE 1003.1 lround function.  IEEE specifies "round to the nearest 
-   integer value, rounding halfway cases away from zero, regardless of
-   the current rounding mode."  However PowerPC Architecture defines
-   "round to Nearest" as "Choose the best approximation. In case of a 
-   tie, choose the one that is even (least significant bit o).". 
-   So we pre-round using the V2.02 Floating Round to Integer Nearest
-   instruction before we use the Floating Convert to Integer Word with
-   round to zero instruction.  */
-
-	.machine	"power5"
-ENTRY (__llround)
-	stwu    r1,-16(r1)
-	cfi_adjust_cfa_offset (16)
-	frin	fp2,fp1
-	fctidz	fp3,fp2		/* Convert To Integer Word lround toward 0.  */
-	stfd	fp3,8(r1)
-	nop	/* Ensure the following load is in a different dispatch  */
-	nop	/* group to avoid pipe stall on POWER4&5.  */
-	nop
-	lwz	r4,12(r1)
-	lwz	r3,8(r1)
-	addi	r1,r1,16
-	blr
-	END (__llround)
-
-weak_alias (__llround, llround)
-
-strong_alias (__llround, __llroundf)
-weak_alias (__llround, llroundf)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__llround, llroundl)
-strong_alias (__llround, __llroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llround, llroundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_llroundf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_llroundf.S
deleted file mode 100644
index ffe6b7eb37..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_llroundf.S
+++ /dev/null
@@ -1,2 +0,0 @@
-/* __llroundf is in s_llround.S  */
-/* __llroundf is in s_llround.S  */
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S
deleted file mode 100644
index 83107f6f97..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* lround function.  POWER5+, PowerPC32 version.
-   Copyright (C) 2006 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., 1 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-	
-/* long [r3] lround (float x [fp1])
-   IEEE 1003.1 lround function.  IEEE specifies "round to the nearest 
-   integer value, rounding halfway cases away from zero, regardless of
-   the current rounding mode."  However PowerPC Architecture defines
-   "round to Nearest" as "Choose the best approximation. In case of a 
-   tie, choose the one that is even (least significant bit o).". 
-   So we pre-round using the V2.02 Floating Round to Integer Nearest
-   instruction before we use the Floating Convert to Integer Word with
-   round to zero instruction.  */
-
-	.machine	"power5"
-ENTRY (__lround)
-	stwu    r1,-16(r1)
-	cfi_adjust_cfa_offset (16)
-	frin	fp2,fp1
-	fctiwz	fp3,fp2		/* Convert To Integer Word lround toward 0.  */
-	stfd	fp3,8(r1)
-	nop	/* Ensure the following load is in a different dispatch  */
-	nop	/* group to avoid pipe stall on POWER4&5.  */
-	nop
-	lwz	r3,12(r1)
-	addi	r1,r1,16
-	blr
-	END (__lround)
-
-weak_alias (__lround, lround)
-
-strong_alias (__lround, __lroundf)
-weak_alias (__lround, lroundf)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__lround, lroundl)
-strong_alias (__lround, __lroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S
deleted file mode 100644
index 379c579def..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/* round function.  PowerPC32/power5+ version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power5"
-EALIGN (__round, 4, 0)
-	frin	fp1, fp1
-	blr
-	END (__round)
-
-weak_alias (__round, round)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__round, roundl)
-strong_alias (__round, __roundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __round, roundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S
deleted file mode 100644
index 4193c69152..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* roundf function.  PowerPC32/power5+ version.
-   Copyright (C) 2006 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>
-
-	.machine	"power5"
-EALIGN (__roundf, 4, 0)
-	frin	fp1, fp1	/* The rounding instructions are double.  */
-	frsp	fp1, fp1	/* But we need to set ooverflow for float.  */
-	blr
-	END (__roundf)
-
-weak_alias (__roundf, roundf)
-
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S
deleted file mode 100644
index 92fa3ca34d..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/* trunc function.  PowerPC32/power5+ version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power5"
-EALIGN (__trunc, 4, 0)
-	friz	fp1, fp1
-	blr
-	END (__trunc)
-
-weak_alias (__trunc, trunc)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__trunc, truncl)
-strong_alias (__trunc, __truncl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __trunc, truncl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S
deleted file mode 100644
index c575e2bbc2..0000000000
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* truncf function.  PowerPC32/power5+ version.
-   Copyright (C) 2006 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>
-
-	.machine	"power5"
-EALIGN (__truncf, 4, 0)
-	friz	fp1, fp1	/* The rounding instructions are double.  */
-	frsp	fp1, fp1	/* But we need to set ooverflow for float.  */
-	blr
-	END (__truncf)
-
-weak_alias (__truncf, truncf)
-
diff --git a/sysdeps/powerpc/powerpc32/power5/Implies b/sysdeps/powerpc/powerpc32/power5/Implies
deleted file mode 100644
index 4e3a983426..0000000000
--- a/sysdeps/powerpc/powerpc32/power5/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc32/power4
diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/Implies b/sysdeps/powerpc/powerpc32/power5/fpu/Implies
deleted file mode 100644
index 7c16e45c29..0000000000
--- a/sysdeps/powerpc/powerpc32/power5/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc32/power4/fpu
diff --git a/sysdeps/powerpc/powerpc32/power6/Implies b/sysdeps/powerpc/powerpc32/power6/Implies
deleted file mode 100644
index c9a2d47f8a..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc32/power5+
-powerpc/powerpc32/power4
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/Implies b/sysdeps/powerpc/powerpc32/power6/fpu/Implies
deleted file mode 100644
index 57b92fb13e..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/fpu/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc32/power5+/fpu
-powerpc/powerpc32/power4/fpu
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S
deleted file mode 100644
index bcbc1fc3eb..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Round double to long int.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-
-/* long long int[r3, r4] __llrint (double x[fp1])  */
-ENTRY (__llrint)	
-	CALL_MCOUNT
-	stwu	r1,-16(r1)
-	cfi_adjust_cfa_offset (16)
-	fctid	fp13,fp1
-	stfd	fp13,8(r1)
-/* Insure the following load is in a different dispatch group by
-   inserting "group ending nop".  */
-	ori	r1,r1,0
-	lwz	r3,8(r1)
-	lwz	r4,12(r1)
-	addi	r1,r1,16	
-	blr
-	END (__llrint)
-
-weak_alias (__llrint, llrint)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__llrint, __llrintl)
-weak_alias (__llrint, llrintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S
deleted file mode 100644
index 2c14800da2..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Round float to long int.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-
-/* long long int[r3, r4] __llrintf (float x[fp1])  */
-ENTRY (__llrintf)	
-	CALL_MCOUNT
-	stwu	r1,-16(r1)
-	cfi_adjust_cfa_offset (16)
-	fctid	fp13,fp1
-	stfd	fp13,8(r1)
-/* Insure the following load is in a different dispatch group by
-   inserting "group ending nop".  */
-	ori	r1,r1,0
-	lwz	r3,8(r1)
-	lwz	r4,12(r1)
-	addi	r1,r1,16	
-	blr
-	END (__llrintf)
-
-weak_alias (__llrintf, llrintf)
-
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S
deleted file mode 100644
index 2b1fa1c846..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S
+++ /dev/null
@@ -1,60 +0,0 @@
-/* lround function.  POWER5+, PowerPC32 version.
-   Copyright (C) 2006, 2007 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., 1 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-	
-/* long [r3] llround (float x [fp1])
-   IEEE 1003.1 lround function.  IEEE specifies "round to the nearest 
-   integer value, rounding halfway cases away from zero, regardless of
-   the current rounding mode."  However PowerPC Architecture defines
-   "round to Nearest" as "Choose the best approximation. In case of a 
-   tie, choose the one that is even (least significant bit o).". 
-   So we pre-round using the V2.02 Floating Round to Integer Nearest
-   instruction before we use the Floating Convert to Integer Word with
-   round to zero instruction.  */
-
-	.machine	"power5"
-ENTRY (__llround)
-	stwu    r1,-16(r1)
-	cfi_adjust_cfa_offset (16)
-	frin	fp2,fp1
-	fctidz	fp3,fp2		/* Convert To Integer Word lround toward 0.  */
-	stfd	fp3,8(r1)
-/* Insure the following load is in a different dispatch group by
-   inserting "group ending nop".  */
-	ori	r1,r1,0
-	lwz	r4,12(r1)
-	lwz	r3,8(r1)
-	addi	r1,r1,16
-	blr
-	END (__llround)
-
-weak_alias (__llround, llround)
-
-strong_alias (__llround, __llroundf)
-weak_alias (__llround, llroundf)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__llround, llroundl)
-strong_alias (__llround, __llroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llround, llroundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llroundf.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llroundf.S
deleted file mode 100644
index ffe6b7eb37..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llroundf.S
+++ /dev/null
@@ -1,2 +0,0 @@
-/* __llroundf is in s_llround.S  */
-/* __llroundf is in s_llround.S  */
diff --git a/sysdeps/powerpc/powerpc32/power6/memcpy.S b/sysdeps/powerpc/powerpc32/power6/memcpy.S
deleted file mode 100644
index e8d56eb135..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/memcpy.S
+++ /dev/null
@@ -1,842 +0,0 @@
-/* Optimized memcpy implementation for PowerPC32 on POWER6.
-   Copyright (C) 2003, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
-   Returns 'dst'.
-
-   Memcpy handles short copies (< 32-bytes) using a binary move blocks 
-   (no loops) of lwz/stw.  The tail (remaining 1-3) bytes is handled 
-   with the appropriate combination of byte and halfword load/stores. 
-   There is minimal effort to optimize the alignment of short moves.  
-
-   Longer moves (>= 32-bytes) justify the effort to get at least the
-   destination word (4-byte) aligned.  Further optimization is
-   possible when both source and destination are word aligned.
-   Each case has an optimized unrolled loop.   */
-
-EALIGN (BP_SYM (memcpy), 5, 0)
-	CALL_MCOUNT
-
-    stwu   1,-32(1)
-    cfi_adjust_cfa_offset(32)
-    cmplwi cr1,5,31     /* check for short move.  */
-    neg    0,3
-    cmplwi cr1,5,31
-    clrlwi 10,4,30	/* check alignment of src.  */
-    andi.  11,3,3	/* check alignment of dst.  */
-    clrlwi 0,0,30	/* Number of bytes until the 1st word of dst.  */
-    ble-   cr1,L(word_unaligned_short)	/* If move < 32 bytes.  */
-    cmplw  cr6,10,11
-    stw    31,24(1)
-    cfi_offset(31,(24-32))
-    stw    30,20(1)
-    cfi_offset(30,(20-32))
-    mr     30,3
-    beq    .L0
-    mtcrf  0x01,0
-    subf  31,0,5        /* Length after alignment.  */
-    add   12,4,0        /* Compute src addr after alignment.  */
-  /* Move 0-3 bytes as needed to get the destination word aligned.  */
-1:  bf    31,2f
-    lbz   6,0(4)
-    bf    30,3f
-    lhz   7,1(4)
-    stb   6,0(3)
-    sth   7,1(3)
-    addi  3,3,3
-    b     0f
-3:
-    stb   6,0(3)
-    addi  3,3,1
-    b     0f
-2:  bf    30,0f
-    lhz   6,0(4)
-    sth   6,0(3)
-    addi  3,3,2
-0:
-    clrlwi 10,12,30	/* check alignment of src again.  */
-    srwi   9,31,2	/* Number of full words remaining.  */
-    bne-   cr6,L(wdu)   /* If source is not word aligned. .L6 */
-    clrlwi 11,31,30  /* calculate the number of tail bytes */
-    b      L(word_aligned)
-  /* Copy words from source to destination, assuming the destination is 
-     aligned on a word boundary.
-
-     At this point we know there are at least 29 bytes left (32-3) to copy.
-     The next step is to determine if the source is also word aligned. 
-     If not branch to the unaligned move code at .L6. which uses
-     a load, shift, store strategy.
-
-     Otherwise source and destination are word aligned, and we can use
-     the optimized word copy loop.  */
-    .align  4
-.L0:
-    mr     31,5
-    mr     12,4
-    bne-   cr6,L(wdu)   /* If source is not word aligned. .L6 */
-    srwi   9,5,2	/* Number of full words remaining.  */
-    clrlwi 11,5,30      /* calculate the number of tail bytes */
-
-  /* Move words where destination and source are word aligned.
-     Use an unrolled loop to copy 4 words (16-bytes) per iteration.
-     If the the copy is not an exact multiple of 16 bytes, 1-3 
-     words are copied as needed to set up the main loop.  After
-     the main loop exits there may be a tail of 1-3 bytes. These bytes are 
-     copied a halfword/byte at a time as needed to preserve alignment.  */
-L(word_aligned):
-    mtcrf 0x01,9
-    srwi  8,31,4    /* calculate the 16 byte loop count */
-    cmplwi	cr1,9,4
-    cmplwi	cr6,11,0
-    mr    11,12
-
-    bf    30,1f
-    lwz   6,0(12)
-    lwz   7,4(12)
-    addi  11,12,8
-    mtctr 8
-    stw   6,0(3)
-    stw   7,4(3)
-    addi  10,3,8
-    bf    31,4f
-    lwz   0,8(12)
-    stw   0,8(3)    
-    blt   cr1,3f
-    addi  11,12,12
-    addi  10,3,12
-    b     4f
-    .align  4
-1:
-    mr    10,3
-    mtctr 8
-    bf    31,4f
-    lwz   6,0(12)
-    addi  11,12,4
-    stw   6,0(3)
-    addi  10,3,4
-    
-    .align  4
-4:
-    lwz   6,0(11)
-    lwz   7,4(11)
-    lwz   8,8(11)
-    lwz   0,12(11)
-    stw   6,0(10)
-    stw   7,4(10)
-    stw   8,8(10)
-    stw   0,12(10)
-    addi  11,11,16
-    addi  10,10,16
-    bdnz  4b
-3:  
-    clrrwi 0,31,2
-    mtcrf 0x01,31
-    beq   cr6,0f
-.L9:
-    add   3,3,0
-    add   12,12,0
-    
-/*  At this point we have a tail of 0-3 bytes and we know that the
-    destination is word aligned.  */
-2:  bf    30,1f
-    lhz   6,0(12)
-    addi  12,12,2
-    sth   6,0(3)
-    addi  3,3,2
-1:  bf    31,0f
-    lbz   6,0(12)
-    stb   6,0(3)
-0:
-  /* Return original dst pointer.  */
-    mr  3,30
-    lwz 30,20(1)
-    lwz 31,24(1)
-    addi 1,1,32
-    blr
-
-/* Copy up to 31 bytes.  This divided into two cases 0-8 bytes and 9-31 
-   bytes.  Each case is handled without loops, using binary (1,2,4,8)
-   tests.
-
-   In the short (0-8 byte) case no attempt is made to force alignment
-   of either source or destination.  The hardware will handle the
-   unaligned load/stores with small delays for crossing 32- 128-byte,
-   and 4096-byte boundaries. Since these short moves are unlikely to be
-   unaligned or cross these boundaries, the overhead to force
-   alignment is not justified.
-
-   The longer (9-31 byte) move is more likely to cross 32- or 128-byte
-   boundaries.  Since only loads are sensitive to the 32-/128-byte
-   boundaries it is more important to align the source then the
-   destination.  If the source is not already word aligned, we first
-   move 1-3 bytes as needed.  Since we are only word aligned we don't
-   use double word load/stores to insure that all loads are aligned.
-   While the destination and stores may still be unaligned, this
-   is only an issue for page (4096 byte boundary) crossing, which
-   should be rare for these short moves.  The hardware handles this
-   case automatically with a small (~20 cycle) delay.  */
-    .align  4
-
-    cfi_same_value (31)
-    cfi_same_value (30)
-L(word_unaligned_short):
-    mtcrf 0x01,5
-    cmplwi cr6,5,8
-    neg   8,4
-    clrrwi	9,4,2
-    andi. 0,8,3
-    beq   cr6,L(wus_8)	/* Handle moves of 8 bytes.  */
-/* At least 9 bytes left.  Get the source word aligned.  */
-    cmpldi	cr1,5,16
-    mr    12,4
-    ble   cr6,L(wus_4)  /* Handle moves of 0-8 bytes.  */
-    mr    11,3
-    mr    10,5
-    cmplwi	cr6,0,2
-    beq   L(wus_tail)	/* If the source is already word aligned skip this.  */
-/* Copy 1-3 bytes to get source address word aligned.  */
-    lwz   6,0(9)
-    subf  10,0,5
-    add   12,4,0
-    blt   cr6,5f
-    srdi  7,6,16
-    bgt	  cr6,3f
-    sth   6,0(3)
-    b     7f
-    .align  4
-3:
-    stb   7,0(3)
-    sth   6,1(3)
-    b     7f
-    .align  4
-5:
-    stb   6,0(3)
-7:
-    cmplwi	cr1,10,16
-    add   11,3,0
-    mtcrf 0x01,10
-    .align  4
-L(wus_tail):
-/* At least 6 bytes left and the source is word aligned.  This allows
-   some speculative loads up front.  */
-/* We need to special case the fall-through because the biggest delays
-   are due to address computation not being ready in time for the 
-   AGEN.  */
-    lwz   6,0(12)
-    lwz   7,4(12)
-    blt   cr1,L(wus_tail8)
-    cmplwi	cr0,10,24
-L(wus_tail16): /* Move 16 bytes.  */
-    stw   6,0(11)
-    stw   7,4(11)
-    lwz   6,8(12)
-    lwz   7,12(12)
-    stw   6,8(11)
-    stw   7,12(11)
-/* Move 8 bytes more.  */
-    bf    28,L(wus_tail16p8)
-    cmplwi	cr1,10,28
-    lwz   6,16(12)
-    lwz   7,20(12)
-    stw   6,16(11)
-    stw   7,20(11)
-/* Move 4 bytes more.  */
-    bf    29,L(wus_tail16p4)
-    lwz   6,24(12)
-    stw   6,24(11)
-    addi  12,12,28
-    addi  11,11,28
-    bgt   cr1,L(wus_tail2)
- /* exactly 28 bytes.  Return original dst pointer and exit.  */
-    addi  1,1,32
-    blr
-    .align  4
-L(wus_tail16p8):  /* less then 8 bytes left.  */
-    beq   cr1,L(wus_tailX) /* exactly 16 bytes, early exit.  */
-    cmplwi	cr1,10,20
-    bf    29,L(wus_tail16p2)
-/* Move 4 bytes more.  */
-    lwz   6,16(12)
-    stw   6,16(11)
-    addi  12,12,20
-    addi  11,11,20
-    bgt   cr1,L(wus_tail2)
- /* exactly 20 bytes.  Return original dst pointer and exit.  */
-    addi  1,1,32
-    blr
-    .align  4
-L(wus_tail16p4):  /* less then 4 bytes left.  */
-    addi  12,12,24
-    addi  11,11,24
-    bgt   cr0,L(wus_tail2)
- /* exactly 24 bytes.  Return original dst pointer and exit.  */
-    addi  1,1,32
-    blr
-    .align  4
-L(wus_tail16p2):  /* 16 bytes moved, less then 4 bytes left.  */
-    addi  12,12,16
-    addi  11,11,16
-    b     L(wus_tail2)
-
-    .align  4
-L(wus_tail8):  /* Move 8 bytes.  */
-/*  r6, r7 already loaded speculatively.  */
-    cmplwi	cr1,10,8
-    cmplwi	cr0,10,12
-    bf    28,L(wus_tail4)
-    stw   6,0(11)
-    stw   7,4(11)
-/* Move 4 bytes more.  */
-    bf    29,L(wus_tail8p4)
-    lwz   6,8(12)
-    stw   6,8(11)
-    addi  12,12,12
-    addi  11,11,12
-    bgt   cr0,L(wus_tail2)
- /* exactly 12 bytes.  Return original dst pointer and exit.  */
-    addi  1,1,32
-    blr
-    .align  4
-L(wus_tail8p4):  /* less then 4 bytes left.  */
-    addi  12,12,8
-    addi  11,11,8
-    bgt   cr1,L(wus_tail2)
- /* exactly 8 bytes.  Return original dst pointer and exit.  */
-    addi  1,1,32
-    blr
-
-    .align  4
-L(wus_tail4):  /* Move 4 bytes.  */
-/*  r6 already loaded speculatively.  If we are here we know there is
-    more then 4 bytes left.  So there is no need to test.  */
-    addi  12,12,4
-    stw   6,0(11)
-    addi  11,11,4
-L(wus_tail2):  /* Move 2-3 bytes.  */
-    bf    30,L(wus_tail1)
-    lhz   6,0(12)
-    sth   6,0(11) 
-    bf    31,L(wus_tailX)
-    lbz   7,2(12)
-    stb   7,2(11)
-    addi  1,1,32
-    blr
-L(wus_tail1):  /* Move 1 byte.  */
-    bf    31,L(wus_tailX)
-    lbz   6,0(12)
-    stb   6,0(11)
-L(wus_tailX):
-  /* Return original dst pointer.  */
-    addi  1,1,32
-    blr
-
-/* Special case to copy 0-8 bytes.  */
-    .align  4
-L(wus_8):
-    lwz   6,0(4)
-    lwz   7,4(4)
-    stw   6,0(3)
-    stw   7,4(3)
-  /* Return original dst pointer.  */
-    addi  1,1,32
-    blr
-    .align  4
-L(wus_4):
-    bf    29,L(wus_2)
-    lwz   6,0(4)
-    stw   6,0(3)
-    bf    30,L(wus_5)
-    lhz   7,4(4)
-    sth   7,4(3) 
-    bf    31,L(wus_0)
-    lbz   8,6(4)
-    stb   8,6(3)
-    addi  1,1,32
-    blr
-    .align  4
-L(wus_5):
-    bf    31,L(wus_0)
-    lbz   6,4(4)
-    stb   6,4(3)
-  /* Return original dst pointer.  */
-    addi 1,1,32
-    blr
-    .align  4
-L(wus_2):  /* Move 2-3 bytes.  */
-    bf    30,L(wus_1)
-    lhz   6,0(4)
-    sth   6,0(3) 
-    bf    31,L(wus_0)
-    lbz   7,2(4)
-    stb   7,2(3)
-    addi  1,1,32
-    blr
-    .align  4
-L(wus_1):  /* Move 1 byte.  */
-    bf    31,L(wus_0)
-    lbz   6,0(4)
-    stb   6,0(3)
-    .align  3
-L(wus_0):
-  /* Return original dst pointer.  */
-    addi  1,1,32
-    blr
-
-    .align  4
-    cfi_offset(31,(24-32))
-    cfi_offset(30,(20-32))
-L(wdu):
-
-  /* Copy words where the destination is aligned but the source is
-     not.  For power4, power5 and power6 machines there is penalty for
-     unaligned loads (src) that cross 32-byte, cacheline, or page 
-     boundaries. So we want to use simple (unaligned) loads where
-     posible but avoid them where we know the load would span a 32-byte
-     boundary. 
-
-     At this point we know we have at least 29 (32-3) bytes to copy
-     the src is unaligned. and we may cross at least one 32-byte 
-     boundary. Also we have the following regester values:
-     r3 == adjusted dst, word aligned
-     r4 == unadjusted src
-     r5 == unadjusted len
-     r9 == adjusted Word length
-     r10 == src alignment (1-3)
-     r12 == adjuested src, not aligned
-     r31 == adjusted len
-
-     First we need to copy word upto but not crossing the next 32-byte
-     boundary. Then perform aligned loads just before and just after 
-     the boundary and use shifts and or to gernerate the next aligned
-     word for dst. If more then 32 bytes remain we copy (unaligned src)
-     the next 7 words and repeat the loop until less then 32-bytes
-     remaim.
-
-     Then if more then 4 bytes remain we again use aligned loads,
-     shifts and or to generate the next dst word. We then process the
-     remaining words using unaligned loads as needed. Finally we check
-     if there more then 0 bytes (1-3) bytes remainting and use
-     halfword and or byte load/stores to complete the copy.
-*/
-    mr      4,12      /* restore unaligned adjusted src ptr */
-    clrlwi  0,12,27   /* Find dist from previous 32-byte boundary.  */
-    slwi    10,10,3   /* calculate number of bits to shift 1st word left */
-    cmplwi  cr5,0,16   
-    subfic  8,0,32   /* Number of bytes to next 32-byte boundary.  */
-
-    mtcrf   0x01,8
-    cmplwi  cr1,10,16
-    subfic  9,10,32  /* number of bits to shift 2nd word right */
-/*  This test is reversed because the timing to compare the bytes to
-    32-byte boundary could not be meet.  So we compare the bytes from
-    previous 32-byte boundary and invert the test.  */
-    bge     cr5,L(wdu_h32_8)
-    .align  4
-    lwz   6,0(4)
-    lwz   7,4(4)
-    addi  12,4,16    /* generate alternate pointers to avoid agen */
-    addi  11,3,16    /* timing issues downstream.  */
-    stw   6,0(3)
-    stw   7,4(3)
-    subi  31,31,16
-    lwz   6,8(4)
-    lwz   7,12(4)
-    addi  4,4,16
-    stw   6,8(3)
-    stw   7,12(3)
-    addi  3,3,16
-    bf    28,L(wdu_h32_4)
-    lwz   6,0(12)
-    lwz   7,4(12)
-    subi  31,31,8
-    addi  4,4,8
-    stw   6,0(11)
-    stw   7,4(11)
-    addi  3,3,8
-    bf    29,L(wdu_h32_0)
-    lwz   6,8(12)
-    addi  4,4,4
-    subi  31,31,4
-    stw   6,8(11)
-    addi  3,3,4
-    b     L(wdu_h32_0)
-    .align  4
-L(wdu_h32_8):
-    bf    28,L(wdu_h32_4)
-    lwz   6,0(4)
-    lwz   7,4(4)
-    subi  31,31,8
-    bf    29,L(wdu_h32_8x)
-    stw   6,0(3)
-    stw   7,4(3)
-    lwz   6,8(4)
-    addi  4,4,12
-    subi  31,31,4
-    stw   6,8(3)
-    addi  3,3,12
-    b     L(wdu_h32_0)
-    .align  4
-L(wdu_h32_8x):
-    addi  4,4,8
-    stw   6,0(3)
-    stw   7,4(3)
-    addi  3,3,8
-    b     L(wdu_h32_0)
-    .align  4
-L(wdu_h32_4):
-    bf    29,L(wdu_h32_0)
-    lwz   6,0(4)
-    subi  31,31,4
-    addi  4,4,4
-    stw   6,0(3)
-    addi  3,3,4
-    .align  4
-L(wdu_h32_0):
-/*  set up for 32-byte boundry crossing word move and possibly 32-byte
-    move loop.  */
-    clrrwi  12,4,2
-    cmplwi  cr5,31,32
-    bge     cr1,L(wdu2_32)
-#if 0
-    b       L(wdu1_32)
-/*
-    cmplwi  cr1,10,8
-    beq     cr1,L(wdu1_32)
-    cmplwi  cr1,10,16
-    beq     cr1,L(wdu2_32)
-    cmplwi  cr1,10,24
-    beq     cr1,L(wdu3_32)
-*/
-L(wdu_32):
-    lwz     6,0(12)
-    cmplwi  cr6,31,4
-    srwi    8,31,5    /* calculate the 32 byte loop count */
-    slw     0,6,10 
-    clrlwi  31,31,27   /* The remaining bytes, < 32.  */
-    blt     cr5,L(wdu_32tail)
-    mtctr   8
-    cmplwi  cr6,31,4
-    .align  4
-L(wdu_loop32):
-    /* copy 32 bytes at a time */
-    lwz   8,4(12)
-    addi  12,12,32
-    lwz   7,4(4)
-    srw   8,8,9 
-    or    0,0,8
-    stw   0,0(3)
-    stw   7,4(3)
-    lwz   6,8(4)
-    lwz   7,12(4)
-    stw   6,8(3)
-    stw   7,12(3)
-    lwz   6,16(4)
-    lwz   7,20(4)
-    stw   6,16(3)
-    stw   7,20(3)
-    lwz   6,24(4)
-    lwz   7,28(4)
-    lwz   8,0(12)
-    addi  4,4,32
-    stw   6,24(3)
-    stw   7,28(3)
-    addi  3,3,32
-    slw   0,8,10 
-    bdnz+ L(wdu_loop32)
-
-L(wdu_32tail):
-    mtcrf   0x01,31
-    cmplwi  cr5,31,16
-    blt     cr6,L(wdu_4tail)
-    /* calculate and store the final word */
-    lwz   8,4(12)
-    srw   8,8,9 
-    or    6,0,8
-    b     L(wdu_32tailx)
-#endif
-    .align  4
-L(wdu1_32):
-    lwz     6,-1(4)
-    cmplwi  cr6,31,4
-    srwi    8,31,5    /* calculate the 32 byte loop count */
-    slwi    6,6,8
-    clrlwi  31,31,27   /* The remaining bytes, < 32.  */
-    blt     cr5,L(wdu1_32tail)
-    mtctr   8
-    cmplwi  cr6,31,4
-
-    lwz   8,3(4)
-    lwz   7,4(4)
-/*  Equivalent to: srwi   8,8,32-8;  or    6,6,8 */
-    rlwimi 6,8,8,(32-8),31
-    b      L(wdu1_loop32x)
-    .align  4
-L(wdu1_loop32):
-    /* copy 32 bytes at a time */
-    lwz   8,3(4)
-    lwz   7,4(4)
-    stw   10,-8(3)
-    stw   11,-4(3)
-/*  Equivalent to  srwi   8,8,32-8; or    6,6,8 */
-    rlwimi 6,8,8,(32-8),31
-L(wdu1_loop32x):
-    lwz   10,8(4)
-    lwz   11,12(4)
-    stw   6,0(3)
-    stw   7,4(3)
-    lwz   6,16(4)
-    lwz   7,20(4)
-    stw   10,8(3)
-    stw   11,12(3)
-    lwz   10,24(4)
-    lwz   11,28(4)
-    lwz   8,32-1(4)
-    addi  4,4,32
-    stw   6,16(3)
-    stw   7,20(3)
-    addi  3,3,32
-    slwi  6,8,8
-    bdnz+ L(wdu1_loop32)
-    stw   10,-8(3)
-    stw   11,-4(3)
-
-L(wdu1_32tail):
-    mtcrf   0x01,31
-    cmplwi  cr5,31,16
-    blt     cr6,L(wdu_4tail)
-    /* calculate and store the final word */
-    lwz   8,3(4)
-/*  Equivalent to: srwi   8,8,32-9;  or    6,6,8  */
-    rlwimi 6,8,8,(32-8),31
-    b     L(wdu_32tailx)
-
-L(wdu2_32):
-    bgt     cr1,L(wdu3_32)
-    lwz     6,-2(4)
-    cmplwi  cr6,31,4
-    srwi    8,31,5    /* calculate the 32 byte loop count */
-    slwi    6,6,16
-    clrlwi  31,31,27   /* The remaining bytes, < 32.  */
-    blt     cr5,L(wdu2_32tail)
-    mtctr   8
-    cmplwi  cr6,31,4
-
-    lwz   8,2(4)
-    lwz   7,4(4)
-/*  Equivalent to: srwi   8,8,32-8;  or    6,6,8 */
-    rlwimi 6,8,16,(32-16),31
-    b      L(wdu2_loop32x)
-    .align  4
-L(wdu2_loop32):
-    /* copy 32 bytes at a time */
-    lwz   8,2(4)
-    lwz   7,4(4)
-    stw   10,-8(3)
-    stw   11,-4(3)
-/*  Equivalent to  srwi   8,8,32-8; or    6,6,8 */
-    rlwimi 6,8,16,(32-16),31
-L(wdu2_loop32x):
-    lwz   10,8(4)
-    lwz   11,12(4)
-    stw   6,0(3)
-    stw   7,4(3)
-    lwz   6,16(4)
-    lwz   7,20(4)
-    stw   10,8(3)
-    stw   11,12(3)
-    lwz   10,24(4)
-    lwz   11,28(4)
-/*    lwz   8,0(12) */
-    lwz   8,32-2(4)
-    addi  4,4,32
-    stw   6,16(3)
-    stw   7,20(3)
-    addi  3,3,32
-    slwi  6,8,16
-    bdnz+ L(wdu2_loop32)
-    stw   10,-8(3)
-    stw   11,-4(3)
-
-L(wdu2_32tail):
-    mtcrf   0x01,31
-    cmplwi  cr5,31,16
-    blt     cr6,L(wdu_4tail)
-    /* calculate and store the final word */
-    lwz   8,2(4)
-/*  Equivalent to: srwi   8,8,32-9;  or    6,6,8  */
-    rlwimi 6,8,16,(32-16),31
-    b     L(wdu_32tailx)
-
-L(wdu3_32):
-/*    lwz     6,0(12) */
-    lwz     6,-3(4)
-    cmplwi  cr6,31,4
-    srwi    8,31,5    /* calculate the 32 byte loop count */
-    slwi    6,6,24
-    clrlwi  31,31,27   /* The remaining bytes, < 32.  */
-    blt     cr5,L(wdu3_32tail)
-    mtctr   8
-    cmplwi  cr6,31,4
-
-    lwz   8,1(4)
-    lwz   7,4(4)
-/*  Equivalent to: srwi   8,8,32-8;  or    6,6,8 */
-    rlwimi 6,8,24,(32-24),31
-    b      L(wdu3_loop32x)
-    .align  4
-L(wdu3_loop32):
-    /* copy 32 bytes at a time */
-    lwz   8,1(4)
-    lwz   7,4(4)
-    stw   10,-8(3)
-    stw   11,-4(3)
-/*  Equivalent to  srwi   8,8,32-8; or    6,6,8 */
-    rlwimi 6,8,24,(32-24),31
-L(wdu3_loop32x):
-    lwz   10,8(4)
-    lwz   11,12(4)
-    stw   6,0(3)
-    stw   7,4(3)
-    lwz   6,16(4)
-    lwz   7,20(4)
-    stw   10,8(3)
-    stw   11,12(3)
-    lwz   10,24(4)
-    lwz   11,28(4)
-    lwz   8,32-3(4)
-    addi  4,4,32
-    stw   6,16(3)
-    stw   7,20(3)
-    addi  3,3,32
-    slwi  6,8,24
-    bdnz+ L(wdu3_loop32)
-    stw   10,-8(3)
-    stw   11,-4(3)
-
-L(wdu3_32tail):
-    mtcrf   0x01,31
-    cmplwi  cr5,31,16
-    blt     cr6,L(wdu_4tail)
-    /* calculate and store the final word */
-    lwz   8,1(4)
-/*  Equivalent to: srwi   8,8,32-9;  or    6,6,8  */
-    rlwimi 6,8,24,(32-24),31
-    b     L(wdu_32tailx)
-    .align  4
-L(wdu_32tailx):
-    blt     cr5,L(wdu_t32_8)
-    lwz   7,4(4)
-    addi  12,4,16    /* generate alternate pointers to avoid agen */
-    addi  11,3,16    /* timing issues downstream.  */
-    stw   6,0(3)
-    stw   7,4(3)
-    subi  31,31,16
-    lwz   6,8(4)
-    lwz   7,12(4)
-    addi  4,4,16
-    stw   6,8(3)
-    stw   7,12(3)
-    addi  3,3,16
-    bf    28,L(wdu_t32_4x)
-    lwz   6,0(12)
-    lwz   7,4(12)
-    addi  4,4,8
-    subi  31,31,8
-    stw   6,0(11)
-    stw   7,4(11)
-    addi  3,3,8
-    bf    29,L(wdu_t32_0)
-    lwz   6,8(12)
-    addi  4,4,4
-    subi  31,31,4
-    stw   6,8(11)
-    addi  3,3,4
-    b     L(wdu_t32_0)
-    .align  4
-L(wdu_t32_4x):
-    bf    29,L(wdu_t32_0)
-    lwz   6,0(4)
-    addi  4,4,4
-    subi  31,31,4
-    stw   6,0(3)
-    addi  3,3,4
-    b     L(wdu_t32_0)
-    .align  4
-L(wdu_t32_8):
-    bf    28,L(wdu_t32_4)
-    lwz   7,4(4)
-    subi  31,31,8
-    bf    29,L(wdu_t32_8x)
-    stw   6,0(3)
-    stw   7,4(3)
-    lwz   6,8(4)
-    subi  31,31,4
-    addi  4,4,12
-    stw   6,8(3)
-    addi  3,3,12
-    b     L(wdu_t32_0)
-    .align  4
-L(wdu_t32_8x):
-    addi  4,4,8
-    stw   6,0(3)
-    stw   7,4(3)
-    addi  3,3,8
-    b     L(wdu_t32_0)
-    .align  4
-L(wdu_t32_4):
-    subi  31,31,4
-    stw   6,0(3)
-    addi  4,4,4
-    addi  3,3,4
-    .align  4
-L(wdu_t32_0):
-L(wdu_4tail):
-    cmplwi  cr6,31,0
-    beq   cr6,L(wdus_0)	/* If the tail is 0 bytes we are done!  */
-    bf    30,L(wdus_3)
-    lhz   7,0(4)
-    sth   7,0(3) 
-    bf    31,L(wdus_0)
-    lbz   8,2(4)
-    stb   8,2(3)
-    mr    3,30
-    lwz   30,20(1)
-    lwz   31,24(1)
-    addi  1,1,32
-    blr
-    .align  4
-L(wdus_3):
-    bf    31,L(wus_0)
-    lbz   6,0(4)
-    stb   6,0(3)
-    .align  4
-L(wdus_0):
-  /* Return original dst pointer.  */
-    mr   3,30
-    lwz  30,20(1)
-    lwz  31,24(1)
-    addi 1,1,32
-    blr
-END (BP_SYM (memcpy))
-
-libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc32/power6/memset.S b/sysdeps/powerpc/powerpc32/power6/memset.S
deleted file mode 100644
index 71c1209fa4..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/memset.S
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Optimized memset implementation for PowerPC64.
-   Copyright (C) 1997,99, 2000,02,03, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
-   Returns 's'.
-
-   The memset is done in three sizes: byte (8 bits), word (32 bits),
-   cache line (1024 bits). There is a special case for setting cache lines
-   to 0, to take advantage of the dcbz instruction.  */
-
-EALIGN (BP_SYM (memset), 5, 0)
-	CALL_MCOUNT
-
-#define rTMP	r0
-#define rRTN	r3	/* Initial value of 1st argument.  */
-#define rMEMP0	r3	/* Original value of 1st arg.  */
-#define rCHR	r4	/* Char to set in each byte.  */
-#define rLEN	r5	/* Length of region to set.  */
-#define rMEMP	r6	/* Address at which we are storing.  */
-#define rALIGN	r7	/* Number of bytes we are setting now (when aligning). */
-#define rMEMP2	r8
-
-#define rNEG64	r8	/* Constant -64 for clearing with dcbz.  */
-#define rCLS	r8	/* Cache line size (known to be 128).  */
-#define rCLM	r9	/* Cache line size mask to check for cache alignment.  */
-L(_memset):
-/* Take care of case for size <= 4.  */
-	cmplwi	cr1, rLEN, 4
-	andi.	rALIGN, rMEMP0, 3
-	mr	rMEMP, rMEMP0
-	ble-	cr1, L(small)
-
-/* Align to word boundary.  */
-	cmplwi	cr5, rLEN, 31
-	rlwimi	rCHR, rCHR, 8, 16, 23 /* Replicate byte to halfword.  */
-	beq+	L(aligned)
-	mtcrf	0x01, rMEMP0
-	subfic	rALIGN, rALIGN, 4
-	add	rMEMP, rMEMP, rALIGN
-	sub	rLEN, rLEN, rALIGN
-	bf+	31, L(g0)
-	stb	rCHR, 0(rMEMP0)
-	bt	30, L(aligned)
-L(g0):
-	sth	rCHR, -2(rMEMP)
-
-        .align 4
-/* Handle the case of size < 31.  */
-L(aligned):
-	mtcrf	0x01, rLEN
-	rlwimi	rCHR, rCHR, 16, 0, 15 /* Replicate halfword to word.  */
-	ble	cr5, L(medium)
-/* Align to 32-byte boundary.  */
-	andi.	rALIGN, rMEMP, 0x1C
-	subfic	rALIGN, rALIGN, 0x20
-	beq	L(caligned)
-	mtcrf	0x01, rALIGN
-	add	rMEMP, rMEMP, rALIGN
-	sub	rLEN, rLEN, rALIGN
-	cmplwi	cr1, rALIGN, 0x10
-	mr	rMEMP2, rMEMP
-	bf	28, L(a1)
-        stw     rCHR, -4(rMEMP2)
-	stwu	rCHR, -8(rMEMP2)
-L(a1):	blt	cr1, L(a2)
-        stw     rCHR, -4(rMEMP2)
-	stw	rCHR, -8(rMEMP2)
-	stw	rCHR, -12(rMEMP2)
-	stwu	rCHR, -16(rMEMP2)
-L(a2):  bf      29, L(caligned)
-        stw     rCHR, -4(rMEMP2)
-
-        .align 4
-/* Now aligned to a 32 byte boundary.  */
-L(caligned):
-	cmplwi	cr1, rCHR, 0
-	clrrwi.	rALIGN, rLEN, 5
-	mtcrf	0x01, rLEN
-	beq	cr1, L(zloopstart) /* Special case for clearing memory using dcbz.  */
-L(nondcbz):
-	srwi	rTMP, rALIGN, 5
-	mtctr	rTMP
-	beq	L(medium)	/* We may not actually get to do a full line.  */
-	clrlwi.	rLEN, rLEN, 27
-	add	rMEMP, rMEMP, rALIGN
-	li	rNEG64, -0x40
-	bdz	L(cloopdone)
-
-        .align 4
-L(c3): 	dcbtst	rNEG64, rMEMP
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-        stw     rCHR, -12(rMEMP)
-	stw	rCHR, -16(rMEMP)
-        stw     rCHR, -20(rMEMP)
-	stw	rCHR, -24(rMEMP)
-        stw     rCHR, -28(rMEMP)
-	stwu	rCHR, -32(rMEMP)
-	bdnz	L(c3)
-L(cloopdone):
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-        stw     rCHR, -12(rMEMP)
-	stw	rCHR, -16(rMEMP)
-	cmplwi	cr1, rLEN, 16
-        stw     rCHR, -20(rMEMP)
-	stw	rCHR, -24(rMEMP)
-        stw     rCHR, -28(rMEMP)
-	stwu	rCHR, -32(rMEMP)
-	beqlr
-	add	rMEMP, rMEMP, rALIGN
-	b	L(medium_tail2)
-
-	.align 5
-/* Clear lines of memory in 128-byte chunks.  */
-L(zloopstart):
-/* If the remaining length is less the 32 bytes, don't bother getting
-	 the cache line size.  */
-	beq	L(medium)
-	li      rCLS,128  /* cache line size is 128 */
-	dcbt	0,rMEMP
-L(getCacheAligned):
-	cmplwi	cr1,rLEN,32
-	andi.	rTMP,rMEMP,127
-	blt	cr1,L(handletail32)
-	beq	L(cacheAligned)
-	addi	rMEMP,rMEMP,32
-	addi	rLEN,rLEN,-32
-	stw	rCHR,-32(rMEMP)
-        stw     rCHR,-28(rMEMP)
-	stw	rCHR,-24(rMEMP)
-	stw     rCHR,-20(rMEMP)
-	stw	rCHR,-16(rMEMP)
-        stw     rCHR,-12(rMEMP)
-	stw	rCHR,-8(rMEMP)
-        stw     rCHR,-4(rMEMP)
-	b	L(getCacheAligned)
-
-/* Now we are aligned to the cache line and can use dcbz.  */
-        .align 4
-L(cacheAligned):
-	cmplw	cr1,rLEN,rCLS
-	blt	cr1,L(handletail32)
-	dcbz	0,rMEMP
-	subf	rLEN,rCLS,rLEN
-	add	rMEMP,rMEMP,rCLS
-	b	L(cacheAligned)
-
-/* We are here because the cache line size was set and the remainder 
-  (rLEN) is less than the actual cache line size.
-   So set up the preconditions for L(nondcbz) and go there.  */
-        .align 3
-L(handletail32):
-	clrrwi.	rALIGN, rLEN, 5
-	b		L(nondcbz)
-
-	.align 5
-L(small):
-/* Memset of 4 bytes or less.  */
-	cmplwi	cr5, rLEN, 1
-	cmplwi	cr1, rLEN, 3
-	bltlr	cr5
-	stb	rCHR, 0(rMEMP)
-	beqlr	cr5
-	stb	rCHR, 1(rMEMP)
-	bltlr	cr1
-	stb	rCHR, 2(rMEMP)
-	beqlr	cr1
-	stb	rCHR, 3(rMEMP)
-	blr
-
-/* Memset of 0-31 bytes.  */
-	.align 5
-L(medium):
-	cmplwi	cr1, rLEN, 16
-L(medium_tail2):
-	add	rMEMP, rMEMP, rLEN
-L(medium_tail):
-	bt-	31, L(medium_31t)
-	bt-	30, L(medium_30t)
-L(medium_30f):
-	bt-	29, L(medium_29t)
-L(medium_29f):
-	bge-	cr1, L(medium_27t)
-	bflr-	28
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-	blr
-
-L(medium_31t):
-	stbu	rCHR, -1(rMEMP)
-	bf-	30, L(medium_30f)
-L(medium_30t):
-	sthu	rCHR, -2(rMEMP)
-	bf-	29, L(medium_29f)
-L(medium_29t):
-	stwu	rCHR, -4(rMEMP)
-	blt-	cr1, L(medium_27f)
-L(medium_27t):
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-        stw     rCHR, -12(rMEMP)
-	stwu	rCHR, -16(rMEMP)
-L(medium_27f):
-	bflr-	28
-L(medium_28t):
-        stw     rCHR, -4(rMEMP)
-	stw	rCHR, -8(rMEMP)
-	blr
-END (BP_SYM (memset))
-libc_hidden_builtin_def (memset)
diff --git a/sysdeps/powerpc/powerpc32/power6/wordcopy.c b/sysdeps/powerpc/powerpc32/power6/wordcopy.c
deleted file mode 100644
index ddf28659f9..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/wordcopy.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/* _memcopy.c -- subroutines for memory copy functions.
-   Copyright (C) 1991, 1996, 2006 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Torbjorn Granlund (tege@sics.se).
-   Updated for POWER6 by Steven Munroe (sjmunroe@us.ibm.com).
-
-   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.  */
-
-/* BE VERY CAREFUL IF YOU CHANGE THIS CODE...!  */
-
-#include <stddef.h>
-#include <memcopy.h>
-
-/* _wordcopy_fwd_aligned -- Copy block beginning at SRCP to
-   block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
-   Both SRCP and DSTP should be aligned for memory operations on `op_t's.  */
-
-void
-_wordcopy_fwd_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1;
-
-  if (len & 1)
-  {
-    ((op_t *) dstp)[0] = ((op_t *) srcp)[0];
-    
-    if (len == 1)
-      return;
-    srcp += OPSIZ;
-    dstp += OPSIZ;
-    len -= 1;
-  }
-
-  do
-    {
-      a0 = ((op_t *) srcp)[0];
-      a1 = ((op_t *) srcp)[1];
-      ((op_t *) dstp)[0] = a0;
-      ((op_t *) dstp)[1] = a1;
-
-      srcp += 2 * OPSIZ;
-      dstp += 2 * OPSIZ;
-      len -= 2;
-    }
-  while (len != 0);
-}
-
-/* _wordcopy_fwd_dest_aligned -- Copy block beginning at SRCP to
-   block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
-   DSTP should be aligned for memory operations on `op_t's, but SRCP must
-   *not* be aligned.  */
-
-void
-_wordcopy_fwd_dest_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1, a2;
-  int sh_1, sh_2;
-  int align;
-
-  /* Calculate how to shift a word read at the memory operation
-     aligned srcp to make it aligned for copy.  */
-
-  align = srcp % OPSIZ;
-  sh_1 = 8 * (srcp % OPSIZ);
-  sh_2 = 8 * OPSIZ - sh_1;
-
-  /* Make SRCP aligned by rounding it down to the beginning of the `op_t'
-     it points in the middle of.  */
-  srcp &= -OPSIZ;
-  a0 = ((op_t *) srcp)[0];
-
-  if (len & 1)
-  {
-    a1 = ((op_t *) srcp)[1];
-    ((op_t *) dstp)[0] = MERGE (a0, sh_1, a1, sh_2);
-    
-    if (len == 1)
-      return;
-    
-    a0 = a1;
-    srcp += OPSIZ;
-    dstp += OPSIZ;
-    len -= 1;
-  }
-
-  switch (align)
-    {
-    case 1:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (32-8));
-          ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (32-8));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 2:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (32-16));
-          ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (32-16));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 3:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (32-24));
-          ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (32-24));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    }
-
-}
-
-/* _wordcopy_bwd_aligned -- Copy block finishing right before
-   SRCP to block finishing right before DSTP with LEN `op_t' words
-   (not LEN bytes!).  Both SRCP and DSTP should be aligned for memory
-   operations on `op_t's.  */
-
-void
-_wordcopy_bwd_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1;
-
-  if (len & 1)
-  {
-    srcp -= OPSIZ;
-    dstp -= OPSIZ;
-    ((op_t *) dstp)[0] = ((op_t *) srcp)[0];
-    
-    if (len == 1)
-      return;
-    len -= 1;
-  }
-
-  do
-    {
-      srcp -= 2 * OPSIZ;
-      dstp -= 2 * OPSIZ;
-
-      a1 = ((op_t *) srcp)[1];
-      a0 = ((op_t *) srcp)[0];
-      ((op_t *) dstp)[1] = a1;
-      ((op_t *) dstp)[0] = a0;
-
-      len -= 2;
-    }
-  while (len != 0);
-}
-
-/* _wordcopy_bwd_dest_aligned -- Copy block finishing right
-   before SRCP to block finishing right before DSTP with LEN `op_t'
-   words (not LEN bytes!).  DSTP should be aligned for memory
-   operations on `op_t', but SRCP must *not* be aligned.  */
-
-void
-_wordcopy_bwd_dest_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1, a2;
-  int sh_1, sh_2;
-  int align;
-
-  /* Calculate how to shift a word read at the memory operation
-     aligned srcp to make it aligned for copy.  */
-
-  align = srcp % OPSIZ;
-  sh_1 = 8 * (srcp % OPSIZ);
-  sh_2 = 8 * OPSIZ - sh_1;
-
-  /* Make srcp aligned by rounding it down to the beginning of the op_t
-     it points in the middle of.  */
-  srcp &= -OPSIZ;
-  a2 = ((op_t *) srcp)[0];
-
-  if (len & 1)
-  {
-    srcp -= OPSIZ;
-    dstp -= OPSIZ;
-    a1 = ((op_t *) srcp)[0];
-    ((op_t *) dstp)[0] = MERGE (a1, sh_1, a2, sh_2);
-
-    if (len == 1)
-      return;
-
-    a2 = a1;
-    len -= 1;
-  }
-
-  switch (align)
-    {
-    case 1:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (32-8));
-          ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (32-8));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 2:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (32-16));
-          ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (32-16));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 3:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (32-24));
-          ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (32-24));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    }
-}
diff --git a/sysdeps/powerpc/powerpc32/power6x/Implies b/sysdeps/powerpc/powerpc32/power6x/Implies
deleted file mode 100644
index 1ac063bbc1..0000000000
--- a/sysdeps/powerpc/powerpc32/power6x/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-powerpc/powerpc32/power6
-powerpc/powerpc32/power5+
-powerpc/powerpc32/power4
diff --git a/sysdeps/powerpc/powerpc32/power6x/fpu/Implies b/sysdeps/powerpc/powerpc32/power6x/fpu/Implies
deleted file mode 100644
index 081f750093..0000000000
--- a/sysdeps/powerpc/powerpc32/power6x/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-powerpc/powerpc32/power6/fpu
-powerpc/powerpc32/power5+/fpu
-powerpc/powerpc32/power4/fpu
diff --git a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S b/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S
deleted file mode 100644
index 76d8432920..0000000000
--- a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Round double to long int.  POWER6x PowerPC32 version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power6"
-/* long int[r3] __lrint (double x[fp1])  */
-ENTRY (__lrint)
-	fctiw	fp13,fp1
-	mftgpr  r3,fp13
-	blr
-	END (__lrint)
-
-weak_alias (__lrint, lrint)
-
-strong_alias (__lrint, __lrintf)
-weak_alias (__lrint, lrintf)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lrint, __lrintl)
-weak_alias (__lrint, lrintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S
deleted file mode 100644
index dc0ace821a..0000000000
--- a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S
+++ /dev/null
@@ -1,52 +0,0 @@
-/* lround function.  POWER6x, PowerPC32 version.
-   Copyright (C) 2006 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., 1 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-	
-/* long [r3] lround (float x [fp1])
-   IEEE 1003.1 lround function.  IEEE specifies "round to the nearest 
-   integer value, rounding halfway cases away from zero, regardless of
-   the current rounding mode."  However PowerPC Architecture defines
-   "round to Nearest" as "Choose the best approximation. In case of a 
-   tie, choose the one that is even (least significant bit o).". 
-   So we pre-round using the V2.02 Floating Round to Integer Nearest
-   instruction before we use the Floating Convert to Integer Word with
-   round to zero instruction.  */
-
-	.machine	"power6"
-ENTRY (__lround)
-	frin	fp2,fp1	/* Pre-round +-0.5.  */
-	fctiwz	fp3,fp2	/* Convert To Integer Word lround toward 0.  */
-	mftgpr	r3,fp3	/* Transfer fpr3 to r3.  */
-	blr
-	END (__lround)
-
-weak_alias (__lround, lround)
-
-strong_alias (__lround, __lroundf)
-weak_alias (__lround, lroundf)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__lround, lroundl)
-strong_alias (__lround, __lroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc64/970/Implies b/sysdeps/powerpc/powerpc64/970/Implies
deleted file mode 100644
index ac431fa96e..0000000000
--- a/sysdeps/powerpc/powerpc64/970/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4
diff --git a/sysdeps/powerpc/powerpc64/970/fpu/Implies b/sysdeps/powerpc/powerpc64/970/fpu/Implies
deleted file mode 100644
index 558a5fb174..0000000000
--- a/sysdeps/powerpc/powerpc64/970/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4/fpu
diff --git a/sysdeps/powerpc/powerpc64/power4/Makefile b/sysdeps/powerpc/powerpc64/power4/Makefile
deleted file mode 100644
index 60aa508ba4..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# Makefile fragment for POWER4/5/5+.
-
-ifeq ($(subdir),string)
-CFLAGS-wordcopy.c += --param max-variable-expansions-in-unroller=2 --param max-unroll-times=2 -funroll-loops -fpeel-loops -ftree-loop-linear
-CFLAGS-memmove.c += --param max-variable-expansions-in-unroller=2 --param max-unroll-times=2 -funroll-loops -fpeel-loops -ftree-loop-linear
-endif
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/Makefile b/sysdeps/powerpc/powerpc64/power4/fpu/Makefile
deleted file mode 100644
index 89dfa5ef35..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# Makefile fragment for POWER4/5/5+ platforms with FPU.
-
-ifeq ($(subdir),math)
-CFLAGS-mpa.c += --param max-unroll-times=4 -funroll-loops -fpeel-loops -ftree-loop-linear 
-endif
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
deleted file mode 100644
index 4a232e27bf..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
+++ /dev/null
@@ -1,549 +0,0 @@
-
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001, 2006 Free Software Foundation
- *
- * This program 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 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-/************************************************************************/
-/*  MODULE_NAME: mpa.c                                                  */
-/*                                                                      */
-/*  FUNCTIONS:                                                          */
-/*               mcr                                                    */
-/*               acr                                                    */
-/*               cr                                                     */
-/*               cpy                                                    */
-/*               cpymn                                                  */
-/*               norm                                                   */
-/*               denorm                                                 */
-/*               mp_dbl                                                 */
-/*               dbl_mp                                                 */
-/*               add_magnitudes                                         */
-/*               sub_magnitudes                                         */
-/*               add                                                    */
-/*               sub                                                    */
-/*               mul                                                    */
-/*               inv                                                    */
-/*               dvd                                                    */
-/*                                                                      */
-/* Arithmetic functions for multiple precision numbers.                 */
-/* Relative errors are bounded                                          */
-/************************************************************************/
-
-
-#include "endian.h"
-#include "mpa.h"
-#include "mpa2.h"
-#include <sys/param.h>	/* For MIN() */
-/* mcr() compares the sizes of the mantissas of two multiple precision  */
-/* numbers. Mantissas are compared regardless of the signs of the       */
-/* numbers, even if x->d[0] or y->d[0] are zero. Exponents are also     */
-/* disregarded.                                                         */
-static int mcr(const mp_no *x, const mp_no *y, int p) {
-  long i;
-  long p2 = p;
-  for (i=1; i<=p2; i++) {
-    if      (X[i] == Y[i])  continue;
-    else if (X[i] >  Y[i])  return  1;
-    else                    return -1; }
-  return 0;
-}
-
-
-
-/* acr() compares the absolute values of two multiple precision numbers */
-int __acr(const mp_no *x, const mp_no *y, int p) {
-  long i;
-
-  if      (X[0] == ZERO) {
-    if    (Y[0] == ZERO) i= 0;
-    else                 i=-1;
-  }
-  else if (Y[0] == ZERO) i= 1;
-  else {
-    if      (EX >  EY)   i= 1;
-    else if (EX <  EY)   i=-1;
-    else                 i= mcr(x,y,p);
-  }
-
-  return i;
-}
-
-
-/* cr90 compares the values of two multiple precision numbers           */
-int  __cr(const mp_no *x, const mp_no *y, int p) {
-  int i;
-
-  if      (X[0] > Y[0])  i= 1;
-  else if (X[0] < Y[0])  i=-1;
-  else if (X[0] < ZERO ) i= __acr(y,x,p);
-  else                   i= __acr(x,y,p);
-
-  return i;
-}
-
-
-/* Copy a multiple precision number. Set *y=*x. x=y is permissible.      */
-void __cpy(const mp_no *x, mp_no *y, int p) {
-  long i;
-
-  EY = EX;
-  for (i=0; i <= p; i++)    Y[i] = X[i];
-
-  return;
-}
-
-
-/* Copy a multiple precision number x of precision m into a */
-/* multiple precision number y of precision n. In case n>m, */
-/* the digits of y beyond the m'th are set to zero. In case */
-/* n<m, the digits of x beyond the n'th are ignored.        */
-/* x=y is permissible.                                      */
-
-void __cpymn(const mp_no *x, int m, mp_no *y, int n) {
-
-  long i,k;
-  long n2 = n;
-  long m2 = m;
-
-  EY = EX;     k=MIN(m2,n2);
-  for (i=0; i <= k; i++)    Y[i] = X[i];
-  for (   ; i <= n2; i++)    Y[i] = ZERO;
-
-  return;
-}
-
-/* Convert a multiple precision number *x into a double precision */
-/* number *y, normalized case  (|x| >= 2**(-1022))) */
-static void norm(const mp_no *x, double *y, int p)
-{
-  #define R  radixi.d
-  long i;
-#if 0
-  int k;
-#endif
-  double a,c,u,v,z[5];
-  if (p<5) {
-    if      (p==1) c = X[1];
-    else if (p==2) c = X[1] + R* X[2];
-    else if (p==3) c = X[1] + R*(X[2]  +   R* X[3]);
-    else if (p==4) c =(X[1] + R* X[2]) + R*R*(X[3] + R*X[4]);
-  }
-  else {
-    for (a=ONE, z[1]=X[1]; z[1] < TWO23; )
-        {a *= TWO;   z[1] *= TWO; }
-
-    for (i=2; i<5; i++) {
-      z[i] = X[i]*a;
-      u = (z[i] + CUTTER)-CUTTER;
-      if  (u > z[i])  u -= RADIX;
-      z[i] -= u;
-      z[i-1] += u*RADIXI;
-    }
-
-    u = (z[3] + TWO71) - TWO71;
-    if (u > z[3])   u -= TWO19;
-    v = z[3]-u;
-
-    if (v == TWO18) {
-      if (z[4] == ZERO) {
-        for (i=5; i <= p; i++) {
-          if (X[i] == ZERO)   continue;
-          else                {z[3] += ONE;   break; }
-        }
-      }
-      else              z[3] += ONE;
-    }
-
-    c = (z[1] + R *(z[2] + R * z[3]))/a;
-  }
-
-  c *= X[0];
-
-  for (i=1; i<EX; i++)   c *= RADIX;
-  for (i=1; i>EX; i--)   c *= RADIXI;
-
-  *y = c;
-  return;
-#undef R
-}
-
-/* Convert a multiple precision number *x into a double precision */
-/* number *y, denormalized case  (|x| < 2**(-1022))) */
-static void denorm(const mp_no *x, double *y, int p)
-{
-  long i,k;
-  long p2 = p;
-  double c,u,z[5];
-#if 0
-  double a,v;
-#endif
-
-#define R  radixi.d
-  if (EX<-44 || (EX==-44 && X[1]<TWO5))
-     { *y=ZERO; return; }
-
-  if      (p2==1) {
-    if      (EX==-42) {z[1]=X[1]+TWO10;  z[2]=ZERO;  z[3]=ZERO;  k=3;}
-    else if (EX==-43) {z[1]=     TWO10;  z[2]=X[1];  z[3]=ZERO;  k=2;}
-    else              {z[1]=     TWO10;  z[2]=ZERO;  z[3]=X[1];  k=1;}
-  }
-  else if (p2==2) {
-    if      (EX==-42) {z[1]=X[1]+TWO10;  z[2]=X[2];  z[3]=ZERO;  k=3;}
-    else if (EX==-43) {z[1]=     TWO10;  z[2]=X[1];  z[3]=X[2];  k=2;}
-    else              {z[1]=     TWO10;  z[2]=ZERO;  z[3]=X[1];  k=1;}
-  }
-  else {
-    if      (EX==-42) {z[1]=X[1]+TWO10;  z[2]=X[2];  k=3;}
-    else if (EX==-43) {z[1]=     TWO10;  z[2]=X[1];  k=2;}
-    else              {z[1]=     TWO10;  z[2]=ZERO;  k=1;}
-    z[3] = X[k];
-  }
-
-  u = (z[3] + TWO57) - TWO57;
-  if  (u > z[3])   u -= TWO5;
-
-  if (u==z[3]) {
-    for (i=k+1; i <= p2; i++) {
-      if (X[i] == ZERO)   continue;
-      else {z[3] += ONE;   break; }
-    }
-  }
-
-  c = X[0]*((z[1] + R*(z[2] + R*z[3])) - TWO10);
-
-  *y = c*TWOM1032;
-  return;
-
-#undef R
-}
-
-/* Convert a multiple precision number *x into a double precision number *y. */
-/* The result is correctly rounded to the nearest/even. *x is left unchanged */
-
-void __mp_dbl(const mp_no *x, double *y, int p) {
-#if 0
-  int i,k;
-  double a,c,u,v,z[5];
-#endif
-
-  if (X[0] == ZERO)  {*y = ZERO;  return; }
-
-  if      (EX> -42)                 norm(x,y,p);
-  else if (EX==-42 && X[1]>=TWO10)  norm(x,y,p);
-  else                              denorm(x,y,p);
-}
-
-
-/* dbl_mp() converts a double precision number x into a multiple precision  */
-/* number *y. If the precision p is too small the result is truncated. x is */
-/* left unchanged.                                                          */
-
-void __dbl_mp(double x, mp_no *y, int p) {
-
-  long i,n;
-  long p2 = p;
-  double u;
-
-  /* Sign */
-  if      (x == ZERO)  {Y[0] = ZERO;  return; }
-  else if (x >  ZERO)   Y[0] = ONE;
-  else                 {Y[0] = MONE;  x=-x;   }
-
-  /* Exponent */
-  for (EY=ONE; x >= RADIX; EY += ONE)   x *= RADIXI;
-  for (      ; x <  ONE;   EY -= ONE)   x *= RADIX;
-
-  /* Digits */
-  n=MIN(p2,4);
-  for (i=1; i<=n; i++) {
-    u = (x + TWO52) - TWO52;
-    if (u>x)   u -= ONE;
-    Y[i] = u;     x -= u;    x *= RADIX; }
-  for (   ; i<=p2; i++)     Y[i] = ZERO;
-  return;
-}
-
-
-/*  add_magnitudes() adds the magnitudes of *x & *y assuming that           */
-/*  abs(*x) >= abs(*y) > 0.                                                 */
-/* The sign of the sum *z is undefined. x&y may overlap but not x&z or y&z. */
-/* No guard digit is used. The result equals the exact sum, truncated.      */
-/* *x & *y are left unchanged.                                              */
-
-static void add_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  long i,j,k;
-  long p2 = p;
-
-  EZ = EX;
-
-  i=p2;    j=p2+ EY - EX;    k=p2+1;
-
-  if (j<1)
-     {__cpy(x,z,p);  return; }
-  else   Z[k] = ZERO;
-
-  for (; j>0; i--,j--) {
-    Z[k] += X[i] + Y[j];
-    if (Z[k] >= RADIX) {
-      Z[k]  -= RADIX;
-      Z[--k] = ONE; }
-    else
-      Z[--k] = ZERO;
-  }
-
-  for (; i>0; i--) {
-    Z[k] += X[i];
-    if (Z[k] >= RADIX) {
-      Z[k]  -= RADIX;
-      Z[--k] = ONE; }
-    else
-      Z[--k] = ZERO;
-  }
-
-  if (Z[1] == ZERO) {
-    for (i=1; i<=p2; i++)    Z[i] = Z[i+1]; }
-  else   EZ += ONE;
-}
-
-
-/*  sub_magnitudes() subtracts the magnitudes of *x & *y assuming that      */
-/*  abs(*x) > abs(*y) > 0.                                                  */
-/* The sign of the difference *z is undefined. x&y may overlap but not x&z  */
-/* or y&z. One guard digit is used. The error is less than one ulp.         */
-/* *x & *y are left unchanged.                                              */
-
-static void sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  long i,j,k;
-  long p2 = p;
-
-  EZ = EX;
-
-  if (EX == EY) {
-    i=j=k=p2;
-    Z[k] = Z[k+1] = ZERO; }
-  else {
-    j= EX - EY;
-    if (j > p2)  {__cpy(x,z,p);  return; }
-    else {
-      i=p2;   j=p2+1-j;   k=p2;
-      if (Y[j] > ZERO) {
-        Z[k+1] = RADIX - Y[j--];
-        Z[k]   = MONE; }
-      else {
-        Z[k+1] = ZERO;
-        Z[k]   = ZERO;   j--;}
-    }
-  }
-
-  for (; j>0; i--,j--) {
-    Z[k] += (X[i] - Y[j]);
-    if (Z[k] < ZERO) {
-      Z[k]  += RADIX;
-      Z[--k] = MONE; }
-    else
-      Z[--k] = ZERO;
-  }
-
-  for (; i>0; i--) {
-    Z[k] += X[i];
-    if (Z[k] < ZERO) {
-      Z[k]  += RADIX;
-      Z[--k] = MONE; }
-    else
-      Z[--k] = ZERO;
-  }
-
-  for (i=1; Z[i] == ZERO; i++) ;
-  EZ = EZ - i + 1;
-  for (k=1; i <= p2+1; )
-    Z[k++] = Z[i++];
-  for (; k <= p2; )
-    Z[k++] = ZERO;
-
-  return;
-}
-
-
-/* Add two multiple precision numbers. Set *z = *x + *y. x&y may overlap  */
-/* but not x&z or y&z. One guard digit is used. The error is less than    */
-/* one ulp. *x & *y are left unchanged.                                   */
-
-void __add(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  int n;
-
-  if      (X[0] == ZERO)     {__cpy(y,z,p);  return; }
-  else if (Y[0] == ZERO)     {__cpy(x,z,p);  return; }
-
-  if (X[0] == Y[0])   {
-    if (__acr(x,y,p) > 0)      {add_magnitudes(x,y,z,p);  Z[0] = X[0]; }
-    else                     {add_magnitudes(y,x,z,p);  Z[0] = Y[0]; }
-  }
-  else                       {
-    if ((n=__acr(x,y,p)) == 1) {sub_magnitudes(x,y,z,p);  Z[0] = X[0]; }
-    else if (n == -1)        {sub_magnitudes(y,x,z,p);  Z[0] = Y[0]; }
-    else                      Z[0] = ZERO;
-  }
-  return;
-}
-
-
-/* Subtract two multiple precision numbers. *z is set to *x - *y. x&y may */
-/* overlap but not x&z or y&z. One guard digit is used. The error is      */
-/* less than one ulp. *x & *y are left unchanged.                         */
-
-void __sub(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  int n;
-
-  if      (X[0] == ZERO)     {__cpy(y,z,p);  Z[0] = -Z[0];  return; }
-  else if (Y[0] == ZERO)     {__cpy(x,z,p);                 return; }
-
-  if (X[0] != Y[0])    {
-    if (__acr(x,y,p) > 0)      {add_magnitudes(x,y,z,p);  Z[0] =  X[0]; }
-    else                     {add_magnitudes(y,x,z,p);  Z[0] = -Y[0]; }
-  }
-  else                       {
-    if ((n=__acr(x,y,p)) == 1) {sub_magnitudes(x,y,z,p);  Z[0] =  X[0]; }
-    else if (n == -1)        {sub_magnitudes(y,x,z,p);  Z[0] = -Y[0]; }
-    else                      Z[0] = ZERO;
-  }
-  return;
-}
-
-
-/* Multiply two multiple precision numbers. *z is set to *x * *y. x&y      */
-/* may overlap but not x&z or y&z. In case p=1,2,3 the exact result is     */
-/* truncated to p digits. In case p>3 the error is bounded by 1.001 ulp.   */
-/* *x & *y are left unchanged.                                             */
-
-void __mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  long i, i1, i2, j, k, k2;
-  long p2 = p;
-  double u, zk, zk2;
-
-                      /* Is z=0? */
-  if (X[0]*Y[0]==ZERO)
-     { Z[0]=ZERO;  return; }
-
-                       /* Multiply, add and carry */
-  k2 = (p2<3) ? p2+p2 : p2+3;
-  zk = Z[k2]=ZERO;
-  for (k=k2; k>1; ) {
-    if (k > p2)  {i1=k-p2; i2=p2+1; }
-    else        {i1=1;   i2=k;   }
-#if 1
-    /* rearange this inner loop to allow the fmadd instructions to be
-       independent and execute in parallel on processors that have
-       dual symetrical FP pipelines.  */
-    if (i1 < (i2-1))
-    {
-	/* make sure we have at least 2 iterations */
-	if (((i2 - i1) & 1L) == 1L)
-	{
-                /* Handle the odd iterations case.  */
-		zk2 = x->d[i2-1]*y->d[i1];
-	}
-	else
-		zk2 = zero.d;
-	/* Do two multiply/adds per loop iteration, using independent
-           accumulators; zk and zk2.  */
-	for (i=i1,j=i2-1; i<i2-1; i+=2,j-=2) 
-	{
-		zk += x->d[i]*y->d[j];
-		zk2 += x->d[i+1]*y->d[j-1];
-	}
-	zk += zk2; /* final sum.  */
-    }
-    else
-    {
-        /* Special case when iterations is 1.  */
-	zk += x->d[i1]*y->d[i1];
-    }
-#else
-    /* The orginal code.  */
-    for (i=i1,j=i2-1; i<i2; i++,j--)  zk += X[i]*Y[j];
-#endif
-
-    u = (zk + CUTTER)-CUTTER;
-    if  (u > zk)  u -= RADIX;
-    Z[k]  = zk - u;
-    zk = u*RADIXI;
-    --k;
-  }
-  Z[k] = zk;
-
-                 /* Is there a carry beyond the most significant digit? */
-  if (Z[1] == ZERO) {
-    for (i=1; i<=p2; i++)  Z[i]=Z[i+1];
-    EZ = EX + EY - 1; }
-  else
-    EZ = EX + EY;
-
-  Z[0] = X[0] * Y[0];
-  return;
-}
-
-
-/* Invert a multiple precision number. Set *y = 1 / *x.                     */
-/* Relative error bound = 1.001*r**(1-p) for p=2, 1.063*r**(1-p) for p=3,   */
-/* 2.001*r**(1-p) for p>3.                                                  */
-/* *x=0 is not permissible. *x is left unchanged.                           */
-
-void __inv(const mp_no *x, mp_no *y, int p) {
-  long i;
-#if 0
-  int l;
-#endif
-  double t;
-  mp_no z,w;
-  static const int np1[] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,3,
-                            4,4,4,4,4,4,4,4,4,4,4,4,4,4,4};
-  const mp_no mptwo = {1,{1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-                         0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-                         0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-                         0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
-
-  __cpy(x,&z,p);  z.e=0;  __mp_dbl(&z,&t,p);
-  t=ONE/t;   __dbl_mp(t,y,p);    EY -= EX;
-
-  for (i=0; i<np1[p]; i++) {
-    __cpy(y,&w,p);
-    __mul(x,&w,y,p);
-    __sub(&mptwo,y,&z,p);
-    __mul(&w,&z,y,p);
-  }
-  return;
-}
-
-
-/* Divide one multiple precision number by another.Set *z = *x / *y. *x & *y */
-/* are left unchanged. x&y may overlap but not x&z or y&z.                   */
-/* Relative error bound = 2.001*r**(1-p) for p=2, 2.063*r**(1-p) for p=3     */
-/* and 3.001*r**(1-p) for p>3. *y=0 is not permissible.                      */
-
-void __dvd(const mp_no *x, const mp_no *y, mp_no *z, int p) {
-
-  mp_no w;
-
-  if (X[0] == ZERO)    Z[0] = ZERO;
-  else                {__inv(y,&w,p);   __mul(x,&w,z,p);}
-  return;
-}
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c b/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c
deleted file mode 100644
index b22b0dfeab..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001, 2007 Free Software Foundation
- *
- * This program 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 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-/**************************************************************************/
-/*  MODULE_NAME:slowexp.c                                                 */
-/*                                                                        */
-/*  FUNCTION:slowexp                                                      */
-/*                                                                        */
-/*  FILES NEEDED:mpa.h                                                    */
-/*               mpa.c mpexp.c                                            */
-/*                                                                        */
-/*Converting from double precision to Multi-precision and calculating     */
-/* e^x                                                                    */
-/**************************************************************************/
-#include "math_private.h"
-
-#ifdef NO_LONG_DOUBLE
-#include "mpa.h"
-void __mpexp(mp_no *x, mp_no *y, int p);
-#endif
-
-/*Converting from double precision to Multi-precision and calculating  e^x */
-double __slowexp(double x) {
-#ifdef NO_LONG_DOUBLE
-  double w,z,res,eps=3.0e-26;
-  int p;
-  mp_no mpx, mpy, mpz,mpw,mpeps,mpcor;
-
-  p=6;
-  __dbl_mp(x,&mpx,p); /* Convert a double precision number  x               */
-                    /* into a multiple precision number mpx with prec. p. */
-  __mpexp(&mpx, &mpy, p); /* Multi-Precision exponential function */
-  __dbl_mp(eps,&mpeps,p);
-  __mul(&mpeps,&mpy,&mpcor,p);
-  __add(&mpy,&mpcor,&mpw,p);
-  __sub(&mpy,&mpcor,&mpz,p);
-  __mp_dbl(&mpw, &w, p);
-  __mp_dbl(&mpz, &z, p);
-  if (w == z) return w;
-  else  {                   /* if calculating is not exactly   */
-    p = 32;
-    __dbl_mp(x,&mpx,p);
-    __mpexp(&mpx, &mpy, p);
-    __mp_dbl(&mpy, &res, p);
-    return res;
-  }
-#else
-  return (double) __ieee754_expl((long double)x);
-#endif
-}
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c b/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c
deleted file mode 100644
index ad147a89a6..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001, 2006 Free Software Foundation
- *
- * This program 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 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-/*************************************************************************/
-/* MODULE_NAME:slowpow.c                                                 */
-/*                                                                       */
-/* FUNCTION:slowpow                                                      */
-/*                                                                       */
-/*FILES NEEDED:mpa.h                                                     */
-/*             mpa.c mpexp.c mplog.c halfulp.c                           */
-/*                                                                       */
-/* Given two IEEE double machine numbers y,x , routine  computes the     */
-/* correctly  rounded (to nearest) value of x^y. Result calculated  by   */
-/* multiplication (in halfulp.c) or if result isn't accurate enough      */
-/* then routine converts x and y into multi-precision doubles and        */
-/* recompute.                                                            */
-/*************************************************************************/
-
-#include "mpa.h"
-#include "math_private.h"
-
-void __mpexp (mp_no * x, mp_no * y, int p);
-void __mplog (mp_no * x, mp_no * y, int p);
-double ulog (double);
-double __halfulp (double x, double y);
-
-double
-__slowpow (double x, double y, double z)
-{
-  double res, res1;
-  long double ldw, ldz, ldpp;
-  static const long double ldeps = 0x4.0p-96;
-
-  res = __halfulp (x, y);	/* halfulp() returns -10 or x^y             */
-  if (res >= 0)
-    return res;			/* if result was really computed by halfulp */
-  /*  else, if result was not really computed by halfulp */
-
-  /* Compute pow as long double, 106 bits */
-  ldz = __ieee754_logl ((long double) x);
-  ldw = (long double) y *ldz;
-  ldpp = __ieee754_expl (ldw);
-  res = (double) (ldpp + ldeps);
-  res1 = (double) (ldpp - ldeps);
-
-  if (res != res1)		/* if result still not accurate enough */
-    {				/* use mpa for higher persision.  */
-      mp_no mpx, mpy, mpz, mpw, mpp, mpr, mpr1;
-      static const mp_no eps = { -3, {1.0, 4.0} };
-      int p;
-
-      p = 10;			/*  p=precision 240 bits  */
-      __dbl_mp (x, &mpx, p);
-      __dbl_mp (y, &mpy, p);
-      __dbl_mp (z, &mpz, p);
-      __mplog (&mpx, &mpz, p);		/* log(x) = z   */
-      __mul (&mpy, &mpz, &mpw, p);	/*  y * z =w    */
-      __mpexp (&mpw, &mpp, p);		/*  e^w =pp     */
-      __add (&mpp, &eps, &mpr, p);	/*  pp+eps =r   */
-      __mp_dbl (&mpr, &res, p);
-      __sub (&mpp, &eps, &mpr1, p);	/*  pp -eps =r1 */
-      __mp_dbl (&mpr1, &res1, p);	/*  converting into double precision */
-      if (res == res1)
-	return res;
-
-      /* if we get here result wasn't calculated exactly, continue for
-         more exact calculation using 768 bits.  */
-      p = 32;
-      __dbl_mp (x, &mpx, p);
-      __dbl_mp (y, &mpy, p);
-      __dbl_mp (z, &mpz, p);
-      __mplog (&mpx, &mpz, p);		/* log(c)=z  */
-      __mul (&mpy, &mpz, &mpw, p);	/* y*z =w    */
-      __mpexp (&mpw, &mpp, p);		/* e^w=pp    */
-      __mp_dbl (&mpp, &res, p);		/* converting into double precision */
-    }
-  return res;
-}
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c b/sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c
deleted file mode 100644
index d2b62b2672..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Double-precision floating point square root wrapper.
-   Copyright (C) 2004, 2007 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 <math_ldbl_opt.h>
-#include "math.h"
-#include "math_private.h"
-#include <fenv_libc.h>
-
-#ifdef __STDC__
-double
-__sqrt (double x)		/* wrapper sqrt */
-#else
-double
-__sqrt (x)			/* wrapper sqrt */
-     double x;
-#endif
-{
-  double z;
-/* Power4 (ISA V2.0) and above implement sqrt in hardware.  */
-   __asm __volatile (
-	"	fsqrt	%0,%1\n"
-		: "=f" (z)
-		: "f" (x));
-#ifdef _IEEE_LIBM
-  return z;
-#else
-  if (__builtin_expect (_LIB_VERSION == _IEEE_, 0))
-    return z;
-    
-  if (__builtin_expect (x != x, 0))
-    return z;
-    
-  if  (__builtin_expect (x < 0.0, 0))
-    return __kernel_standard (x, x, 26);	/* sqrt(negative) */
-  else
-    return z;
-#endif
-}
-
-weak_alias (__sqrt, sqrt)
-#ifdef NO_LONG_DOUBLE
-  strong_alias (__sqrt, __sqrtl) weak_alias (__sqrt, sqrtl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/w_sqrtf.c b/sysdeps/powerpc/powerpc64/power4/fpu/w_sqrtf.c
deleted file mode 100644
index 4784869f07..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/w_sqrtf.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Single-precision floating point square root wrapper.
-   Copyright (C) 2004, 2007 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 "math.h"
-#include "math_private.h"
-#include <fenv_libc.h>
-
-#include <sysdep.h>
-#include <ldsodefs.h>
-
-#ifdef __STDC__
-float
-__sqrtf (float x)		/* wrapper sqrtf */
-#else
-float
-__sqrtf (x)			/* wrapper sqrtf */
-     float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-  return __ieee754_sqrtf (x);
-#else
-  float z;
-/* Power4 (ISA V2.0) and above implement sqrtf in hardware.  */
-   __asm __volatile (
-	"	fsqrts	%0,%1\n"
-		: "=f" (z)
-		: "f" (x));
-
-  if (__builtin_expect (_LIB_VERSION == _IEEE_, 0))
-    return z;
-    
-  if (__builtin_expect (x != x, 0))
-    return z;
-    
-  if  (__builtin_expect (x < 0.0, 0))
-    /* sqrtf(negative) */
-    return (float) __kernel_standard ((double) x, (double) x, 126);
-  else
-    return z;
-#endif
-}
-
-weak_alias (__sqrtf, sqrtf)
diff --git a/sysdeps/powerpc/powerpc64/power4/memcmp.S b/sysdeps/powerpc/powerpc64/power4/memcmp.S
deleted file mode 100644
index 8f74ca7044..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/memcmp.S
+++ /dev/null
@@ -1,981 +0,0 @@
-/* Optimized strcmp implementation for PowerPC64.
-   Copyright (C) 2003, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* int [r3] memcmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5])  */
-
-EALIGN (BP_SYM(memcmp), 4, 0)
-	CALL_MCOUNT 3
-
-#define rTMP	r0
-#define rRTN	r3
-#define rSTR1	r3	/* first string arg */
-#define rSTR2	r4	/* second string arg */
-#define rN	r5	/* max string length */
-/* Note:  The Bounded pointer support in this code is broken.  This code
-   was inherited from PPC32 and and that support was never completed.  
-   Current PPC gcc does not support -fbounds-check or -fbounded-pointers.  */
-#define rWORD1	r6	/* current word in s1 */
-#define rWORD2	r7	/* current word in s2 */
-#define rWORD3	r8	/* next word in s1 */
-#define rWORD4	r9	/* next word in s2 */
-#define rWORD5	r10	/* next word in s1 */
-#define rWORD6	r11	/* next word in s2 */
-#define rBITDIF	r12	/* bits that differ in s1 & s2 words */
-#define rWORD7	r30	/* next word in s1 */
-#define rWORD8	r31	/* next word in s2 */
-
-	xor	rTMP, rSTR2, rSTR1
-	cmpldi	cr6, rN, 0
-	cmpldi	cr1, rN, 12
-	clrldi.	rTMP, rTMP, 61
-	clrldi	rBITDIF, rSTR1, 61
-	cmpldi	cr5, rBITDIF, 0
-	beq-	cr6, L(zeroLength)
-	dcbt	0,rSTR1
-	dcbt	0,rSTR2
-/* If less than 8 bytes or not aligned, use the unalligned
-   byte loop.  */
-	blt	cr1, L(bytealigned)
-	std	rWORD8,-8(r1)	
-	cfi_offset(rWORD8,-8)
-	std	rWORD7,-16(r1)	
-	cfi_offset(rWORD7,-16)
-	bne	L(unaligned)
-/* At this point we know both strings have the same alignment and the
-   compare length is at least 8 bytes.  rBITDIF containes the low order
-   3 bits of rSTR1 and cr5 contains the result of the logical compare
-   of rBITDIF to 0.  If rBITDIF == 0 then we are already double word 
-   aligned and can perform the DWaligned loop.
-  
-   Otherwise we know the two strings have the same alignment (but not
-   yet DW).  So we can force the string addresses to the next lower DW
-   boundary and special case this first DW word using shift left to
-   ellimiate bits preceeding the first byte.  Since we want to join the
-   normal (DWaligned) compare loop, starting at the second double word,
-   we need to adjust the length (rN) and special case the loop
-   versioning for the first DW. This insures that the loop count is
-   correct and the first DW (shifted) is in the expected resister pair.  */
-	.align 4
-L(samealignment):
-	clrrdi	rSTR1, rSTR1, 3
-	clrrdi	rSTR2, rSTR2, 3
-	beq	cr5, L(DWaligned)
-	add	rN, rN, rBITDIF
-	sldi	r11, rBITDIF, 3
-	srdi	rTMP, rN, 5	/* Divide by 32 */
-	andi.	rBITDIF, rN, 24	/* Get the DW remainder */
-	ld	rWORD1, 0(rSTR1)
-	ld	rWORD2, 0(rSTR2)
-	cmpldi	cr1, rBITDIF, 16
-	cmpldi	cr7, rN, 32
-	clrldi	rN, rN, 61
-	beq	L(dPs4)
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	bgt	cr1, L(dPs3)
-	beq	cr1, L(dPs2)
-
-/* Remainder is 8 */
-	.align 3
-L(dsP1):
-	sld	rWORD5, rWORD1, r11
-	sld	rWORD6, rWORD2, r11
-	cmpld	cr5, rWORD5, rWORD6
-	blt	cr7, L(dP1x)
-/* Do something useful in this cycle since we have to branch anyway.  */
-	ld	rWORD1, 8(rSTR1)
-	ld	rWORD2, 8(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-	b	L(dP1e)
-/* Remainder is 16 */
-	.align 4
-L(dPs2):
-	sld	rWORD5, rWORD1, r11
-	sld	rWORD6, rWORD2, r11
-	cmpld	cr6, rWORD5, rWORD6
-	blt	cr7, L(dP2x)
-/* Do something useful in this cycle since we have to branch anyway.  */
-	ld	rWORD7, 8(rSTR1)
-	ld	rWORD8, 8(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-	b	L(dP2e)
-/* Remainder is 24 */
-	.align 4
-L(dPs3):
-	sld	rWORD3, rWORD1, r11
-	sld	rWORD4, rWORD2, r11
-	cmpld	cr1, rWORD3, rWORD4
-	b	L(dP3e)
-/* Count is a multiple of 32, remainder is 0 */
-	.align 4
-L(dPs4):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	sld	rWORD1, rWORD1, r11
-	sld	rWORD2, rWORD2, r11
-	cmpld	cr0, rWORD1, rWORD2
-	b	L(dP4e)
-
-/* At this point we know both strings are double word aligned and the
-   compare length is at least 8 bytes.  */
-	.align 4
-L(DWaligned):
-	andi.	rBITDIF, rN, 24	/* Get the DW remainder */
-	srdi	rTMP, rN, 5	/* Divide by 32 */
-	cmpldi	cr1, rBITDIF, 16
-	cmpldi	cr7, rN, 32
-	clrldi	rN, rN, 61
-	beq	L(dP4)
-	bgt	cr1, L(dP3)
-	beq	cr1, L(dP2)
-		
-/* Remainder is 8 */
-	.align 4
-L(dP1):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-/* Normally we'd use rWORD7/rWORD8 here, but since we might exit early
-   (8-15 byte compare), we want to use only volitile registers.  This
-   means we can avoid restoring non-volitile registers since we did not
-   change any on the early exit path.  The key here is the non-early
-   exit path only cares about the condition code (cr5), not about which 
-   register pair was used.  */
-	ld	rWORD5, 0(rSTR1)
-	ld	rWORD6, 0(rSTR2)
-	cmpld	cr5, rWORD5, rWORD6
-	blt	cr7, L(dP1x)
-	ld	rWORD1, 8(rSTR1)
-	ld	rWORD2, 8(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-L(dP1e):
-	ld	rWORD3, 16(rSTR1)
-	ld	rWORD4, 16(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-	ld	rWORD5, 24(rSTR1)
-	ld	rWORD6, 24(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	bne	cr5, L(dLcr5)
-	bne	cr0, L(dLcr0)
-	
-	ldu	rWORD7, 32(rSTR1)
-	ldu	rWORD8, 32(rSTR2)
-	bne	cr1, L(dLcr1)
-	cmpld	cr5, rWORD7, rWORD8
-	bdnz	L(dLoop)
-	bne	cr6, L(dLcr6)
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	.align 3
-L(dP1x):
-	sldi.	r12, rN, 3
-	bne	cr5, L(dLcr5)
-	subfic	rN, r12, 64	/* Shift count is 64 - (rN * 8).  */
-	bne	L(d00)
-	li	rRTN, 0
-	blr
-		
-/* Remainder is 16 */
-	.align 4
-L(dP2):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	ld	rWORD5, 0(rSTR1)
-	ld	rWORD6, 0(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	blt	cr7, L(dP2x)
-	ld	rWORD7, 8(rSTR1)
-	ld	rWORD8, 8(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-L(dP2e):
-	ld	rWORD1, 16(rSTR1)
-	ld	rWORD2, 16(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-	ld	rWORD3, 24(rSTR1)
-	ld	rWORD4, 24(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-	addi	rSTR1, rSTR1, 8
-	addi	rSTR2, rSTR2, 8
-	bne	cr6, L(dLcr6)
-	bne	cr5, L(dLcr5)
-	b	L(dLoop2)
-/* Again we are on a early exit path (16-23 byte compare), we want to
-   only use volitile registers and avoid restoring non-volitile
-   registers.  */
-	.align 4
-L(dP2x):
-	ld	rWORD3, 8(rSTR1)
-	ld	rWORD4, 8(rSTR2)
-	cmpld	cr5, rWORD3, rWORD4
-	sldi.	r12, rN, 3
-	bne	cr6, L(dLcr6)
-	addi	rSTR1, rSTR1, 8
-	addi	rSTR2, rSTR2, 8
-	bne	cr5, L(dLcr5)
-	subfic	rN, r12, 64	/* Shift count is 64 - (rN * 8).  */
-	bne	L(d00)
-	li	rRTN, 0
-	blr
-		
-/* Remainder is 24 */
-	.align 4
-L(dP3):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	ld	rWORD3, 0(rSTR1)
-	ld	rWORD4, 0(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-L(dP3e):
-	ld	rWORD5, 8(rSTR1)
-	ld	rWORD6, 8(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	blt	cr7, L(dP3x)
-	ld	rWORD7, 16(rSTR1)
-	ld	rWORD8, 16(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-	ld	rWORD1, 24(rSTR1)
-	ld	rWORD2, 24(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-	addi	rSTR1, rSTR1, 16
-	addi	rSTR2, rSTR2, 16
-	bne	cr1, L(dLcr1)
-	bne	cr6, L(dLcr6)
-	b	L(dLoop1)
-/* Again we are on a early exit path (24-31 byte compare), we want to
-   only use volitile registers and avoid restoring non-volitile
-   registers.  */
-	.align 4
-L(dP3x):
-	ld	rWORD1, 16(rSTR1)
-	ld	rWORD2, 16(rSTR2)
-	cmpld	cr5, rWORD1, rWORD2
-	sldi.	r12, rN, 3
-	bne	cr1, L(dLcr1)
-	addi	rSTR1, rSTR1, 16
-	addi	rSTR2, rSTR2, 16
-	bne	cr6, L(dLcr6)
-	subfic	rN, r12, 64	/* Shift count is 64 - (rN * 8).  */
-	bne	cr5, L(dLcr5)
-	bne	L(d00)
-	li	rRTN, 0
-	blr
-	
-/* Count is a multiple of 32, remainder is 0 */
-	.align 4
-L(dP4):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	ld	rWORD1, 0(rSTR1)
-	ld	rWORD2, 0(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-L(dP4e):
-	ld	rWORD3, 8(rSTR1)
-	ld	rWORD4, 8(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-	ld	rWORD5, 16(rSTR1)
-	ld	rWORD6, 16(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	ldu	rWORD7, 24(rSTR1)
-	ldu	rWORD8, 24(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-	bne	cr0, L(dLcr0)
-	bne	cr1, L(dLcr1)
-	bdz-	L(d24)		/* Adjust CTR as we start with +4 */
-/* This is the primary loop */
-	.align 4
-L(dLoop):
-	ld	rWORD1, 8(rSTR1)
-	ld	rWORD2, 8(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-	bne	cr6, L(dLcr6)
-L(dLoop1):
-	ld	rWORD3, 16(rSTR1)
-	ld	rWORD4, 16(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	bne	cr5, L(dLcr5)
-L(dLoop2):
-	ld	rWORD5, 24(rSTR1)
-	ld	rWORD6, 24(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-	bne	cr0, L(dLcr0)
-L(dLoop3):
-	ldu	rWORD7, 32(rSTR1)
-	ldu	rWORD8, 32(rSTR2)
-	bne-	cr1, L(dLcr1)
-	cmpld	cr0, rWORD1, rWORD2
-	bdnz+	L(dLoop)	
-	
-L(dL4):
-	cmpld	cr1, rWORD3, rWORD4
-	bne	cr6, L(dLcr6)
-	cmpld	cr6, rWORD5, rWORD6
-	bne	cr5, L(dLcr5)
-	cmpld	cr5, rWORD7, rWORD8
-L(d44):
-	bne	cr0, L(dLcr0)
-L(d34):
-	bne	cr1, L(dLcr1)
-L(d24):
-	bne	cr6, L(dLcr6)
-L(d14):
-	sldi.	r12, rN, 3
-	bne	cr5, L(dLcr5) 
-L(d04):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	subfic	rN, r12, 64	/* Shift count is 64 - (rN * 8).  */
-	beq	L(zeroLength)
-/* At this point we have a remainder of 1 to 7 bytes to compare.  Since
-   we are aligned it is safe to load the whole double word, and use
-   shift right double to elliminate bits beyond the compare length.  */ 
-L(d00):
-	ld	rWORD1, 8(rSTR1)
-	ld	rWORD2, 8(rSTR2) 
-	srd	rWORD1, rWORD1, rN
-	srd	rWORD2, rWORD2, rN
-	cmpld	cr5, rWORD1, rWORD2
- 	bne	cr5, L(dLcr5x)
-	li	rRTN, 0
-	blr
-	.align 4
-L(dLcr0):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	li	rRTN, 1
-	bgtlr	cr0
-	li	rRTN, -1
-	blr
-	.align 4
-L(dLcr1):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	li	rRTN, 1
-	bgtlr	cr1
-	li	rRTN, -1
-	blr
-	.align 4
-L(dLcr6):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	li	rRTN, 1
-	bgtlr	cr6
-	li	rRTN, -1
-	blr
-	.align 4
-L(dLcr5):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-L(dLcr5x):
-	li	rRTN, 1
-	bgtlr	cr5
-	li	rRTN, -1
-	blr
-	
-	.align 4
-L(bytealigned):
-	mtctr   rN	/* Power4 wants mtctr 1st in dispatch group */
-	beq-	cr6, L(zeroLength)
-
-/* We need to prime this loop.  This loop is swing modulo scheduled
-   to avoid pipe delays.  The dependent instruction latencies (load to 
-   compare to conditional branch) is 2 to 3 cycles.  In this loop each
-   dispatch group ends in a branch and takes 1 cycle.  Effectively
-   the first iteration of the loop only serves to load operands and 
-   branches based on compares are delayed until the next loop. 
-
-   So we must precondition some registers and condition codes so that
-   we don't exit the loop early on the first iteration.  */
-   
-	lbz	rWORD1, 0(rSTR1)
-	lbz	rWORD2, 0(rSTR2)
-	bdz-	L(b11)
-	cmpld	cr0, rWORD1, rWORD2
-	lbz	rWORD3, 1(rSTR1)
-	lbz	rWORD4, 1(rSTR2)
-	bdz-	L(b12)
-	cmpld	cr1, rWORD3, rWORD4
-	lbzu	rWORD5, 2(rSTR1)
-	lbzu	rWORD6, 2(rSTR2)
-	bdz-	L(b13)
-	.align 4
-L(bLoop):
-	lbzu	rWORD1, 1(rSTR1)
-	lbzu	rWORD2, 1(rSTR2)
-	bne-	cr0, L(bLcr0)
-
-	cmpld	cr6, rWORD5, rWORD6
-	bdz-	L(b3i)
-	
-	lbzu	rWORD3, 1(rSTR1)
-	lbzu	rWORD4, 1(rSTR2)
-	bne-	cr1, L(bLcr1)
-
-	cmpld	cr0, rWORD1, rWORD2
-	bdz-	L(b2i)
-
-	lbzu	rWORD5, 1(rSTR1)
-	lbzu	rWORD6, 1(rSTR2)
-	bne-	cr6, L(bLcr6)
-
-	cmpld	cr1, rWORD3, rWORD4
-	bdnz+	L(bLoop)
-	
-/* We speculatively loading bytes before we have tested the previous
-   bytes.  But we must avoid overrunning the length (in the ctr) to
-   prevent these speculative loads from causing a segfault.  In this 
-   case the loop will exit early (before the all pending bytes are
-   tested.  In this case we must complete the pending operations
-   before returning.  */
-L(b1i):
-	bne-	cr0, L(bLcr0)
-	bne-	cr1, L(bLcr1)
-	b	L(bx56)
-	.align 4
-L(b2i):
-	bne-	cr6, L(bLcr6)
-	bne-	cr0, L(bLcr0)
-	b	L(bx34)
-	.align 4
-L(b3i):
-	bne-	cr1, L(bLcr1)
-	bne-	cr6, L(bLcr6)
-	b	L(bx12)
-	.align 4
-L(bLcr0):
-	li	rRTN, 1
-	bgtlr	cr0
-	li	rRTN, -1
-	blr
-L(bLcr1):
-	li	rRTN, 1
-	bgtlr	cr1
-	li	rRTN, -1
-	blr
-L(bLcr6):
-	li	rRTN, 1
-	bgtlr	cr6
-	li	rRTN, -1
-	blr
-
-L(b13):
-	bne-	cr0, L(bx12)
-	bne-	cr1, L(bx34)
-L(bx56):
-	sub	rRTN, rWORD5, rWORD6
-	blr
-	nop
-L(b12):
-	bne-	cr0, L(bx12)
-L(bx34):	
-	sub	rRTN, rWORD3, rWORD4
-	blr
-L(b11):
-L(bx12):
-	sub	rRTN, rWORD1, rWORD2
-	blr
-	.align 4 
-L(zeroLengthReturn):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-L(zeroLength):
-	li	rRTN, 0
-	blr
-
-	.align 4
-/* At this point we know the strings have different alignment and the
-   compare length is at least 8 bytes.  rBITDIF containes the low order
-   3 bits of rSTR1 and cr5 contains the result of the logical compare
-   of rBITDIF to 0.  If rBITDIF == 0 then rStr1 is double word 
-   aligned and can perform the DWunaligned loop.
-  
-   Otherwise we know that rSTR1 is not aready DW aligned yet.
-   So we can force the string addresses to the next lower DW
-   boundary and special case this first DW word using shift left to
-   ellimiate bits preceeding the first byte.  Since we want to join the
-   normal (DWaligned) compare loop, starting at the second double word,
-   we need to adjust the length (rN) and special case the loop
-   versioning for the first DW. This insures that the loop count is
-   correct and the first DW (shifted) is in the expected resister pair.  */
-#define rSHL	r29	/* Unaligned shift left count.  */
-#define rSHR	r28	/* Unaligned shift right count.  */
-#define rB		r27	/* Left rotation temp for rWORD2.  */
-#define rD		r26	/* Left rotation temp for rWORD4.  */
-#define rF		r25	/* Left rotation temp for rWORD6.  */
-#define rH		r24	/* Left rotation temp for rWORD8.  */
-#define rA		r0	/* Right rotation temp for rWORD2.  */
-#define rC		r12	/* Right rotation temp for rWORD4.  */
-#define rE		r0	/* Right rotation temp for rWORD6.  */
-#define rG		r12	/* Right rotation temp for rWORD8.  */
-L(unaligned):
-	std	r29,-24(r1)	
-	cfi_offset(r29,-24)
-	clrldi	rSHL, rSTR2, 61
-	beq-	cr6, L(duzeroLength)
-	std	r28,-32(r1)	
-	cfi_offset(r28,-32)
-	beq	cr5, L(DWunaligned)
-	std	r27,-40(r1)	
-	cfi_offset(r27,-40)
-/* Adjust the logical start of rSTR2 ro compensate for the extra bits
-   in the 1st rSTR1 DW.  */
-	sub	r27, rSTR2, rBITDIF
-/* But do not attempt to address the DW before that DW that contains
-   the actual start of rSTR2.  */
-	clrrdi	rSTR2, rSTR2, 3
-	std	r26,-48(r1)	
-	cfi_offset(r26,-48)
-/* Compute the leaft/right shift counts for the unalign rSTR2,
-   compensating for the logical (DW aligned) start of rSTR1.  */ 
-	clrldi	rSHL, r27, 61
-	clrrdi	rSTR1, rSTR1, 3	
-	std	r25,-56(r1)	
-	cfi_offset(r25,-56)
-	sldi	rSHL, rSHL, 3
-	cmpld	cr5, r27, rSTR2
-	add	rN, rN, rBITDIF
-	sldi	r11, rBITDIF, 3
-	std	r24,-64(r1)	
-	cfi_offset(r24,-64)
-	subfic	rSHR, rSHL, 64
-	srdi	rTMP, rN, 5	/* Divide by 32 */
-	andi.	rBITDIF, rN, 24	/* Get the DW remainder */
-/* We normally need to load 2 DWs to start the unaligned rSTR2, but in
-   this special case those bits may be discarded anyway.  Also we
-   must avoid loading a DW where none of the bits are part of rSTR2 as
-   this may cross a page boundary and cause a page fault.  */
-	li	rWORD8, 0
-	blt	cr5, L(dus0)
-	ld	rWORD8, 0(rSTR2)
-	la	rSTR2, 8(rSTR2)
-	sld	rWORD8, rWORD8, rSHL
-
-L(dus0):
-	ld	rWORD1, 0(rSTR1)
-	ld	rWORD2, 0(rSTR2)
-	cmpldi	cr1, rBITDIF, 16
-	cmpldi	cr7, rN, 32
-	srd	rG, rWORD2, rSHR
-	clrldi	rN, rN, 61
-	beq	L(duPs4)
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	or	rWORD8, rG, rWORD8
-	bgt	cr1, L(duPs3)
-	beq	cr1, L(duPs2)
-
-/* Remainder is 8 */
-	.align 4
-L(dusP1):
-	sld	rB, rWORD2, rSHL
-	sld	rWORD7, rWORD1, r11
-	sld	rWORD8, rWORD8, r11
-	bge	cr7, L(duP1e)
-/* At this point we exit early with the first double word compare
-   complete and remainder of 0 to 7 bytes.  See L(du14) for details on
-   how we handle the remaining bytes.  */
-	cmpld	cr5, rWORD7, rWORD8
-	sldi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-	cmpld	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	ld	rWORD2, 8(rSTR2)
-	srd	rA, rWORD2, rSHR
-	b	L(dutrim)
-/* Remainder is 16 */
-	.align 4
-L(duPs2):
-	sld	rH, rWORD2, rSHL
-	sld	rWORD5, rWORD1, r11
-	sld	rWORD6, rWORD8, r11
-	b	L(duP2e)
-/* Remainder is 24 */
-	.align 4
-L(duPs3):
-	sld	rF, rWORD2, rSHL
-	sld	rWORD3, rWORD1, r11
-	sld	rWORD4, rWORD8, r11
-	b	L(duP3e)
-/* Count is a multiple of 32, remainder is 0 */
-	.align 4
-L(duPs4):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	or	rWORD8, rG, rWORD8
-	sld	rD, rWORD2, rSHL
-	sld	rWORD1, rWORD1, r11
-	sld	rWORD2, rWORD8, r11
-	b	L(duP4e)
-
-/* At this point we know rSTR1 is double word aligned and the
-   compare length is at least 8 bytes.  */
-	.align 4
-L(DWunaligned):
-	std	r27,-40(r1)	
-	cfi_offset(r27,-40)
-	clrrdi	rSTR2, rSTR2, 3
-	std	r26,-48(r1)	
-	cfi_offset(r26,-48)
-	srdi	rTMP, rN, 5	/* Divide by 32 */
-	std	r25,-56(r1)	
-	cfi_offset(r25,-56)
-	andi.	rBITDIF, rN, 24	/* Get the DW remainder */
-	std	r24,-64(r1)	
-	cfi_offset(r24,-64)
-	sldi	rSHL, rSHL, 3
-	ld	rWORD6, 0(rSTR2)
-	ldu	rWORD8, 8(rSTR2)
-	cmpldi	cr1, rBITDIF, 16
-	cmpldi	cr7, rN, 32
-	clrldi	rN, rN, 61
-	subfic	rSHR, rSHL, 64
-	sld	rH, rWORD6, rSHL
-	beq	L(duP4)
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	bgt	cr1, L(duP3)
-	beq	cr1, L(duP2)
-		
-/* Remainder is 8 */
-	.align 4
-L(duP1):
-	srd	rG, rWORD8, rSHR
-	ld	rWORD7, 0(rSTR1)
-	sld	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	blt	cr7, L(duP1x)
-L(duP1e):
-	ld	rWORD1, 8(rSTR1)
-	ld	rWORD2, 8(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-	srd	rA, rWORD2, rSHR
-	sld	rD, rWORD2, rSHL
-	or	rWORD2, rA, rB
-	ld	rWORD3, 16(rSTR1)
-	ld	rWORD4, 16(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-	srd	rC, rWORD4, rSHR
-	sld	rF, rWORD4, rSHL
-	bne	cr5, L(duLcr5)
-	or	rWORD4, rC, rD
-	ld	rWORD5, 24(rSTR1)
-	ld	rWORD6, 24(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-	srd	rE, rWORD6, rSHR
-	sld	rH, rWORD6, rSHL
-	bne	cr0, L(duLcr0)
-	or	rWORD6, rE, rF
-	cmpld	cr6, rWORD5, rWORD6
-	b	L(duLoop3)	
-	.align 4
-/* At this point we exit early with the first double word compare
-   complete and remainder of 0 to 7 bytes.  See L(du14) for details on
-   how we handle the remaining bytes.  */
-L(duP1x):
-	cmpld	cr5, rWORD7, rWORD8
-	sldi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-	cmpld	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	ld	rWORD2, 8(rSTR2)
-	srd	rA, rWORD2, rSHR
-	b	L(dutrim)
-/* Remainder is 16 */
-	.align 4
-L(duP2):
-	srd	rE, rWORD8, rSHR
-	ld	rWORD5, 0(rSTR1)
-	or	rWORD6, rE, rH
-	sld	rH, rWORD8, rSHL
-L(duP2e):
-	ld	rWORD7, 8(rSTR1)
-	ld	rWORD8, 8(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	srd	rG, rWORD8, rSHR
-	sld	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	blt	cr7, L(duP2x)
-	ld	rWORD1, 16(rSTR1)
-	ld	rWORD2, 16(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-	bne	cr6, L(duLcr6)
-	srd	rA, rWORD2, rSHR
-	sld	rD, rWORD2, rSHL
-	or	rWORD2, rA, rB
-	ld	rWORD3, 24(rSTR1)
-	ld	rWORD4, 24(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-	bne	cr5, L(duLcr5)
-	srd	rC, rWORD4, rSHR
-	sld	rF, rWORD4, rSHL
-	or	rWORD4, rC, rD
-	addi	rSTR1, rSTR1, 8
-	addi	rSTR2, rSTR2, 8
-	cmpld	cr1, rWORD3, rWORD4
-	b	L(duLoop2)
-	.align 4
-L(duP2x):
-	cmpld	cr5, rWORD7, rWORD8
-	addi	rSTR1, rSTR1, 8
-	addi	rSTR2, rSTR2, 8
-	bne	cr6, L(duLcr6)
-	sldi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-	cmpld	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	ld	rWORD2, 8(rSTR2)
-	srd	rA, rWORD2, rSHR
-	b	L(dutrim)
-		
-/* Remainder is 24 */
-	.align 4
-L(duP3):
-	srd	rC, rWORD8, rSHR
-	ld	rWORD3, 0(rSTR1)
-	sld	rF, rWORD8, rSHL
-	or	rWORD4, rC, rH
-L(duP3e):
-	ld	rWORD5, 8(rSTR1)
-	ld	rWORD6, 8(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-	srd	rE, rWORD6, rSHR
-	sld	rH, rWORD6, rSHL
-	or	rWORD6, rE, rF
-	ld	rWORD7, 16(rSTR1)
-	ld	rWORD8, 16(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	bne	cr1, L(duLcr1)
-	srd	rG, rWORD8, rSHR
-	sld	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	blt	cr7, L(duP3x)
-	ld	rWORD1, 24(rSTR1)
-	ld	rWORD2, 24(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-	bne	cr6, L(duLcr6)
-	srd	rA, rWORD2, rSHR
-	sld	rD, rWORD2, rSHL
-	or	rWORD2, rA, rB
-	addi	rSTR1, rSTR1, 16
-	addi	rSTR2, rSTR2, 16
-	cmpld	cr0, rWORD1, rWORD2
-	b	L(duLoop1)
-	.align 4
-L(duP3x):
-	addi	rSTR1, rSTR1, 16
-	addi	rSTR2, rSTR2, 16
-	bne	cr1, L(duLcr1)
-	cmpld	cr5, rWORD7, rWORD8
-	bne	cr6, L(duLcr6)
-	sldi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-	cmpld	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	ld	rWORD2, 8(rSTR2)
-	srd	rA, rWORD2, rSHR
-	b	L(dutrim)
-	
-/* Count is a multiple of 32, remainder is 0 */
-	.align 4
-L(duP4):
-	mtctr   rTMP	/* Power4 wants mtctr 1st in dispatch group */
-	srd	rA, rWORD8, rSHR
-	ld	rWORD1, 0(rSTR1)
-	sld	rD, rWORD8, rSHL
-	or	rWORD2, rA, rH
-L(duP4e):
-	ld	rWORD3, 8(rSTR1)
-	ld	rWORD4, 8(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-	srd	rC, rWORD4, rSHR
-	sld	rF, rWORD4, rSHL
-	or	rWORD4, rC, rD
-	ld	rWORD5, 16(rSTR1)
-	ld	rWORD6, 16(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-	bne	cr0, L(duLcr0)
-	srd	rE, rWORD6, rSHR
-	sld	rH, rWORD6, rSHL
-	or	rWORD6, rE, rF
-	ldu	rWORD7, 24(rSTR1)
-	ldu	rWORD8, 24(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	bne	cr1, L(duLcr1)
-	srd	rG, rWORD8, rSHR
-	sld	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	cmpld	cr5, rWORD7, rWORD8
-	bdz-	L(du24)		/* Adjust CTR as we start with +4 */
-/* This is the primary loop */
-	.align 4
-L(duLoop):
-	ld	rWORD1, 8(rSTR1)
-	ld	rWORD2, 8(rSTR2)
-	cmpld	cr1, rWORD3, rWORD4
-	bne	cr6, L(duLcr6)
-	srd	rA, rWORD2, rSHR
-	sld	rD, rWORD2, rSHL
-	or	rWORD2, rA, rB
-L(duLoop1):
-	ld	rWORD3, 16(rSTR1)
-	ld	rWORD4, 16(rSTR2)
-	cmpld	cr6, rWORD5, rWORD6
-	bne	cr5, L(duLcr5)
-	srd	rC, rWORD4, rSHR
-	sld	rF, rWORD4, rSHL
-	or	rWORD4, rC, rD
-L(duLoop2):
-	ld	rWORD5, 24(rSTR1)
-	ld	rWORD6, 24(rSTR2)
-	cmpld	cr5, rWORD7, rWORD8
-	bne	cr0, L(duLcr0)
-	srd	rE, rWORD6, rSHR
-	sld	rH, rWORD6, rSHL
-	or	rWORD6, rE, rF
-L(duLoop3):
-	ldu	rWORD7, 32(rSTR1)
-	ldu	rWORD8, 32(rSTR2)
-	cmpld	cr0, rWORD1, rWORD2
-	bne-	cr1, L(duLcr1)
-	srd	rG, rWORD8, rSHR
-	sld	rB, rWORD8, rSHL
-	or	rWORD8, rG, rH
-	bdnz+	L(duLoop)	
-	
-L(duL4):
-	bne	cr1, L(duLcr1)
-	cmpld	cr1, rWORD3, rWORD4
-	bne	cr6, L(duLcr6)
-	cmpld	cr6, rWORD5, rWORD6
-	bne	cr5, L(duLcr5)
-	cmpld	cr5, rWORD7, rWORD8
-L(du44):
-	bne	cr0, L(duLcr0)
-L(du34):
-	bne	cr1, L(duLcr1)
-L(du24):
-	bne	cr6, L(duLcr6)
-L(du14):
-	sldi.	rN, rN, 3
-	bne	cr5, L(duLcr5)
-/* At this point we have a remainder of 1 to 7 bytes to compare.  We use
-   shift right double to elliminate bits beyond the compare length. 
-   This allows the use of double word subtract to compute the final
-   result.
-
-   However it may not be safe to load rWORD2 which may be beyond the 
-   string length. So we compare the bit length of the remainder to
-   the right shift count (rSHR). If the bit count is less than or equal
-   we do not need to load rWORD2 (all significant bits are already in
-   rB).  */
-	cmpld	cr7, rN, rSHR
-	beq	L(duZeroReturn)
-	li	rA, 0
-	ble	cr7, L(dutrim)
-	ld	rWORD2, 8(rSTR2)
-	srd	rA, rWORD2, rSHR
-	.align 4
-L(dutrim):
-	ld	rWORD1, 8(rSTR1)
-	ld	rWORD8,-8(r1)
-	subfic	rN, rN, 64	/* Shift count is 64 - (rN * 8).  */ 
-	or	rWORD2, rA, rB
-	ld	rWORD7,-16(r1)	
-	ld	r29,-24(r1)
-	srd	rWORD1, rWORD1, rN
-	srd	rWORD2, rWORD2, rN
-	ld	r28,-32(r1)	
-	ld	r27,-40(r1)
-	li	rRTN, 0
-	cmpld	cr0, rWORD1, rWORD2	
-	ld	r26,-48(r1)
-	ld	r25,-56(r1)
- 	beq	cr0, L(dureturn24)
-	li	rRTN, 1
-	ld	r24,-64(r1)
-	bgtlr	cr0
-	li	rRTN, -1
-	blr
-	.align 4
-L(duLcr0):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	li	rRTN, 1
-	bgt	cr0, L(dureturn29)	
-	ld	r29,-24(r1)
-	ld	r28,-32(r1)
-	li	rRTN, -1
-	b	L(dureturn27)
-	.align 4
-L(duLcr1):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	li	rRTN, 1
-	bgt	cr1, L(dureturn29)	
-	ld	r29,-24(r1)
-	ld	r28,-32(r1)
-	li	rRTN, -1
-	b	L(dureturn27)
-	.align 4
-L(duLcr6):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	li	rRTN, 1
-	bgt	cr6, L(dureturn29)	
-	ld	r29,-24(r1)
-	ld	r28,-32(r1)
-	li	rRTN, -1
-	b	L(dureturn27)
-	.align 4
-L(duLcr5):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-	li	rRTN, 1
-	bgt	cr5, L(dureturn29)	
-	ld	r29,-24(r1)
-	ld	r28,-32(r1)
-	li	rRTN, -1
-	b	L(dureturn27)
-	.align	3
-L(duZeroReturn):
-	li	rRTN,0
-	.align	4
-L(dureturn):
-	ld	rWORD8,-8(r1)
-	ld	rWORD7,-16(r1)
-L(dureturn29):	
-	ld	r29,-24(r1)
-	ld	r28,-32(r1)
-L(dureturn27):	
-	ld	r27,-40(r1)
-L(dureturn26):	
-	ld	r26,-48(r1)
-L(dureturn25):	
-	ld	r25,-56(r1)
-L(dureturn24):
-	ld	r24,-64(r1)
-	blr
-L(duzeroLength):
-	li	rRTN,0
-	blr
-
-END (BP_SYM (memcmp))
-libc_hidden_builtin_def (memcmp)
-weak_alias (memcmp, bcmp)
diff --git a/sysdeps/powerpc/powerpc64/power4/memcopy.h b/sysdeps/powerpc/powerpc64/power4/memcopy.h
deleted file mode 100644
index 9a4ff79f4a..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/memcopy.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../powerpc32/power4/memcopy.h"
diff --git a/sysdeps/powerpc/powerpc64/power4/memcpy.S b/sysdeps/powerpc/powerpc64/power4/memcpy.S
deleted file mode 100644
index 9910ebda82..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/memcpy.S
+++ /dev/null
@@ -1,417 +0,0 @@
-/* Optimized memcpy implementation for PowerPC64.
-   Copyright (C) 2003, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
-   Returns 'dst'.
-
-   Memcpy handles short copies (< 32-bytes) using a binary move blocks 
-   (no loops) of lwz/stw.  The tail (remaining 1-3) bytes is handled 
-   with the appropriate combination of byte and halfword load/stores. 
-   There is minimal effort to optimize the alignment of short moves.  
-   The 64-bit implementations of POWER3 and POWER4 do a reasonable job
-   of handling unligned load/stores that do not cross 32-byte boundries.
-
-   Longer moves (>= 32-bytes) justify the effort to get at least the
-   destination doubleword (8-byte) aligned.  Further optimization is
-   posible when both source and destination are doubleword aligned.
-   Each case has a optimized unrolled loop.   */
-
-EALIGN (BP_SYM (memcpy), 5, 0)
-	CALL_MCOUNT 3
-
-    cmpldi cr1,5,31
-    neg   0,3
-    std   3,-16(1)
-    std   31,-8(1)
-    cfi_offset(31,-8)
-    andi. 11,3,7	/* check alignement of dst.  */
-    clrldi 0,0,61	/* Number of bytes until the 1st doubleword of dst.  */
-    clrldi 10,4,61	/* check alignement of src.  */
-    cmpldi cr6,5,8
-    ble-  cr1,.L2	/* If move < 32 bytes use short move code.  */
-    cmpld cr6,10,11     
-    mr    12,4
-    srdi  9,5,3		/* Number of full double words remaining.  */
-    mtcrf 0x01,0
-    mr    31,5
-    beq   .L0
-  
-    subf  31,0,5
-  /* Move 0-7 bytes as needed to get the destination doubleword alligned.  */
-1:  bf    31,2f
-    lbz   6,0(12)
-    addi  12,12,1
-    stb   6,0(3)
-    addi  3,3,1
-2:  bf    30,4f
-    lhz   6,0(12)
-    addi  12,12,2
-    sth   6,0(3)
-    addi  3,3,2
-4:  bf    29,0f
-    lwz   6,0(12)
-    addi  12,12,4
-    stw   6,0(3)
-    addi  3,3,4
-0:
-    clrldi 10,12,61	/* check alignement of src again.  */     
-    srdi  9,31,3	/* Number of full double words remaining.  */
-    
-  /* Copy doublewords from source to destination, assumpting the
-     destination is aligned on a doubleword boundary.
-
-     At this point we know there are at least 25 bytes left (32-7) to copy.
-     The next step is to determine if the source is also doubleword aligned. 
-     If not branch to the unaligned move code at .L6. which uses
-     a load, shift, store strategy.
-     
-     Otherwise source and destination are doubleword aligned, and we can
-     the optimized doubleword copy loop.  */
-.L0:
-    clrldi  11,31,61
-    mtcrf   0x01,9
-    cmpldi  cr1,11,0
-    bne-    cr6,.L6   /* If source is not DW aligned.  */
-
-  /* Move doublewords where destination and source are DW aligned.
-     Use a unrolled loop to copy 4 doubleword (32-bytes) per iteration.
-     If the the copy is not an exact multiple of 32 bytes, 1-3 
-     doublewords are copied as needed to set up the main loop.  After
-     the main loop exits there may be a tail of 1-7 bytes. These byte are 
-     copied a word/halfword/byte at a time as needed to preserve alignment.  */
-
-    srdi  8,31,5
-    cmpldi	cr1,9,4
-    cmpldi	cr6,11,0
-    mr    11,12
-    
-    bf    30,1f
-    ld    6,0(12)
-    ld    7,8(12)
-    addi  11,12,16
-    mtctr 8
-    std   6,0(3)
-    std   7,8(3)
-    addi  10,3,16
-    bf    31,4f
-    ld    0,16(12)
-    std   0,16(3)    
-    blt   cr1,3f
-    addi  11,12,24
-    addi  10,3,24
-    b     4f
-    .align  4
-1:
-    mr    10,3
-    mtctr 8
-    bf    31,4f
-    ld    6,0(12)
-    addi  11,12,8
-    std   6,0(3)
-    addi  10,3,8
-    
-    .align  4
-4:
-    ld    6,0(11)
-    ld    7,8(11)
-    ld    8,16(11)
-    ld    0,24(11)
-    addi  11,11,32
-2:
-    std   6,0(10)
-    std   7,8(10)
-    std   8,16(10)
-    std   0,24(10)
-    addi  10,10,32
-    bdnz  4b
-3:  
-
-    rldicr 0,31,0,60
-    mtcrf 0x01,31
-    beq   cr6,0f
-.L9:
-    add   3,3,0
-    add   12,12,0
-    
-/*  At this point we have a tail of 0-7 bytes and we know that the
-    destiniation is double word aligned.  */
-4:  bf    29,2f
-    lwz   6,0(12)
-    addi  12,12,4
-    stw   6,0(3)
-    addi  3,3,4
-2:  bf    30,1f
-    lhz   6,0(12)
-    addi  12,12,2
-    sth   6,0(3)
-    addi  3,3,2
-1:  bf    31,0f
-    lbz   6,0(12)
-    stb   6,0(3)
-0:
-  /* Return original dst pointer.  */
-    ld 31,-8(1)
-    ld 3,-16(1)
-    blr
-       
-/* Copy up to 31 bytes.  This divided into two cases 0-8 bytes and 9-31 
-   bytes.  Each case is handled without loops, using binary (1,2,4,8) 
-   tests.  
-   
-   In the short (0-8 byte) case no attempt is made to force alignment
-   of either source or destination.  The hardware will handle the 
-   unaligned load/stores with small delays for crossing 32- 64-byte, and 
-   4096-byte boundaries. Since these short moves are unlikely to be
-   unaligned or cross these boundaries, the overhead to force 
-   alignment is not justified.
-   
-   The longer (9-31 byte) move is more likely to cross 32- or 64-byte
-   boundaries.  Since only loads are sensitive to the 32-/64-byte
-   boundaries it is more important to align the source then the 
-   destination.  If the source is not already word aligned, we first
-   move 1-3 bytes as needed.  Since we are only word aligned we don't 
-   use double word load/stores to insure that all loads are aligned. 
-   While the destination and stores may still be unaligned, this
-   is only an issue for page (4096 byte boundary) crossing, which
-   should be rare for these short moves.  The hardware handles this
-   case automatically with a small delay.  */ 
-   
-    .align  4
-.L2:
-    mtcrf 0x01,5
-    neg   8,4
-    clrrdi	11,4,2
-    andi. 0,8,3
-    ble   cr6,.LE8	/* Handle moves of 0-8 bytes.  */
-/* At least 9 bytes left.  Get the source word aligned.  */
-    cmpldi	cr1,5,16
-    mr    10,5
-    mr    12,4
-    cmpldi	cr6,0,2
-    beq   .L3	/* If the source is already word aligned skip this.  */
-/* Copy 1-3 bytes to get source address word aligned.  */
-    lwz   6,0(11)
-    subf  10,0,5
-    add   12,4,0
-    blt   cr6,5f
-    srdi  7,6,16
-    bgt	  cr6,3f
-    sth   6,0(3)
-    b     7f
-    .align  4
-3:
-    stb   7,0(3)
-    sth   6,1(3)
-    b     7f
-    .align  4
-5:
-    stb   6,0(3)
-7:
-    cmpldi	cr1,10,16
-    add   3,3,0
-    mtcrf 0x01,10
-    .align  4
-.L3:
-/* At least 6 bytes left and the source is word aligned.  */
-    blt   cr1,8f
-16: /* Move 16 bytes.  */
-    lwz   6,0(12)
-    lwz   7,4(12)
-    stw   6,0(3)
-    lwz   6,8(12)
-    stw   7,4(3)
-    lwz   7,12(12)
-    addi  12,12,16
-    stw   6,8(3)
-    stw   7,12(3)
-    addi  3,3,16
-8:  /* Move 8 bytes.  */
-    bf    28,4f
-    lwz   6,0(12)
-    lwz   7,4(12)
-    addi  12,12,8
-    stw   6,0(3)
-    stw   7,4(3)
-    addi  3,3,8
-4:  /* Move 4 bytes.  */
-    bf    29,2f
-    lwz   6,0(12)
-    addi  12,12,4
-    stw   6,0(3)
-    addi  3,3,4    
-2:  /* Move 2-3 bytes.  */
-    bf    30,1f
-    lhz   6,0(12)
-    sth   6,0(3) 
-    bf    31,0f
-    lbz   7,2(12)
-    stb   7,2(3)
-    ld 3,-16(1)
-    blr
-1:  /* Move 1 byte.  */
-    bf    31,0f
-    lbz   6,0(12)
-    stb   6,0(3)
-0:
-  /* Return original dst pointer.  */
-    ld    3,-16(1)
-    blr
-
-/* Special case to copy 0-8 bytes.  */
-    .align  4
-.LE8:
-    mr    12,4
-    bne   cr6,4f
-/* Would have liked to use use ld/std here but the 630 processors are
-   slow for load/store doubles that are not at least word aligned.  
-   Unaligned Load/Store word execute with only a 1 cycle penaltity.  */
-    lwz   6,0(4)
-    lwz   7,4(4)
-    stw   6,0(3)
-    stw   7,4(3)
-  /* Return original dst pointer.  */
-    ld    3,-16(1)
-    blr
-    .align  4
-4:  bf    29,2b
-    lwz   6,0(4)
-    stw   6,0(3)
-6:
-    bf    30,5f
-    lhz   7,4(4)
-    sth   7,4(3) 
-    bf    31,0f
-    lbz   8,6(4)
-    stb   8,6(3)
-    ld 3,-16(1)
-    blr
-    .align  4
-5:  
-    bf    31,0f
-    lbz   6,4(4)
-    stb   6,4(3)
-    .align  4
-0:
-  /* Return original dst pointer.  */
-    ld    3,-16(1)
-    blr
-
-    .align  4
-.L6:
-
-  /* Copy doublewords where the destination is aligned but the source is
-     not.  Use aligned doubleword loads from the source, shifted to realign
-     the data, to allow aligned destination stores.  */
-    addi    11,9,-1  /* loop DW count is one less than total */
-    subf    5,10,12
-    sldi    10,10,3
-    mr      4,3
-    srdi    8,11,2   /* calculate the 32 byte loop count */
-    ld      6,0(5)
-    mtcrf   0x01,11
-    cmpldi  cr6,9,4
-    mtctr   8
-    ld      7,8(5)
-    subfic  9,10,64
-    bf      30,1f
-
-    /* there are at least two DWs to copy */
-    sld     0,6,10
-    srd     8,7,9
-    or      0,0,8
-    ld      6,16(5)
-    std     0,0(4)
-    sld     0,7,10
-    srd     8,6,9
-    or      0,0,8
-    ld      7,24(5)
-    std     0,8(4)
-    addi    4,4,16
-    addi    5,5,32
-    blt     cr6,8f  /* if total DWs = 3, then bypass loop */
-    bf      31,4f
-    /* there is a third DW to copy */
-    sld     0,6,10
-    srd     8,7,9
-    or      0,0,8
-    std     0,0(4)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    addi    4,4,8
-    beq     cr6,8f  /* if total DWs = 4, then bypass loop */
-    b       4f
-    .align 4
-1:
-    sld     0,6,10
-    srd     8,7,9
-    addi    5,5,16
-    or      0,0,8
-    bf      31,4f
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    std     0,0(4)
-    addi    4,4,8
-    .align 4
-/* copy 32 bytes at a time */
-4:  sld   0,6,10
-    srd   8,7,9
-    or    0,0,8
-    ld    6,0(5)
-    std   0,0(4)
-    sld   0,7,10
-    srd   8,6,9
-    or    0,0,8
-    ld    7,8(5)
-    std   0,8(4)
-    sld   0,6,10
-    srd   8,7,9
-    or    0,0,8
-    ld    6,16(5)
-    std   0,16(4)
-    sld   0,7,10
-    srd   8,6,9
-    or    0,0,8
-    ld    7,24(5)
-    std   0,24(4)
-    addi  5,5,32
-    addi  4,4,32
-    bdnz+ 4b
-    .align 4
-8:
-    /* calculate and store the final DW */
-    sld   0,6,10
-    srd   8,7,9
-    or    0,0,8  
-    std   0,0(4)
-3:
-    rldicr 0,31,0,60
-    mtcrf 0x01,31
-    bne   cr1,.L9	/* If the tail is 0 bytes we are done!  */
-  /* Return original dst pointer.  */
-    ld 31,-8(1)
-    ld 3,-16(1)
-    blr
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
-libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/power4/memset.S b/sysdeps/powerpc/powerpc64/power4/memset.S
deleted file mode 100644
index 17b2d76950..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/memset.S
+++ /dev/null
@@ -1,280 +0,0 @@
-/* Optimized memset implementation for PowerPC64.
-   Copyright (C) 1997, 1999, 2000, 2002, 2003, 2007
-   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 <bp-sym.h>
-#include <bp-asm.h>
-
-	.section	".toc","aw"
-.LC0:
-	.tc __cache_line_size[TC],__cache_line_size
-	.section	".text"
-	.align 2
-
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
-   Returns 's'.
-
-   The memset is done in three sizes: byte (8 bits), word (32 bits),
-   cache line (256 bits). There is a special case for setting cache lines
-   to 0, to take advantage of the dcbz instruction.  */
-
-EALIGN (BP_SYM (memset), 5, 0)
-	CALL_MCOUNT 3
-
-#define rTMP	r0
-#define rRTN	r3	/* Initial value of 1st argument.  */
-#if __BOUNDED_POINTERS__
-# define rMEMP0	r4	/* Original value of 1st arg.  */
-# define rCHR	r5	/* Char to set in each byte.  */
-# define rLEN	r6	/* Length of region to set.  */
-# define rMEMP	r10	/* Address at which we are storing.  */
-#else
-# define rMEMP0	r3	/* Original value of 1st arg.  */
-# define rCHR	r4	/* Char to set in each byte.  */
-# define rLEN	r5	/* Length of region to set.  */
-# define rMEMP	r6	/* Address at which we are storing.  */
-#endif
-#define rALIGN	r7	/* Number of bytes we are setting now (when aligning). */
-#define rMEMP2	r8
-
-#define rNEG64	r8	/* Constant -64 for clearing with dcbz.  */
-#define rCLS	r8	/* Cache line size obtained from static.  */
-#define rCLM	r9	/* Cache line size mask to check for cache alignment.  */
-L(_memset):
-#if __BOUNDED_POINTERS__
-	cmpldi	cr1, rRTN, 0
-	CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN)
-	beq	cr1, L(b0)
-	STORE_RETURN_VALUE (rMEMP0)
-	STORE_RETURN_BOUNDS (rTMP, rTMP2)
-L(b0):
-#endif
-/* Take care of case for size <= 4.  */
-	cmpldi	cr1, rLEN, 8
-	andi.	rALIGN, rMEMP0, 7
-	mr	rMEMP, rMEMP0
-	ble-	cr1, L(small)
-
-/* Align to doubleword boundary.  */
-	cmpldi	cr5, rLEN, 31
-	rlwimi	rCHR, rCHR, 8, 16, 23 /* Replicate byte to halfword.  */
-	beq+	L(aligned2)
-	mtcrf	0x01, rMEMP0
-	subfic	rALIGN, rALIGN, 8
-	cror	28,30,31		/* Detect odd word aligned.  */
-	add	rMEMP, rMEMP, rALIGN
-	sub	rLEN, rLEN, rALIGN
-	rlwimi	rCHR, rCHR, 16, 0, 15 /* Replicate halfword to word.  */
-	bt	29, L(g4)
-/* Process the even word of doubleword.  */
-	bf+	31, L(g2)
-	stb	rCHR, 0(rMEMP0)
-	bt	30, L(g4x)
-L(g2):
-	sth	rCHR, -6(rMEMP)
-L(g4x):
-	stw	rCHR, -4(rMEMP)
-	b	L(aligned)
-/* Process the odd word of doubleword.  */
-L(g4):
-	bf	28, L(g4x) /* If false, word aligned on odd word.  */
-	bf+	31, L(g0)
-	stb	rCHR, 0(rMEMP0)
-	bt	30, L(aligned)
-L(g0):
-	sth	rCHR, -2(rMEMP)
-
-/* Handle the case of size < 31.  */
-L(aligned2):
-	rlwimi	rCHR, rCHR, 16, 0, 15 /* Replicate halfword to word.  */
-L(aligned):
-	mtcrf	0x01, rLEN
-	ble	cr5, L(medium)
-/* Align to 32-byte boundary.  */
-	andi.	rALIGN, rMEMP, 0x18
-	subfic	rALIGN, rALIGN, 0x20
-	insrdi	rCHR,rCHR,32,0 /* Replicate word to double word. */
-	beq	L(caligned)
-	mtcrf	0x01, rALIGN
-	add	rMEMP, rMEMP, rALIGN
-	sub	rLEN, rLEN, rALIGN
-	cmplwi	cr1, rALIGN, 0x10
-	mr	rMEMP2, rMEMP
-	bf	28, L(a1)
-	stdu	rCHR, -8(rMEMP2)
-L(a1):	blt	cr1, L(a2)
-	std	rCHR, -8(rMEMP2)
-	stdu	rCHR, -16(rMEMP2)
-L(a2):
-
-/* Now aligned to a 32 byte boundary.  */
-L(caligned):
-	cmpldi	cr1, rCHR, 0
-	clrrdi.	rALIGN, rLEN, 5
-	mtcrf	0x01, rLEN
-	beq	cr1, L(zloopstart) /* Special case for clearing memory using dcbz.  */
-L(nondcbz):
-	srdi	rTMP, rALIGN, 5
-	mtctr	rTMP
-	beq	L(medium)	/* We may not actually get to do a full line.  */
-	clrldi.	rLEN, rLEN, 59
-	add	rMEMP, rMEMP, rALIGN
-	li	rNEG64, -0x40
-	bdz	L(cloopdone)
-
-L(c3):	dcbtst	rNEG64, rMEMP
-	std	rCHR, -8(rMEMP)
-	std	rCHR, -16(rMEMP)
-	std	rCHR, -24(rMEMP)
-	stdu	rCHR, -32(rMEMP)
-	bdnz	L(c3)
-L(cloopdone):
-	std	rCHR, -8(rMEMP)
-	std	rCHR, -16(rMEMP)
-	cmpldi	cr1, rLEN, 16
-	std	rCHR, -24(rMEMP)
-	stdu	rCHR, -32(rMEMP)
-	beqlr
-	add	rMEMP, rMEMP, rALIGN
-	b	L(medium_tail2)
-
-	.align 5
-/* Clear lines of memory in 128-byte chunks.  */
-L(zloopstart):
-/* If the remaining length is less the 32 bytes, don't bother getting
-	 the cache line size.  */
-	beq	L(medium)
-	li      rCLS,128  /* cache line size is 128 */
-
-/* Now we know the cache line size, and it is not 32-bytes, but
-	 we may not yet be aligned to the cache line. May have a partial
-	 line to fill, so touch it 1st.  */
-	dcbt	0,rMEMP
-L(getCacheAligned):
-	cmpldi	cr1,rLEN,32
-	andi.	rTMP,rMEMP,127
-	blt		cr1,L(handletail32)
-	beq		L(cacheAligned)
-	addi	rMEMP,rMEMP,32
-	addi	rLEN,rLEN,-32
-	std		rCHR,-32(rMEMP)
-	std		rCHR,-24(rMEMP)
-	std		rCHR,-16(rMEMP)
-	std		rCHR,-8(rMEMP)
-	b		L(getCacheAligned)
-
-/* Now we are aligned to the cache line and can use dcbz.  */
-L(cacheAligned):
-	cmpld	cr1,rLEN,rCLS
-	blt		cr1,L(handletail32)
-	dcbz	0,rMEMP
-	subf	rLEN,rCLS,rLEN
-	add		rMEMP,rMEMP,rCLS
-	b		L(cacheAligned)
-
-/* We are here because the cache line size was set and was not 32-bytes
-   and the remainder (rLEN) is less than the actual cache line size.
-   So set up the preconditions for L(nondcbz) and go there.  */
-L(handletail32):
-	clrrwi.	rALIGN, rLEN, 5
-	b		L(nondcbz)
-
-	.align 5
-L(small):
-/* Memset of 8 bytes or less.  */
-	cmpldi	cr6, rLEN, 4
-	cmpldi	cr5, rLEN, 1
-	ble	cr6,L(le4)
-	subi	rLEN, rLEN, 4
-	stb	rCHR,0(rMEMP)
-	stb	rCHR,1(rMEMP)
-	stb	rCHR,2(rMEMP)
-	stb	rCHR,3(rMEMP)
-	addi	rMEMP,rMEMP, 4
-	cmpldi	cr5, rLEN, 1
-L(le4):
-	cmpldi	cr1, rLEN, 3
-	bltlr	cr5
-	stb	rCHR, 0(rMEMP)
-	beqlr	cr5
-	stb	rCHR, 1(rMEMP)
-	bltlr	cr1
-	stb	rCHR, 2(rMEMP)
-	beqlr	cr1
-	stb	rCHR, 3(rMEMP)
-	blr
-
-/* Memset of 0-31 bytes.  */
-	.align 5
-L(medium):
-	insrdi	rCHR,rCHR,32,0 /* Replicate word to double word.  */
-	cmpldi	cr1, rLEN, 16
-L(medium_tail2):
-	add	rMEMP, rMEMP, rLEN
-L(medium_tail):
-	bt-	31, L(medium_31t)
-	bt-	30, L(medium_30t)
-L(medium_30f):
-	bt-	29, L(medium_29t)
-L(medium_29f):
-	bge-	cr1, L(medium_27t)
-	bflr-	28
-	std	rCHR, -8(rMEMP)
-	blr
-
-L(medium_31t):
-	stbu	rCHR, -1(rMEMP)
-	bf-	30, L(medium_30f)
-L(medium_30t):
-	sthu	rCHR, -2(rMEMP)
-	bf-	29, L(medium_29f)
-L(medium_29t):
-	stwu	rCHR, -4(rMEMP)
-	blt-	cr1, L(medium_27f)
-L(medium_27t):
-	std	rCHR, -8(rMEMP)
-	stdu	rCHR, -16(rMEMP)
-L(medium_27f):
-	bflr-	28
-L(medium_28t):
-	std	rCHR, -8(rMEMP)
-	blr
-END_GEN_TB (BP_SYM (memset),TB_TOCLESS)
-libc_hidden_builtin_def (memset)
-
-/* Copied from bzero.S to prevent the linker from inserting a stub
-   between bzero and memset.  */
-ENTRY (BP_SYM (__bzero))
-	CALL_MCOUNT 3
-#if __BOUNDED_POINTERS__
-	mr	r6,r4
-	li	r5,0
-	mr	r4,r3
-	/* Tell memset that we don't want a return value.  */
-	li	r3,0
-	b	L(_memset)
-#else
-	mr	r5,r4
-	li	r4,0
-	b	L(_memset)
-#endif
-END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS)
-
-weak_alias (BP_SYM (__bzero), BP_SYM (bzero))
diff --git a/sysdeps/powerpc/powerpc64/power4/strncmp.S b/sysdeps/powerpc/powerpc64/power4/strncmp.S
deleted file mode 100644
index 7a1665d2bc..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/strncmp.S
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Optimized strcmp implementation for PowerPC64.
-   Copyright (C) 2003, 2006 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* See strlen.s for comments on how the end-of-string testing works.  */
-
-/* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5])  */
-
-EALIGN (BP_SYM(strncmp), 4, 0)
-	CALL_MCOUNT 3
-
-#define rTMP	r0
-#define rRTN	r3
-#define rSTR1	r3	/* first string arg */
-#define rSTR2	r4	/* second string arg */
-#define rN	r5	/* max string length */
-/* Note:  The Bounded pointer support in this code is broken.  This code
-   was inherited from PPC32 and and that support was never completed.  
-   Current PPC gcc does not support -fbounds-check or -fbounded-pointers.  */
-#define rWORD1	r6	/* current word in s1 */
-#define rWORD2	r7	/* current word in s2 */
-#define rWORD3  r10
-#define rWORD4  r11
-#define rFEFE	r8	/* constant 0xfefefefefefefeff (-0x0101010101010101) */
-#define r7F7F	r9	/* constant 0x7f7f7f7f7f7f7f7f */
-#define rNEG	r10	/* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */
-#define rBITDIF	r11	/* bits that differ in s1 & s2 words */
-
-	dcbt	0,rSTR1
-	or	rTMP, rSTR2, rSTR1
-	lis	r7F7F, 0x7f7f
-	dcbt	0,rSTR2
-	clrldi.	rTMP, rTMP, 61
-	cmpldi	cr1, rN, 0
-	lis	rFEFE, -0x101
-	bne	L(unaligned)
-/* We are doubleword alligned so set up for two loops.  first a double word
-   loop, then fall into the byte loop if any residual.  */
-	srdi.	rTMP, rN, 3
-	clrldi	rN, rN, 61
-	addi	rFEFE, rFEFE, -0x101
-	addi	r7F7F, r7F7F, 0x7f7f
-	cmpldi	cr1, rN, 0	
-	beq	L(unaligned)
-
-	mtctr	rTMP	/* Power4 wants mtctr 1st in dispatch group.  */
-	ld	rWORD1, 0(rSTR1)
-	ld	rWORD2, 0(rSTR2)
-	sldi	rTMP, rFEFE, 32
-	insrdi	r7F7F, r7F7F, 32, 0
-	add	rFEFE, rFEFE, rTMP
-	b	L(g1)
-
-L(g0):	
-	ldu	rWORD1, 8(rSTR1)
-	bne-	cr1, L(different)
-	ldu	rWORD2, 8(rSTR2)
-L(g1):	add	rTMP, rFEFE, rWORD1
-	nor	rNEG, r7F7F, rWORD1
-	bdz	L(tail)
-	and.	rTMP, rTMP, rNEG
-	cmpd	cr1, rWORD1, rWORD2
-	beq+	L(g0)
-	
-/* OK. We've hit the end of the string. We need to be careful that
-   we don't compare two strings as different because of gunk beyond
-   the end of the strings...  */
-	
-L(endstring):
-	and	rTMP, r7F7F, rWORD1
-	beq	cr1, L(equal)
-	add	rTMP, rTMP, r7F7F
-	xor.	rBITDIF, rWORD1, rWORD2
-
-	andc	rNEG, rNEG, rTMP
-	blt-	L(highbit)
-	cntlzd	rBITDIF, rBITDIF
-	cntlzd	rNEG, rNEG
-	addi	rNEG, rNEG, 7
-	cmpd	cr1, rNEG, rBITDIF
-	sub	rRTN, rWORD1, rWORD2
-	blt-	cr1, L(equal)
-	sradi	rRTN, rRTN, 63
-	ori	rRTN, rRTN, 1
-	blr
-L(equal):
-	li	rRTN, 0
-	blr
-
-L(different):
-	ldu	rWORD1, -8(rSTR1)
-	xor.	rBITDIF, rWORD1, rWORD2
-	sub	rRTN, rWORD1, rWORD2
-	blt-	L(highbit)
-	sradi	rRTN, rRTN, 63
-	ori	rRTN, rRTN, 1
-	blr
-L(highbit):
-	srdi	rWORD2, rWORD2, 56
-	srdi	rWORD1, rWORD1, 56
-	sub	rRTN, rWORD1, rWORD2
-	blr
-
-
-/* Oh well.  In this case, we just do a byte-by-byte comparison.  */
-	.align 4
-L(tail):
-	and.	rTMP, rTMP, rNEG
-	cmpd	cr1, rWORD1, rWORD2
-	bne-	L(endstring)
-	addi	rSTR1, rSTR1, 8
-	bne-	cr1, L(different)
-	addi	rSTR2, rSTR2, 8
-	cmpldi	cr1, rN, 0
-L(unaligned):
-	mtctr   rN	/* Power4 wants mtctr 1st in dispatch group */
-	ble	cr1, L(ux)
-L(uz):
-	lbz	rWORD1, 0(rSTR1)
-	lbz	rWORD2, 0(rSTR2)
-	.align 4
-L(u1):
-	cmpdi	cr1, rWORD1, 0
-	bdz	L(u4)
-	cmpd	rWORD1, rWORD2
-	beq-	cr1, L(u4)
-	lbzu    rWORD3, 1(rSTR1)
-	lbzu	rWORD4, 1(rSTR2)
-	bne-	L(u4)
-	cmpdi	cr1, rWORD3, 0
-	bdz	L(u3)
-	cmpd	rWORD3, rWORD4
-	beq-    cr1, L(u3)
-	lbzu	rWORD1, 1(rSTR1)
-	lbzu	rWORD2, 1(rSTR2)
-	bne-    L(u3)
-	cmpdi	cr1, rWORD1, 0
-	bdz	L(u4)
-	cmpd	rWORD1, rWORD2
-	beq-	cr1, L(u4)
-	lbzu	rWORD3, 1(rSTR1)
-	lbzu	rWORD4, 1(rSTR2)
-	bne-	L(u4)
-	cmpdi	cr1, rWORD3, 0
-	bdz	L(u3)
-	cmpd	rWORD3, rWORD4
-	beq-    cr1, L(u3)
-	lbzu	rWORD1, 1(rSTR1)
-	lbzu	rWORD2, 1(rSTR2)
-	beq+    L(u1)
-
-L(u3):  sub     rRTN, rWORD3, rWORD4
-        blr
-L(u4):	sub	rRTN, rWORD1, rWORD2
-	blr
-L(ux):
-	li	rRTN, 0
-	blr
-END (BP_SYM (strncmp))
-libc_hidden_builtin_def (strncmp)
-
diff --git a/sysdeps/powerpc/powerpc64/power4/wordcopy.c b/sysdeps/powerpc/powerpc64/power4/wordcopy.c
deleted file mode 100644
index f427b48e7a..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/wordcopy.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../powerpc32/power4/wordcopy.c"
diff --git a/sysdeps/powerpc/powerpc64/power5+/Implies b/sysdeps/powerpc/powerpc64/power5+/Implies
deleted file mode 100644
index ac431fa96e..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/Implies b/sysdeps/powerpc/powerpc64/power5+/fpu/Implies
deleted file mode 100644
index 558a5fb174..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4/fpu
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S
deleted file mode 100644
index 1e4851db9e..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/* ceil function.  PowerPC64/power5+ version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power5"
-EALIGN (__ceil, 4, 0)
-	CALL_MCOUNT 0
-	frip	fp1, fp1
-	blr
-	END (__ceil)
-
-weak_alias (__ceil, ceil)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__ceil, ceill)
-strong_alias (__ceil, __ceill)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __ceil, ceill, GLIBC_2_0)
-#endif
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S
deleted file mode 100644
index 38c51d5ff1..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ceilf function.  PowerPC64/power5+ version.
-   Copyright (C) 2006 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>
-
-	.machine	"power5"
-EALIGN (__ceilf, 4, 0)
-	CALL_MCOUNT 0
-	frip	fp1, fp1	/* The rounding instructions are double.  */
-	frsp	fp1, fp1	/* But we need to set ooverflow for float.  */
-	blr
-	END (__ceilf)
-
-weak_alias (__ceilf, ceilf)
-
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S
deleted file mode 100644
index 86f07c8b59..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/* floor function.  PowerPC64/power5+ version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power5"
-EALIGN (__floor, 4, 0)
-	CALL_MCOUNT 0
-	frim	fp1, fp1
-	blr
-	END (__floor)
-
-weak_alias (__floor, floor)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__floor, floorl)
-strong_alias (__floor, __floorl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __floor, floorl, GLIBC_2_0)
-#endif
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S
deleted file mode 100644
index e7bdccf513..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/* floorf function.  PowerPC64/power5+ version.
-   Copyright (C) 2006 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>
-
-	.machine	"power5"
-EALIGN (__floorf, 4, 0)
-	CALL_MCOUNT 0
-	frim	fp1, fp1	/* The rounding instructions are double.  */
-	frsp	fp1, fp1	/* But we need to set ooverflow for float.  */
-	blr
-	END (__floorf)
-
-weak_alias (__floorf, floorf)
-
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S
deleted file mode 100644
index 6a022769f4..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/* llround function.  POWER5+, PowerPC64 version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-	
-/* long long [r3] llround (float x [fp1])
-   IEEE 1003.1 llround function.  IEEE specifies "round to the nearest 
-   integer value, rounding halfway cases away from zero, regardless of
-   the current rounding mode."  However PowerPC Architecture defines
-   "round to Nearest" as "Choose the best approximation. In case of a 
-   tie, choose the one that is even (least significant bit o).". 
-   So we pre-round using the V2.02 Floating Round to Integer Nearest
-   instruction before we use Floating Convert to Integer Word with
-   round to zero instruction.  */
-
-	.machine	"power5"
-EALIGN (__llround, 4, 0)
-	CALL_MCOUNT 0
-	frin	fp2, fp1	/* Round to nearest +-0.5.  */	
-	fctidz	fp3, fp2	/* Convert To Integer DW round toward 0.  */
-	stfd	fp3, -16(r1)
-	nop	/* Insure the following load is in a different dispatch group */
-	nop	/* to avoid pipe stall on POWER4&5.  */
-	nop
-	ld	r3, -16(r1)
-	blr
-	END (__llround)
-
-strong_alias (__llround, __lround)
-weak_alias (__llround, llround)
-weak_alias (__lround, lround)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__llround, llroundl)
-strong_alias (__llround, __llroundl)
-weak_alias (__lround, lroundl)
-strong_alias (__lround, __lroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llround, llroundl, GLIBC_2_1)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S
deleted file mode 100644
index 7082734bb5..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/* round function.  PowerPC64/power5+ version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power5"
-EALIGN (__round, 4, 0)
-	CALL_MCOUNT 0
-	frin	fp1, fp1
-	blr
-	END (__round)
-
-weak_alias (__round, round)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__round, roundl)
-strong_alias (__round, __roundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __round, roundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S
deleted file mode 100644
index 30b83be9e7..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/* roundf function.  PowerPC64/power5+ version.
-   Copyright (C) 2006 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>
-
-	.machine	"power5"
-EALIGN (__roundf, 4, 0)
-	CALL_MCOUNT 0
-	frin	fp1, fp1	/* The rounding instructions are double.  */
-	frsp	fp1, fp1	/* But we need to set ooverflow for float.  */
-	blr
-	END (__roundf)
-
-weak_alias (__roundf, roundf)
-
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S
deleted file mode 100644
index 4e6e4d790e..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/* trunc function.  PowerPC64/power5+ version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power5"
-EALIGN (__trunc, 4, 0)
-	CALL_MCOUNT 0
-	friz	fp1, fp1
-	blr
-	END (__trunc)
-
-weak_alias (__trunc, trunc)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__trunc, truncl)
-strong_alias (__trunc, __truncl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __trunc, truncl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S
deleted file mode 100644
index 61d9cb372d..0000000000
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/* truncf function.  PowerPC64/power5+ version.
-   Copyright (C) 2006 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>
-
-	.machine	"power5"
-EALIGN (__truncf, 4, 0)
-	CALL_MCOUNT 0
-	friz	fp1, fp1	/* The rounding instructions are double.  */
-	frsp	fp1, fp1	/* But we need to set ooverflow for float.  */
-	blr
-	END (__truncf)
-
-weak_alias (__truncf, truncf)
-
diff --git a/sysdeps/powerpc/powerpc64/power5/Implies b/sysdeps/powerpc/powerpc64/power5/Implies
deleted file mode 100644
index ac431fa96e..0000000000
--- a/sysdeps/powerpc/powerpc64/power5/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4
diff --git a/sysdeps/powerpc/powerpc64/power5/fpu/Implies b/sysdeps/powerpc/powerpc64/power5/fpu/Implies
deleted file mode 100644
index 558a5fb174..0000000000
--- a/sysdeps/powerpc/powerpc64/power5/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4/fpu
diff --git a/sysdeps/powerpc/powerpc64/power6/Implies b/sysdeps/powerpc/powerpc64/power6/Implies
deleted file mode 100644
index 0f35f37c77..0000000000
--- a/sysdeps/powerpc/powerpc64/power6/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power5+
diff --git a/sysdeps/powerpc/powerpc64/power6/fpu/Implies b/sysdeps/powerpc/powerpc64/power6/fpu/Implies
deleted file mode 100644
index 885e39c003..0000000000
--- a/sysdeps/powerpc/powerpc64/power6/fpu/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power5+/fpu
-powerpc/powerpc64/power4/fpu
diff --git a/sysdeps/powerpc/powerpc64/power6/memcpy.S b/sysdeps/powerpc/powerpc64/power6/memcpy.S
deleted file mode 100644
index d105f8302e..0000000000
--- a/sysdeps/powerpc/powerpc64/power6/memcpy.S
+++ /dev/null
@@ -1,1170 +0,0 @@
-/* Optimized memcpy implementation for PowerPC64.
-   Copyright (C) 2003, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston MA
-   02110-1301 USA.  */
-
-#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
-   Returns 'dst'.
-
-   Memcpy handles short copies (< 32-bytes) using a binary move blocks 
-   (no loops) of lwz/stw.  The tail (remaining 1-3) bytes is handled 
-   with the appropriate combination of byte and halfword load/stores. 
-   There is minimal effort to optimize the alignment of short moves.  
-   The 64-bit implementations of POWER3 and POWER4 do a reasonable job
-   of handling unligned load/stores that do not cross 32-byte boundries.
-
-   Longer moves (>= 32-bytes) justify the effort to get at least the
-   destination doubleword (8-byte) aligned.  Further optimization is
-   posible when both source and destination are doubleword aligned.
-   Each case has a optimized unrolled loop.  
-     
-   For POWER6 unaligned loads will take a 20+ cycle hicup for any
-   L1 cache miss that crosses a 32- or 128-byte boundary.  Store
-   is more forgiving and does not take a hicup until page or 
-   segment boundaries.  So we require doubleword alignment for 
-   the source but may take a risk and only require word alignment
-   for the destination.  */
-
-	.machine	"power6"
-EALIGN (BP_SYM (memcpy), 7, 0)
-	CALL_MCOUNT 3
-
-    cmpldi cr1,5,31
-    neg   0,3
-    std   3,-16(1)
-    std   31,-8(1)
-    andi. 11,3,7	/* check alignement of dst.  */
-    clrldi 0,0,61	/* Number of bytes until the 1st doubleword of dst.  */
-    clrldi 10,4,61	/* check alignement of src.  */
-    cmpldi cr6,5,8
-    ble-  cr1,.L2	/* If move < 32 bytes use short move code.  */
-    mtcrf 0x01,0
-    cmpld cr6,10,11  
-    srdi  9,5,3		/* Number of full double words remaining.  */
-    beq   .L0
-  
-    subf  5,0,5
-  /* Move 0-7 bytes as needed to get the destination doubleword alligned.
-     Duplicate some code to maximize fall-throught and minimize agen delays.  */
-1:  bf    31,2f
-    lbz   6,0(4)
-    stb   6,0(3)
-    bf    30,5f
-    lhz   6,1(4)
-    sth   6,1(3)
-    bf    29,0f
-    lwz   6,3(4)
-    stw   6,3(3)
-    b     0f
-5:
-    bf    29,0f
-    lwz   6,1(4)
-    stw   6,1(3)
-    b     0f
-    
-2:  bf    30,4f
-    lhz   6,0(4)
-    sth   6,0(3)
-    bf    29,0f
-    lwz   6,2(4)
-    stw   6,2(3)
-    b     0f
-    
-4:  bf    29,0f
-    lwz   6,0(4)
-    stw   6,0(3)
-0: 
-/* Add the number of bytes until the 1st doubleword of dst to src and dst.  */
-    add   4,4,0
-    add   3,3,0
-    
-    clrldi 10,4,61	/* check alignement of src again.  */     
-    srdi  9,5,3	/* Number of full double words remaining.  */
-    
-  /* Copy doublewords from source to destination, assumpting the
-     destination is aligned on a doubleword boundary.
-
-     At this point we know there are at least 25 bytes left (32-7) to copy.
-     The next step is to determine if the source is also doubleword aligned. 
-     If not branch to the unaligned move code at .L6. which uses
-     a load, shift, store strategy.
-     
-     Otherwise source and destination are doubleword aligned, and we can
-     the optimized doubleword copy loop.  */
-    .align  4
-.L0:
-    clrldi  11,5,61
-    andi.   0,5,0x78
-    srdi    12,5,7	/* Number of 128-byte blocks to move.  */
-    cmpldi  cr1,11,0	/* If the tail is 0 bytes  */
-    bne-    cr6,.L6     /* If source is not DW aligned.  */
-
-  /* Move doublewords where destination and source are DW aligned.
-     Use a unrolled loop to copy 16 doublewords (128-bytes) per iteration.
-     If the the copy is not an exact multiple of 128 bytes, 1-15
-     doublewords are copied as needed to set up the main loop.  After
-     the main loop exits there may be a tail of 1-7 bytes. These byte
-     are copied a word/halfword/byte at a time as needed to preserve
-     alignment.
-     
-     For POWER6 the L1 is store-through and the L2 is store-in.  The
-     L2 is clocked at half CPU clock so we can store 16 bytes every
-     other cycle.  POWER6 also has a load/store bypass so we can do
-     load, load, store, store every 2 cycles.  
-     
-     The following code is sensitive to cache line alignment.  Do not
-     make any change with out first making sure thay don't result in
-     splitting ld/std pairs across a cache line.  */
-
-    mtcrf 0x02,5
-    mtcrf 0x01,5
-    cmpldi  cr5,12,1
-    beq   L(das_loop)
-
-    bf    25,4f
-    .align  3
-    ld    6,0(4)
-    ld    7,8(4)
-    mr    11,4
-    mr    10,3
-    std   6,0(3)
-    std   7,8(3)
-    ld    6,16(4)
-    ld    7,24(4)
-    std   6,16(3)
-    std   7,24(3)
-    ld    6,0+32(4)
-    ld    7,8+32(4)
-    addi  4,4,64
-    addi  3,3,64
-    std   6,0+32(10)
-    std   7,8+32(10)
-    ld    6,16+32(11)
-    ld    7,24+32(11)
-    std   6,16+32(10)
-    std   7,24+32(10)
-4:
-    mr    10,3
-    bf    26,2f
-    ld    6,0(4)
-    ld    7,8(4)
-    mr    11,4
-    nop
-    std   6,0(3)
-    std   7,8(3)
-    ld    6,16(4)
-    ld    7,24(4)
-    addi  4,4,32
-    std   6,16(3)
-    std   7,24(3)
-    addi  3,3,32
-6:
-    nop
-    bf    27,5f
-    ld    6,0+32(11)
-    ld    7,8+32(11)
-    addi  4,4,16
-    addi  3,3,16
-    std   6,0+32(10)
-    std   7,8+32(10)
-    bf    28,L(das_loop_s)
-    ld    0,16+32(11)
-    addi  4,4,8
-    addi  3,3,8
-    std   0,16+32(10)
-    blt   cr5,L(das_tail)
-    b     L(das_loop)
-    .align  3
-5:
-    nop
-    bf    28,L(das_loop_s)
-    ld    6,32(11)
-    addi  4,4,8
-    addi  3,3,8
-    std   6,32(10)
-    blt   cr5,L(das_tail)
-    b     L(das_loop)
-    .align  3
-2:
-    mr    11,4
-    bf    27,1f
-    ld    6,0(4)
-    ld    7,8(4)
-    addi  4,4,16
-    addi  3,3,16
-    std   6,0(10)
-    std   7,8(10)
-    bf    28,L(das_loop_s)
-    ld    0,16(11)
-    addi  4,11,24
-    addi  3,10,24
-    std   0,16(10)
-    blt   cr5,L(das_tail)
-    b     L(das_loop)
-    .align  3
-1:
-    nop
-    bf    28,L(das_loop_s)
-    ld    6,0(4)
-    addi  4,4,8
-    addi  3,3,8
-    std   6,0(10)
-L(das_loop_s):
-    nop
-    blt   cr5,L(das_tail)
-    .align  4
-L(das_loop):
-    ld    6,0(4)
-    ld    7,8(4)
-    mr    10,3
-    mr    11,4
-    std   6,0(3)
-    std   7,8(3)
-    addi  12,12,-1
-    nop
-    ld    8,16(4)
-    ld    0,24(4)
-    std   8,16(3)
-    std   0,24(3)
-
-    ld    6,0+32(4)
-    ld    7,8+32(4)
-    std   6,0+32(3)
-    std   7,8+32(3)
-    ld    8,16+32(4)
-    ld    0,24+32(4)
-    std   8,16+32(3)
-    std   0,24+32(3)
-
-    ld    6,0+64(11)
-    ld    7,8+64(11)
-    std   6,0+64(10)
-    std   7,8+64(10)
-    ld    8,16+64(11)
-    ld    0,24+64(11)
-    std   8,16+64(10)
-    std   0,24+64(10)
-
-    ld    6,0+96(11)
-    ld    7,8+96(11)
-    addi  4,4,128
-    addi  3,3,128
-    std   6,0+96(10)
-    std   7,8+96(10)
-    ld    8,16+96(11)
-    ld    0,24+96(11)
-    std   8,16+96(10)
-    std   0,24+96(10)
-    ble   cr5,L(das_loop_e)
-    
-    mtctr   12
-    .align  4
-L(das_loop2):
-    ld    6,0(4)
-    ld    7,8(4)
-    mr    10,3
-    mr    11,4
-    std   6,0(3)
-    std   7,8(3)
-    ld    8,16(4)
-    ld    0,24(4)
-    std   8,16(3)
-    std   0,24(3)
-
-    ld    6,0+32(4)
-    ld    7,8+32(4)
-    std   6,0+32(3)
-    std   7,8+32(3)
-    ld    8,16+32(4)
-    ld    0,24+32(4)
-    std   8,16+32(3)
-    std   0,24+32(3)
-
-    ld    6,0+64(11)
-    ld    7,8+64(11)
-    std   6,0+64(10)
-    std   7,8+64(10)
-    ld    8,16+64(11)
-    ld    0,24+64(11)
-    std   8,16+64(10)
-    std   0,24+64(10)
-
-    ld    6,0+96(11)
-    ld    7,8+96(11)
-    addi  4,4,128
-    addi  3,3,128
-    std   6,0+96(10)
-    std   7,8+96(10)
-    ld    8,16+96(11)
-    ld    0,24+96(11)
-    std   8,16+96(10)
-    std   0,24+96(10)
-    bdnz  L(das_loop2)
-L(das_loop_e):
-/* Check of a 1-7 byte tail, return if none.  */
-    bne   cr1,L(das_tail2)
-/* Return original dst pointer.  */
-    ld 3,-16(1)
-    blr
-    .align  4
-L(das_tail):
-    beq   cr1,0f
-    
-L(das_tail2):
-/*  At this point we have a tail of 0-7 bytes and we know that the
-    destiniation is double word aligned.  */
-4:  bf    29,2f
-    lwz   6,0(4)
-    stw   6,0(3)
-    bf    30,5f
-    lhz   6,4(4)
-    sth   6,4(3)
-    bf    31,0f
-    lbz   6,6(4)
-    stb   6,6(3)
-    b     0f
-5:  bf    31,0f
-    lbz   6,4(4)
-    stb   6,4(3)
-    b     0f
-  
-2:  bf    30,1f
-    lhz   6,0(4)
-    sth   6,0(3)
-    bf    31,0f
-    lbz   6,2(4)
-    stb   6,2(3)
-    b     0f
-    
-1:  bf    31,0f
-    lbz   6,0(4)
-    stb   6,0(3)
-0:
-  /* Return original dst pointer.  */
-    ld 3,-16(1)
-    blr
-
-/* Copy up to 31 bytes.  This divided into two cases 0-8 bytes and 9-31 
-   bytes.  Each case is handled without loops, using binary (1,2,4,8)
-   tests.
-
-   In the short (0-8 byte) case no attempt is made to force alignment
-   of either source or destination.  The hardware will handle the
-   unaligned load/stores with small delays for crossing 32- 128-byte,
-   and 4096-byte boundaries. Since these short moves are unlikely to be
-   unaligned or cross these boundaries, the overhead to force
-   alignment is not justified.
-
-   The longer (9-31 byte) move is more likely to cross 32- or 128-byte
-   boundaries.  Since only loads are sensitive to the 32-/128-byte
-   boundaries it is more important to align the source then the
-   destination.  If the source is not already word aligned, we first
-   move 1-3 bytes as needed.  Since we are only word aligned we don't
-   use double word load/stores to insure that all loads are aligned.
-   While the destination and stores may still be unaligned, this
-   is only an issue for page (4096 byte boundary) crossing, which
-   should be rare for these short moves.  The hardware handles this
-   case automatically with a small (~20 cycle) delay.  */
-    .align  4
-.L2:
-    mtcrf 0x01,5
-    neg   8,4
-    clrrdi	11,4,2
-    andi. 0,8,3
-    ble   cr6,.LE8	/* Handle moves of 0-8 bytes.  */
-/* At least 9 bytes left.  Get the source word aligned.  */
-    cmpldi	cr1,5,16
-    mr    10,5
-    mr    12,4
-    cmpldi	cr6,0,2
-    beq   L(dus_tail)	/* If the source is already word aligned skip this.  */
-/* Copy 1-3 bytes to get source address word aligned.  */
-    lwz   6,0(11)
-    subf  10,0,5
-    add   12,4,0
-    blt   cr6,5f
-    srdi  7,6,16
-    bgt	  cr6,3f
-    sth   6,0(3)
-    b     7f
-    .align  4
-3:
-    stb   7,0(3)
-    sth   6,1(3)
-    b     7f
-    .align  4
-5:
-    stb   6,0(3)
-7:
-    cmpldi	cr1,10,16
-    add   3,3,0
-    mtcrf 0x01,10
-    .align  4
-L(dus_tail):
-/* At least 6 bytes left and the source is word aligned.  This allows
-   some speculative loads up front.  */
-/* We need to special case the fall-through because the biggest delays
-   are due to address computation not being ready in time for the 
-   AGEN.  */
-    lwz   6,0(12)
-    lwz   7,4(12)
-    blt   cr1,L(dus_tail8)
-    cmpldi	cr0,10,24
-L(dus_tail16): /* Move 16 bytes.  */
-    stw   6,0(3)
-    stw   7,4(3)
-    lwz   6,8(12)
-    lwz   7,12(12)
-    stw   6,8(3)
-    stw   7,12(3)
-/* Move 8 bytes more.  */
-    bf    28,L(dus_tail16p8)
-    cmpldi	cr1,10,28
-    lwz   6,16(12)
-    lwz   7,20(12)
-    stw   6,16(3)
-    stw   7,20(3)
-/* Move 4 bytes more.  */
-    bf    29,L(dus_tail16p4)
-    lwz   6,24(12)
-    stw   6,24(3)
-    addi  12,12,28
-    addi  3,3,28
-    bgt   cr1,L(dus_tail2)
- /* exactly 28 bytes.  Return original dst pointer and exit.  */
-    ld    3,-16(1)
-    blr
-    .align  4
-L(dus_tail16p8):  /* less then 8 bytes left.  */
-    beq   cr1,L(dus_tailX) /* exactly 16 bytes, early exit.  */
-    cmpldi	cr1,10,20
-    bf    29,L(dus_tail16p2)
-/* Move 4 bytes more.  */
-    lwz   6,16(12)
-    stw   6,16(3)
-    addi  12,12,20
-    addi  3,3,20
-    bgt   cr1,L(dus_tail2)
- /* exactly 20 bytes.  Return original dst pointer and exit.  */
-    ld    3,-16(1)
-    blr
-    .align  4
-L(dus_tail16p4):  /* less then 4 bytes left.  */
-    addi  12,12,24
-    addi  3,3,24
-    bgt   cr0,L(dus_tail2)
- /* exactly 24 bytes.  Return original dst pointer and exit.  */
-    ld    3,-16(1)
-    blr
-    .align  4
-L(dus_tail16p2):  /* 16 bytes moved, less then 4 bytes left.  */
-    addi  12,12,16
-    addi  3,3,16
-    b     L(dus_tail2)
-
-    .align  4
-L(dus_tail8):  /* Move 8 bytes.  */
-/*  r6, r7 already loaded speculatively.  */
-    cmpldi	cr1,10,8
-    cmpldi	cr0,10,12
-    bf    28,L(dus_tail4)
-    .align  2
-    stw   6,0(3)
-    stw   7,4(3)
-/* Move 4 bytes more.  */
-    bf    29,L(dus_tail8p4)
-    lwz   6,8(12)
-    stw   6,8(3)
-    addi  12,12,12
-    addi  3,3,12
-    bgt   cr0,L(dus_tail2)
- /* exactly 12 bytes.  Return original dst pointer and exit.  */
-    ld    3,-16(1)
-    blr
-    .align  4
-L(dus_tail8p4):  /* less then 4 bytes left.  */
-    addi  12,12,8
-    addi  3,3,8
-    bgt   cr1,L(dus_tail2)
- /* exactly 8 bytes.  Return original dst pointer and exit.  */
-    ld    3,-16(1)
-    blr
-
-    .align  4
-L(dus_tail4):  /* Move 4 bytes.  */
-/*  r6 already loaded speculatively.  If we are here we know there is
-    more then 4 bytes left.  So there is no need to test.  */
-    addi  12,12,4
-    stw   6,0(3)
-    addi  3,3,4
-L(dus_tail2):  /* Move 2-3 bytes.  */
-    bf    30,L(dus_tail1)
-    lhz   6,0(12)
-    sth   6,0(3) 
-    bf    31,L(dus_tailX)
-    lbz   7,2(12)
-    stb   7,2(3)
-    ld 3,-16(1)
-    blr
-L(dus_tail1):  /* Move 1 byte.  */
-    bf    31,L(dus_tailX)
-    lbz   6,0(12)
-    stb   6,0(3)
-L(dus_tailX):
-  /* Return original dst pointer.  */
-    ld    3,-16(1)
-    blr
-
-/* Special case to copy 0-8 bytes.  */
-    .align  4
-.LE8:
-    mr    12,4
-    bne   cr6,L(dus_4)
-/* Exactly 8 bytes.  We may cross a 32-/128-byte boundry and take a ~20
-   cycle delay.  This case should be rare and any attempt to avoid this
-   would take most of 20 cycles any way.  */
-    ld   6,0(4)
-    std   6,0(3)
-  /* Return original dst pointer.  */
-    ld    3,-16(1)
-    blr
-    .align  4
-L(dus_4):
-    bf    29,L(dus_tail2)
-    lwz   6,0(4)
-    stw   6,0(3)
-    bf    30,L(dus_5)
-    lhz   7,4(4)
-    sth   7,4(3) 
-    bf    31,L(dus_0)
-    lbz   8,6(4)
-    stb   8,6(3)
-    ld 3,-16(1)
-    blr
-    .align  4
-L(dus_5):
-    bf    31,L(dus_0)
-    lbz   6,4(4)
-    stb   6,4(3)
-L(dus_0):
-  /* Return original dst pointer.  */
-    ld    3,-16(1)
-    blr
-
-    .align  4
-.L6:
-    cfi_offset(31,-8)
-    mr    12,4
-    mr    31,5
-  /* Copy doublewords where the destination is aligned but the source is
-     not.  Use aligned doubleword loads from the source, shifted to realign
-     the data, to allow aligned destination stores.  */
-    addi    11,9,-1  /* loop DW count is one less than total */
-    subf    5,10,12  /* Move source addr to previous full double word.  */
-    cmpldi  cr5, 10, 2
-    cmpldi  cr0, 10, 4
-    mr      4,3
-    srdi    8,11,2   /* calculate the 32 byte loop count */
-    ld      6,0(5)   /* pre load 1st full doubleword.  */
-    mtcrf   0x01,11
-    cmpldi  cr6,9,4
-    mtctr   8
-    ld      7,8(5)   /* pre load 2nd full doubleword.  */
-    bge     cr0, L(du4_do)
-    blt     cr5, L(du1_do)
-    beq     cr5, L(du2_do)
-    b       L(du3_do) 
-       
-    .align 4
-L(du1_do):
-    bf      30,L(du1_1dw)
-
-    /* there are at least two DWs to copy */
-    sldi     0,6, 8
-    srdi     8,7, 64-8
-    or      0,0,8
-    ld      6,16(5)
-    std     0,0(4)
-    sldi     0,7, 8
-    srdi     8,6, 64-8
-    or      0,0,8
-    ld      7,24(5)
-    std     0,8(4)
-    addi    4,4,16
-    addi    5,5,32
-    blt     cr6,L(du1_fini)  /* if total DWs = 3, then bypass loop */
-    bf      31,L(du1_loop)
-    /* there is a third DW to copy */
-    sldi     0,6, 8
-    srdi     8,7, 64-8
-    or      0,0,8
-    std     0,0(4)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    addi    4,4,8
-    beq     cr6,L(du1_fini)  /* if total DWs = 4, then bypass loop */
-    b       L(du1_loop)
-    .align 4
-L(du1_1dw):
-    sldi     0,6, 8
-    srdi     8,7, 64-8
-    addi    5,5,16
-    or      0,0,8
-    bf      31,L(du1_loop)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    std     0,0(4)
-    addi    4,4,8
-    .align 4
-/* copy 32 bytes at a time */
-L(du1_loop):
-    sldi   0,6, 8
-    srdi   8,7, 64-8
-    or    0,0,8
-    ld    6,0(5)
-    std   0,0(4)
-    sldi   0,7, 8
-    srdi   8,6, 64-8
-    or    0,0,8
-    ld    7,8(5)
-    std   0,8(4)
-    sldi   0,6, 8
-    srdi   8,7, 64-8
-    or    0,0,8
-    ld    6,16(5)
-    std   0,16(4)
-    sldi   0,7, 8
-    srdi   8,6, 64-8
-    or    0,0,8
-    ld    7,24(5)
-    std   0,24(4)
-    addi  5,5,32
-    addi  4,4,32
-    bdnz+ L(du1_loop)
-    .align 4
-L(du1_fini):
-    /* calculate and store the final DW */
-    sldi   0,6, 8
-    srdi   8,7, 64-8
-    or    0,0,8  
-    std   0,0(4)
-    b     L(du_done)
-
-    .align 4
-L(du2_do):
-    bf      30,L(du2_1dw)
-
-    /* there are at least two DWs to copy */
-    sldi     0,6, 16
-    srdi     8,7, 64-16
-    or      0,0,8
-    ld      6,16(5)
-    std     0,0(4)
-    sldi     0,7, 16
-    srdi     8,6, 64-16
-    or      0,0,8
-    ld      7,24(5)
-    std     0,8(4)
-    addi    4,4,16
-    addi    5,5,32
-    blt     cr6,L(du2_fini)  /* if total DWs = 3, then bypass loop */
-    bf      31,L(du2_loop)
-    /* there is a third DW to copy */
-    sldi     0,6, 16
-    srdi     8,7, 64-16
-    or      0,0,8
-    std     0,0(4)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    addi    4,4,8
-    beq     cr6,L(du2_fini)  /* if total DWs = 4, then bypass loop */
-    b       L(du2_loop)
-    .align 4
-L(du2_1dw):
-    sldi     0,6, 16
-    srdi     8,7, 64-16
-    addi    5,5,16
-    or      0,0,8
-    bf      31,L(du2_loop)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    std     0,0(4)
-    addi    4,4,8
-    .align 4
-/* copy 32 bytes at a time */
-L(du2_loop):
-    sldi   0,6, 16
-    srdi   8,7, 64-16
-    or    0,0,8
-    ld    6,0(5)
-    std   0,0(4)
-    sldi   0,7, 16
-    srdi   8,6, 64-16
-    or    0,0,8
-    ld    7,8(5)
-    std   0,8(4)
-    sldi   0,6, 16
-    srdi   8,7, 64-16
-    or    0,0,8
-    ld    6,16(5)
-    std   0,16(4)
-    sldi   0,7, 16
-    srdi   8,6, 64-16
-    or    0,0,8
-    ld    7,24(5)
-    std   0,24(4)
-    addi  5,5,32
-    addi  4,4,32
-    bdnz+ L(du2_loop)
-    .align 4
-L(du2_fini):
-    /* calculate and store the final DW */
-    sldi   0,6, 16
-    srdi   8,7, 64-16
-    or    0,0,8  
-    std   0,0(4)
-    b     L(du_done)
-
-    .align 4
-L(du3_do):
-    bf      30,L(du3_1dw)
-
-    /* there are at least two DWs to copy */
-    sldi     0,6, 24
-    srdi     8,7, 64-24
-    or      0,0,8
-    ld      6,16(5)
-    std     0,0(4)
-    sldi     0,7, 24
-    srdi     8,6, 64-24
-    or      0,0,8
-    ld      7,24(5)
-    std     0,8(4)
-    addi    4,4,16
-    addi    5,5,32
-    blt     cr6,L(du3_fini)  /* if total DWs = 3, then bypass loop */
-    bf      31,L(du3_loop)
-    /* there is a third DW to copy */
-    sldi     0,6, 24
-    srdi     8,7, 64-24
-    or      0,0,8
-    std     0,0(4)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    addi    4,4,8
-    beq     cr6,L(du3_fini)  /* if total DWs = 4, then bypass loop */
-    b       L(du3_loop)
-    .align 4
-L(du3_1dw):
-    sldi     0,6, 24
-    srdi     8,7, 64-24
-    addi    5,5,16
-    or      0,0,8
-    bf      31,L(du3_loop)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    std     0,0(4)
-    addi    4,4,8
-    .align 4
-/* copy 32 bytes at a time */
-L(du3_loop):
-    sldi   0,6, 24
-    srdi   8,7, 64-24
-    or    0,0,8
-    ld    6,0(5)
-    std   0,0(4)
-    sldi   0,7, 24
-    srdi   8,6, 64-24
-    or    0,0,8
-    ld    7,8(5)
-    std   0,8(4)
-    sldi   0,6, 24
-    srdi   8,7, 64-24
-    or    0,0,8
-    ld    6,16(5)
-    std   0,16(4)
-    sldi   0,7, 24
-    srdi   8,6, 64-24
-    or    0,0,8
-    ld    7,24(5)
-    std   0,24(4)
-    addi  5,5,32
-    addi  4,4,32
-    bdnz+ L(du3_loop)
-    .align 4
-L(du3_fini):
-    /* calculate and store the final DW */
-    sldi   0,6, 24
-    srdi   8,7, 64-24
-    or    0,0,8  
-    std   0,0(4)
-    b     L(du_done)
-
-    .align 4
-L(du4_do):
-    cmpldi  cr5, 10, 6
-    beq     cr0, L(du4_dox)
-    blt     cr5, L(du5_do)
-    beq     cr5, L(du6_do)
-    b       L(du7_do)
-L(du4_dox):
-    bf      30,L(du4_1dw)
-
-    /* there are at least two DWs to copy */
-    sldi     0,6, 32
-    srdi     8,7, 64-32
-    or      0,0,8
-    ld      6,16(5)
-    std     0,0(4)
-    sldi     0,7, 32
-    srdi     8,6, 64-32
-    or      0,0,8
-    ld      7,24(5)
-    std     0,8(4)
-    addi    4,4,16
-    addi    5,5,32
-    blt     cr6,L(du4_fini)  /* if total DWs = 3, then bypass loop */
-    bf      31,L(du4_loop)
-    /* there is a third DW to copy */
-    sldi     0,6, 32
-    srdi     8,7, 64-32
-    or      0,0,8
-    std     0,0(4)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    addi    4,4,8
-    beq     cr6,L(du4_fini)  /* if total DWs = 4, then bypass loop */
-    b       L(du4_loop)
-    .align 4
-L(du4_1dw):
-    sldi     0,6, 32
-    srdi     8,7, 64-32
-    addi    5,5,16
-    or      0,0,8
-    bf      31,L(du4_loop)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    std     0,0(4)
-    addi    4,4,8
-    .align 4
-/* copy 32 bytes at a time */
-L(du4_loop):
-    sldi   0,6, 32
-    srdi   8,7, 64-32
-    or    0,0,8
-    ld    6,0(5)
-    std   0,0(4)
-    sldi   0,7, 32
-    srdi   8,6, 64-32
-    or    0,0,8
-    ld    7,8(5)
-    std   0,8(4)
-    sldi   0,6, 32
-    srdi   8,7, 64-32
-    or    0,0,8
-    ld    6,16(5)
-    std   0,16(4)
-    sldi   0,7, 32
-    srdi   8,6, 64-32
-    or    0,0,8
-    ld    7,24(5)
-    std   0,24(4)
-    addi  5,5,32
-    addi  4,4,32
-    bdnz+ L(du4_loop)
-    .align 4
-L(du4_fini):
-    /* calculate and store the final DW */
-    sldi   0,6, 32
-    srdi   8,7, 64-32
-    or    0,0,8  
-    std   0,0(4)
-    b     L(du_done)
-
-    .align 4
-L(du5_do):
-    bf      30,L(du5_1dw)
-
-    /* there are at least two DWs to copy */
-    sldi     0,6, 40
-    srdi     8,7, 64-40
-    or      0,0,8
-    ld      6,16(5)
-    std     0,0(4)
-    sldi     0,7, 40
-    srdi     8,6, 64-40
-    or      0,0,8
-    ld      7,24(5)
-    std     0,8(4)
-    addi    4,4,16
-    addi    5,5,32
-    blt     cr6,L(du5_fini)  /* if total DWs = 3, then bypass loop */
-    bf      31,L(du5_loop)
-    /* there is a third DW to copy */
-    sldi     0,6, 40
-    srdi     8,7, 64-40
-    or      0,0,8
-    std     0,0(4)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    addi    4,4,8
-    beq     cr6,L(du5_fini)  /* if total DWs = 4, then bypass loop */
-    b       L(du5_loop)
-    .align 4
-L(du5_1dw):
-    sldi     0,6, 40
-    srdi     8,7, 64-40
-    addi    5,5,16
-    or      0,0,8
-    bf      31,L(du5_loop)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    std     0,0(4)
-    addi    4,4,8
-    .align 4
-/* copy 32 bytes at a time */
-L(du5_loop):
-    sldi   0,6, 40
-    srdi   8,7, 64-40
-    or    0,0,8
-    ld    6,0(5)
-    std   0,0(4)
-    sldi   0,7, 40
-    srdi   8,6, 64-40
-    or    0,0,8
-    ld    7,8(5)
-    std   0,8(4)
-    sldi   0,6, 40
-    srdi   8,7, 64-40
-    or    0,0,8
-    ld    6,16(5)
-    std   0,16(4)
-    sldi   0,7, 40
-    srdi   8,6, 64-40
-    or    0,0,8
-    ld    7,24(5)
-    std   0,24(4)
-    addi  5,5,32
-    addi  4,4,32
-    bdnz+ L(du5_loop)
-    .align 4
-L(du5_fini):
-    /* calculate and store the final DW */
-    sldi   0,6, 40
-    srdi   8,7, 64-40
-    or    0,0,8  
-    std   0,0(4)
-    b     L(du_done)
-
-    .align 4
-L(du6_do):
-    bf      30,L(du6_1dw)
-
-    /* there are at least two DWs to copy */
-    sldi     0,6, 48
-    srdi     8,7, 64-48
-    or      0,0,8
-    ld      6,16(5)
-    std     0,0(4)
-    sldi     0,7, 48
-    srdi     8,6, 64-48
-    or      0,0,8
-    ld      7,24(5)
-    std     0,8(4)
-    addi    4,4,16
-    addi    5,5,32
-    blt     cr6,L(du6_fini)  /* if total DWs = 3, then bypass loop */
-    bf      31,L(du6_loop)
-    /* there is a third DW to copy */
-    sldi     0,6, 48
-    srdi     8,7, 64-48
-    or      0,0,8
-    std     0,0(4)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    addi    4,4,8
-    beq     cr6,L(du6_fini)  /* if total DWs = 4, then bypass loop */
-    b       L(du6_loop)
-    .align 4
-L(du6_1dw):
-    sldi     0,6, 48
-    srdi     8,7, 64-48
-    addi    5,5,16
-    or      0,0,8
-    bf      31,L(du6_loop)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    std     0,0(4)
-    addi    4,4,8
-    .align 4
-/* copy 32 bytes at a time */
-L(du6_loop):
-    sldi   0,6, 48
-    srdi   8,7, 64-48
-    or    0,0,8
-    ld    6,0(5)
-    std   0,0(4)
-    sldi   0,7, 48
-    srdi   8,6, 64-48
-    or    0,0,8
-    ld    7,8(5)
-    std   0,8(4)
-    sldi   0,6, 48
-    srdi   8,7, 64-48
-    or    0,0,8
-    ld    6,16(5)
-    std   0,16(4)
-    sldi   0,7, 48
-    srdi   8,6, 64-48
-    or    0,0,8
-    ld    7,24(5)
-    std   0,24(4)
-    addi  5,5,32
-    addi  4,4,32
-    bdnz+ L(du6_loop)
-    .align 4
-L(du6_fini):
-    /* calculate and store the final DW */
-    sldi   0,6, 48
-    srdi   8,7, 64-48
-    or    0,0,8  
-    std   0,0(4)
-    b     L(du_done)
-
-    .align 4
-L(du7_do):
-    bf      30,L(du7_1dw)
-
-    /* there are at least two DWs to copy */
-    sldi     0,6, 56
-    srdi     8,7, 64-56
-    or      0,0,8
-    ld      6,16(5)
-    std     0,0(4)
-    sldi     0,7, 56
-    srdi     8,6, 64-56
-    or      0,0,8
-    ld      7,24(5)
-    std     0,8(4)
-    addi    4,4,16
-    addi    5,5,32
-    blt     cr6,L(du7_fini)  /* if total DWs = 3, then bypass loop */
-    bf      31,L(du7_loop)
-    /* there is a third DW to copy */
-    sldi     0,6, 56
-    srdi     8,7, 64-56
-    or      0,0,8
-    std     0,0(4)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    addi    4,4,8
-    beq     cr6,L(du7_fini)  /* if total DWs = 4, then bypass loop */
-    b       L(du7_loop)
-    .align 4
-L(du7_1dw):
-    sldi     0,6, 56
-    srdi     8,7, 64-56
-    addi    5,5,16
-    or      0,0,8
-    bf      31,L(du7_loop)
-    mr      6,7
-    ld      7,0(5)
-    addi    5,5,8
-    std     0,0(4)
-    addi    4,4,8
-    .align 4
-/* copy 32 bytes at a time */
-L(du7_loop):
-    sldi   0,6, 56
-    srdi   8,7, 64-56
-    or    0,0,8
-    ld    6,0(5)
-    std   0,0(4)
-    sldi   0,7, 56
-    srdi   8,6, 64-56
-    or    0,0,8
-    ld    7,8(5)
-    std   0,8(4)
-    sldi   0,6, 56
-    srdi   8,7, 64-56
-    or    0,0,8
-    ld    6,16(5)
-    std   0,16(4)
-    sldi   0,7, 56
-    srdi   8,6, 64-56
-    or    0,0,8
-    ld    7,24(5)
-    std   0,24(4)
-    addi  5,5,32
-    addi  4,4,32
-    bdnz+ L(du7_loop)
-    .align 4
-L(du7_fini):
-    /* calculate and store the final DW */
-    sldi   0,6, 56
-    srdi   8,7, 64-56
-    or    0,0,8  
-    std   0,0(4)
-    b     L(du_done)
-    
-    .align 4
-L(du_done):
-    rldicr 0,31,0,60
-    mtcrf 0x01,31
-    beq   cr1,0f	/* If the tail is 0 bytes we are done!  */
-
-    add   3,3,0
-    add   12,12,0    
-/*  At this point we have a tail of 0-7 bytes and we know that the
-    destiniation is double word aligned.  */
-4:  bf    29,2f
-    lwz   6,0(12)
-    addi  12,12,4
-    stw   6,0(3)
-    addi  3,3,4
-2:  bf    30,1f
-    lhz   6,0(12)
-    addi  12,12,2
-    sth   6,0(3)
-    addi  3,3,2
-1:  bf    31,0f
-    lbz   6,0(12)
-    stb   6,0(3)
-0:
-  /* Return original dst pointer.  */
-    ld 31,-8(1)
-    ld 3,-16(1)
-    blr
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
-libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/power6/memset.S b/sysdeps/powerpc/powerpc64/power6/memset.S
deleted file mode 100644
index 6daaa2c366..0000000000
--- a/sysdeps/powerpc/powerpc64/power6/memset.S
+++ /dev/null
@@ -1,285 +0,0 @@
-/* Optimized memset implementation for PowerPC64.
-   Copyright (C) 1997, 1999, 2000, 2002, 2003, 2007
-   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 <bp-sym.h>
-#include <bp-asm.h>
-
-	.section	".toc","aw"
-.LC0:
-	.tc __cache_line_size[TC],__cache_line_size
-	.section	".text"
-	.align 2
-
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
-   Returns 's'.
-
-   The memset is done in three sizes: byte (8 bits), word (32 bits),
-   cache line (256 bits). There is a special case for setting cache lines
-   to 0, to take advantage of the dcbz instruction.  */
-
-EALIGN (BP_SYM (memset), 5, 0)
-	CALL_MCOUNT 3
-
-#define rTMP	r0
-#define rRTN	r3	/* Initial value of 1st argument.  */
-#if __BOUNDED_POINTERS__
-# define rMEMP0	r4	/* Original value of 1st arg.  */
-# define rCHR	r5	/* Char to set in each byte.  */
-# define rLEN	r6	/* Length of region to set.  */
-# define rMEMP	r10	/* Address at which we are storing.  */
-#else
-# define rMEMP0	r3	/* Original value of 1st arg.  */
-# define rCHR	r4	/* Char to set in each byte.  */
-# define rLEN	r5	/* Length of region to set.  */
-# define rMEMP	r6	/* Address at which we are storing.  */
-#endif
-#define rALIGN	r7	/* Number of bytes we are setting now (when aligning). */
-#define rMEMP2	r8
-
-#define rNEG64	r8	/* Constant -64 for clearing with dcbz.  */
-#define rCLS	r8	/* Cache line size obtained from static.  */
-#define rCLM	r9	/* Cache line size mask to check for cache alignment.  */
-L(_memset):
-#if __BOUNDED_POINTERS__
-	cmpldi	cr1, rRTN, 0
-	CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN)
-	beq	cr1, L(b0)
-	STORE_RETURN_VALUE (rMEMP0)
-	STORE_RETURN_BOUNDS (rTMP, rTMP2)
-L(b0):
-#endif
-/* Take care of case for size <= 4.  */
-	cmpldi	cr1, rLEN, 8
-	andi.	rALIGN, rMEMP0, 7
-	mr	rMEMP, rMEMP0
-	ble-	cr1, L(small)
-
-/* Align to doubleword boundary.  */
-	cmpldi	cr5, rLEN, 31
-	rlwimi	rCHR, rCHR, 8, 16, 23 /* Replicate byte to halfword.  */
-	beq+	L(aligned2)
-	mtcrf	0x01, rMEMP0
-	subfic	rALIGN, rALIGN, 8
-	cror	28,30,31		/* Detect odd word aligned.  */
-	add	rMEMP, rMEMP, rALIGN
-	sub	rLEN, rLEN, rALIGN
-	rlwimi	rCHR, rCHR, 16, 0, 15 /* Replicate halfword to word.  */
-	bt	29, L(g4)
-/* Process the even word of doubleword.  */
-	bf+	31, L(g2)
-	stb	rCHR, 0(rMEMP0)
-	bt	30, L(g4x)
-L(g2):
-	sth	rCHR, -6(rMEMP)
-L(g4x):
-	stw	rCHR, -4(rMEMP)
-	b	L(aligned)
-/* Process the odd word of doubleword.  */
-L(g4):
-	bf	28, L(g4x) /* If false, word aligned on odd word.  */
-	bf+	31, L(g0)
-	stb	rCHR, 0(rMEMP0)
-	bt	30, L(aligned)
-L(g0):
-	sth	rCHR, -2(rMEMP)
-
-/* Handle the case of size < 31.  */
-L(aligned2):
-	rlwimi	rCHR, rCHR, 16, 0, 15 /* Replicate halfword to word.  */
-L(aligned):
-	mtcrf	0x01, rLEN
-	ble	cr5, L(medium)
-/* Align to 32-byte boundary.  */
-	andi.	rALIGN, rMEMP, 0x18
-	subfic	rALIGN, rALIGN, 0x20
-	insrdi	rCHR,rCHR,32,0 /* Replicate word to double word. */
-	beq	L(caligned)
-	mtcrf	0x01, rALIGN
-	add	rMEMP, rMEMP, rALIGN
-	sub	rLEN, rLEN, rALIGN
-	cmplwi	cr1, rALIGN, 0x10
-	mr	rMEMP2, rMEMP
-	bf	28, L(a1)
-	stdu	rCHR, -8(rMEMP2)
-L(a1):	blt	cr1, L(a2)
-	std	rCHR, -8(rMEMP2)
-	stdu	rCHR, -16(rMEMP2)
-L(a2):
-
-/* Now aligned to a 32 byte boundary.  */
-        .align 4
-L(caligned):
-	cmpldi	cr1, rCHR, 0
-	clrrdi.	rALIGN, rLEN, 5
-	mtcrf	0x01, rLEN
-	beq	cr1, L(zloopstart) /* Special case for clearing memory using dcbz.  */
-L(nondcbz):
-	srdi	rTMP, rALIGN, 5
-	mtctr	rTMP
-	beq	L(medium)	/* We may not actually get to do a full line.  */
-	clrldi.	rLEN, rLEN, 59
-	add	rMEMP, rMEMP, rALIGN
-	li	rNEG64, -0x40
-	bdz	L(cloopdone)
-
-        .align 4
-L(c3):	dcbtst	rNEG64, rMEMP
-	std	rCHR, -8(rMEMP)
-	std	rCHR, -16(rMEMP)
-	std	rCHR, -24(rMEMP)
-	stdu	rCHR, -32(rMEMP)
-	bdnz	L(c3)
-        .align 4
-L(cloopdone):
-	std	rCHR, -8(rMEMP)
-	std	rCHR, -16(rMEMP)
-	cmpldi	cr1, rLEN, 16
-	std	rCHR, -24(rMEMP)
-	stdu	rCHR, -32(rMEMP)
-	beqlr
-	add	rMEMP, rMEMP, rALIGN
-	b	L(medium_tail2)
-
-	.align 5
-/* Clear lines of memory in 128-byte chunks.  */
-L(zloopstart):
-/* If the remaining length is less the 32 bytes, don't bother getting
-	 the cache line size.  */
-	beq	L(medium)
-	li      rCLS,128  /* cache line size is 128 */
-
-/* Now we know the cache line size, and it is not 32-bytes, but
-	 we may not yet be aligned to the cache line. May have a partial
-	 line to fill, so touch it 1st.  */
-	dcbt	0,rMEMP
-L(getCacheAligned):
-	cmpldi	cr1,rLEN,32
-	andi.	rTMP,rMEMP,127
-	blt		cr1,L(handletail32)
-	beq		L(cacheAligned)
-	addi	rMEMP,rMEMP,32
-	addi	rLEN,rLEN,-32
-	std		rCHR,-32(rMEMP)
-	std		rCHR,-24(rMEMP)
-	std		rCHR,-16(rMEMP)
-	std		rCHR,-8(rMEMP)
-	b		L(getCacheAligned)
-
-/* Now we are aligned to the cache line and can use dcbz.  */
-        .align 4
-L(cacheAligned):
-	cmpld	cr1,rLEN,rCLS
-	blt		cr1,L(handletail32)
-	dcbz	0,rMEMP
-	subf	rLEN,rCLS,rLEN
-	add		rMEMP,rMEMP,rCLS
-	b		L(cacheAligned)
-
-/* We are here because the cache line size was set and was not 32-bytes
-   and the remainder (rLEN) is less than the actual cache line size.
-   So set up the preconditions for L(nondcbz) and go there.  */
-        .align 3
-L(handletail32):
-	clrrwi.	rALIGN, rLEN, 5
-	b		L(nondcbz)
-
-	.align 5
-L(small):
-/* Memset of 8 bytes or less.  */
-	cmpldi	cr6, rLEN, 4
-	cmpldi	cr5, rLEN, 1
-	ble	cr6,L(le4)
-	subi	rLEN, rLEN, 4
-	stb	rCHR,0(rMEMP)
-	stb	rCHR,1(rMEMP)
-	stb	rCHR,2(rMEMP)
-	stb	rCHR,3(rMEMP)
-	addi	rMEMP,rMEMP, 4
-	cmpldi	cr5, rLEN, 1
-L(le4):
-	cmpldi	cr1, rLEN, 3
-	bltlr	cr5
-	stb	rCHR, 0(rMEMP)
-	beqlr	cr5
-	stb	rCHR, 1(rMEMP)
-	bltlr	cr1
-	stb	rCHR, 2(rMEMP)
-	beqlr	cr1
-	stb	rCHR, 3(rMEMP)
-	blr
-
-/* Memset of 0-31 bytes.  */
-	.align 5
-L(medium):
-	insrdi	rCHR,rCHR,32,0 /* Replicate word to double word.  */
-	cmpldi	cr1, rLEN, 16
-L(medium_tail2):
-	add	rMEMP, rMEMP, rLEN
-L(medium_tail):
-	bt-	31, L(medium_31t)
-	bt-	30, L(medium_30t)
-L(medium_30f):
-	bt-	29, L(medium_29t)
-L(medium_29f):
-	bge-	cr1, L(medium_27t)
-	bflr-	28
-	std	rCHR, -8(rMEMP)
-	blr
-
-L(medium_31t):
-	stbu	rCHR, -1(rMEMP)
-	bf-	30, L(medium_30f)
-L(medium_30t):
-	sthu	rCHR, -2(rMEMP)
-	bf-	29, L(medium_29f)
-L(medium_29t):
-	stwu	rCHR, -4(rMEMP)
-	blt-	cr1, L(medium_27f)
-L(medium_27t):
-	std	rCHR, -8(rMEMP)
-	stdu	rCHR, -16(rMEMP)
-L(medium_27f):
-	bflr-	28
-L(medium_28t):
-	std	rCHR, -8(rMEMP)
-	blr
-END_GEN_TB (BP_SYM (memset),TB_TOCLESS)
-libc_hidden_builtin_def (memset)
-
-/* Copied from bzero.S to prevent the linker from inserting a stub
-   between bzero and memset.  */
-ENTRY (BP_SYM (__bzero))
-	CALL_MCOUNT 3
-#if __BOUNDED_POINTERS__
-	mr	r6,r4
-	li	r5,0
-	mr	r4,r3
-	/* Tell memset that we don't want a return value.  */
-	li	r3,0
-	b	L(_memset)
-#else
-	mr	r5,r4
-	li	r4,0
-	b	L(_memset)
-#endif
-END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS)
-
-weak_alias (BP_SYM (__bzero), BP_SYM (bzero))
diff --git a/sysdeps/powerpc/powerpc64/power6/wordcopy.c b/sysdeps/powerpc/powerpc64/power6/wordcopy.c
deleted file mode 100644
index faddd945b3..0000000000
--- a/sysdeps/powerpc/powerpc64/power6/wordcopy.c
+++ /dev/null
@@ -1,410 +0,0 @@
-/* _memcopy.c -- subroutines for memory copy functions.
-   Copyright (C) 1991, 1996 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.  */
-
-/* BE VERY CAREFUL IF YOU CHANGE THIS CODE...!  */
-
-#include <stddef.h>
-#include <memcopy.h>
-
-/* _wordcopy_fwd_aligned -- Copy block beginning at SRCP to
-   block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
-   Both SRCP and DSTP should be aligned for memory operations on `op_t's.  */
-
-void
-_wordcopy_fwd_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1;
-
-  if (len & 1)
-  {
-    ((op_t *) dstp)[0] = ((op_t *) srcp)[0];
-    
-    if (len == 1)
-      return;
-    srcp += OPSIZ;
-    dstp += OPSIZ;
-    len -= 1;
-  }
-
-  do
-    {
-      a0 = ((op_t *) srcp)[0];
-      a1 = ((op_t *) srcp)[1];
-      ((op_t *) dstp)[0] = a0;
-      ((op_t *) dstp)[1] = a1;
-
-      srcp += 2 * OPSIZ;
-      dstp += 2 * OPSIZ;
-      len -= 2;
-    }
-  while (len != 0);
-}
-
-/* _wordcopy_fwd_dest_aligned -- Copy block beginning at SRCP to
-   block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
-   DSTP should be aligned for memory operations on `op_t's, but SRCP must
-   *not* be aligned.  */
-
-void
-_wordcopy_fwd_dest_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1, a2;
-  int sh_1, sh_2;
-  int align;
-
-  /* Calculate how to shift a word read at the memory operation
-     aligned srcp to make it aligned for copy.  */
-
-  align = srcp % OPSIZ;
-  sh_1 = 8 * (srcp % OPSIZ);
-  sh_2 = 8 * OPSIZ - sh_1;
-
-  /* Make SRCP aligned by rounding it down to the beginning of the `op_t'
-     it points in the middle of.  */
-  srcp &= -OPSIZ;
-  a0 = ((op_t *) srcp)[0];
-
-  if (len & 1)
-  {
-    a1 = ((op_t *) srcp)[1];
-    ((op_t *) dstp)[0] = MERGE (a0, sh_1, a1, sh_2);
-    
-    if (len == 1)
-      return;
-    
-    a0 = a1;
-    srcp += OPSIZ;
-    dstp += OPSIZ;
-    len -= 1;
-  }
-
-  switch (align)
-    {
-    case 1:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (64-8));
-          ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (64-8));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 2:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (64-16));
-          ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (64-16));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 3:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (64-24));
-          ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (64-24));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 4:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 32, a1, (64-32));
-          ((op_t *) dstp)[1] = MERGE (a1, 32, a2, (64-32));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 5:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 40, a1, (64-40));
-          ((op_t *) dstp)[1] = MERGE (a1, 40, a2, (64-40));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 6:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 48, a1, (64-48));
-          ((op_t *) dstp)[1] = MERGE (a1, 48, a2, (64-48));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 7:
-      do
-        {
-          a1 = ((op_t *) srcp)[1];
-          a2 = ((op_t *) srcp)[2];
-          ((op_t *) dstp)[0] = MERGE (a0, 56, a1, (64-56));
-          ((op_t *) dstp)[1] = MERGE (a1, 56, a2, (64-56));
-          a0 = a2;
-    
-          srcp += 2 * OPSIZ;
-          dstp += 2 * OPSIZ;
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    }
-
-}
-
-/* _wordcopy_bwd_aligned -- Copy block finishing right before
-   SRCP to block finishing right before DSTP with LEN `op_t' words
-   (not LEN bytes!).  Both SRCP and DSTP should be aligned for memory
-   operations on `op_t's.  */
-
-void
-_wordcopy_bwd_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1;
-
-  if (len & 1)
-  {
-    srcp -= OPSIZ;
-    dstp -= OPSIZ;
-    ((op_t *) dstp)[0] = ((op_t *) srcp)[0];
-    
-    if (len == 1)
-      return;
-    len -= 1;
-  }
-
-  do
-    {
-      srcp -= 2 * OPSIZ;
-      dstp -= 2 * OPSIZ;
-
-      a1 = ((op_t *) srcp)[1];
-      a0 = ((op_t *) srcp)[0];
-      ((op_t *) dstp)[1] = a1;
-      ((op_t *) dstp)[0] = a0;
-
-      len -= 2;
-    }
-  while (len != 0);
-}
-
-/* _wordcopy_bwd_dest_aligned -- Copy block finishing right
-   before SRCP to block finishing right before DSTP with LEN `op_t'
-   words (not LEN bytes!).  DSTP should be aligned for memory
-   operations on `op_t', but SRCP must *not* be aligned.  */
-
-void
-_wordcopy_bwd_dest_aligned (dstp, srcp, len)
-     long int dstp;
-     long int srcp;
-     size_t len;
-{
-  op_t a0, a1, a2;
-  int sh_1, sh_2;
-  int align;
-
-  /* Calculate how to shift a word read at the memory operation
-     aligned srcp to make it aligned for copy.  */
-
-  align = srcp % OPSIZ;
-  sh_1 = 8 * (srcp % OPSIZ);
-  sh_2 = 8 * OPSIZ - sh_1;
-
-  /* Make srcp aligned by rounding it down to the beginning of the op_t
-     it points in the middle of.  */
-  srcp &= -OPSIZ;
-  a2 = ((op_t *) srcp)[0];
-
-  if (len & 1)
-  {
-    srcp -= OPSIZ;
-    dstp -= OPSIZ;
-    a1 = ((op_t *) srcp)[0];
-    ((op_t *) dstp)[0] = MERGE (a1, sh_1, a2, sh_2);
-
-    if (len == 1)
-      return;
-
-    a2 = a1;
-    len -= 1;
-  }
-
-  switch (align)
-    {
-    case 1:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (64-8));
-          ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (64-8));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 2:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (64-16));
-          ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (64-16));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 3:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (64-24));
-          ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (64-24));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 4:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 32, a2, (64-32));
-          ((op_t *) dstp)[0] = MERGE (a0, 32, a1, (64-32));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 5:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 40, a2, (64-40));
-          ((op_t *) dstp)[0] = MERGE (a0, 40, a1, (64-40));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 6:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 48, a2, (64-48));
-          ((op_t *) dstp)[0] = MERGE (a0, 48, a1, (64-48));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    case 7:
-      do
-        {
-          srcp -= 2 * OPSIZ;
-          dstp -= 2 * OPSIZ;
-    
-          a1 = ((op_t *) srcp)[1];
-          a0 = ((op_t *) srcp)[0];
-          ((op_t *) dstp)[1] = MERGE (a1, 56, a2, (64-56));
-          ((op_t *) dstp)[0] = MERGE (a0, 56, a1, (64-56));
-          a2 = a0;
-    
-          len -= 2;
-        }
-      while (len != 0);
-      break;
-    }
-}
diff --git a/sysdeps/powerpc/powerpc64/power6x/Implies b/sysdeps/powerpc/powerpc64/power6x/Implies
deleted file mode 100644
index d993b0cd73..0000000000
--- a/sysdeps/powerpc/powerpc64/power6x/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power6
-powerpc/powerpc64/power5+
diff --git a/sysdeps/powerpc/powerpc64/power6x/fpu/Implies b/sysdeps/powerpc/powerpc64/power6x/fpu/Implies
deleted file mode 100644
index 84510991b2..0000000000
--- a/sysdeps/powerpc/powerpc64/power6x/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-powerpc/powerpc64/power6/fpu
-powerpc/powerpc64/power5+/fpu
-powerpc/powerpc64/power4/fpu
diff --git a/sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S b/sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S
deleted file mode 100644
index 4a4a5f8855..0000000000
--- a/sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Round double to long int.  POWER6x PowerPC64 version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-
-	.machine	"power6"
-/* long long int[r3] __llrint (double x[fp1])  */
-ENTRY (__llrint)	
-	CALL_MCOUNT 0
-	fctid	fp13,fp1
-	mftgpr  r3,fp13
-	blr
-	END (__llrint)
-
-strong_alias (__llrint, __lrint)
-weak_alias (__llrint, llrint)
-weak_alias (__lrint, lrint)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__llrint, __llrintl)
-weak_alias (__llrint, llrintl)
-strong_alias (__lrint, __lrintl)
-weak_alias (__lrint, lrintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S b/sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S
deleted file mode 100644
index 149feaf965..0000000000
--- a/sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S
+++ /dev/null
@@ -1,55 +0,0 @@
-/* llround function.  POWER6x PowerPC64 version.
-   Copyright (C) 2006 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 <math_ldbl_opt.h>
-	
-/* long long [r3] llround (float x [fp1])
-   IEEE 1003.1 llround function.  IEEE specifies "round to the nearest 
-   integer value, rounding halfway cases away from zero, regardless of
-   the current rounding mode."  However PowerPC Architecture defines
-   "round to Nearest" as "Choose the best approximation. In case of a 
-   tie, choose the one that is even (least significant bit o).". 
-   So we pre-round using the V2.02 Floating Round to Integer Nearest
-   instruction before we use Floating Convert to Integer Word with
-   round to zero instruction.  */
-
-	.machine	"power6"
-ENTRY (__llround)
-	CALL_MCOUNT 0
-	frin	fp2,fp1	/* Round to nearest +-0.5.  */	
-	fctidz	fp3,fp2	/* Convert To Integer DW round toward 0.  */
-	mftgpr	r3,fp3  /* Transfer integer to R3.  */
-	blr
-	END (__llround)
-
-strong_alias (__llround, __lround)
-weak_alias (__llround, llround)
-weak_alias (__lround, lround)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__llround, llroundl)
-strong_alias (__llround, __llroundl)
-weak_alias (__lround, lroundl)
-strong_alias (__lround, __lroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llround, llroundl, GLIBC_2_1)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_1)
-#endif
diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c
deleted file mode 100644
index 32c6aef951..0000000000
--- a/sysdeps/s390/dl-procinfo.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Data for s390 version of processor capability information.
-   Copyright (C) 2006 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2006.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* This information must be kept in sync with the _DL_HWCAP_COUNT and
-   _DL_PLATFORM_COUNT definitions in procinfo.h.
-
-   If anything should be added here check whether the size of each string
-   is still ok with the given array size.
-
-   All the #ifdefs in the definitions are quite irritating but
-   necessary if we want to avoid duplicating the information.  There
-   are three different modes:
-
-   - PROCINFO_DECL is defined.  This means we are only interested in
-     declarations.
-
-   - PROCINFO_DECL is not defined:
-
-     + if SHARED is defined the file is included in an array
-       initializer.  The .element = { ... } syntax is needed.
-
-     + if SHARED is not defined a normal array initialization is
-       needed.
-  */
-
-#ifndef PROCINFO_CLASS
-# define PROCINFO_CLASS
-#endif
-
-#if !defined PROCINFO_DECL && defined SHARED
-  ._dl_s390_cap_flags
-#else
-PROCINFO_CLASS const char _dl_s390_cap_flags[7][6]
-#endif
-#ifndef PROCINFO_DECL
-= {
-     "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp"
-  }
-#endif
-#if !defined SHARED || defined PROCINFO_DECL
-;
-#else
-,
-#endif
-
-#if !defined PROCINFO_DECL && defined SHARED
-  ._dl_s390_platforms
-#else
-PROCINFO_CLASS const char _dl_s390_platforms[4][7]
-#endif
-#ifndef PROCINFO_DECL
-= {
-     "g5", "z900", "z990", "z9-109"
-  }
-#endif
-#if !defined SHARED || defined PROCINFO_DECL
-;
-#else
-,
-#endif
-
-#undef PROCINFO_DECL
-#undef PROCINFO_CLASS
diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
deleted file mode 100644
index 178d7cc017..0000000000
--- a/sysdeps/s390/dl-procinfo.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* s390 version of processor capability information handling macros.
-   Copyright (C) 2006 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2006.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _DL_PROCINFO_H
-#define _DL_PROCINFO_H	1
-#include <ldsodefs.h>
-
-#define _DL_HWCAP_COUNT 7
-
-#define _DL_PLATFORMS_COUNT	4
-
-/* The kernel provides up to 32 capability bits with elf_hwcap.  */
-#define _DL_FIRST_PLATFORM	32
-/* Mask to filter out platforms.  */
-#define _DL_HWCAP_PLATFORM	(((1ULL << _DL_PLATFORMS_COUNT) - 1) \
-				 << _DL_FIRST_PLATFORM)
-
-/* Hardware capablity bit numbers are derived directly from the
-   facility indications as stored by the "store facility list" (STFL)
-   instruction.  */
-
-enum
-{
-  HWCAP_S390_ESAN3 = 1 << 0,
-  HWCAP_S390_ZARCH = 1 << 1,
-  HWCAP_S390_STFLE = 1 << 2,
-  HWCAP_S390_MSA = 1 << 3,
-  HWCAP_S390_LDISP = 1 << 4,
-  HWCAP_S390_EIMM = 1 << 5,
-  HWCAP_S390_DFP = 1 << 6,
-};
-
-#define HWCAP_IMPORTANT (HWCAP_S390_ZARCH | HWCAP_S390_LDISP \
-			  | HWCAP_S390_EIMM | HWCAP_S390_DFP)
-
-/* We cannot provide a general printing function.  */
-#define _dl_procinfo(word) -1
-
-static inline const char *
-__attribute__ ((unused))
-_dl_hwcap_string (int idx)
-{
-  return GLRO(dl_s390_cap_flags)[idx];
-};
-
-static inline const char *
-__attribute__ ((unused))
-_dl_platform_string (int idx)
-{
-  return GLRO(dl_s390_platforms)[idx - _DL_FIRST_PLATFORM];
-};
-
-static inline int
-__attribute__ ((unused, always_inline))
-_dl_string_hwcap (const char *str)
-{
-  int i;
-
-  for (i = 0; i < _DL_HWCAP_COUNT; i++)
-    {
-      if (strcmp (str, GLRO(dl_s390_cap_flags)[i]) == 0)
-	return i;
-    }
-  return -1;
-};
-
-static inline int
-__attribute__ ((unused, always_inline))
-_dl_string_platform (const char *str)
-{
-  int i;
-
-  if (str != NULL)
-    for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
-      {
-	if (strcmp (str, GLRO(dl_s390_platforms)[i]) == 0)
-	  return _DL_FIRST_PLATFORM + i;
-      }
-  return -1;
-};
-
-#endif /* dl-procinfo.h */
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 119e37b345..f59e340f8e 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -137,7 +137,7 @@ endif
 
 ifeq ($(subdir),io)
 sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
-		   sync_file_range open_2
+		   sync_file_range
 endif
 
 ifeq ($(subdir),elf)
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 96ae96f826..31db66f8ac 100644
--- a/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/sysdeps/unix/sysv/linux/bits/sched.h
@@ -131,8 +131,7 @@ typedef struct
   ((cpusetp)->__bits[__CPUELT (cpu)] &= ~__CPUMASK (cpu))
 # define __CPU_ISSET(cpu, cpusetp) \
   (((cpusetp)->__bits[__CPUELT (cpu)] & __CPUMASK (cpu)) != 0)
-extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
-  __THROW;
+extern int __sched_cpucount (size_t __setsize, cpu_set_t *__setp) __THROW;
 # define __CPU_COUNT(cpusetp) \
   __sched_cpucount (sizeof (cpu_set_t), cpusetp)
 #endif
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 201a9793f1..377f589bbd 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -63,7 +63,7 @@ enum __socket_type
 /* Protocol families.  */
 #define	PF_UNSPEC	0	/* Unspecified.  */
 #define	PF_LOCAL	1	/* Local to host (pipes and file-domain).  */
-#define	PF_UNIX		PF_LOCAL /* POSIX name for PF_LOCAL.  */
+#define	PF_UNIX		PF_LOCAL /* Old BSD name for PF_LOCAL.  */
 #define	PF_FILE		PF_LOCAL /* Another non-standard name for PF_LOCAL.  */
 #define	PF_INET		2	/* IP protocol family.  */
 #define	PF_AX25		3	/* Amateur Radio AX.25.  */
@@ -90,9 +90,7 @@ enum __socket_type
 #define	PF_PPPOX	24	/* PPPoX sockets.  */
 #define	PF_WANPIPE	25	/* Wanpipe API sockets.  */
 #define	PF_BLUETOOTH	31	/* Bluetooth sockets.  */
-#define	PF_IUCV		32	/* IUCV sockets.  */
-#define PF_RXRPC	33	/* RxRPC sockets.  */
-#define	PF_MAX		34	/* For now..  */
+#define	PF_MAX		32	/* For now..  */
 
 /* Address families.  */
 #define	AF_UNSPEC	PF_UNSPEC
@@ -124,8 +122,6 @@ enum __socket_type
 #define	AF_PPPOX	PF_PPPOX
 #define	AF_WANPIPE	PF_WANPIPE
 #define	AF_BLUETOOTH	PF_BLUETOOTH
-#define	AF_IUCV		PF_IUCV
-#define AF_RXRPC	PF_RXRPC
 #define	AF_MAX		PF_MAX
 
 /* Socket level values.  Others are defined in the appropriate headers.
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index 4c222f10d9..46161a806a 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -139,72 +139,40 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
 	  if (nlmh->nlmsg_type == RTM_NEWADDR)
 	    {
 	      struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh);
-	      struct rtattr *rta = IFA_RTA (ifam);
-	      size_t len = nlmh->nlmsg_len - NLMSG_LENGTH (sizeof (*ifam));
 
 	      switch (ifam->ifa_family)
 		{
-		  const void *local;
-		  const void *address;
-
 		case AF_INET:
-		  local = NULL;
-		  address = NULL;
-		  while (RTA_OK (rta, len))
-		    {
-		      switch (rta->rta_type)
-			{
-			case IFA_LOCAL:
-			  local = RTA_DATA (rta);
-			  break;
-
-			case IFA_ADDRESS:
-			  address = RTA_DATA (rta);
-			  goto out_v4;
-			}
-
-		      rta = RTA_NEXT (rta, len);
-		    }
-
-		  if (local != NULL)
-		    {
-		    out_v4:
-		      if (*(const in_addr_t *) (address ?: local)
-			  != htonl (INADDR_LOOPBACK))
-			*seen_ipv4 = true;
-		    }
+		  *seen_ipv4 = true;
 		  break;
-
 		case AF_INET6:
-		  local = NULL;
-		  address = NULL;
-		  while (RTA_OK (rta, len))
-		    {
-		      switch (rta->rta_type)
-			{
-			case IFA_LOCAL:
-			  local = RTA_DATA (rta);
-			  break;
-
-			case IFA_ADDRESS:
-			  address = RTA_DATA (rta);
-			  goto out_v6;
-			}
-
-		      rta = RTA_NEXT (rta, len);
-		    }
-
-		  if (local != NULL)
-		    {
-		    out_v6:
-		      if (!IN6_IS_ADDR_LOOPBACK (address ?: local))
-			*seen_ipv6 = true;
-		    }
+		  *seen_ipv6 = true;
 
 		  if (ifam->ifa_flags & (IFA_F_DEPRECATED
 					 | IFA_F_TEMPORARY
 					 | IFA_F_HOMEADDRESS))
 		    {
+		      struct rtattr *rta = IFA_RTA (ifam);
+		      size_t len = (nlmh->nlmsg_len
+				    - NLMSG_LENGTH (sizeof (*ifam)));
+		      void *local = NULL;
+		      void *address = NULL;
+		      while (RTA_OK (rta, len))
+			{
+			  switch (rta->rta_type)
+			    {
+			    case IFA_LOCAL:
+			      local = RTA_DATA (rta);
+			      break;
+
+			    case IFA_ADDRESS:
+			      address = RTA_DATA (rta);
+			      break;
+			    }
+
+			  rta = RTA_NEXT (rta, len);
+			}
+
 		      struct in6ailist *newp = alloca (sizeof (*newp));
 		      newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
 					   ? in6ai_deprecated : 0)
@@ -235,7 +203,7 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
 
   close_not_cancel_no_status (fd);
 
-  if (*seen_ipv6 && in6ailist != NULL)
+  if (in6ailist != NULL)
     {
       *in6ai = malloc (in6ailistlen * sizeof (**in6ai));
       if (*in6ai == NULL)
diff --git a/sysdeps/unix/sysv/linux/futimes.c b/sysdeps/unix/sysv/linux/futimes.c
index 272b83eb05..610f1deb29 100644
--- a/sysdeps/unix/sysv/linux/futimes.c
+++ b/sysdeps/unix/sysv/linux/futimes.c
@@ -1,5 +1,5 @@
 /* futimes -- change access and modification times of open file.  Linux version.
-   Copyright (C) 2002,2003,2005,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2002,2003,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
 #include <kernel-features.h>
 
 
-#if defined __NR_utimensat && !defined __ASSUME_UTIMENSAT
+#ifndef __ASSUME_UTIMENSAT
 static int miss_utimensat;
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
index c824be2da7..ff77627a83 100644
--- a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux/ia64 version.
-   Copyright (C) 2001, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006 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
@@ -127,28 +127,6 @@ struct pt_all_user_regs
     struct ia64_fpreg fr[128];
   };
 
-/* Options set using PTRACE_SETOPTIONS.  */
-enum __ptrace_setoptions {
-  PTRACE_O_TRACESYSGOOD	= 0x00000001,
-  PTRACE_O_TRACEFORK	= 0x00000002,
-  PTRACE_O_TRACEVFORK   = 0x00000004,
-  PTRACE_O_TRACECLONE	= 0x00000008,
-  PTRACE_O_TRACEEXEC	= 0x00000010,
-  PTRACE_O_TRACEVFORKDONE = 0x00000020,
-  PTRACE_O_TRACEEXIT	= 0x00000040,
-  PTRACE_O_MASK		= 0x0000007f
-};
-
-/* Wait extended result codes for the above trace options.  */
-enum __ptrace_eventcodes {
-  PTRACE_EVENT_FORK	= 1,
-  PTRACE_EVENT_VFORK	= 2,
-  PTRACE_EVENT_CLONE	= 3,
-  PTRACE_EVENT_EXEC	= 4,
-  PTRACE_EVENT_VFORK_DONE = 5,
-  PTRACE_EVENT_EXIT	= 6
-};
-
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index f6bd906f5d..ed32001544 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -1,6 +1,6 @@
 /* Set flags signalling availability of kernel features based on given
    kernel version number.
-   Copyright (C) 1999-2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999-2003, 2004, 2005, 2006 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
@@ -463,8 +463,3 @@
 #if __LINUX_KERNEL_VERSION >= 0x020616
 # define __ASSUME_UTIMENSAT	1
 #endif
-
-/* Support for private futexes was added in 2.6.22.  */
-#if __LINUX_KERNEL_VERSION >= 0x020616
-# define __ASSUME_PRIVATE_FUTEX	1
-#endif
diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c
index c52ce39db1..5fb5363e1e 100644
--- a/sysdeps/unix/sysv/linux/open64.c
+++ b/sysdeps/unix/sysv/linux/open64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991,1995-1997,1999,2000,2002,2007
-   Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995-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
@@ -20,7 +19,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <stdarg.h>
-#include <stdio.h>
+#include <bp-sym.h>
 #include <sysdep-cancel.h>
 
 /* Open FILE with access OFLAG.  If OFLAG includes O_CREAT,
@@ -49,29 +48,6 @@ __libc_open64 (const char *file, int oflag, ...)
 
   return result;
 }
-weak_alias (__libc_open64, __open64)
-libc_hidden_weak (__open64)
-weak_alias (__libc_open64, open64)
-
-
-#ifndef PTW
-int
-__open64_2 (file, oflag)
-     const char *file;
-     int oflag;
-{
-  if (oflag & O_CREAT)
-    __fortify_fail ("invalid open64 call: O_CREAT without mode");
-
-  if (SINGLE_THREAD_P)
-    return INLINE_SYSCALL (open, 2, file, oflag | O_LARGEFILE);
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  int result = INLINE_SYSCALL (open, 2, file, oflag | O_LARGEFILE);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-#endif
+weak_alias (__libc_open64, BP_SYM (__open64))
+libc_hidden_weak (BP_SYM (__open64))
+weak_alias (__libc_open64, BP_SYM (open64))
diff --git a/sysdeps/unix/sysv/linux/open_2.c b/sysdeps/unix/sysv/linux/open_2.c
deleted file mode 100644
index 0a6dc28b43..0000000000
--- a/sysdeps/unix/sysv/linux/open_2.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 2007 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 <stdio.h>
-
-
-int
-__open_2 (file, oflag)
-     const char *file;
-     int oflag;
-{
-  if (oflag & O_CREAT)
-    __fortify_fail ("invalid open call: O_CREAT without mode");
-
-  return __open (file, oflag);
-}
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index 45b566f2d0..df53b6cf2c 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 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,6 @@
 
 #ifndef OPENAT
 # define OPENAT openat
-# define __OPENAT_2 __openat_2
 
 # ifndef __ASSUME_ATFCTS
 /* Set errno after a failed call.  If BUF is not null,
@@ -174,18 +173,3 @@ __OPENAT (fd, file, oflag)
 }
 libc_hidden_def (__OPENAT)
 weak_alias (__OPENAT, OPENAT)
-
-
-int
-__OPENAT_2 (fd, file, oflag)
-     int fd;
-     const char *file;
-     int oflag;
-{
-  if (oflag & O_CREAT)
-#define MSG(s) MSG2 (s)
-#define MSG2(s) "invalid " #s " call: O_CREAT without mode"
-    __fortify_fail (MSG (OPENAT));
-
-  return __OPENAT (fd, file, oflag);
-}
diff --git a/sysdeps/unix/sysv/linux/openat64.c b/sysdeps/unix/sysv/linux/openat64.c
index 013a13effa..9e7a2b3737 100644
--- a/sysdeps/unix/sysv/linux/openat64.c
+++ b/sysdeps/unix/sysv/linux/openat64.c
@@ -1,5 +1,4 @@
 #define OPENAT openat64
-#define __OPENAT_2 __openat64_2
 #define MORE_OFLAGS O_LARGEFILE
 
 #include "openat.c"
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
index a71cfa5b06..923eab99ef 100644
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <ldsodefs.h>
-#include <sysdep.h>
 #include <bp-start.h>
 #include <bp-sym.h>
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/970/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/970/fpu/Implies
deleted file mode 100644
index 52993ae71b..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/970/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-# Make sure this comes before the powerpc/powerpc32/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc32/fpu/Implies.
-powerpc/powerpc32/970/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu/Implies
deleted file mode 100644
index 3c0690e2fe..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-# Make sure this comes before the powerpc/powerpc32/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc32/fpu/Implies.
-powerpc/powerpc32/power4/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/fpu/Implies
deleted file mode 100644
index 37d43bb6fc..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-# Make sure this comes before the powerpc/powerpc32/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc32/fpu/Implies.
-powerpc/powerpc32/power5+/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/fpu/Implies
deleted file mode 100644
index d379a2dd12..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-# Make sure this comes before the powerpc/powerpc32/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc32/fpu/Implies.
-powerpc/powerpc32/power5/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/Implies
deleted file mode 100644
index 9fb457db93..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-# Make sure this comes before the powerpc/powerpc32/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc32/fpu/Implies.
-powerpc/powerpc32/power6/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/fpu/Implies
deleted file mode 100644
index ffca13c0ef..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/fpu/Implies
+++ /dev/null
@@ -1,4 +0,0 @@
-# Make sure this comes before the powerpc/powerpc32/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc32/fpu/Implies.
-powerpc/powerpc32/power6x/fpu
-powerpc/powerpc32/power6/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/970/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/970/fpu/Implies
deleted file mode 100644
index 558a5fb174..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/970/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/fpu/Implies
deleted file mode 100644
index 558a5fb174..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/fpu/Implies
deleted file mode 100644
index cf5913dec3..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-# Make sure this comes before the powerpc/powerpc64/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc64/fpu/Implies.
-powerpc/powerpc64/power5+/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/fpu/Implies
deleted file mode 100644
index 558a5fb174..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/fpu/Implies
+++ /dev/null
@@ -1 +0,0 @@
-powerpc/powerpc64/power4/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/Implies
deleted file mode 100644
index 9451147267..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/Implies
+++ /dev/null
@@ -1,3 +0,0 @@
-# Make sure this comes before the powerpc/powerpc64/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc64/fpu/Implies.
-powerpc/powerpc64/power6/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/fpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/fpu/Implies
deleted file mode 100644
index fd74b8341c..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/fpu/Implies
+++ /dev/null
@@ -1,4 +0,0 @@
-# Make sure this comes before the powerpc/powerpc64/fpu that's
-# listed in unix/sysv/linux/powerpc/powerpc64/fpu/Implies.
-powerpc/powerpc64/power6x/fpu
-powerpc/powerpc64/power6/fpu
diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
index 23e75fbcff..5d055f67fe 100644
--- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux version.
-   Copyright (C) 2001, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006 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
@@ -99,28 +99,6 @@ enum __ptrace_request
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
 };
 
-/* Options set using PTRACE_SETOPTIONS.  */
-enum __ptrace_setoptions {
-  PTRACE_O_TRACESYSGOOD	= 0x00000001,
-  PTRACE_O_TRACEFORK	= 0x00000002,
-  PTRACE_O_TRACEVFORK   = 0x00000004,
-  PTRACE_O_TRACECLONE	= 0x00000008,
-  PTRACE_O_TRACEEXEC	= 0x00000010,
-  PTRACE_O_TRACEVFORKDONE = 0x00000020,
-  PTRACE_O_TRACEEXIT	= 0x00000040,
-  PTRACE_O_MASK		= 0x0000007f
-};
-
-/* Wait extended result codes for the above trace options.  */
-enum __ptrace_eventcodes {
-  PTRACE_EVENT_FORK	= 1,
-  PTRACE_EVENT_VFORK	= 2,
-  PTRACE_EVENT_CLONE	= 3,
-  PTRACE_EVENT_EXEC	= 4,
-  PTRACE_EVENT_VFORK_DONE = 5,
-  PTRACE_EVENT_EXIT	= 6
-};
-
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
diff --git a/sysdeps/unix/sysv/linux/s390/dl-procinfo.h b/sysdeps/unix/sysv/linux/s390/dl-procinfo.h
deleted file mode 100644
index 3eeb529053..0000000000
--- a/sysdeps/unix/sysv/linux/s390/dl-procinfo.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Linux/s390 version of processor capability information handling macros.
-   Copyright (C) 2006 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2006.
-
-   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 <sysdeps/s390/dl-procinfo.h>
-#include <ldsodefs.h>
-
-
-#undef _dl_procinfo
-static inline int
-__attribute__ ((unused))
-_dl_procinfo (int word)
-{
-  /* This table should match the information from arch/s390/kernel/setup.c
-     in the kernel sources.  */
-  int i;
-
-  _dl_printf ("AT_HWCAP:   ");
-
-  for (i = 0; i < _DL_HWCAP_COUNT; ++i)
-    if (word & (1UL << i))
-      _dl_printf (" %s", GLRO(dl_s390_cap_flags)[i]);
-
-  _dl_printf ("\n");
-
-  return 0;
-}
diff --git a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
index ac186387fc..70eb4f8222 100644
--- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux version.
-   Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2006 Free Software Foundation, Inc.
    Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -138,28 +138,6 @@ enum __ptrace_request
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
 };
 
-/* Options set using PTRACE_SETOPTIONS.  */
-enum __ptrace_setoptions {
-  PTRACE_O_TRACESYSGOOD	= 0x00000001,
-  PTRACE_O_TRACEFORK	= 0x00000002,
-  PTRACE_O_TRACEVFORK   = 0x00000004,
-  PTRACE_O_TRACECLONE	= 0x00000008,
-  PTRACE_O_TRACEEXEC	= 0x00000010,
-  PTRACE_O_TRACEVFORKDONE = 0x00000020,
-  PTRACE_O_TRACEEXIT	= 0x00000040,
-  PTRACE_O_MASK		= 0x0000007f
-};
-
-/* Wait extended result codes for the above trace options.  */
-enum __ptrace_eventcodes {
-  PTRACE_EVENT_FORK	= 1,
-  PTRACE_EVENT_VFORK	= 2,
-  PTRACE_EVENT_CLONE	= 3,
-  PTRACE_EVENT_EXEC	= 4,
-  PTRACE_EVENT_VFORK_DONE = 5,
-  PTRACE_EVENT_EXIT	= 6
-};
-
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
diff --git a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
index a7b204b33a..17907c4a38 100644
--- a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux/SPARC version.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2007
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -183,28 +183,6 @@ enum __ptrace_request
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
 };
 
-/* Options set using PTRACE_SETOPTIONS.  */
-enum __ptrace_setoptions {
-  PTRACE_O_TRACESYSGOOD	= 0x00000001,
-  PTRACE_O_TRACEFORK	= 0x00000002,
-  PTRACE_O_TRACEVFORK   = 0x00000004,
-  PTRACE_O_TRACECLONE	= 0x00000008,
-  PTRACE_O_TRACEEXEC	= 0x00000010,
-  PTRACE_O_TRACEVFORKDONE = 0x00000020,
-  PTRACE_O_TRACEEXIT	= 0x00000040,
-  PTRACE_O_MASK		= 0x0000007f
-};
-
-/* Wait extended result codes for the above trace options.  */
-enum __ptrace_eventcodes {
-  PTRACE_EVENT_FORK	= 1,
-  PTRACE_EVENT_VFORK	= 2,
-  PTRACE_EVENT_CLONE	= 3,
-  PTRACE_EVENT_EXEC	= 4,
-  PTRACE_EVENT_VFORK_DONE = 5,
-  PTRACE_EVENT_EXIT	= 6
-};
-
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h
index 08658f9764..44284cb307 100644
--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux version.
-   Copyright (C) 1996-1999,2000,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1996-1999,2000,2006 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
@@ -129,29 +129,6 @@ enum __ptrace_request
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
 };
 
-
-/* Options set using PTRACE_SETOPTIONS.  */
-enum __ptrace_setoptions {
-  PTRACE_O_TRACESYSGOOD	= 0x00000001,
-  PTRACE_O_TRACEFORK	= 0x00000002,
-  PTRACE_O_TRACEVFORK   = 0x00000004,
-  PTRACE_O_TRACECLONE	= 0x00000008,
-  PTRACE_O_TRACEEXEC	= 0x00000010,
-  PTRACE_O_TRACEVFORKDONE = 0x00000020,
-  PTRACE_O_TRACEEXIT	= 0x00000040,
-  PTRACE_O_MASK		= 0x0000007f
-};
-
-/* Wait extended result codes for the above trace options.  */
-enum __ptrace_eventcodes {
-  PTRACE_EVENT_FORK	= 1,
-  PTRACE_EVENT_VFORK	= 2,
-  PTRACE_EVENT_CLONE	= 3,
-  PTRACE_EVENT_EXEC	= 4,
-  PTRACE_EVENT_VFORK_DONE = 5,
-  PTRACE_EVENT_EXIT	= 6
-};
-
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
diff --git a/sysdeps/x86_64/sched_cpucount.c b/sysdeps/x86_64/sched_cpucount.c
deleted file mode 100644
index 63d84a62e8..0000000000
--- a/sysdeps/x86_64/sched_cpucount.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifdef __amdfam10
-# define POPCNT(l) \
-  ({ __cpu_mask r;							      \
-     asm ("popcntq %1, %0" : "=r" (r) : "0" (l));			      \
-     r; })
-#endif
-
-#include <posix/sched_cpucount.c>
diff --git a/version.h b/version.h
index 2fc4a7b8d3..d70070f2a3 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
 /* This file just defines the current version number of libc.  */
 
-#define RELEASE "development"
-#define VERSION "2.6.90"
+#define RELEASE "stable"
+#define VERSION "2.6"