about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-03-01 06:55:57 +0000
committerJakub Jelinek <jakub@redhat.com>2006-03-01 06:55:57 +0000
commit6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33 (patch)
tree754e2649fcc68e83b3ad749cb5a1a1f7549ffafb /sysdeps/unix/sysv
parent378b1353df56387b0706bc42cb661ff2227c8eb9 (diff)
downloadglibc-6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33.tar.gz
glibc-6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33.tar.xz
glibc-6a8c1091fdc978b0e369f4ca3f58a07c2f8b9d33.zip
Updated to fedora-glibc-20060301T0647
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/fpu/Implies2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/fxstatat.c5
-rw-r--r--sysdeps/unix/sysv/linux/ftruncate64.c2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/Versions25
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/errno.h51
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/fcntl.h181
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/ioctls.h37
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/ipc.h63
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/mman.h83
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/msq.h84
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/sem.h92
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/shm.h107
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/sigaction.h75
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/signum.h82
-rw-r--r--sysdeps/unix/sysv/linux/hppa/brk.c42
-rw-r--r--sysdeps/unix/sysv/linux/hppa/clone.S99
-rw-r--r--sysdeps/unix/sysv/linux/hppa/fcntl.c1
-rw-r--r--sysdeps/unix/sysv/linux/hppa/getdents64.c1
-rw-r--r--sysdeps/unix/sysv/linux/hppa/getrlimit64.c1
-rw-r--r--sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h18
-rw-r--r--sysdeps/unix/sysv/linux/hppa/kernel_stat.h31
-rw-r--r--sysdeps/unix/sysv/linux/hppa/mmap.c50
-rw-r--r--sysdeps/unix/sysv/linux/hppa/profil-counter.h25
-rw-r--r--sysdeps/unix/sysv/linux/hppa/socket.S10
-rw-r--r--sysdeps/unix/sysv/linux/hppa/sys/procfs.h113
-rw-r--r--sysdeps/unix/sysv/linux/hppa/sys/ucontext.h67
-rw-r--r--sysdeps/unix/sysv/linux/hppa/syscall.S19
-rw-r--r--sysdeps/unix/sysv/linux/hppa/syscalls.list37
-rw-r--r--sysdeps/unix/sysv/linux/hppa/sysdep.c64
-rw-r--r--sysdeps/unix/sysv/linux/hppa/sysdep.h419
-rw-r--r--sysdeps/unix/sysv/linux/hppa/umount.c31
-rw-r--r--sysdeps/unix/sysv/linux/i386/fchownat.c10
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h35
-rw-r--r--sysdeps/unix/sysv/linux/linkat.c12
-rw-r--r--sysdeps/unix/sysv/linux/m68k/Makefile17
-rw-r--r--sysdeps/unix/sysv/linux/m68k/Versions32
-rw-r--r--sysdeps/unix/sysv/linux/m68k/alphasort64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/a.out.h3
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/fcntl.h188
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/mman.h102
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/poll.h43
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/stat.h164
-rw-r--r--sysdeps/unix/sysv/linux/m68k/brk.c48
-rw-r--r--sysdeps/unix/sysv/linux/m68k/chown.c69
-rw-r--r--sysdeps/unix/sysv/linux/m68k/clone.S66
-rw-r--r--sysdeps/unix/sysv/linux/m68k/dl-librecon.h1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/fchown.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/fchownat.c122
-rw-r--r--sysdeps/unix/sysv/linux/m68k/fcntl.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/fxstat.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/fxstatat.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getdents64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getegid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/geteuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getgroups.c2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getmsg.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getpagesize.c50
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getresgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getresuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getrlimit.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getrlimit64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getsysstats.c37
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/glob64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/lchown.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/ldconfig.h1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/lockf64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/lxstat.c2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/mmap.S43
-rw-r--r--sysdeps/unix/sysv/linux/m68k/mremap.S29
-rw-r--r--sysdeps/unix/sysv/linux/m68k/msgctl.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/putmsg.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/readdir64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/readdir64_r.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/register-dump.h214
-rw-r--r--sysdeps/unix/sysv/linux/m68k/scandir64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/semctl.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/semtimedop.S60
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setegid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/seteuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setfsgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setfsuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setgroups.c2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setregid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setresgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setresuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setreuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setrlimit.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/setuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/shmctl.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h26
-rw-r--r--sysdeps/unix/sysv/linux/m68k/socket.S111
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sys/procfs.h126
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sys/reg.h89
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sys/ucontext.h109
-rw-r--r--sysdeps/unix/sysv/linux/m68k/syscall.S33
-rw-r--r--sysdeps/unix/sysv/linux/m68k/syscalls.list5
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.S49
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.h295
-rw-r--r--sysdeps/unix/sysv/linux/m68k/versionsort64.c1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/vfork.S76
-rw-r--r--sysdeps/unix/sysv/linux/m68k/xstat.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/Makefile128
-rw-r--r--sysdeps/unix/sysv/linux/mips/Versions31
-rw-r--r--sysdeps/unix/sysv/linux/mips/_test_and_set.c30
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/endian.h16
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/errno.h59
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/fcntl.h194
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h76
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/ipc.h55
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/mman.h95
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/msq.h74
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/poll.h48
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/resource.h225
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/sem.h85
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/shm.h94
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/sigaction.h89
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/sigcontext.h105
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/siginfo.h310
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/signum.h79
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/sigstack.h55
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/socket.h315
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/stat.h209
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/statfs.h72
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/termios.h218
-rw-r--r--sysdeps/unix/sysv/linux/mips/brk.c57
-rw-r--r--sysdeps/unix/sysv/linux/mips/clone.S166
-rwxr-xr-xsysdeps/unix/sysv/linux/mips/configure78
-rw-r--r--sysdeps/unix/sysv/linux/mips/configure.in78
-rw-r--r--sysdeps/unix/sysv/linux/mips/dl-cache.h43
-rw-r--r--sysdeps/unix/sysv/linux/mips/entry.h5
-rw-r--r--sysdeps/unix/sysv/linux/mips/fcntl.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/ftruncate64.c76
-rw-r--r--sysdeps/unix/sysv/linux/mips/getmsg.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/getpagesize.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/getsysstats.c36
-rw-r--r--sysdeps/unix/sysv/linux/mips/ipc_priv.h1
-rw-r--r--sysdeps/unix/sysv/linux/mips/kernel_sigaction.h40
-rw-r--r--sysdeps/unix/sysv/linux/mips/kernel_stat.h57
-rw-r--r--sysdeps/unix/sysv/linux/mips/kernel_termios.h35
-rw-r--r--sysdeps/unix/sysv/linux/mips/lockf64.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/sysdep.h292
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h26
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/llseek.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c28
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h242
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c30
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S42
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h242
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/recv.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/send.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/syscall.S60
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/syscalls.list21
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/umount.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/pipe.S1
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread.c109
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread64.c107
-rw-r--r--sysdeps/unix/sysv/linux/mips/profil-counter.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/ptrace.c111
-rw-r--r--sysdeps/unix/sysv/linux/mips/putmsg.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/pwrite.c109
-rw-r--r--sysdeps/unix/sysv/linux/mips/pwrite64.c108
-rw-r--r--sysdeps/unix/sysv/linux/mips/readelflib.c71
-rw-r--r--sysdeps/unix/sysv/linux/mips/register-dump.h108
-rw-r--r--sysdeps/unix/sysv/linux/mips/sigaction.c188
-rw-r--r--sysdeps/unix/sysv/linux/mips/sigcontextinfo.h43
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/cachectl.h42
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/procfs.h128
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/ptrace.h136
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/syscall.h42
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/sysmips.h43
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/tas.h67
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/ucontext.h109
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/user.h219
-rw-r--r--sysdeps/unix/sysv/linux/mips/syscalls.list31
-rw-r--r--sysdeps/unix/sysv/linux/mips/truncate64.c76
-rw-r--r--sysdeps/unix/sysv/linux/mips/ustat.c37
-rw-r--r--sysdeps/unix/sysv/linux/mips/vfork.S98
-rw-r--r--sysdeps/unix/sysv/linux/mips/xmknod.c51
-rw-r--r--sysdeps/unix/sysv/linux/mips/xstatconv.c133
-rw-r--r--sysdeps/unix/sysv/linux/openat.c8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h19
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h20
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/fcntl.h52
-rw-r--r--sysdeps/unix/sysv/linux/sh/chown.c70
-rw-r--r--sysdeps/unix/sysv/linux/sh/fchownat.c123
-rw-r--r--sysdeps/unix/sysv/linux/sh/pread.c96
-rw-r--r--sysdeps/unix/sysv/linux/sh/pread64.c97
-rw-r--r--sysdeps/unix/sysv/linux/sh/pwrite.c96
-rw-r--r--sysdeps/unix/sysv/linux/sh/pwrite64.c99
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/chown.c2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c64
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h75
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c64
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h76
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/brk.c43
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sys/epoll.h9
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/umount.c32
207 files changed, 754 insertions, 11022 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/fpu/Implies
deleted file mode 100644
index d76f511c2e..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/fpu/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# Override ldbl-opt with alpha specific routines.
-alpha/fpu
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
index 4cb304cb40..497694619a 100644
--- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -94,5 +94,6 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
 
   return -1;
 }
-strong_alias (__fxstatat, __fxstatat64)
-strong_alias (__fxstatat64, __GI___fxstatat64)
+libc_hidden_def (__fxstatat)
+strong_alias (__fxstatat, __fxstatat64);
+libc_hidden_ver(__fxstatat, __fxstatat64);
diff --git a/sysdeps/unix/sysv/linux/ftruncate64.c b/sysdeps/unix/sysv/linux/ftruncate64.c
index 2aa4ad54be..60e7ae0ac7 100644
--- a/sysdeps/unix/sysv/linux/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/ftruncate64.c
@@ -73,5 +73,5 @@ weak_alias (__ftruncate64, ftruncate64)
 
 #else
 /* Use the generic implementation.  */
-# include <posix/ftruncate64.c>
+# include <misc/ftruncate64.c>
 #endif
diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile
deleted file mode 100644
index 1c93ec52d9..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-# linux/hppa does not use -lmilli anymore
-gnulib := -lgcc
diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions
deleted file mode 100644
index e15c8225fb..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/Versions
+++ /dev/null
@@ -1,25 +0,0 @@
-libc {
-  # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
-  # When you get an error from errlist-compat.awk, you need to add a new
-  # version here.  Don't do this blindly, since this means changing the ABI
-  # for all GNU/Linux configurations.
-
-  GLIBC_2.1 {
-    #errlist-compat	253
-    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
-  }
-  GLIBC_2.2 {
-    # New rlimit interface
-    getrlimit; setrlimit; getrlimit64; setrlimit64;
-  }
-  GLIBC_2.3 {
-    #errlist-compat	254
-    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
-  }
-}
-librt {
-  GLIBC_2.3 {
-    # AIO functions.
-    aio_cancel; aio_cancel64;
-  }
-}
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
deleted file mode 100644
index 003d71f622..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Error constants.  Linux/HPPA specific version.
-   Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifdef _ERRNO_H
-
-# undef EDOM
-# undef EILSEQ
-# undef ERANGE
-# include <linux/errno.h>
-
-/* Linux also has no ECANCELED error code.  Since it is not used here
-   we define it to an invalid value.  */
-# ifndef ECANCELED
-#  define ECANCELED	ECANCELLED
-# endif
-
-# ifndef __ASSEMBLER__
-/* Function to get address of global `errno' variable.  */
-extern int *__errno_location (void) __THROW __attribute__ ((__const__));
-
-#  if !defined _LIBC || defined _LIBC_REENTRANT
-/* When using threads, errno is a per-thread value.  */
-#   define errno (*__errno_location ())
-#  endif
-# endif /* !__ASSEMBLER__ */
-#endif /* _ERRNO_H */
-
-#if !defined _ERRNO_H && defined __need_Emath
-/* This is ugly but the kernel header is not clean enough.  We must
-   define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
-   defined.  */
-# define EDOM	33	/* Math argument out of domain of function.  */
-# define EILSEQ	47	/* Illegal byte sequence.  */
-# define ERANGE	34	/* Math result not representable.  */
-#endif /* !_ERRNO_H && __need_Emath */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
deleted file mode 100644
index 9d967c6475..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* O_*, F_*, FD_* bit values for Linux/HPPA.
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004
-	Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _FCNTL_H
-# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
-#endif
-
-#include <sys/types.h>
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
-   located on an ext2 file system */
-#define O_RDONLY	00000000
-#define O_WRONLY	00000001
-#define O_RDWR		00000002
-#define O_ACCMODE	00000003
-#define O_APPEND	00000010
-#define O_BLKSEEK	00000100 /* HPUX only */
-#define O_CREAT		00000400 /* not fcntl */
-#define O_TRUNC		00001000 /* not fcntl */
-#define O_EXCL		00002000 /* not fcntl */
-#define O_ASYNC		00020000
-#define O_SYNC		00100000
-#define O_NONBLOCK	00200004 /* HPUX has separate NDELAY & NONBLOCK */
-#define O_NDELAY	O_NONBLOCK
-#define O_NOCTTY	00400000 /* not fcntl */
-
-
-#ifdef __USE_GNU
-# define O_DIRECT	00040000 /* direct disk access hint - currently ignored */
-# define O_DIRECTORY	00010000 /* must be a directory */
-# define O_NOFOLLOW	00000200 /* don't follow links */
-# define O_NOATIME	04000000 /* Do not set atime.  */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE	00004000
-#endif
-
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC		01000000 /* HPUX only */
-# define O_RSYNC		02000000 /* HPUX only */
-#endif
-
-/* Values for the second argument to `fcntl'.  */
-#define F_DUPFD		0	/* Duplicate file descriptor.  */
-#define F_GETFD		1	/* Get file descriptor flags.  */
-#define F_SETFD		2	/* Set file descriptor flags.  */
-#define F_GETFL		3	/* Get file status flags.  */
-#define F_SETFL		4	/* Set file status flags.  */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK	5	/* Get record locking info.  */
-# define F_SETLK	6    	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).  */
-#else
-# define F_GETLK	F_GETLK64 /* Get record locking info.  */
-# define F_SETLK	F_SETLK64 /* Set record locking info (non-blocking). */
-# define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
-#endif
-
-#define F_GETLK64	8	/* Get record locking info.  */
-#define F_SETLK64	9	/* Set record locking info (non-blocking).  */
-#define F_SETLKW64	10	/* Set record locking info (blocking).  */
-
-#if defined __USE_BSD || defined __USE_UNIX98
-# define F_GETOWN	11	/* Get owner of socket (receiver of SIGIO).  */
-# define F_SETOWN	12	/* Set owner of socket (receiver of SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG	13	/* Set number of signal to be sent.  */
-# define F_GETSIG	14	/* Get number of signal to be sent.  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE     1024    /* Set a lease.  */
-# define F_GETLEASE     1025    /* Enquire what lease is active.  */
-# define F_NOTIFY       1026    /* Request notfications on a directory.  */
-#endif
-
-/* for F_[GET|SET]FL */
-#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
-#define F_RDLCK		1	/* Read lock.  */
-#define F_WRLCK		2	/* Write lock.  */
-#define F_UNLCK		3	/* Remove lock.  */
-
-/* for old implementation of bsd flock () */
-#define F_EXLCK		4	/* or 3 */
-#define F_SHLCK		8	/* or 4 */
-
-#ifdef __USE_BSD
-/* operations for bsd flock(), also used by the kernel implementation */
-# define LOCK_SH	1	/* shared lock */
-# define LOCK_EX	2	/* exclusive lock */
-# define LOCK_NB	4	/* or'd with one of the above to prevent
-				   blocking */
-# define LOCK_UN	8	/* remove lock */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY.  */
-# define DN_ACCESS      0x00000001      /* File accessed.  */
-# define DN_MODIFY      0x00000002      /* File modified.  */
-# define DN_CREATE      0x00000004      /* File created.  */
-# define DN_DELETE      0x00000008      /* File removed.  */
-# define DN_RENAME      0x00000010      /* File renamed.  */
-# define DN_ATTRIB      0x00000020      /* File changed attibutes.  */
-# define DN_MULTISHOT   0x80000000      /* Don't remove notifier.  */
-#endif
-
-struct flock
-  {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
-    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
-#ifndef __USE_FILE_OFFSET64
-    __off_t l_start;	/* Offset where the lock begins.  */
-    __off_t l_len;	/* Size of the locked area; zero means until EOF.  */
-#else
-    __off64_t l_start;	/* Offset where the lock begins.  */
-    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
-#endif
-    __pid_t l_pid;	/* Process holding the lock.  */
-  };
-
-#ifdef __USE_LARGEFILE64
-struct flock64
-  {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
-    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
-    __off64_t l_start;	/* Offset where the lock begins.  */
-    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
-    __pid_t l_pid;	/* Process holding the lock.  */
-  };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
-   BSD systems which did not managed to hide these kernel macros.  */
-#ifdef	__USE_BSD
-# define FAPPEND	O_APPEND
-# define FFSYNC		O_FSYNC
-# define FASYNC		O_ASYNC
-# define FNONBLOCK	O_NONBLOCK
-# define FNDELAY	O_NDELAY
-#endif /* Use BSD.  */
-
-/* Advise to `posix_fadvise'.  */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
-# define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.  */
-# define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
-# define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
-# define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
-#endif
-
-__BEGIN_DECLS
-
-/* Provide kernel hint to read ahead.  */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-    __THROW;
-
-__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h
deleted file mode 100644
index 6f4e05fcc8..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_IOCTL_H
-# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
-#endif
-
-/* Use the definitions from the kernel header files.  */
-#include <asm/ioctls.h>
-
-/* Oh well, this is necessary since the kernel data structure is
-   different from the user-level version.  */
-#undef  TCGETS
-#undef  TCSETS
-#undef  TCSETSW
-#undef  TCSETSF
-#define TCGETS	_IOR ('T', 16, char[36])
-#define TCSETS	_IOW ('T', 17, char[36])
-#define TCSETSW	_IOW ('T', 18, char[36])
-#define TCSETSF	_IOW ('T', 19, char[36])
-
-#include <linux/sockios.h>
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h b/sysdeps/unix/sysv/linux/hppa/bits/ipc.h
deleted file mode 100644
index d80cf06993..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_IPC_H
-# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
-#endif
-
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* Mode bits for `msgget', `semget', and `shmget'.  */
-#define IPC_CREAT	01000		/* Create key if key does not exist. */
-#define IPC_EXCL	02000		/* Fail if key exists.  */
-#define IPC_NOWAIT	04000		/* Return error on wait.  */
-
-/* Control commands for `msgctl', `semctl', and `shmctl'.  */
-#define IPC_RMID	0		/* Remove identifier.  */
-#define IPC_SET		1		/* Set `ipc_perm' options.  */
-#define IPC_STAT	2		/* Get `ipc_perm' options.  */
-#ifdef __USE_GNU
-# define IPC_INFO	3		/* See ipcs.  */
-#endif
-
-/* Special key values.  */
-#define IPC_PRIVATE	((__key_t) 0)	/* Private key.  */
-
-
-/* Data structure used to pass permission information to IPC operations.  */
-struct ipc_perm
-  {
-    __key_t __key;			/* Key.  */
-    __uid_t uid;			/* Owner's user ID.  */
-    __gid_t gid;			/* Owner's group ID.  */
-    __uid_t cuid;			/* Creator's user ID.  */
-    __gid_t cgid;			/* Creator's group ID.  */
-#if __WORDSIZE == 32
-    unsigned short int __pad1;
-    unsigned short int mode;		/* Read/write permission.  */
-    unsigned short int __pad2;
-#else
-    __mode_t mode;			/* Read/write permission.  */
-    unsigned short int __pad2;
-#endif
-    unsigned short int __seq;		/* Sequence number.  */
-    unsigned int __pad3;
-    unsigned long long int __unused1;
-    unsigned long long int __unused2;
-  };
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
deleted file mode 100644
index 1eb1233814..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Definitions for POSIX memory map interface.  Linux/HPPA version.
-   Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_MMAN_H
-# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
-#endif
-
-/* these are basically taken from the kernel definitions */
-
-#define PROT_READ	0x1		/* page can be read */
-#define PROT_WRITE	0x2		/* page can be written */
-#define PROT_EXEC	0x4		/* page can be executed */
-#define PROT_NONE	0x0		/* page can not be accessed */
-#define PROT_GROWSDOWN	0x01000000	/* Extend change to start of
-					   growsdown vma (mprotect only).  */
-#define PROT_GROWSUP	0x02000000	/* Extend change to start of
-					   growsup vma (mprotect only).  */
-
-#define MAP_SHARED	0x01		/* Share changes */
-#define MAP_PRIVATE	0x02		/* Changes are private */
-#define MAP_TYPE	0x03		/* Mask for type of mapping */
-#define MAP_FIXED	0x04		/* Interpret addr exactly */
-#define MAP_ANONYMOUS	0x10		/* don't use a file */
-
-#define MAP_DENYWRITE	0x0800		/* ETXTBSY */
-#define MAP_EXECUTABLE	0x1000		/* mark it as an executable */
-#define MAP_LOCKED	0x2000		/* pages are locked */
-#define MAP_NORESERVE	0x4000		/* don't check for reservations */
-#define MAP_GROWSDOWN	0x8000		/* stack-like segment */
-#define MAP_POPULATE	0x10000		/* populate (prefault) pagetables */
-#define MAP_NONBLOCK	0x20000		/* do not block on IO */
-
-#define MS_SYNC		1		/* synchronous memory sync */
-#define MS_ASYNC	2		/* sync memory asynchronously */
-#define MS_INVALIDATE	4		/* invalidate the caches */
-
-#define MCL_CURRENT	1		/* lock all current mappings */
-#define MCL_FUTURE	2		/* lock all future mappings */
-
-#define MADV_NORMAL     0               /* no further special treatment */
-#define MADV_RANDOM     1               /* expect random page references */
-#define MADV_SEQUENTIAL 2               /* expect sequential page references */
-#define MADV_WILLNEED   3               /* will need these pages */
-#define MADV_DONTNEED   4               /* dont need these pages */
-#define MADV_SPACEAVAIL 5               /* insure that resources are reserved */
-#define MADV_VPS_PURGE  6               /* Purge pages from VM page cache */
-#define MADV_VPS_INHERIT 7              /* Inherit parents page size */
-
-/* The range 12-64 is reserved for page size specification. */
-#define MADV_4K_PAGES   12              /* Use 4K pages  */
-#define MADV_16K_PAGES  14              /* Use 16K pages */
-#define MADV_64K_PAGES  16              /* Use 64K pages */
-#define MADV_256K_PAGES 18              /* Use 256K pages */
-#define MADV_1M_PAGES   20              /* Use 1 Megabyte pages */
-#define MADV_4M_PAGES   22              /* Use 4 Megabyte pages */
-#define MADV_16M_PAGES  24              /* Use 16 Megabyte pages */
-#define MADV_64M_PAGES  26              /* Use 64 Megabyte pages */
-
-/* compatibility flags */
-#define MAP_ANON	MAP_ANONYMOUS
-#define MAP_FILE	0
-#define MAP_VARIABLE	0
-
-/* Flags for `mremap'.  */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-#endif
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/msq.h b/sysdeps/unix/sysv/linux/hppa/bits/msq.h
deleted file mode 100644
index 1268dc858c..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/msq.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_MSG_H
-# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
-#endif
-
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* Define options for message queue functions.  */
-#define MSG_NOERROR	010000	/* no error if message is too big */
-#ifdef __USE_GNU
-# define MSG_EXCEPT	020000	/* recv any msg except of specified type */
-#endif
-
-/* Types used in the structure definition.  */
-typedef unsigned long int msgqnum_t;
-typedef unsigned long int msglen_t;
-
-
-/* Structure of record for one message inside the kernel.
-   The type `struct msg' is opaque.  */
-struct msqid_ds
-{
-  struct ipc_perm msg_perm;	/* structure describing operation permission */
-#if __WORDSIZE == 32
-  unsigned int __pad1;
-#endif
-  __time_t msg_stime;		/* time of last msgsnd command */
-#if __WORDSIZE == 32
-  unsigned int __pad2;
-#endif
-  __time_t msg_rtime;		/* time of last msgrcv command */
-#if __WORDSIZE == 32
-  unsigned int __pad3;
-#endif
-  __time_t msg_ctime;		/* time of last change */
-  unsigned long int __msg_cbytes; /* current number of bytes on queue */
-  msgqnum_t msg_qnum;		/* number of messages currently on queue */
-  msglen_t msg_qbytes;		/* max number of bytes allowed on queue */
-  __pid_t msg_lspid;		/* pid of last msgsnd() */
-  __pid_t msg_lrpid;		/* pid of last msgrcv() */
-  unsigned long int __unused1;
-  unsigned long int __unused2;
-};
-
-#ifdef __USE_MISC
-
-# define msg_cbytes	__msg_cbytes
-
-/* ipcs ctl commands */
-# define MSG_STAT 11
-# define MSG_INFO 12
-
-/* buffer for msgctl calls IPC_INFO, MSG_INFO */
-struct msginfo
-  {
-    int msgpool;
-    int msgmap;
-    int msgmax;
-    int msgmnb;
-    int msgmni;
-    int msgssz;
-    int msgtql;
-    unsigned short int msgseg;
-  };
-
-#endif /* __USE_MISC */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sem.h b/sysdeps/unix/sysv/linux/hppa/bits/sem.h
deleted file mode 100644
index 2880765108..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/sem.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_SEM_H
-# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
-#endif
-
-#include <sys/types.h>
-#include <bits/wordsize.h>
-
-/* Flags for `semop'.  */
-#define SEM_UNDO	0x1000		/* undo the operation on exit */
-
-/* Commands for `semctl'.  */
-#define GETPID		11		/* get sempid */
-#define GETVAL		12		/* get semval */
-#define GETALL		13		/* get all semval's */
-#define GETNCNT		14		/* get semncnt */
-#define GETZCNT		15		/* get semzcnt */
-#define SETVAL		16		/* set semval */
-#define SETALL		17		/* set all semval's */
-
-
-/* Data structure describing a set of semaphores.  */
-struct semid_ds
-{
-  struct ipc_perm sem_perm;		/* operation permission struct */
-#if __WORDSIZE == 32
-  unsigned int __pad1;
-#endif
-  __time_t sem_otime;			/* last semop() time */
-#if __WORDSIZE == 32
-  unsigned int __pad2;
-#endif
-  __time_t sem_ctime;			/* last time changed by semctl() */
-  unsigned long int sem_nsems;		/* number of semaphores in set */
-  unsigned long int __unused1;
-  unsigned long int __unused2;
-};
-
-/* The user should define a union like the following to use it for arguments
-   for `semctl'.
-
-   union semun
-   {
-     int val;				<= value for SETVAL
-     struct semid_ds *buf;		<= buffer for IPC_STAT & IPC_SET
-     unsigned short int *array;		<= array for GETALL & SETALL
-     struct seminfo *__buf;		<= buffer for IPC_INFO
-   };
-
-   Previous versions of this file used to define this union but this is
-   incorrect.  One can test the macro _SEM_SEMUN_UNDEFINED to see whether
-   one must define the union or not.  */
-#define _SEM_SEMUN_UNDEFINED	1
-
-#ifdef __USE_MISC
-
-/* ipcs ctl cmds */
-# define SEM_STAT 18
-# define SEM_INFO 19
-
-struct  seminfo
-{
-  int semmap;
-  int semmni;
-  int semmns;
-  int semmnu;
-  int semmsl;
-  int semopm;
-  int semume;
-  int semusz;
-  int semvmx;
-  int semaem;
-};
-
-#endif /* __USE_MISC */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
deleted file mode 100644
index a91f1f575b..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_SHM_H
-# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
-#endif
-
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* Permission flag for shmget.  */
-#define SHM_R		0400		/* or S_IRUGO from <linux/stat.h> */
-#define SHM_W		0200		/* or S_IWUGO from <linux/stat.h> */
-
-/* Flags for `shmat'.  */
-#define SHM_RDONLY	010000		/* attach read-only else read-write */
-#define SHM_RND		020000		/* round attach address to SHMLBA */
-#define SHM_REMAP	040000		/* take-over region on attach */
-
-/* Commands for `shmctl'.  */
-#define SHM_LOCK	11		/* lock segment (root only) */
-#define SHM_UNLOCK	12		/* unlock segment (root only) */
-
-/* Segment low boundary address multiple.  */
-#define SHMLBA 0x00400000		/* address needs to be 4 Mb aligned */
-
-/* Type to count number of attaches.  */
-typedef unsigned long int shmatt_t;
-
-/* Data structure describing a set of semaphores.  */
-struct shmid_ds
-  {
-    struct ipc_perm shm_perm;		/* operation permission struct */
-#if __WORDSIZE == 32
-    unsigned int __pad1;
-#endif
-    __time_t shm_atime;			/* time of last shmat() */
-#if __WORDSIZE == 32
-    unsigned int __pad2;
-#endif
-    __time_t shm_dtime;			/* time of last shmdt() */
-#if __WORDSIZE == 32
-    unsigned int __pad3;
-#endif
-    __time_t shm_ctime;			/* time of last change by shmctl() */
-#if __WORDSIZE == 32
-    unsigned int __pad4;
-#endif
-    size_t shm_segsz;			/* size of segment in bytes */
-    __pid_t shm_cpid;			/* pid of creator */
-    __pid_t shm_lpid;			/* pid of last shmop */
-    shmatt_t shm_nattch;		/* number of current attaches */
-    unsigned long int __unused1;
-    unsigned long int __unused2;
-  };
-
-#ifdef __USE_MISC
-
-/* ipcs ctl commands */
-# define SHM_STAT 	13
-# define SHM_INFO 	14
-
-/* shm_mode upper byte flags */
-# define SHM_DEST	01000	/* segment will be destroyed on last detach */
-# define SHM_LOCKED	02000   /* segment will not be swapped */
-# define SHM_HUGETLB	04000	/* segment is mapped via hugetlb */
-# define SHM_NORESERVE	010000	/* don't check for reservations */
-
-struct	shminfo
-  {
-    unsigned long shmmax;
-    unsigned long shmmin;
-    unsigned long shmmni;
-    unsigned long shmseg;
-    unsigned long shmall;
-    unsigned long __unused1;
-    unsigned long __unused2;
-    unsigned long __unused3;
-    unsigned long __unused4;
-  };
-
-struct shm_info
-  {
-    int used_ids;
-    unsigned long int shm_tot;	/* total allocated shm */
-    unsigned long int shm_rss;	/* total resident shm */
-    unsigned long int shm_swp;	/* total swapped shm */
-    unsigned long int swap_attempts;
-    unsigned long int swap_successes;
-  };
-
-#endif /* __USE_MISC */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
deleted file mode 100644
index 33f2b237b7..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Definitions for Linux/HPPA sigaction.
-   Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SIGNAL_H
-# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
-#endif
-
-/* Structure describing the action to be taken when a signal arrives.  */
-struct sigaction
-  {
-    /* Signal handler.  */
-#ifdef __USE_POSIX199309
-    union
-      {
-	/* Used if SA_SIGINFO is not set.  */
-	__sighandler_t sa_handler;
-	/* Used if SA_SIGINFO is set.  */
-	void (*sa_sigaction) (int, siginfo_t *, void *);
-      }
-    __sigaction_handler;
-# define sa_handler	__sigaction_handler.sa_handler
-# define sa_sigaction	__sigaction_handler.sa_sigaction
-#else
-    __sighandler_t sa_handler;
-#endif
-
-    /* Special flags.  */
-    unsigned long int sa_flags;
-
-    /* Additional set of signals to be blocked.  */
-    __sigset_t sa_mask;
-  };
-
-/* Bits in `sa_flags'.  */
-
-#define SA_NOCLDSTOP  0x00000008  /* Don't send SIGCHLD when children stop.  */
-#define SA_NOCLDWAIT  0x00000080  /* Don't create zombie on child death.  */
-#define SA_SIGINFO    0x00000010  /* Invoke signal-catching function with
-				     three arguments instead of one.  */
-#if defined __USE_UNIX98 || defined __USE_MISC
-# define SA_ONSTACK   0x00000001 /* Use signal stack by using `sa_restorer'. */
-# define SA_RESETHAND 0x00000004 /* Reset to SIG_DFL on entry to handler.  */
-# define SA_NODEFER   0x00000020 /* Don't automatically block the signal
-				    when its handler is being executed.  */
-# define SA_RESTART   0x00000040 /* Restart syscall on signal return.  */
-#endif
-#ifdef __USE_MISC
-# define SA_INTERRUPT 0x20000000 /* Historic no-op.  */
-
-/* Some aliases for the SA_ constants.  */
-# define SA_NOMASK    SA_NODEFER
-# define SA_ONESHOT   SA_RESETHAND
-# define SA_STACK     SA_ONSTACK
-#endif
-
-/* Values for the HOW argument to `sigprocmask'.  */
-#define SIG_BLOCK          0	/* for blocking signals */
-#define SIG_UNBLOCK        1	/* for unblocking signals */
-#define SIG_SETMASK        2	/* for setting the signal mask */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
deleted file mode 100644
index bf46006c8d..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Signal number definitions.  Linux/HPPA version.
-   Copyright (C) 1995,1996,1997,1998,1999,2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifdef	_SIGNAL_H
-
-/* Fake signal functions.  */
-#define SIG_ERR	((__sighandler_t) -1)		/* Error return.  */
-#define SIG_DFL	((__sighandler_t) 0)		/* Default action.  */
-#define SIG_IGN	((__sighandler_t) 1)		/* Ignore signal.  */
-
-#ifdef __USE_UNIX98
-# define SIG_HOLD	((__sighandler_t) 2)	/* Add signal to hold mask.  */
-#endif
-
-
-/* Signals.  */
-#define	SIGHUP		1	/* Hangup (POSIX).  */
-#define	SIGINT		2	/* Interrupt (ANSI).  */
-#define	SIGQUIT		3	/* Quit (POSIX).  */
-#define	SIGILL		4	/* Illegal instruction (ANSI).  */
-#define	SIGTRAP		5	/* Trace trap (POSIX).  */
-#define	SIGABRT		6	/* Abort (ANSI).  */
-#define	SIGIOT		6	/* IOT trap (4.2 BSD).  */
-#define	SIGEMT		7
-#define	SIGFPE		8	/* Floating-point exception (ANSI).  */
-#define	SIGKILL		9	/* Kill, unblockable (POSIX).  */
-#define	SIGBUS		10	/* BUS error (4.2 BSD).  */
-#define	SIGSEGV		11	/* Segmentation violation (ANSI).  */
-#define SIGSYS		12	/* Bad system call.  */
-#define	SIGPIPE		13	/* Broken pipe (POSIX).  */
-#define	SIGALRM		14	/* Alarm clock (POSIX).  */
-#define	SIGTERM		15	/* Termination (ANSI).  */
-#define	SIGUSR1		16	/* User-defined signal 1 (POSIX).  */
-#define SIGUSR2		17	/* User-defined signal 2 (POSIX).  */
-#define	SIGCLD		SIGCHLD	/* Same as SIGCHLD (System V).  */
-#define	SIGCHLD		18	/* Child status has changed (POSIX).  */
-#define	SIGPWR		19	/* Power failure restart (System V).  */
-#define	SIGVTALRM	20	/* Virtual alarm clock (4.2 BSD).  */
-#define	SIGPROF		21	/* Profiling alarm clock (4.2 BSD).  */
-#define	SIGPOLL		SIGIO	/* Pollable event occurred (System V).  */
-#define	SIGIO		22	/* I/O now possible (4.2 BSD).  */
-#define	SIGWINCH	23	/* Window size change (4.3 BSD, Sun).  */
-#define	SIGSTOP		24	/* Stop, unblockable (POSIX).  */
-#define	SIGTSTP		25	/* Keyboard stop (POSIX).  */
-#define	SIGCONT		26	/* Continue (POSIX).  */
-#define	SIGTTIN		27	/* Background read from tty (POSIX).  */
-#define	SIGTTOU		28	/* Background write to tty (POSIX).  */
-#define	SIGURG		29	/* Urgent condition on socket (4.2 BSD).  */
-#define SIGLOST		30	/* Operating System Has Lost (HP/UX). */
-#define SIGUNUSED	31
-#define	SIGXCPU		33	/* CPU limit exceeded (4.2 BSD).  */
-#define	SIGXFSZ		34	/* File size limit exceeded (4.2 BSD).  */
-#define	SIGSTKFLT	36	/* Stack fault.  */
-
-#define	_NSIG		65	/* Biggest signal number + 1
-				   (including real-time signals).  */
-
-#define SIGRTMIN        (__libc_current_sigrtmin ())
-#define SIGRTMAX        (__libc_current_sigrtmax ())
-
-/* These are the hard limits of the kernel.  These values should not be
-   used directly at user level.  */
-#define __SIGRTMIN	37
-#define __SIGRTMAX	(_NSIG - 1)
-
-#endif	/* <signal.h> included.  */
diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c
deleted file mode 100644
index a4b4df2831..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/brk.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* brk system call for Linux/HPPA.
-   Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <unistd.h>
-#include <sysdep.h>
-
-/* This must be initialized data because commons can't have aliases.  */
-void *__curbrk = 0;
-
-int
-__brk (void *addr)
-{
-  void *newbrk;
-
-  __curbrk = newbrk = (void *) INLINE_SYSCALL (brk, 1, addr);
-
-  if (newbrk < addr)
-    {
-      __set_errno (ENOMEM);
-      return -1;
-    }
-
-  return 0;
-}
-weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
deleted file mode 100644
index f497bca13d..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
-   Based on the Alpha version by Richard Henderson <rth@tamu.edu>, 1996.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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.  */
-
-/* clone() is even more special than fork() as it mucks with stacks
-   and invokes a function in the right context after its all over.  */
-
-#include <asm/unistd.h>
-#include <sysdep.h>
-#define _ERRNO_H	1
-#include <bits/errno.h>
-
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
-
-        .text
-ENTRY(__clone)
-	/* FIXME: I have no idea how profiling works on hppa. */
-
-	/* Sanity check arguments.  */
-	comib,=  0,%arg0,.Lerror        /* no NULL function pointers */
-	ldi     -EINVAL,%ret0
-	comib,=  0,%arg1,.Lerror        /* no NULL stack pointers */
-	nop
-
-	/* Save the fn ptr and arg on the new stack.  */
-	stwm    %arg0,64(%arg1)
-	stw	%arg3,-60(%arg1)
-
-	/* Save the PIC register. */
-#ifdef PIC
-	stw	%r19,-32(%sr0, %sp)	/* parent */
-#endif
-
-	/* Do the system call */
-	copy	%arg2,%arg0
-	ble     0x100(%sr2,%r0)
-	ldi	__NR_clone,%r20
-
-	ldi	-4096,%r1
-	comclr,>>= %r1,%ret0,%r0	/* Note: unsigned compare. */
-	b,n	.Lerror
-
-	comib,=,n 0,%ret0,thread_start
-
-	/* Successful return from the parent
-	   No need to restore the PIC register, 
-	   since we return immediately. */
-
-	bv	%r0(%rp)
-	nop
-
-	/* Something bad happened -- no child created */
-.Lerror:
-
-	/* Restore the PIC register on error */
-#ifdef PIC
-	ldw	-32(%sr0, %sp), %r19	/* parent */
-#endif
-
-	b	__syscall_error
-	sub     %r0,%ret0,%arg0
-
-thread_start:
-
-	/* Load up the arguments.  */
-	ldw	-60(%sr0, %sp),%arg0
-	ldw     -64(%sr0, %sp),%r22
-
-	/* $$dyncall fixes childs PIC register */
-
-	/* Call the user's function */
-	bl	$$dyncall,%r31
-	copy	%r31,%rp
-
-	bl	_exit,%rp
-	copy	%ret0,%arg0
-
-	/* Die horribly.  */
-	iitlbp	%r0,(%r0)
-
-PSEUDO_END(__clone)
-
-weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/hppa/fcntl.c b/sysdeps/unix/sysv/linux/hppa/fcntl.c
deleted file mode 100644
index ea951bc4f9..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/fcntl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/getdents64.c b/sysdeps/unix/sysv/linux/hppa/getdents64.c
deleted file mode 100644
index 0c75fb5a06..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/getdents64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getdents64.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit64.c b/sysdeps/unix/sysv/linux/hppa/getrlimit64.c
deleted file mode 100644
index fef018f471..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/getrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h b/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h
deleted file mode 100644
index af048cbe7d..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* We have a separate header file here because we do not support
-   SA_RESTORER on hppa. */
-
-/* This is the sigaction struction from the Linux 2.1.20 kernel.  */
-/* Blah.  This is bogus.  We don't ever use it. */
-struct old_kernel_sigaction {
-	__sighandler_t k_sa_handler;
-	unsigned long sa_mask;
-	unsigned long sa_flags;
-};
-
-/* This is the sigaction structure from the Linux 2.1.68 kernel.  */
-
-struct kernel_sigaction {
-	__sighandler_t k_sa_handler;
-	unsigned long sa_flags;
-	sigset_t sa_mask;
-};
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
deleted file mode 100644
index a85c5be464..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* definition of "struct stat" from the kernel */
-struct kernel_stat {
-	unsigned long	st_dev;		/* dev_t is 32 bits on parisc */
-	unsigned long	st_ino;		/* 32 bits */
-	unsigned short	st_mode;	/* 16 bits */
-	unsigned short	st_nlink;	/* 16 bits */
-	unsigned short	st_reserved1;	/* old st_uid */
-	unsigned short	st_reserved2;	/* old st_gid */
-	unsigned long	st_rdev;
-	unsigned long   st_size;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	long		st_blksize;
-	long		st_blocks;
-	unsigned long	__unused1;	/* ACL stuff */
-	unsigned long	__unused2;	/* network */
-	unsigned long	__unused3;	/* network */
-	unsigned long	__unused4;	/* cnodes */
-	unsigned short	__unused5;	/* netsite */
-	short		st_fstype;
-	unsigned long	st_realdev;
-	unsigned short	st_basemode;
-	unsigned short	st_spareshort;
-	unsigned long	st_uid;
-	unsigned long   st_gid;
-	unsigned long	st_spare4[3];
-};
-
-#define _HAVE_STAT_NSEC
-#define _HAVE_STAT64_NSEC
diff --git a/sysdeps/unix/sysv/linux/hppa/mmap.c b/sysdeps/unix/sysv/linux/hppa/mmap.c
deleted file mode 100644
index 6f4bfdce2a..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/mmap.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <errno.h>
-
-/* Map addresses starting near ADDR and extending for LEN bytes.  From
-   OFFSET into the file FD describes according to PROT and FLAGS.  If ADDR
-   is nonzero, it is the desired mapping address.  If the MAP_FIXED bit is
-   set in FLAGS, the mapping will be at ADDR exactly (which must be
-   page-aligned); otherwise the system chooses a convenient nearby address.
-   The return value is the actual mapping address chosen or MAP_FAILED
-   for errors (in which case `errno' is set).  A successful `mmap' call
-   deallocates any previous mapping for the affected region.  */
-
-#include <sysdep.h>
-
-__ptr_t
-__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
-{
-	
-	__ptr_t ret;
-
-	ret = INLINE_SYSCALL(mmap, 6, addr, len, prot, flags, fd, offset);
-
-	/* check if it's really a negative number */
-	if(((unsigned long)ret & 0xfffff000) == 0xfffff000)
-		return MAP_FAILED;
-
-	return ret;
-
-}
-
-strong_alias (__mmap, mmap)
diff --git a/sysdeps/unix/sysv/linux/hppa/profil-counter.h b/sysdeps/unix/sysv/linux/hppa/profil-counter.h
deleted file mode 100644
index b108be8a36..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/profil-counter.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Machine-dependent SIGPROF signal handler.  PA-RISC version
-   Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-static void
-profil_counter (int signr, siginfo_t *si, struct ucontext *uctx)
-{
-  unsigned long ip = uctx->uc_mcontext.sc_iaoq[0] & ~0x3;
-  profil_count ((void *) ip);
-}
diff --git a/sysdeps/unix/sysv/linux/hppa/socket.S b/sysdeps/unix/sysv/linux/hppa/socket.S
deleted file mode 100644
index dfbb721a82..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/socket.S
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <sysdep.h>
-
-	.globl __socket
-PSEUDO(__socket, socket, 3)
-
-PSEUDO_END(__socket)
-
-#ifndef NO_WEAK_ALIAS
-weak_alias (__socket, socket)
-#endif
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
deleted file mode 100644
index 2e6d10956d..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_PROCFS_H
-#define _SYS_PROCFS_H	1
-
-/* This is somewhat modelled after the file of the same name on SVR4
-   systems.  It provides a definition of the core file format for ELF
-   used on Linux.  It doesn't have anything to do with the /proc file
-   system, even though Linux has one.
-
-   Anyway, the whole purpose of this file is for GDB and GDB only.
-   Don't read too much into it.  Don't use it for anything other than
-   GDB unless you know what you are doing.  */
-
-#include <features.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/ucontext.h>
-#include <sys/user.h>
-#include <asm/elf.h>
-
-__BEGIN_DECLS
-
-struct elf_siginfo
-  {
-    int si_signo;			/* Signal number.  */
-    int si_code;			/* Extra code.  */
-    int si_errno;			/* Errno.  */
-  };
-
-/* Definitions to generate Intel SVR4-like core files.  These mostly
-   have the same names as the SVR4 types with "elf_" tacked on the
-   front to prevent clashes with Linux definitions, and the typedef
-   forms have been avoided.  This is mostly like the SVR4 structure,
-   but more Linuxy, with things that Linux does not support and which
-   GDB doesn't really use excluded.  */
-
-struct elf_prstatus
-  {
-    struct elf_siginfo pr_info;		/* Info associated with signal.  */
-    short int pr_cursig;		/* Current signal.  */
-    unsigned long int pr_sigpend;	/* Set of pending signals.  */
-    unsigned long int pr_sighold;	/* Set of held signals.  */
-    __pid_t pr_pid;
-    __pid_t pr_ppid;
-    __pid_t pr_pgrp;
-    __pid_t pr_sid;
-    struct timeval pr_utime;		/* User time.  */
-    struct timeval pr_stime;		/* System time.  */
-    struct timeval pr_cutime;		/* Cumulative user time.  */
-    struct timeval pr_cstime;		/* Cumulative system time.  */
-    elf_gregset_t pr_reg;		/* GP registers.  */
-    int pr_fpvalid;			/* True if math copro being used.  */
-  };
-
-
-#define ELF_PRARGSZ     (80)    /* Number of chars for args.  */
-
-struct elf_prpsinfo
-  {
-    char pr_state;			/* Numeric process state.  */
-    char pr_sname;			/* Char for pr_state.  */
-    char pr_zomb;			/* Zombie.  */
-    char pr_nice;			/* Nice val.  */
-    unsigned long int pr_flag;		/* Flags.  */
-    unsigned int pr_uid;
-    unsigned int pr_gid;
-    int pr_pid, pr_ppid, pr_pgrp, pr_sid;
-    /* Lots missing */
-    char pr_fname[16];			/* Filename of executable.  */
-    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
-  };
-
-
-/* The rest of this file provides the types for emulation of the
-   Solaris <proc_service.h> interfaces that should be implemented by
-   users of libthread_db.  */
-
-/* Addresses.  */
-typedef void *psaddr_t;
-
-/* Register sets.  Linux has different names.  */
-typedef elf_gregset_t prgregset_t;
-typedef elf_fpregset_t prfpregset_t;
-
-/* We don't have any differences between processes and threads,
-   therefore have only one PID type.  */
-typedef __pid_t lwpid_t;
-
-/* Process status and info.  In the end we do provide typedefs for them.  */
-typedef struct elf_prstatus prstatus_t;
-typedef struct elf_prpsinfo prpsinfo_t;
-
-__END_DECLS
-
-#endif	/* sys/procfs.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
deleted file mode 100644
index 1431143849..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Don't rely on this, the interface is currently messed up and may need to
-   be broken to be fixed.  */
-#ifndef _SYS_UCONTEXT_H
-#define _SYS_UCONTEXT_H	1
-
-#include <features.h>
-#include <signal.h>
-
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
-#include <bits/sigcontext.h>
-
-
-/* Type for general register.  */
-typedef unsigned long int greg_t;
-
-/* Number of general registers.  */
-#define NGREG	80
-#define NFPREG	32
-
-/* Container for all general registers.  */
-typedef struct gregset
-  {
-    greg_t g_regs[32];
-    greg_t sr_regs[8];
-    greg_t cr_regs[24];
-    greg_t g_pad[16];
-  } gregset_t;
-
-/* Container for all FPU registers.  */
-typedef struct fpregset
-  {
-    double fp_dregs[32];
-  } fpregset_t;
-
-/* Context to describe whole processor state.  */
-typedef struct sigcontext mcontext_t;
-
-/* Userlevel context.  */
-typedef struct ucontext
-  {
-    unsigned long int uc_flags;
-    struct ucontext *uc_link;
-    stack_t uc_stack;
-    mcontext_t uc_mcontext;
-    __sigset_t uc_sigmask;
-  } ucontext_t;
-
-#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S
deleted file mode 100644
index b333487c99..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/syscall.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 1995, 1996, 1998, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* HPPA implements syscall() in 'C'; see sysdep.c.  */
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
deleted file mode 100644
index 0f7537c306..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ /dev/null
@@ -1,37 +0,0 @@
-# File name	Caller	Syscall name	# args	Strong name	Weak names
-
-# semaphore and shm system calls
-msgctl		-	msgctl		i:iip	__msgctl	msgctl
-msgget		-	msgget		i:ii	__msgget	msgget
-msgrcv		-	msgrcv		Ci:ibnii __msgrcv	msgrcv
-msgsnd		-	msgsnd		Ci:ibni	__msgsnd	msgsnd
-shmat		-	shmat		i:ipi	__shmat		shmat
-shmctl		-	shmctl		i:iip	__shmctl	shmctl
-shmdt		-	shmdt		i:s	__shmdt		shmdt
-shmget		-	shmget		i:iii	__shmget	shmget
-semop		-	semop		i:ipi	__semop		semop
-semtimedop      -       semtimedop      i:ipip  semtimedop
-semget		-	semget		i:iii	__semget	semget
-semctl		-	semctl		i:iiii	__semctl	semctl
-
-# proper socket implementations:
-accept		-	accept		Ci:iBN	__libc_accept	__accept accept
-bind		-	bind		i:ipi	__bind		bind
-connect		-	connect		Ci:ipi	__libc_connect	__connect_internal __connect connect 
-getpeername	-	getpeername	i:ipp	__getpeername	getpeername
-getsockname	-	getsockname	i:ipp	__getsockname	getsockname
-getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
-listen		-	listen		i:ii	__listen	listen
-recv		-	recv		Ci:ibni	__libc_recv	__recv recv
-recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
-send		-	send		Ci:ibni	__libc_send	__send send
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
-sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
-setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
-shutdown	-	shutdown	i:ii	__shutdown	shutdown
-socket		-	socket		i:iii	__socket	socket
-socketpair	-	socketpair	i:iiif	__socketpair	socketpair
-
-setrlimit	-	setrlimit	i:ip	__setrlimit	setrlimit	
-getrlimit	-	getrlimit	i:ip	__getrlimit	getrlimit	
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c
deleted file mode 100644
index 192efbaf75..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sysdep.h>
-#include <errno.h>
-
-extern int __syscall_error(int err_no);
-extern int syscall (int sysnum, int arg0, int arg1, int arg2,
-		    int arg3, int arg4, int arg5);
-
-/* This routine is jumped to by all the syscall handlers, to stash
-   an error number into errno.  */
-int
-__syscall_error (int err_no)
-{
-  __set_errno (err_no);
-  return -1;
-}
-
-
-/* HPPA implements syscall() in 'C'; the assembler version would
-   typically be in syscall.S. Also note that we have INLINE_SYSCALL,
-   INTERNAL_SYSCALL, and all the generated pure assembly syscall wrappers.
-   How often the function is used is unknown. */
-int
-syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4,
-	 int arg5)
-{
-  /* FIXME: Keep this matching INLINE_SYSCALL for hppa */
-  long int __sys_res;
-  {
-    register unsigned long int __res asm("r28");
-    LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5)
-    asm volatile (STW_ASM_PIC
-		  "	ble  0x100(%%sr2, %%r0)	\n"
-		  "	copy %1, %%r20		\n"
-		  LDW_ASM_PIC
-		  : "=r" (__res)
-		  : "r" (sysnum) ASM_ARGS_6
-		  : CALL_CLOB_REGS CLOB_ARGS_6);
-    __sys_res = __res;
-  }
-  if ((unsigned long int) __sys_res >= (unsigned long int) -4095)
-    {
-      __set_errno (-__sys_res);
-      __sys_res = -1;
-    }
-  return __sys_res;
-}
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
deleted file mode 100644
index 4cfe63c556..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ /dev/null
@@ -1,419 +0,0 @@
-/* Assembler macros for PA-RISC.
-   Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
-   Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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 <asm/unistd.h>
-#include <sysdeps/generic/sysdep.h>
-#include <sys/syscall.h>
-#include "config.h"
-
-#ifndef ASM_LINE_SEP
-# define ASM_LINE_SEP ;
-#endif
-
-#undef SYS_ify
-#define SYS_ify(syscall_name)	(__NR_##syscall_name)
-
-#ifdef PIC
-/* WARNING: CANNOT BE USED IN A NOP! */
-# define STW_PIC stw %r19, -32(%sr0, %sp) ASM_LINE_SEP
-# define LDW_PIC ldw -32(%sr0, %sp), %r19 ASM_LINE_SEP
-# define STW_ASM_PIC	"       copy %%r19, %%r4\n"
-# define LDW_ASM_PIC	"       copy %%r4, %%r19\n"
-# define USING_GR4	"%r4",
-#else
-# define STW_PIC ASM_LINE_SEP
-# define LDW_PIC ASM_LINE_SEP
-# define STW_ASM_PIC	" \n"
-# define LDW_ASM_PIC	" \n"
-# define USING_GR4
-#endif
-
-#ifdef __ASSEMBLER__
-
-/* Syntactic details of assembler.  */
-
-#define ALIGNARG(log2) log2
-
-/* For Linux we can use the system call table in the header file
-	/usr/include/asm/unistd.h
-   of the kernel.  But these symbols do not follow the SYS_* syntax
-   so we have to redefine the `SYS_ify' macro here.  */
-#undef SYS_ify
-#define SYS_ify(syscall_name)	__NR_##syscall_name
-
-/* ELF-like local names start with `.L'.  */
-#undef L
-#define L(name)	.L##name
-
-/* Linux uses a negative return value to indicate syscall errors,
-   unlike most Unices, which use the condition codes' carry flag.
-
-   Since version 2.1 the return value of a system call might be
-   negative even if the call succeeded.  E.g., the `lseek' system call
-   might return a large offset.  Therefore we must not anymore test
-   for < 0, but test for a real error by making sure the value in %eax
-   is a real error number.  Linus said he will make sure the no syscall
-   returns a value in -1 .. -4095 as a valid result so we can safely
-   test with -4095.  */
-
-/* We don't want the label for the error handle to be global when we define
-   it here.  */
-#ifdef PIC
-# define SYSCALL_ERROR_LABEL 0f
-#else
-# define SYSCALL_ERROR_LABEL syscall_error
-#endif
-
-/* Define an entry point visible from C.
-
-   There is currently a bug in gdb which prevents us from specifying
-   incomplete stabs information.  Fake some entries here which specify
-   the current source file.  */
-#define	ENTRY(name)						\
-	.text					ASM_LINE_SEP	\
-	.export C_SYMBOL_NAME(name)		ASM_LINE_SEP	\
-	.type	C_SYMBOL_NAME(name),@function	ASM_LINE_SEP	\
-	C_LABEL(name)				ASM_LINE_SEP	\
-	CALL_MCOUNT				ASM_LINE_SEP
-
-#undef	END
-#define END(name)							\
-1:							ASM_LINE_SEP	\
-.size	C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name)	ASM_LINE_SEP
-
-/* If compiled for profiling, call `mcount' at the start of each function.  */
-/* No, don't bother.  gcc will put the call in for us.  */
-#define CALL_MCOUNT		/* Do nothing.  */
-
-/* syscall wrappers consist of
-	#include <sysdep.h>
-	PSEUDO(...)
-	ret
-	PSEUDO_END(...)
-
-   which means
-	ENTRY(name)
-	DO_CALL(...)
-	nop
-	bv 0(2)
-	nop
-*/
-
-#define	PSEUDO(name, syscall_name, args)			\
-  ENTRY (name)							\
-  DO_CALL(syscall_name, args)			ASM_LINE_SEP	\
-  nop						ASM_LINE_SEP
-
-#define ret \
-	/* Return value set by ERRNO code */	ASM_LINE_SEP	\
-	bv 0(2)					ASM_LINE_SEP	\
-	nop					ASM_LINE_SEP
-
-#undef	PSEUDO_END
-#define	PSEUDO_END(name)					\
-  END (name)
-
-/* We don't set the errno on the return from the syscall */
-#define	PSEUDO_NOERRNO(name, syscall_name, args)		\
-  ENTRY (name)							\
-  DO_CALL_NOERRNO(syscall_name, args)		ASM_LINE_SEP	\
-  nop						ASM_LINE_SEP
-
-#define ret_NOERRNO ret
-
-#undef	PSEUDO_END_NOERRNO
-#define	PSEUDO_END_NOERRNO(name)				\
-  END (name)
-
-/* This has to return the error value */
-#undef  PSEUDO_ERRVAL
-#define PSEUDO_ERRVAL(name, syscall_name, args)			\
-	ENTRY(name)						\
-	DO_CALL_ERRVAL(syscall_name, args)	ASM_LINE_SEP	\
-	nop					ASM_LINE_SEP
-
-#define ret_ERRVAL ret
-
-#undef	PSEUDO_END_ERRVAL
-#define PSEUDO_END_ERRVAL(name)					\
-	END(name)
-
-#undef JUMPTARGET
-#define JUMPTARGET(name)	name
-#define SYSCALL_PIC_SETUP	/* Nothing.  */
-
-
-/* All the syscall assembly macros rely on finding the approriate
-   SYSCALL_ERROR_LABEL or rather HANDLER. */
-
-/* int * __errno_location(void) so you have to store your value
-   into the return address! */
-#define DEFAULT_SYSCALL_ERROR_HANDLER 			\
-	.import __errno_location,code	ASM_LINE_SEP	\
-	/* branch to errno handler */	ASM_LINE_SEP	\
-	bl __errno_location,%rp		ASM_LINE_SEP
-
-/* Here are the myriad of configuration options that the above can
-   work for... what we've done is provide the framework for future
-   changes if required to each section */
-
-#ifdef PIC
-# if RTLD_PRIVATE_ERRNO
-#  define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
-# else /* !RTLD_PRIVATE_ERRNO */
-#  if defined _LIBC_REENTRANT
-#   define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
-#  else /* !_LIBC_REENTRANT */
-#   define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
-#  endif /* _LIBC_REENTRANT */
-# endif /* RTLD_PRIVATE_ERRNO */
-#else
-# ifndef _LIBC_REENTRANT
-#  define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
-# else
-#  define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
-# endif
-#endif
-
-
-/* Linux takes system call arguments in registers:
-	syscall number	gr20
-	arg 1		gr26
-	arg 2		gr25
-	arg 3		gr24
-	arg 4		gr23
-	arg 5		gr22
-	arg 6		gr21
-
-   The compiler calls us by the C convention:
-	syscall number	in the DO_CALL macro
-	arg 1		gr26
-	arg 2		gr25
-	arg 3		gr24
-	arg 4		gr23
-	arg 5		-52(gr30)
-	arg 6		-56(gr30)
-
-   gr22 and gr21 are caller-saves, so we can just load the arguments
-   there and generally be happy. */
-
-/* the cmpb...no_error code below inside DO_CALL
- * is intended to mimic the if (__sys_res...)
- * code inside INLINE_SYSCALL
- */
-
-#undef	DO_CALL
-#define DO_CALL(syscall_name, args)				\
-	DOARGS_##args				ASM_LINE_SEP	\
-	STW_PIC					ASM_LINE_SEP	\
-	/* Do syscall, delay loads # */		ASM_LINE_SEP	\
-	ble  0x100(%sr2,%r0)			ASM_LINE_SEP	\
-	ldi SYS_ify (syscall_name), %r20	ASM_LINE_SEP	\
-	ldi -0x1000,%r1				ASM_LINE_SEP	\
-	cmpb,>>=,n %r1,%ret0,0f			ASM_LINE_SEP	\
-	/* save rp or we get lost */		ASM_LINE_SEP	\
-	stw %rp, -20(%sr0,%sp)			ASM_LINE_SEP	\
-	/* Restore r19 from frame */		ASM_LINE_SEP	\
-	LDW_PIC					ASM_LINE_SEP	\
-	stw %ret0, -24(%sr0,%sp)		ASM_LINE_SEP	\
-	SYSCALL_ERROR_HANDLER			ASM_LINE_SEP	\
-	/* create frame */			ASM_LINE_SEP	\
-	ldo 64(%sp), %sp			ASM_LINE_SEP	\
-	ldo -64(%sp), %sp			ASM_LINE_SEP	\
-	/* OPTIMIZE: Don't reload r19 */	ASM_LINE_SEP	\
-	/* do a -1*syscall_ret0 */		ASM_LINE_SEP	\
-	ldw -24(%sr0,%sp), %r26			ASM_LINE_SEP	\
-	sub %r0, %r26, %r26			ASM_LINE_SEP	\
-	/* Store into errno location */		ASM_LINE_SEP	\
-	stw %r26, 0(%sr0,%ret0)			ASM_LINE_SEP	\
-	/* return -1 as error */		ASM_LINE_SEP	\
-	ldo -1(%r0), %ret0			ASM_LINE_SEP	\
-	ldw -20(%sr0,%sp), %rp			ASM_LINE_SEP	\
-0:						ASM_LINE_SEP	\
-	UNDOARGS_##args				ASM_LINE_SEP
-
-/* We do nothing with the return, except hand it back to someone else */
-#undef  DO_CALL_NOERRNO
-#define DO_CALL_NOERRNO(syscall_name, args)			\
-	DOARGS_##args                                           \
-	/* No need to store r19 */		ASM_LINE_SEP	\
-	ble  0x100(%sr2,%r0)                    ASM_LINE_SEP    \
-	ldi SYS_ify (syscall_name), %r20        ASM_LINE_SEP    \
-	/* Caller will restore r19 */		ASM_LINE_SEP	\
-	UNDOARGS_##args
-
-/* Here, we return the ERRVAL in assembly, note we don't call the
-   error handler function, but we do 'negate' the return _IF_
-   it's an error. Not sure if this is the right semantic. */
-
-#undef	DO_CALL_ERRVAL
-#define DO_CALL_ERRVAL(syscall_name, args)			\
-	DOARGS_##args				ASM_LINE_SEP	\
-	/* No need to store r19 */		ASM_LINE_SEP	\
-	ble  0x100(%sr2,%r0)			ASM_LINE_SEP	\
-	ldi SYS_ify (syscall_name), %r20	ASM_LINE_SEP	\
-	/* Caller will restore r19 */		ASM_LINE_SEP	\
-	ldi -0x1000,%r1				ASM_LINE_SEP	\
-	cmpb,>>=,n %r1,%ret0,0f			ASM_LINE_SEP	\
-	sub %r0, %ret0, %ret0			ASM_LINE_SEP	\
-0:						ASM_LINE_SEP	\
-	UNDOARGS_##args				ASM_LINE_SEP
-
-#define DOARGS_0 /* nothing */
-#define DOARGS_1 /* nothing */
-#define DOARGS_2 /* nothing */
-#define DOARGS_3 /* nothing */
-#define DOARGS_4 /* nothing */
-#define DOARGS_5 ldw -52(%r30), %r22		ASM_LINE_SEP
-#define DOARGS_6 ldw -52(%r30), %r22		ASM_LINE_SEP	\
-		 ldw -56(%r30), %r21		ASM_LINE_SEP
-
-
-#define UNDOARGS_0 /* nothing */
-#define UNDOARGS_1 /* nothing */
-#define UNDOARGS_2 /* nothing */
-#define UNDOARGS_3 /* nothing */
-#define UNDOARGS_4 /* nothing */
-#define UNDOARGS_5 /* nothing */
-#define UNDOARGS_6 /* nothing */
-
-#else
-
-/* GCC has to be warned that a syscall may clobber all the ABI
-   registers listed as "caller-saves", see page 8, Table 2
-   in section 2.2.6 of the PA-RISC RUN-TIME architecture
-   document. However! r28 is the result and will conflict with
-   the clobber list so it is left out. Also the input arguments
-   registers r20 -> r26 will conflict with the list so they
-   are treated specially. Although r19 is clobbered by the syscall
-   we cannot say this because it would violate ABI, thus we say
-   r4 is clobbered and use that register to save/restore r19
-   across the syscall. */
-
-#define CALL_CLOB_REGS	"%r1", "%r2", USING_GR4 \
-		 	"%r20", "%r29", "%r31"
-
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...)	({			\
-	long __sys_res;							\
-	{								\
-		register unsigned long __res asm("r28");		\
-		LOAD_ARGS_##nr(args)					\
-		/* FIXME: HACK stw/ldw r19 around syscall */		\
-		asm volatile(						\
-			STW_ASM_PIC					\
-			"	ble  0x100(%%sr2, %%r0)\n"		\
-			"	ldi %1, %%r20\n"			\
-			LDW_ASM_PIC					\
-			: "=r" (__res)					\
-			: "i" (SYS_ify(name)) ASM_ARGS_##nr		\
-			: CALL_CLOB_REGS CLOB_ARGS_##nr			\
-		);							\
-		__sys_res = (long)__res;				\
-	}								\
-	if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){	\
-		__set_errno(-__sys_res);				\
-		__sys_res = -1;						\
-	}								\
-	__sys_res;							\
-})
-
-/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static
-   value to use within the context of the syscall
-   INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise
-   You are allowed to use the syscall result (val) and the DECL error variable
-   to determine what went wrong.
-   INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number.
-   In our case we just flip the sign. */
-
-#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
-
-/* Equivalent to  (val < 0)&&(val > -4095) which is what we want */
-#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) \
-	((unsigned long)val >= (unsigned long)-4095)
-
-#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
-
-/* Similar to INLINE_SYSCALL but we don't set errno */
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) 		\
-({								\
-	long __sys_res;						\
-	{							\
-		register unsigned long __res asm("r28");	\
-		LOAD_ARGS_##nr(args)				\
-		/* FIXME: HACK stw/ldw r19 around syscall */	\
-		asm volatile(					\
-			STW_ASM_PIC				\
-			"	ble  0x100(%%sr2, %%r0)\n"	\
-			"	ldi %1, %%r20\n"		\
-			LDW_ASM_PIC				\
-			: "=r" (__res)				\
-			: "i" (SYS_ify(name)) ASM_ARGS_##nr	\
-			: CALL_CLOB_REGS CLOB_ARGS_##nr		\
-		);						\
-		__sys_res = (long)__res;			\
-	}							\
-	__sys_res;						\
- })
-
-#define LOAD_ARGS_0()
-#define LOAD_ARGS_1(r26)					\
-	register unsigned long __r26 __asm__("r26") = (unsigned long)(r26);   \
-	LOAD_ARGS_0()
-#define LOAD_ARGS_2(r26,r25)					\
-	register unsigned long __r25 __asm__("r25") = (unsigned long)(r25);   \
-	LOAD_ARGS_1(r26)
-#define LOAD_ARGS_3(r26,r25,r24)				\
-	register unsigned long __r24 __asm__("r24") = (unsigned long)(r24);   \
-	LOAD_ARGS_2(r26,r25)
-#define LOAD_ARGS_4(r26,r25,r24,r23)				\
-	register unsigned long __r23 __asm__("r23") = (unsigned long)(r23);   \
-	LOAD_ARGS_3(r26,r25,r24)
-#define LOAD_ARGS_5(r26,r25,r24,r23,r22)			\
-	register unsigned long __r22 __asm__("r22") = (unsigned long)(r22);   \
-	LOAD_ARGS_4(r26,r25,r24,r23)
-#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21)			\
-	register unsigned long __r21 __asm__("r21") = (unsigned long)(r21);   \
-	LOAD_ARGS_5(r26,r25,r24,r23,r22)
-
-/* Even with zero args we use r20 for the syscall number */
-#define ASM_ARGS_0
-#define ASM_ARGS_1 ASM_ARGS_0, "r" (__r26)
-#define ASM_ARGS_2 ASM_ARGS_1, "r" (__r25)
-#define ASM_ARGS_3 ASM_ARGS_2, "r" (__r24)
-#define ASM_ARGS_4 ASM_ARGS_3, "r" (__r23)
-#define ASM_ARGS_5 ASM_ARGS_4, "r" (__r22)
-#define ASM_ARGS_6 ASM_ARGS_5, "r" (__r21)
-
-/* The registers not listed as inputs but clobbered */
-#define CLOB_ARGS_6
-#define CLOB_ARGS_5 CLOB_ARGS_6, "%r21"
-#define CLOB_ARGS_4 CLOB_ARGS_5, "%r22"
-#define CLOB_ARGS_3 CLOB_ARGS_4, "%r23"
-#define CLOB_ARGS_2 CLOB_ARGS_3, "%r24"
-#define CLOB_ARGS_1 CLOB_ARGS_2, "%r25"
-#define CLOB_ARGS_0 CLOB_ARGS_1, "%r26"
-
-#endif	/* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c
deleted file mode 100644
index e7c5690890..0000000000
--- a/sysdeps/unix/sysv/linux/hppa/umount.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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.  */
-
-/* Since we don't have an oldumount system call, do what the kernel
-   does down here.  */
-
-extern long int __umount2 (const char *name, int flags);
-
-long int
-__umount (const char *name)
-{
-  return __umount2 (name, 0);
-}
-
-weak_alias (__umount, umount);
diff --git a/sysdeps/unix/sysv/linux/i386/fchownat.c b/sysdeps/unix/sysv/linux/i386/fchownat.c
index b2bac1913f..e5306db6ee 100644
--- a/sysdeps/unix/sysv/linux/i386/fchownat.c
+++ b/sysdeps/unix/sysv/linux/i386/fchownat.c
@@ -168,11 +168,11 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
 #endif
 
   if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
-    {
-    fail:
-      __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
-      result = -1;
-    }
+    goto fail;
 
   return result;
+
+ fail:
+  __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+  return -1;
 }
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 837a1c14fb..9f3f3965f4 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -21,10 +21,6 @@
 /* This file must not contain any C code.  At least it must be protected
    to allow using the file also in assembler files.  */
 
-#if defined __mips__
-# include <sgidefs.h>
-#endif
-
 #ifndef __LINUX_KERNEL_VERSION
 /* We assume the worst; all kernels should be supported.  */
 # define __LINUX_KERNEL_VERSION	0
@@ -133,7 +129,7 @@
 
 /* Linux 2.3.39 introduced 32bit UID/GIDs.  Some platforms had 32
    bit type all along.  */
-#if __LINUX_KERNEL_VERSION >= 131879 || defined __powerpc__ || defined __mips__
+#if __LINUX_KERNEL_VERSION >= 131879 || defined __powerpc__
 # define __ASSUME_32BITUIDS		1
 #endif
 
@@ -151,11 +147,6 @@
 # define __ASSUME_IPC64		1
 #endif
 
-/* MIPS platforms had IPC64 all along.  */
-#if defined __mips__
-# define __ASSUME_IPC64		1
-#endif
-
 /* We can use the LDTs for threading with Linux 2.3.99 and newer.  */
 #if __LINUX_KERNEL_VERSION >= 131939
 # define __ASSUME_LDT_WORKS		1
@@ -292,15 +283,16 @@
 # define __ASSUME_TIMEVAL64		1
 #endif
 
-#if defined __mips__ && _MIPS_SIM == _ABIN32
-# define __ASSUME_FCNTL64		1
-#endif
-
 /* The late 2.5 kernels saw a lot of new CLONE_* flags.  Summarize
    their availability with one define.  The changes were made first
    for i386 and the have to be done separately for the other archs.
-   For i386 we pick 2.5.50 as the first version with support.  */
-#if __LINUX_KERNEL_VERSION >= 132402 && defined __i386__
+   For i386 we pick 2.5.50 as the first version with support.
+   For ia64, s390*, PPC, x86-64, and SH we pick 2.5.64 as the first
+   version with support.  */
+#if ((__LINUX_KERNEL_VERSION >= 132402 && defined __i386__)		\
+     || (__LINUX_KERNEL_VERSION >= 132416				\
+	 && (defined __ia64__ || defined __s390__			\
+	     || defined __powerpc__ || defined __x86_64__ || defined __sh__)))
 # define __ASSUME_CLONE_THREAD_FLAGS	1
 #endif
 
@@ -324,17 +316,6 @@
 # define __ASSUME_POSIX_CPU_TIMERS	1
 #endif
 
-/* The late 2.5 kernels saw a lot of new CLONE_* flags.  Summarize
-   their availability with one define.  The changes were made first
-   for i386 and the have to be done separately for the other archs.
-   For ia64, s390*, PPC, x86-64 we pick 2.5.64 as the first version
-   with support.  */
-#if __LINUX_KERNEL_VERSION >= 132416 \
-    && (defined __ia64__ || defined __s390__ || defined __powerpc__ \
-	|| defined __x86_64__ || defined __sh__)
-# define __ASSUME_CLONE_THREAD_FLAGS	1
-#endif
-
 /* With kernel 2.4.17 we always have netlink support.  */
 #if __LINUX_KERNEL_VERSION >= (132096+17)
 # define __ASSUME_NETLINK_SUPPORT	1
diff --git a/sysdeps/unix/sysv/linux/linkat.c b/sysdeps/unix/sysv/linux/linkat.c
index 5485b3f61c..cfd0e18223 100644
--- a/sysdeps/unix/sysv/linux/linkat.c
+++ b/sysdeps/unix/sysv/linux/linkat.c
@@ -28,11 +28,12 @@
 /* Make a link to FROM named TO but relative paths in TO and FROM are
    interpreted relative to FROMFD and TOFD respectively.  */
 int
-linkat (fromfd, from, tofd, to)
+linkat (fromfd, from, tofd, to, flags)
      int fromfd;
      const char *from;
      int tofd;
      const char *to;
+     int flags;
 {
   int result;
 
@@ -41,7 +42,7 @@ linkat (fromfd, from, tofd, to)
   if (__have_atfcts >= 0)
 # endif
     {
-      result = INLINE_SYSCALL (linkat, 4, fromfd, from, tofd, to);
+      result = INLINE_SYSCALL (linkat, 5, fromfd, from, tofd, to, flags);
 # ifndef __ASSUME_ATFCTS
       if (result == -1 && errno == ENOSYS)
 	__have_atfcts = -1;
@@ -52,6 +53,13 @@ linkat (fromfd, from, tofd, to)
 #endif
 
 #ifndef __ASSUME_ATFCTS
+  /* Without kernel support we cannot handle AT_SYMLINK_FOLLOW.  */
+  if (flags != 0)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
   static const char procfd[] = "/proc/self/fd/%d/%s";
   char *buffrom = NULL;
 
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
deleted file mode 100644
index 6bb4f6b816..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-# Linux/m68k uses Motorola asm syntax and the ELF format.
-
-m68k-syntax-flag = -DMOTOROLA_SYNTAX
-
-ifeq ($(subdir),misc)
-sysdep_routines += mremap
-sysdep_headers += sys/reg.h
-endif
-
-ifeq ($(subdir),elf)
-sysdep-others += lddlibc4
-install-bin += lddlibc4
-endif
-
-ifeq ($(subdir),resource)
-sysdep_routines += oldgetrlimit64
-endif
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
deleted file mode 100644
index 0799bf310e..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/Versions
+++ /dev/null
@@ -1,32 +0,0 @@
-libc {
-  GLIBC_2.0 {
-    # Exception handling support functions from libgcc
-    __register_frame; __register_frame_table; __deregister_frame;
-    __frame_state_for; __register_frame_info_table;
-
-    # c*
-    cacheflush;
-  }
-  GLIBC_2.2 {
-    # functions used in other libraries
-    __xstat64; __fxstat64; __lxstat64;
-
-    # a*
-    alphasort64;
-
-    # g*
-    glob64;
-
-    # New rlimit interface
-    getrlimit; setrlimit; getrlimit64;
-
-    # r*
-    readdir64; readdir64_r;
-
-    # s*
-    scandir64;
-
-    # v*
-    versionsort64;
-  }
-}
diff --git a/sysdeps/unix/sysv/linux/m68k/alphasort64.c b/sysdeps/unix/sysv/linux/m68k/alphasort64.c
deleted file mode 100644
index 0b5ae47d2f..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/alphasort64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/alphasort64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/a.out.h b/sysdeps/unix/sysv/linux/m68k/bits/a.out.h
deleted file mode 100644
index 0fb52c3815..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/bits/a.out.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef __A_OUT_GNU_H__
-# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
-#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
deleted file mode 100644
index 90c0a481e4..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 2000, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef	_FCNTL_H
-# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
-#endif
-
-
-#include <sys/types.h>
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
-   located on an ext2 file system */
-#define O_ACCMODE	   0003
-#define O_RDONLY	     00
-#define O_WRONLY	     01
-#define O_RDWR		     02
-#define O_CREAT		   0100	/* not fcntl */
-#define O_EXCL		   0200	/* not fcntl */
-#define O_NOCTTY	   0400	/* not fcntl */
-#define O_TRUNC		  01000	/* not fcntl */
-#define O_APPEND	  02000
-#define O_NONBLOCK	  04000
-#define O_NDELAY	O_NONBLOCK
-#define O_SYNC		 010000
-#define O_FSYNC		 O_SYNC
-#define O_ASYNC		 020000
-
-#ifdef __USE_GNU
-# define O_DIRECTORY	 040000	/* Must be a directory.	 */
-# define O_NOFOLLOW	0100000	/* Do not follow links.	 */
-# define O_DIRECT	0200000	/* Direct disk access.	*/
-# define O_NOATIME	01000000 /* Do not set atime.  */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
-   We define the symbols here but let them do the same as O_SYNC since
-   this is a superset.	*/
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	O_SYNC	/* Synchronize data.  */
-# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE	0400000
-#endif
-
-/* Values for the second argument to `fcntl'.  */
-#define F_DUPFD		0	/* Duplicate file descriptor.  */
-#define F_GETFD		1	/* Get file descriptor flags.  */
-#define F_SETFD		2	/* Set file descriptor flags.  */
-#define F_GETFL		3	/* Get file status flags.  */
-#define F_SETFL		4	/* Set file status flags.  */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK	5	/* Get record locking info.  */
-# define F_SETLK	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).	*/
-#else
-# define F_GETLK	F_GETLK64  /* Get record locking info.	*/
-# define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
-# define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
-#endif
-#define F_GETLK64	12	/* Get record locking info.  */
-#define F_SETLK64	13	/* Set record locking info (non-blocking).  */
-#define F_SETLKW64	14	/* Set record locking info (blocking).	*/
-
-#if defined __USE_BSD || defined __USE_UNIX98
-# define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
-# define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG	10	/* Set number of signal to be sent.  */
-# define F_GETSIG	11	/* Get number of signal to be sent.  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE	1024	/* Set a lease.	 */
-# define F_GETLEASE	1025	/* Enquire what lease is active.  */
-# define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-#endif
-
-/* For F_[GET|SET]FL.  */
-#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
-#define F_RDLCK		0	/* Read lock.  */
-#define F_WRLCK		1	/* Write lock.	*/
-#define F_UNLCK		2	/* Remove lock.	 */
-
-/* For old implementation of bsd flock().  */
-#define F_EXLCK		4	/* or 3 */
-#define F_SHLCK		8	/* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation.	*/
-# define LOCK_SH	1	/* shared lock */
-# define LOCK_EX	2	/* exclusive lock */
-# define LOCK_NB	4	/* or'd with one of the above to prevent
-				   blocking */
-# define LOCK_UN	8	/* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND	32	/* This is a mandatory flock:	*/
-# define LOCK_READ	64	/* ... which allows concurrent read operations.	 */
-# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
-# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.	 */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY.  */
-# define DN_ACCESS	0x00000001	/* File accessed.  */
-# define DN_MODIFY	0x00000002	/* File modified.  */
-# define DN_CREATE	0x00000004	/* File created.  */
-# define DN_DELETE	0x00000008	/* File removed.  */
-# define DN_RENAME	0x00000010	/* File renamed.  */
-# define DN_ATTRIB	0x00000020	/* File changed attibutes.  */
-# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
-#endif
-
-struct flock
-  {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
-    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
-#ifndef __USE_FILE_OFFSET64
-    __off_t l_start;	/* Offset where the lock begins.  */
-    __off_t l_len;	/* Size of the locked area; zero means until EOF.  */
-#else
-    __off64_t l_start;	/* Offset where the lock begins.  */
-    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
-#endif
-    __pid_t l_pid;	/* Process holding the lock.  */
-  };
-
-#ifdef __USE_LARGEFILE64
-struct flock64
-  {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
-    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
-    __off64_t l_start;	/* Offset where the lock begins.  */
-    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
-    __pid_t l_pid;	/* Process holding the lock.  */
-  };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
-   BSD systems which did not managed to hide these kernel macros.  */
-#ifdef	__USE_BSD
-# define FAPPEND	O_APPEND
-# define FFSYNC		O_FSYNC
-# define FASYNC		O_ASYNC
-# define FNONBLOCK	O_NONBLOCK
-# define FNDELAY	O_NDELAY
-#endif /* Use BSD.  */
-
-/* Advise to `posix_fadvise'.  */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
-# define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
-# define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
-# define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
-# define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
-#endif
-
-__BEGIN_DECLS
-
-/* Provide kernel hint to read ahead.  */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-    __THROW;
-
-__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
deleted file mode 100644
index fbec1a03f8..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Definitions for POSIX memory map interface.  Linux/m68k version.
-   Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_MMAN_H
-# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
-#endif
-
-/* The following definitions basically come from the kernel headers.
-   But the kernel header is not namespace clean.  */
-
-
-/* Protections are chosen from these bits, OR'd together.  The
-   implementation does not necessarily support PROT_EXEC or PROT_WRITE
-   without PROT_READ.  The only guarantees are that no writing will be
-   allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ	0x1		/* Page can be read.  */
-#define PROT_WRITE	0x2		/* Page can be written.  */
-#define PROT_EXEC	0x4		/* Page can be executed.  */
-#define PROT_NONE	0x0		/* Page can not be accessed.  */
-#define PROT_GROWSDOWN	0x01000000	/* Extend change to start of
-					   growsdown vma (mprotect only).  */
-#define PROT_GROWSUP	0x02000000	/* Extend change to start of
-					   growsup vma (mprotect only).  */
-
-/* Sharing types (must choose one and only one of these).  */
-#define MAP_SHARED	0x01		/* Share changes.  */
-#define MAP_PRIVATE	0x02		/* Changes are private.  */
-#ifdef __USE_MISC
-# define MAP_TYPE	0x0f		/* Mask for type of mapping.  */
-#endif
-
-/* Other flags.  */
-#define MAP_FIXED	0x10		/* Interpret addr exactly.  */
-#ifdef __USE_MISC
-# define MAP_FILE	0
-# define MAP_ANONYMOUS	0x20		/* Don't use a file.  */
-# define MAP_ANON	MAP_ANONYMOUS
-#endif
-
-/* These are Linux-specific.  */
-#ifdef __USE_MISC
-# define MAP_GROWSDOWN	0x00100		/* Stack-like segment.  */
-# define MAP_DENYWRITE	0x00800		/* ETXTBSY */
-# define MAP_EXECUTABLE	0x01000		/* Mark it as an executable.  */
-# define MAP_LOCKED	0x02000		/* Lock the mapping.  */
-# define MAP_NORESERVE	0x04000		/* Don't check for reservations.  */
-# define MAP_POPULATE	0x08000		/* Populate (prefault) pagetables.  */
-# define MAP_NONBLOCK	0x10000		/* Do not block on IO.  */
-#endif
-
-/* Flags to `msync'.  */
-#define MS_ASYNC	1		/* Sync memory asynchronously.  */
-#define MS_SYNC		4		/* Synchronous memory sync.  */
-#define MS_INVALIDATE	2		/* Invalidate the caches.  */
-
-/* Flags for `mlockall'.  */
-#define MCL_CURRENT	1		/* Lock all currently mapped pages.  */
-#define MCL_FUTURE	2		/* Lock all additions to address
-					   space.  */
-
-/* Flags for `mremap'.  */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE	1
-# define MREMAP_FIXED	2
-#endif
-
-/* Advice to `madvise'.  */
-#ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
-#endif
-
-/* The POSIX people had to invent similar names for the same things.  */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL	0 /* No further special treatment.  */
-# define POSIX_MADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_MADV_SEQUENTIAL	2 /* Expect sequential page references.  */
-# define POSIX_MADV_WILLNEED	3 /* Will need these pages.  */
-# define POSIX_MADV_DONTNEED	4 /* Don't need these pages.  */
-#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
deleted file mode 100644
index f7a7393154..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_POLL_H
-# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
-#endif
-
-/* Event types that can be polled for.  These bits may be set in `events'
-   to indicate the interesting event types; they will appear in `revents'
-   to indicate the status of the file descriptor.  */
-#define POLLIN		0x001		/* There is data to read.  */
-#define POLLPRI		0x002		/* There is urgent data to read.  */
-#define POLLOUT		0x004		/* Writing now will not block.  */
-
-#ifdef __USE_XOPEN
-/* These values are defined in XPG4.2.  */
-# define POLLRDNORM	0x040		/* Normal data may be read.  */
-# define POLLRDBAND	0x080		/* Priority data may be read.  */
-# define POLLWRNORM	POLLOUT		/* Writing now will not block.  */
-# define POLLWRBAND	0x100		/* Priority data may be written.  */
-#endif
-
-/* Event types always implicitly polled for.  These bits need not be set in
-   `events', but they will appear in `revents' to indicate the status of
-   the file descriptor.  */
-#define POLLERR		0x008		/* Error condition.  */
-#define POLLHUP		0x010		/* Hung up.  */
-#define POLLNVAL	0x020		/* Invalid polling request.  */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
deleted file mode 100644
index dc06b13e2f..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002
-     Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_STAT_H
-# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
-#endif
-
-/* Versions of the `struct stat' data structure.  */
-#define _STAT_VER_LINUX_OLD	1
-#define _STAT_VER_KERNEL	1
-#define _STAT_VER_SVR4		2
-#define _STAT_VER_LINUX		3
-#define _STAT_VER		_STAT_VER_LINUX	/* The one defined below.  */
-
-/* Versions of the `xmknod' interface.  */
-#define _MKNOD_VER_LINUX	1
-#define _MKNOD_VER_SVR4		2
-#define _MKNOD_VER		_MKNOD_VER_LINUX /* The bits defined below.  */
-
-
-struct stat
-  {
-    __dev_t st_dev;			/* Device.  */
-    unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
-    __ino_t st_ino;			/* File serial number.	*/
-#else
-    __ino_t __st_ino;			/* 32bit file serial number.	*/
-#endif
-    __mode_t st_mode;			/* File mode.  */
-    __nlink_t st_nlink;			/* Link count.  */
-    __uid_t st_uid;			/* User ID of the file's owner.	*/
-    __gid_t st_gid;			/* Group ID of the file's group.*/
-    __dev_t st_rdev;			/* Device number, if device.  */
-    unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
-    __off_t st_size;			/* Size of file, in bytes.  */
-#else
-    __off64_t st_size;			/* Size of file, in bytes.  */
-#endif
-    __blksize_t st_blksize;		/* Optimal block size for I/O.  */
-
-#ifndef __USE_FILE_OFFSET64
-    __blkcnt_t st_blocks;		/* Number 512-byte blocks allocated. */
-#else
-    __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_MISC
-    /* Nanosecond resolution timestamps are stored in a format
-       equivalent to 'struct timespec'.  This is the type used
-       whenever possible but the Unix namespace rules do not allow the
-       identifier 'timespec' to appear in the <sys/stat.h> header.
-       Therefore we have to handle the use of this header in strictly
-       standard-compliant sources special.  */
-    struct timespec st_atim;		/* Time of last access.  */
-    struct timespec st_mtim;		/* Time of last modification.  */
-    struct timespec st_ctim;		/* Time of last status change.  */
-# define st_atime st_atim.tv_sec	/* Backward compatibility.  */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
-    __time_t st_atime;			/* Time of last access.  */
-    unsigned long int st_atimensec;	/* Nscecs of last access.  */
-    __time_t st_mtime;			/* Time of last modification.  */
-    unsigned long int st_mtimensec;	/* Nsecs of last modification.  */
-    __time_t st_ctime;			/* Time of last status change.  */
-    unsigned long int st_ctimensec;	/* Nsecs of last status change.  */
-#endif
-#ifndef __USE_FILE_OFFSET64
-    unsigned long int __unused4;
-    unsigned long int __unused5;
-#else
-    __ino64_t st_ino;			/* File serial number.	*/
-#endif
-  };
-
-#ifdef __USE_LARGEFILE64
-struct stat64
-  {
-    __dev_t st_dev;			/* Device.  */
-    unsigned short int __pad1;
-
-    __ino_t __st_ino;			/* 32bit file serial number.	*/
-    __mode_t st_mode;			/* File mode.  */
-    __nlink_t st_nlink;			/* Link count.  */
-    __uid_t st_uid;			/* User ID of the file's owner.	*/
-    __gid_t st_gid;			/* Group ID of the file's group.*/
-    __dev_t st_rdev;			/* Device number, if device.  */
-    unsigned short int __pad2;
-    __off64_t st_size;			/* Size of file, in bytes.  */
-    __blksize_t st_blksize;		/* Optimal block size for I/O.  */
-
-    __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
-    /* Nanosecond resolution timestamps are stored in a format
-       equivalent to 'struct timespec'.  This is the type used
-       whenever possible but the Unix namespace rules do not allow the
-       identifier 'timespec' to appear in the <sys/stat.h> header.
-       Therefore we have to handle the use of this header in strictly
-       standard-compliant sources special.  */
-    struct timespec st_atim;		/* Time of last access.  */
-    struct timespec st_mtim;		/* Time of last modification.  */
-    struct timespec st_ctim;		/* Time of last status change.  */
-#else
-    __time_t st_atime;			/* Time of last access.  */
-    unsigned long int st_atimensec;	/* Nscecs of last access.  */
-    __time_t st_mtime;			/* Time of last modification.  */
-    unsigned long int st_mtimensec;	/* Nsecs of last modification.  */
-    __time_t st_ctime;			/* Time of last status change.  */
-    unsigned long int st_ctimensec;	/* Nsecs of last status change.  */
-#endif
-    __ino64_t st_ino;			/* File serial number.		*/
-  };
-#endif
-
-/* Tell code we have these members.  */
-#define	_STATBUF_ST_BLKSIZE
-#define _STATBUF_ST_RDEV
-/* Nanosecond resolution time values are supported.  */
-#define _STATBUF_ST_NSEC
-
-/* Encoding of the file mode.  */
-
-#define	__S_IFMT	0170000	/* These bits determine file type.  */
-
-/* File types.  */
-#define	__S_IFDIR	0040000	/* Directory.  */
-#define	__S_IFCHR	0020000	/* Character device.  */
-#define	__S_IFBLK	0060000	/* Block device.  */
-#define	__S_IFREG	0100000	/* Regular file.  */
-#define	__S_IFIFO	0010000	/* FIFO.  */
-#define	__S_IFLNK	0120000	/* Symbolic link.  */
-#define	__S_IFSOCK	0140000	/* Socket.  */
-
-/* POSIX.1b objects.  Note that these macros always evaluate to zero.  But
-   they do it by enforcing the correct use of the macros.  */
-#define __S_TYPEISMQ(buf)  ((buf)->st_mode - (buf)->st_mode)
-#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
-#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
-
-/* Protection bits.  */
-
-#define	__S_ISUID	04000	/* Set user ID on execution.  */
-#define	__S_ISGID	02000	/* Set group ID on execution.  */
-#define	__S_ISVTX	01000	/* Save swapped text after use (sticky).  */
-#define	__S_IREAD	0400	/* Read by owner.  */
-#define	__S_IWRITE	0200	/* Write by owner.  */
-#define	__S_IEXEC	0100	/* Execute by owner.  */
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
deleted file mode 100644
index 6b2c92852d..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* brk system call for Linux/m68k.
-   Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <unistd.h>
-#include <sysdep.h>
-
-void *__curbrk = 0;
-
-/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
-   to work around different old braindamage in the old Linux/x86 ELF
-   dynamic linker.  Sigh.  */
-weak_alias (__curbrk, ___brk_addr)
-
-int
-__brk (void *addr)
-{
-  void *newbrk;
-
-  INTERNAL_SYSCALL_DECL (err);
-  newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
-  __curbrk = newbrk;
-
-  if (newbrk < addr)
-    {
-      __set_errno (ENOMEM);
-      return -1;
-    }
-
-  return 0;
-}
-weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
deleted file mode 100644
index e7193dc23b..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (C) 1998,2000,2002,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., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include <linux/posix_types.h>
-#include <kernel-features.h>
-
-#ifdef __NR_chown32
-# if __ASSUME_32BITUIDS == 0
-/* This variable is shared with all files that need to check for 32bit
-   uids.  */
-extern int __libc_missing_32bit_uids;
-# endif
-#endif /* __NR_chown32 */
-
-int
-__chown (const char *file, uid_t owner, gid_t group)
-{
-#if __ASSUME_32BITUIDS > 0
-  return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
-#else
-# ifdef __NR_chown32
-  if (__libc_missing_32bit_uids <= 0)
-    {
-      int result;
-      int saved_errno = errno;
-
-      result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
-      if (result == 0 || errno != ENOSYS)
-	return result;
-
-      __set_errno (saved_errno);
-      __libc_missing_32bit_uids = 1;
-    }
-# endif /* __NR_chown32 */
-
-  if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U))
-      || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group);
-#endif
-}
-libc_hidden_def (__chown)
-weak_alias (__chown, chown)
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
deleted file mode 100644
index 6baf723d9b..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (C) 1996,97,98,2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
-
-   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.  */
-
-/* clone is even more special than fork as it mucks with stacks
-   and invokes a function in the right context after its all over.  */
-
-#include <sysdep.h>
-#define _ERRNO_H	1
-#include <bits/errno.h>
-
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
-
-        .text
-ENTRY (__clone)
-
-	/* Sanity check arguments.  */
-	movel	#-EINVAL, %d0
-	movel	4(%sp), %a0		/* no NULL function pointers */
-	tstl	%a0
-	jeq	SYSCALL_ERROR_LABEL
-	movel	8(%sp), %a1		/* no NULL stack pointers */
-	tstl	%a1
-	jeq	SYSCALL_ERROR_LABEL
-
-	/* Allocate space and copy the argument onto the new stack.  */
-	movel	16(%sp), -(%a1)
-
-	/* Do the system call */
-	exg	%d2, %a1		/* save %d2 and get stack pointer */
-	movel	12(%sp), %d1		/* get flags */
-	movel	#SYS_ify (clone), %d0
-	trap	#0
-	exg	%d2, %a1		/* restore %d2 */
-
-	tstl	%d0
-	jmi	SYSCALL_ERROR_LABEL
-	jeq	thread_start
-
-	rts
-
-thread_start:
-	subl	%fp, %fp	/* terminate the stack frame */
-	jsr	(%a0)
-	movel	%d0, %d1
-	movel	#SYS_ify (exit), %d0
-	trap	#0
-
-PSEUDO_END (__clone)
-
-weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/m68k/dl-librecon.h b/sysdeps/unix/sysv/linux/m68k/dl-librecon.h
deleted file mode 100644
index dbb4e75712..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/dl-librecon.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/dl-librecon.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/fchown.c b/sysdeps/unix/sysv/linux/m68k/fchown.c
deleted file mode 100644
index 3a69ecc9e7..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/fchown.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fchown.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c
deleted file mode 100644
index 6cc093222d..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/fchownat.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include <linux/posix_types.h>
-#include <kernel-features.h>
-
-#ifdef __NR_chown32
-# if __ASSUME_32BITUIDS == 0
-/* This variable is shared with all files that need to check for 32bit
-   uids.  */
-extern int __libc_missing_32bit_uids;
-# endif
-#endif /* __NR_chown32 */
-
-int
-fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
-{
-  if (flag & ~AT_SYMLINK_NOFOLLOW)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  char *buf = NULL;
-
-  if (fd != AT_FDCWD && file[0] != '/')
-    {
-      size_t filelen = strlen (file);
-      static const char procfd[] = "/proc/self/fd/%d/%s";
-      /* Buffer for the path name we are going to use.  It consists of
-	 - the string /proc/self/fd/
-	 - the file descriptor number
-	 - the file name provided.
-	 The final NUL is included in the sizeof.   A bit of overhead
-	 due to the format elements compensates for possible negative
-	 numbers.  */
-      size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen;
-      buf = alloca (buflen);
-
-      __snprintf (buf, buflen, procfd, fd, file);
-      file = buf;
-    }
-
-  int result;
-  INTERNAL_SYSCALL_DECL (err);
-
-#if __ASSUME_32BITUIDS > 0
-  if (flag & AT_SYMLINK_NOFOLLOW)
-    result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner,
-			       group);
-  else
-    result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
-			       group);
-#else
-# ifdef __NR_chown32
-  if (__libc_missing_32bit_uids <= 0)
-    {
-      if (flag & AT_SYMLINK_NOFOLLOW)
-	result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file),
-				   owner, group);
-      else
-	result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
-				   group);
-
-      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-	return result;
-      if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS)
-	goto fail;
-
-      __libc_missing_32bit_uids = 1;
-    }
-# endif /* __NR_chown32 */
-
-  if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U))
-      || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  if (flag & AT_SYMLINK_NOFOLLOW)
-    result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner,
-			       group);
-  else
-    result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner,
-			       group);
-#endif
-
-  if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
-    {
-    fail:
-      __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
-      result = -1;
-    }
-
-  return result;
-}
diff --git a/sysdeps/unix/sysv/linux/m68k/fcntl.c b/sysdeps/unix/sysv/linux/m68k/fcntl.c
deleted file mode 100644
index ea951bc4f9..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/fcntl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/fxstat.c b/sysdeps/unix/sysv/linux/m68k/fxstat.c
deleted file mode 100644
index 4f219f0b9d..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/fxstat.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fxstat.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/fxstatat.c b/sysdeps/unix/sysv/linux/m68k/fxstatat.c
deleted file mode 100644
index 0f8b3135d8..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/fxstatat.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fxstatat.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getdents64.c b/sysdeps/unix/sysv/linux/m68k/getdents64.c
deleted file mode 100644
index 0c75fb5a06..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getdents64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getdents64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getegid.c b/sysdeps/unix/sysv/linux/m68k/getegid.c
deleted file mode 100644
index 37b4b4a530..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getegid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getegid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/geteuid.c b/sysdeps/unix/sysv/linux/m68k/geteuid.c
deleted file mode 100644
index ebcb555b5e..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/geteuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getgid.c b/sysdeps/unix/sysv/linux/m68k/getgid.c
deleted file mode 100644
index 0a4d6061f0..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getgroups.c b/sysdeps/unix/sysv/linux/m68k/getgroups.c
deleted file mode 100644
index 102ea24e14..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getgroups.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We also have to rewrite the kernel gid_t to the user land type.  */
-#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getmsg.c b/sysdeps/unix/sysv/linux/m68k/getmsg.c
deleted file mode 100644
index 3a1fa08525..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getmsg.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getmsg.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
deleted file mode 100644
index f7ffdc5185..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Schwab <schwab@suse.de>.
-
-   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 <unistd.h>
-#include <sys/param.h>
-#include <errno.h>
-
-#include <ldsodefs.h>
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Return the system page size.  */
-int
-__getpagesize ()
-{
-#ifdef __NR_getpagesize
-  int result;
-#endif
-
-  if (GLRO(dl_pagesize) != 0)
-    return GLRO(dl_pagesize);
-
-#ifdef __NR_getpagesize
-  INTERNAL_SYSCALL_DECL (err);
-  result = INTERNAL_SYSCALL (getpagesize, err, 0);
-  /* The only possible error is ENOSYS.  */
-  if (!INTERNAL_SYSCALL_ERROR_P (result, err))
-    return result;
-#endif
-
-  return 4096;
-}
-libc_hidden_def (__getpagesize)
-weak_alias (__getpagesize, getpagesize)
diff --git a/sysdeps/unix/sysv/linux/m68k/getresgid.c b/sysdeps/unix/sysv/linux/m68k/getresgid.c
deleted file mode 100644
index b703a414cc..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getresgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getresuid.c b/sysdeps/unix/sysv/linux/m68k/getresuid.c
deleted file mode 100644
index 0b14cefe34..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getresuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit.c b/sysdeps/unix/sysv/linux/m68k/getrlimit.c
deleted file mode 100644
index fc06dbd641..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit64.c b/sysdeps/unix/sysv/linux/m68k/getrlimit64.c
deleted file mode 100644
index fef018f471..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getsysstats.c b/sysdeps/unix/sysv/linux/m68k/getsysstats.c
deleted file mode 100644
index 23207e9bcb..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getsysstats.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Determine various system internal values, Linux/m68k version.
-   Copyright (C) 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Schwab <schwab@suse.de>
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-
-/* We need to define a special parser for /proc/cpuinfo.  */
-#define GET_NPROCS_PARSER(FP, BUFFER, RESULT)				  \
-  do									  \
-    {									  \
-      (RESULT) = 0;							  \
-      /* Read all lines and count the lines starting with the string	  \
-	 "CPU:".  We don't have to fear extremely long lines since	  \
-	 the kernel will not generate them.  8192 bytes are really	  \
-	 enough.  */							  \
-      while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL)	  \
-	if (strncmp (BUFFER, "CPU:", 4) == 0)	      	     		  \
-	  ++(RESULT);							  \
-    }									  \
-  while (0)
-
-#include <sysdeps/unix/sysv/linux/getsysstats.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getuid.c b/sysdeps/unix/sysv/linux/m68k/getuid.c
deleted file mode 100644
index d682c79a49..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/getuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/glob64.c b/sysdeps/unix/sysv/linux/m68k/glob64.c
deleted file mode 100644
index 82a9a296a7..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/glob64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/glob64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/lchown.c b/sysdeps/unix/sysv/linux/m68k/lchown.c
deleted file mode 100644
index c89de99ba2..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/lchown.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/lchown.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/ldconfig.h b/sysdeps/unix/sysv/linux/m68k/ldconfig.h
deleted file mode 100644
index 953f192bcd..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/ldconfig.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/ldconfig.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/lockf64.c b/sysdeps/unix/sysv/linux/m68k/lockf64.c
deleted file mode 100644
index a88f5a784a..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/lockf64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/lxstat.c b/sysdeps/unix/sysv/linux/m68k/lxstat.c
deleted file mode 100644
index 2371cd9719..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/lxstat.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/lxstat.c>
-
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
deleted file mode 100644
index 086212a42b..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software 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>
-
-	.text
-ENTRY (__mmap)
-
-	move.l #SYS_ify (mmap), %d0	/* System call number in %d0.  */
-
-	lea 4(%sp), %a0			/* Address of args is 1st arg.  */
-	move.l %a0, %d1
-
-	/* Do the system call trap.  */
-	trap #0
-
-	/* Kludge: negative numbers are among the legal return values.
-	   If %d0 is between -4096 and 0 then there was an error.  */
-	cmp.l #-4096, %d0
-	jhi SYSCALL_ERROR_LABEL
-
-	/* Successful; return the syscall's value.  Copy it to %a0 because
-	   mmap is declared to return a pointer.  */
-	move.l %d0, %a0
-	rts
-PSEUDO_END (__mmap)
-
-weak_alias (__mmap, mmap)
diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S
deleted file mode 100644
index 68d961b553..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/mremap.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sysdep.h>
-
-/* The mremap system call is special because it needs to return
-   its value in register %a0.  */
-
-	.text
-PSEUDO (__mremap, mremap, 4)
-	move.l %d0, %a0
-	rts
-PSEUDO_END (__mremap)
-weak_alias (__mremap, mremap)
diff --git a/sysdeps/unix/sysv/linux/m68k/msgctl.c b/sysdeps/unix/sysv/linux/m68k/msgctl.c
deleted file mode 100644
index 9f9b8431a3..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/msgctl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/msgctl.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c
deleted file mode 100644
index 4c27e957bf..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/putmsg.c b/sysdeps/unix/sysv/linux/m68k/putmsg.c
deleted file mode 100644
index ebc1680ca7..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/putmsg.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/putmsg.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64.c b/sysdeps/unix/sysv/linux/m68k/readdir64.c
deleted file mode 100644
index 2ea26dd409..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/readdir64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/readdir64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64_r.c b/sysdeps/unix/sysv/linux/m68k/readdir64_r.c
deleted file mode 100644
index 9f54f897e3..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/readdir64_r.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/readdir64_r.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h
deleted file mode 100644
index a7ac3ca01c..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/register-dump.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/* Dump registers.
-   Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Schwab <schwab@gnu.org>.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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 <stddef.h>
-#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
-
-/* We will print the register dump in this format:
-
-  D0: XXXXXXXX   D1: XXXXXXXX   D2: XXXXXXXX   D3: XXXXXXXX
-  D4: XXXXXXXX   D5: XXXXXXXX   D6: XXXXXXXX   D7: XXXXXXXX
-  A0: XXXXXXXX   A1: XXXXXXXX   A2: XXXXXXXX   A3: XXXXXXXX
-  A4: XXXXXXXX   A5: XXXXXXXX   A6: XXXXXXXX   A7: XXXXXXXX
-  PC: XXXXXXXX   SR: XXXX
-
-  OldMask: XXXXXXXX  Vector: XXXX
-
-  FP0: XXXXXXXXXXXXXXXXXXXXXXXX   FP1: XXXXXXXXXXXXXXXXXXXXXXXX
-  FP2: XXXXXXXXXXXXXXXXXXXXXXXX   FP3: XXXXXXXXXXXXXXXXXXXXXXXX
-  FP4: XXXXXXXXXXXXXXXXXXXXXXXX   FP5: XXXXXXXXXXXXXXXXXXXXXXXX
-  FP6: XXXXXXXXXXXXXXXXXXXXXXXX   FP7: XXXXXXXXXXXXXXXXXXXXXXXX
-  FPCR: XXXXXXXX   FPSR: XXXXXXXX   FPIAR: XXXXXXXX
-
-*/
-
-/* Linux saves only the call-clobbered registers in the sigcontext.  We
-   need to use a trampoline that saves the rest so that the C code can
-   access them.  We use the sc_fpstate field, since the handler is not
-   supposed to return anyway, thus it doesn't matter that it's clobbered.  */
-
-/* static */ void catch_segfault (int, int, struct sigcontext *);
-
-/* Dummy function so that we can use asm with arguments.  */
-static void __attribute_used__
-__dummy__ (void)
-{
-  asm ("\n\
-catch_segfault:\n\
-	move.l 12(%%sp),%%a0\n\
-	lea %c0(%%a0),%%a0\n\
-	/* Clear the first 4 bytes to make it a null fp state, just\n\
-	   in case the handler does return.  */\n\
-	clr.l (%%a0)+\n\
-	movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\
-	fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\
-	jra real_catch_segfault"
-       : : "n" (offsetof (struct sigcontext, sc_fpstate)));
-}
-#define catch_segfault(a,b) \
-  __attribute_used__ real_catch_segfault(a,b)
-
-static void
-hexvalue (unsigned long int value, char *buf, size_t len)
-{
-  char *cp = _itoa_word (value, buf + len, 16, 0);
-  while (cp > buf)
-    *--cp = '0';
-}
-
-static void
-register_dump (int fd, struct sigcontext *ctx)
-{
-  char regs[20][8];
-  char fpregs[11][24];
-  struct iovec iov[63], *next_iov = iov;
-  unsigned long *p = (unsigned long *) ctx->sc_fpstate + 1;
-
-#define ADD_STRING(str) \
-  next_iov->iov_base = (char *) (str); \
-  next_iov->iov_len = strlen (str); \
-  ++next_iov
-#define ADD_MEM(str, len) \
-  next_iov->iov_base = (str); \
-  next_iov->iov_len = (len); \
-  ++next_iov
-
-  /* Generate strings of register contents.  */
-  hexvalue (ctx->sc_d0, regs[0], 8);
-  hexvalue (ctx->sc_d1, regs[1], 8);
-  hexvalue (*p++, regs[2], 8);
-  hexvalue (*p++, regs[3], 8);
-  hexvalue (*p++, regs[4], 8);
-  hexvalue (*p++, regs[5], 8);
-  hexvalue (*p++, regs[6], 8);
-  hexvalue (*p++, regs[7], 8);
-  hexvalue (ctx->sc_a0, regs[8], 8);
-  hexvalue (ctx->sc_a1, regs[9], 8);
-  hexvalue (*p++, regs[10], 8);
-  hexvalue (*p++, regs[11], 8);
-  hexvalue (*p++, regs[12], 8);
-  hexvalue (*p++, regs[13], 8);
-  hexvalue (*p++, regs[14], 8);
-  hexvalue (ctx->sc_usp, regs[15], 8);
-  hexvalue (ctx->sc_pc, regs[16], 8);
-  hexvalue (ctx->sc_sr, regs[17], 4);
-  hexvalue (ctx->sc_mask, regs[18], 8);
-  hexvalue (ctx->sc_formatvec & 0xfff, regs[19], 4);
-  hexvalue (ctx->sc_fpregs[0], fpregs[0], 8);
-  hexvalue (ctx->sc_fpregs[1], fpregs[0] + 8, 8);
-  hexvalue (ctx->sc_fpregs[2], fpregs[0] + 16, 8);
-  hexvalue (ctx->sc_fpregs[3], fpregs[1], 8);
-  hexvalue (ctx->sc_fpregs[4], fpregs[1] + 8, 8);
-  hexvalue (ctx->sc_fpregs[5], fpregs[1] + 16, 8);
-  hexvalue (*p++, fpregs[2], 8);
-  hexvalue (*p++, fpregs[2] + 8, 8);
-  hexvalue (*p++, fpregs[2] + 16, 8);
-  hexvalue (*p++, fpregs[3], 8);
-  hexvalue (*p++, fpregs[3] + 8, 8);
-  hexvalue (*p++, fpregs[3] + 16, 8);
-  hexvalue (*p++, fpregs[4], 8);
-  hexvalue (*p++, fpregs[4] + 8, 8);
-  hexvalue (*p++, fpregs[4] + 16, 8);
-  hexvalue (*p++, fpregs[5], 8);
-  hexvalue (*p++, fpregs[5] + 8, 8);
-  hexvalue (*p++, fpregs[5] + 16, 8);
-  hexvalue (*p++, fpregs[6], 8);
-  hexvalue (*p++, fpregs[6] + 8, 8);
-  hexvalue (*p++, fpregs[6] + 16, 8);
-  hexvalue (*p++, fpregs[7], 8);
-  hexvalue (*p++, fpregs[7] + 8, 8);
-  hexvalue (*p++, fpregs[7] + 16, 8);
-  hexvalue (ctx->sc_fpcntl[0], fpregs[8], 8);
-  hexvalue (ctx->sc_fpcntl[1], fpregs[9], 8);
-  hexvalue (ctx->sc_fpcntl[2], fpregs[10], 8);
-
-  /* Generate the output.  */
-  ADD_STRING ("Register dump:\n\n  D0: ");
-  ADD_MEM (regs[0], 8);
-  ADD_STRING ("  D1: ");
-  ADD_MEM (regs[1], 8);
-  ADD_STRING ("  D2: ");
-  ADD_MEM (regs[2], 8);
-  ADD_STRING ("  D3: ");
-  ADD_MEM (regs[3], 8);
-  ADD_STRING ("\n  D4: ");
-  ADD_MEM (regs[4], 8);
-  ADD_STRING ("  D5: ");
-  ADD_MEM (regs[5], 8);
-  ADD_STRING ("  D6: ");
-  ADD_MEM (regs[6], 8);
-  ADD_STRING ("  D7: ");
-  ADD_MEM (regs[7], 8);
-  ADD_STRING ("\n  A0: ");
-  ADD_MEM (regs[8], 8);
-  ADD_STRING ("  A1: ");
-  ADD_MEM (regs[9], 8);
-  ADD_STRING ("  A2: ");
-  ADD_MEM (regs[10], 8);
-  ADD_STRING ("  A3: ");
-  ADD_MEM (regs[11], 8);
-  ADD_STRING ("\n  A4: ");
-  ADD_MEM (regs[12], 8);
-  ADD_STRING ("  A5: ");
-  ADD_MEM (regs[13], 8);
-  ADD_STRING ("  A6: ");
-  ADD_MEM (regs[14], 8);
-  ADD_STRING ("  A7: ");
-  ADD_MEM (regs[15], 8);
-  ADD_STRING ("\n  PC: ");
-  ADD_MEM (regs[16], 8);
-  ADD_STRING ("  SR: ");
-  ADD_MEM (regs[17], 4);
-
-  ADD_STRING ("\n\n  OldMask: ");
-  ADD_MEM (regs[18], 8);
-  ADD_STRING ("  Vector: ");
-  ADD_MEM (regs[19], 4);
-
-  ADD_STRING ("\n\n  FP0: ");
-  ADD_MEM (fpregs[0], 24);
-  ADD_STRING ("  FP1: ");
-  ADD_MEM (fpregs[1], 24);
-  ADD_STRING ("\n  FP2: ");
-  ADD_MEM (fpregs[2], 24);
-  ADD_STRING ("  FP3: ");
-  ADD_MEM (fpregs[3], 24);
-  ADD_STRING ("\n  FP4: ");
-  ADD_MEM (fpregs[4], 24);
-  ADD_STRING ("  FP5: ");
-  ADD_MEM (fpregs[5], 24);
-  ADD_STRING ("\n  FP6: ");
-  ADD_MEM (fpregs[6], 24);
-  ADD_STRING ("  FP7: ");
-  ADD_MEM (fpregs[7], 24);
-  ADD_STRING ("\n  FPCR: ");
-  ADD_MEM (fpregs[8], 8);
-  ADD_STRING ("  FPSR: ");
-  ADD_MEM (fpregs[9], 8);
-  ADD_STRING ("  FPIAR: ");
-  ADD_MEM (fpregs[10], 8);
-  ADD_STRING ("\n");
-
-  /* Write the stuff out.  */
-  writev (fd, iov, next_iov - iov);
-}
-
-#define REGISTER_DUMP register_dump (fd, ctx)
diff --git a/sysdeps/unix/sysv/linux/m68k/scandir64.c b/sysdeps/unix/sysv/linux/m68k/scandir64.c
deleted file mode 100644
index 506fd8877c..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/scandir64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/scandir64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/semctl.c b/sysdeps/unix/sysv/linux/m68k/semctl.c
deleted file mode 100644
index e9b1a483c9..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/semctl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/semctl.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/semtimedop.S b/sysdeps/unix/sysv/linux/m68k/semtimedop.S
deleted file mode 100644
index 2775c124c6..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/semtimedop.S
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Schwab <schwab@suse.de>, 2003.
-
-   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>
-
-#define SYSOP_semtimedop 4
-
-#define SVRSP	8		/* saved register space */
-#define PARMS	4+SVRSP		/* space for 3 saved regs */
-#define SEMID	PARMS
-#define SOPS	SEMID+4
-#define NSOPS	SOPS+4
-#define TIMEOUT	NSOPS+4
-
-	.text
-ENTRY (semtimedop)
-
-	/* Save registers.  */
-	move.l	%d2, %a1
-	move.l	%d3, -(%sp)
-	move.l	%d5, -(%sp)
-
-	move.l	#SYSOP_semtimedop, %d1
-	move.l	SEMID(%sp), %d2
-	move.l	NSOPS(%sp), %d3
-	move.l	SOPS(%sp), %d5
-	move.l	TIMEOUT(%sp), %a0
-	move.l	#SYS_ify (ipc), %d0
-
-	trap	#0
-
-	/* Restore registers.  */
-	move.l	(%sp)+, %d5
-	move.l	(%sp)+, %d3
-	move.l	%a1, %d2
-
-	/* Check for error.  */
-	tst.l	%d0
-	jmi	SYSCALL_ERROR_LABEL
-
-	/* Successful; return the syscall's value.  */
-	ret
-
-PSEUDO_END (semtimedop)
diff --git a/sysdeps/unix/sysv/linux/m68k/setegid.c b/sysdeps/unix/sysv/linux/m68k/setegid.c
deleted file mode 100644
index 2e3a54c893..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setegid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setegid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/seteuid.c b/sysdeps/unix/sysv/linux/m68k/seteuid.c
deleted file mode 100644
index 18e41d08c1..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/seteuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/seteuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setfsgid.c b/sysdeps/unix/sysv/linux/m68k/setfsgid.c
deleted file mode 100644
index 0886712569..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setfsgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setfsgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setfsuid.c b/sysdeps/unix/sysv/linux/m68k/setfsuid.c
deleted file mode 100644
index a9f22eb8ab..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setfsuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setfsuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setgid.c b/sysdeps/unix/sysv/linux/m68k/setgid.c
deleted file mode 100644
index 377021d9ec..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setgroups.c b/sysdeps/unix/sysv/linux/m68k/setgroups.c
deleted file mode 100644
index 0e7086278f..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setgroups.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We also have to rewrite the kernel gid_t to the user land type.  */
-#include <sysdeps/unix/sysv/linux/i386/setgroups.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setregid.c b/sysdeps/unix/sysv/linux/m68k/setregid.c
deleted file mode 100644
index 99c57ad20f..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setregid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setregid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setresgid.c b/sysdeps/unix/sysv/linux/m68k/setresgid.c
deleted file mode 100644
index daca1a4833..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setresgid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setresgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setresuid.c b/sysdeps/unix/sysv/linux/m68k/setresuid.c
deleted file mode 100644
index 3aeabe9ad7..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setresuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setresuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setreuid.c b/sysdeps/unix/sysv/linux/m68k/setreuid.c
deleted file mode 100644
index 8ad61226e9..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setreuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setrlimit.c b/sysdeps/unix/sysv/linux/m68k/setrlimit.c
deleted file mode 100644
index bfaef74c38..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setuid.c b/sysdeps/unix/sysv/linux/m68k/setuid.c
deleted file mode 100644
index de394379be..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/setuid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/shmctl.c b/sysdeps/unix/sysv/linux/m68k/shmctl.c
deleted file mode 100644
index 7eac6380dd..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/shmctl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/shmctl.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
deleted file mode 100644
index b7e08cfc95..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>, 1998.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#define SIGCONTEXT int _code, struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS _code,
-#define GET_PC(ctx)	((void *) (ctx)->sc_pc)
-#define GET_FRAME(ctx)	((void *) __builtin_frame_address (1))
-#define GET_STACK(ctx)	((void *) (ctx)->sc_usp)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
deleted file mode 100644
index 1d10f33e17..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software 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-cancel.h>
-#include <socketcall.h>
-
-#define P(a, b) P2(a, b)
-#define P2(a, b) a##b
-
-	.text
-/* The socket-oriented system calls are handled unusally in Linux.
-   They are all gated through the single `socketcall' system call number.
-   `socketcall' takes two arguments: the first is the subcode, specifying
-   which socket function is being called; and the second is a pointer to
-   the arguments to the specific function.
-
-   The .S files for the other calls just #define socket and #include this.  */
-
-#ifndef __socket
-#ifndef NO_WEAK_ALIAS
-#define __socket P(__,socket)
-#else
-#define __socket socket
-#endif
-#endif
-
-.globl __socket
-ENTRY (__socket)
-#if defined NEED_CANCELLATION && defined CENABLE
-	SINGLE_THREAD_P
-	jne 1f
-#endif
-
-	/* Save registers.  */
-	move.l %d2, %a0
-
-	move.l #SYS_ify (socketcall), %d0 /* System call number in %d0.  */
-
-	/* Use ## so `socket' is a separate token that might be #define'd.  */
-	move.l #P (SOCKOP_,socket), %d1	/* Subcode is first arg to syscall.  */
-	lea 4(%sp), %a1			/* Address of args is 2nd arg.  */
-	move.l %a1, %d2
-
-	/* Do the system call trap.  */
-	trap #0
-
-	/* Restore registers.  */
-	move.l %a0, %d2
-
-	/* %d0 is < 0 if there was an error.  */
-	tst.l %d0
-	jmi SYSCALL_ERROR_LABEL
-
-	/* Successful; return the syscall's value.  */
-	rts
-
-#if defined NEED_CANCELLATION && defined CENABLE
-1:	/* Enable asynchronous cancellation.  */
-	CENABLE
-
-	/* Save registers.  */
-	move.l %d2, -(%sp)
-	move.l %d0, -(%sp)
-
-	move.l #SYS_ify (socketcall), %d0 /* System call number in %d0.  */
-
-	/* Use ## so `socket' is a separate token that might be #define'd.  */
-	move.l #P (SOCKOP_,socket), %d1	/* Subcode is first arg to syscall.  */
-	lea 4+8(%sp), %a1		/* Address of args is 2nd arg.  */
-	move.l %a1, %d2
-
-	/* Do the system call trap.  */
-	trap #0
-
-	/* Restore cancellation.  */
-	move.l %d0, %d2
-	CDISABLE
-	addq.l #4, %sp
-	move.l %d2, %d0
-
-	/* Restore registers.  */
-	move.l (%sp)+, %d2
-
-	/* %d0 is < 0 if there was an error.  */
-	tst.l %d0
-	jmi SYSCALL_ERROR_LABEL
-
-	/* Successful; return the syscall's value.  */
-	rts
-#endif
-	
-PSEUDO_END (__socket)
-
-#ifndef NO_WEAK_ALIAS
-weak_alias (__socket, socket)
-#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h b/sysdeps/unix/sysv/linux/m68k/sys/procfs.h
deleted file mode 100644
index 27abf8ef52..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_PROCFS_H
-#define _SYS_PROCFS_H	1
-
-/* This is somewhat modelled after the file of the same name on SVR4
-   systems.  It provides a definition of the core file format for ELF
-   used on Linux.  It doesn't have anything to do with the /proc file
-   system, even though Linux has one.
-
-   Anyway, the whole purpose of this file is for GDB and GDB only.
-   Don't read too much into it.  Don't use it for anything other than
-   GDB unless you know what you are doing.  */
-
-#include <features.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/user.h>
-
-__BEGIN_DECLS
-
-/* Type for a general-purpose register.  */
-typedef unsigned long elf_greg_t;
-
-/* And the whole bunch of them.  We could have used `struct
-   user_regs_struct' directly in the typedef, but tradition says that
-   the register set is an array, which does have some peculiar
-   semantics, so leave it that way.  */
-#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-/* Register set for the floating-point registers.  */
-typedef struct user_m68kfp_struct elf_fpregset_t;
-
-
-/* Signal info.  */
-struct elf_siginfo
-  {
-    int si_signo;			/* Signal number.  */
-    int si_code;			/* Extra code.  */
-    int si_errno;			/* Errno.  */
-  };
-
-
-/* Definitions to generate Intel SVR4-like core files.  These mostly
-   have the same names as the SVR4 types with "elf_" tacked on the
-   front to prevent clashes with Linux definitions, and the typedef
-   forms have been avoided.  This is mostly like the SVR4 structure,
-   but more Linuxy, with things that Linux does not support and which
-   GDB doesn't really use excluded.  */
-
-struct elf_prstatus
-  {
-    struct elf_siginfo pr_info;		/* Info associated with signal.  */
-    short int pr_cursig;		/* Current signal.  */
-    unsigned long int pr_sigpend;	/* Set of pending signals.  */
-    unsigned long int pr_sighold;	/* Set of held signals.  */
-    __pid_t pr_pid;
-    __pid_t pr_ppid;
-    __pid_t pr_pgrp;
-    __pid_t pr_sid;
-    struct timeval pr_utime;		/* User time.  */
-    struct timeval pr_stime;		/* System time.  */
-    struct timeval pr_cutime;		/* Cumulative user time.  */
-    struct timeval pr_cstime;		/* Cumulative system time.  */
-    elf_gregset_t pr_reg;		/* GP registers.  */
-    int pr_fpvalid;			/* True if math copro being used.  */
-  };
-
-
-#define ELF_PRARGSZ     (80)    /* Number of chars for args.  */
-
-struct elf_prpsinfo
-  {
-    char pr_state;			/* Numeric process state.  */
-    char pr_sname;			/* Char for pr_state.  */
-    char pr_zomb;			/* Zombie.  */
-    char pr_nice;			/* Nice val.  */
-    unsigned long int pr_flag;		/* Flags.  */
-    unsigned short int pr_uid;
-    unsigned short int pr_gid;
-    int pr_pid, pr_ppid, pr_pgrp, pr_sid;
-    /* Lots missing */
-    char pr_fname[16];			/* Filename of executable.  */
-    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
-  };
-
-
-/* The rest of this file provides the types for emulation of the
-   Solaris <proc_service.h> interfaces that should be implemented by
-   users of libthread_db.  */
-
-/* Addresses.  */
-typedef void *psaddr_t;
-
-/* Register sets.  Linux has different names.  */
-typedef elf_gregset_t prgregset_t;
-typedef elf_fpregset_t prfpregset_t;
-
-/* We don't have any differences between processes and threads,
-   therefore have only one PID type.  */
-typedef __pid_t lwpid_t;
-
-/* Process status and info.  In the end we do provide typedefs for them.  */
-typedef struct elf_prstatus prstatus_t;
-typedef struct elf_prpsinfo prpsinfo_t;
-
-__END_DECLS
-
-#endif	/* sys/procfs.h */
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h
deleted file mode 100644
index 418f8323f1..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/sys/reg.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Copyright (C) 1998 Free Software 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 _SYS_REG_H
-#define _SYS_REG_H	1
-
-/* Index into an array of 4 byte integers returned from ptrace for
-   location of the users' stored general purpose registers. */
-
-enum
-{
-  PT_D1 = 0,
-#define PT_D1 PT_D1
-  PT_D2 = 1,
-#define PT_D2 PT_D2
-  PT_D3 = 2,
-#define PT_D3 PT_D3
-  PT_D4 = 3,
-#define PT_D4 PT_D4
-  PT_D5 = 4,
-#define PT_D5 PT_D5
-  PT_D6 = 5,
-#define PT_D6 PT_D6
-  PT_D7 = 6,
-#define PT_D7 PT_D7
-  PT_A0 = 7,
-#define PT_A0 PT_A0
-  PT_A1 = 8,
-#define PT_A1 PT_A1
-  PT_A2 = 9,
-#define PT_A2 PT_A2
-  PT_A3 = 10,
-#define PT_A3 PT_A3
-  PT_A4 = 11,
-#define PT_A4 PT_A4
-  PT_A5 = 12,
-#define PT_A5 PT_A5
-  PT_A6 = 13,
-#define PT_A6 PT_A6
-  PT_D0 = 14,
-#define PT_D0 PT_D0
-  PT_USP = 15,
-#define PT_USP PT_USP
-  PT_ORIG_D0 = 16,
-#define PT_ORIG_D0 PT_ORIG_D0
-  PT_SR = 17,
-#define PT_SR PT_SR
-  PT_PC = 18,
-#define PT_PC PT_PC
-  PT_FP0 = 21,
-#define PT_FP0 PT_FP0
-  PT_FP1 = 24,
-#define PT_FP1 PT_FP1
-  PT_FP2 = 27,
-#define PT_FP2 PT_FP2
-  PT_FP3 = 30,
-#define PT_FP3 PT_FP3
-  PT_FP4 = 33,
-#define PT_FP4 PT_FP4
-  PT_FP5 = 36,
-#define PT_FP5 PT_FP5
-  PT_FP6 = 39,
-#define PT_FP6 PT_FP6
-  PT_FP7 = 42,
-#define PT_FP7 PT_FP7
-  PT_FPCR = 45,
-#define PT_FPCR PT_FPCR
-  PT_FPSR = 46,
-#define PT_FPSR PT_FPSR
-  PT_FPIAR = 47
-#define PT_FPIAR PT_FPIAR
-};
-
-#endif	/* _SYS_REG_H */
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
deleted file mode 100644
index 3c441dc5ce..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* System V/m68k ABI compliant context switching support.  */
-
-#ifndef _SYS_UCONTEXT_H
-#define _SYS_UCONTEXT_H	1
-
-#include <features.h>
-#include <signal.h>
-
-/* Type for general register.  */
-typedef int greg_t;
-
-/* Number of general registers.  */
-#define NGREG	18
-
-/* Container for all general registers.  */
-typedef greg_t gregset_t[NGREG];
-
-/* Number of each register is the `gregset_t' array.  */
-enum
-{
-  R_D0 = 0,
-#define R_D0	R_D0
-  R_D1 = 1,
-#define R_D1	R_D1
-  R_D2 = 2,
-#define R_D2	R_D2
-  R_D3 = 3,
-#define R_D3	R_D3
-  R_D4 = 4,
-#define R_D4	R_D4
-  R_D5 = 5,
-#define R_D5	R_D5
-  R_D6 = 6,
-#define R_D6	R_D6
-  R_D7 = 7,
-#define R_D7	R_D7
-  R_A0 = 8,
-#define R_A0	R_A0
-  R_A1 = 9,
-#define R_A1	R_A1
-  R_A2 = 10,
-#define R_A2	R_A2
-  R_A3 = 11,
-#define R_A3	R_A3
-  R_A4 = 12,
-#define R_A4	R_A4
-  R_A5 = 13,
-#define R_A5	R_A5
-  R_A6 = 14,
-#define R_A6	R_A6
-  R_A7 = 15,
-#define R_A7	R_A7
-  R_SP = 15,
-#define R_SP	R_SP
-  R_PC = 16,
-#define R_PC	R_PC
-  R_PS = 17
-#define R_PS	R_PS
-};
-
-/* Structure to describe FPU registers.  */
-typedef struct fpregset
-{
-  int f_fpregs[8][3];
-  int f_pcr;
-  int f_psr;
-  int f_fpiaddr;
-} fpregset_t;
-
-/* Context to describe whole processor state.  */
-typedef struct
-{
-  int version;
-  gregset_t gregs;
-  fpregset_t fpregs;
-} mcontext_t;
-
-#define MCONTEXT_VERSION 2
-
-/* Userlevel context.  */
-typedef struct ucontext
-{
-  unsigned long int uc_flags;
-  struct ucontext *uc_link;
-  __sigset_t uc_sigmask;
-  stack_t uc_stack;
-  mcontext_t uc_mcontext;
-  long int uc_filler[174];
-} ucontext_t;
-
-#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S
deleted file mode 100644
index 4f2c747c27..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/syscall.S
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 1996, 1998 Free Software 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>
-
-/* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for
-   more information about the value -4095 used below.*/
-
-	.text
-ENTRY (syscall)
-	move.l 4(%sp), %d0	/* Load syscall number.  */
-	_DOARGS_5 (24)		/* Frob arguments.  */
-	trap &0			/* Do the system call.  */
-	UNDOARGS_5		/* Unfrob arguments.  */
-	cmp.l &-4095, %d0	/* Check %d0 for error.  */
-	jcc SYSCALL_ERROR_LABEL	/* Jump to error handler if negative.  */
-	rts			/* Return to caller.  */
-PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
deleted file mode 100644
index 98d30667bd..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ /dev/null
@@ -1,5 +0,0 @@
-# File name	Caller	Syscall name	Args	Strong name	Weak names
-
-cacheflush	EXTRA	cacheflush	i:iiii	__cacheflush	cacheflush
-oldgetrlimit	EXTRA	getrlimit	i:ip	__old_getrlimit	getrlimit@GLIBC_2.0
-oldsetrlimit	EXTRA	setrlimit	i:ip	__old_setrlimit	setrlimit@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
deleted file mode 100644
index e4ec92d836..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sysdep.h>
-
-
-/* The following code is only used in the shared library when we
-   compile the reentrant version.  Otherwise each system call defines
-   each own version.  */
-
-#ifndef	PIC
-
-/* The syscall stubs jump here when they detect an error.  */
-
-#undef CALL_MCOUNT
-#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %d0.  */
-
-	.text
-ENTRY (__syscall_error)
-	neg.l %d0
-#ifndef _LIBC_REENTRANT
-	move.l %d0, errno
-#else
-	move.l %d0, -(%sp)
-	jbsr __errno_location
-	move.l (%sp)+, (%a0)
-#endif
-	move.l #-1, %d0
-	/* Copy return value to %a0 for syscalls that are declared to
-	   return a pointer.  */
-	move.l %d0, %a0
-	rts
-END (__syscall_error)
-#endif /* PIC */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
deleted file mode 100644
index 091dfc9c7d..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ /dev/null
@@ -1,295 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
-   December 1995.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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/unix/sysdep.h>
-#include <sysdeps/m68k/sysdep.h>
-
-/* Defines RTLD_PRIVATE_ERRNO.  */
-#include <dl-sysdep.h>
-
-/* For Linux we can use the system call table in the header file
-	/usr/include/asm/unistd.h
-   of the kernel.  But these symbols do not follow the SYS_* syntax
-   so we have to redefine the `SYS_ify' macro here.  */
-#undef SYS_ify
-#ifdef __STDC__
-# define SYS_ify(syscall_name)	__NR_##syscall_name
-#else
-# define SYS_ify(syscall_name)	__NR_/**/syscall_name
-#endif
-
-#ifdef __ASSEMBLER__
-
-/* Linux uses a negative return value to indicate syscall errors, unlike
-   most Unices, which use the condition codes' carry flag.
-
-   Since version 2.1 the return value of a system call might be negative
-   even if the call succeeded.  E.g., the `lseek' system call might return
-   a large offset.  Therefore we must not anymore test for < 0, but test
-   for a real error by making sure the value in %d0 is a real error
-   number.  Linus said he will make sure the no syscall returns a value
-   in -1 .. -4095 as a valid result so we can savely test with -4095.  */
-
-/* We don't want the label for the error handler to be visible in the symbol
-   table when we define it here.  */
-#ifdef PIC
-#define SYSCALL_ERROR_LABEL .Lsyscall_error
-#else
-#define SYSCALL_ERROR_LABEL __syscall_error
-#endif
-
-#undef PSEUDO
-#define	PSEUDO(name, syscall_name, args)				      \
-  .text;								      \
-  ENTRY (name)								      \
-    DO_CALL (syscall_name, args);					      \
-    cmp.l &-4095, %d0;							      \
-    jcc SYSCALL_ERROR_LABEL
-
-#undef PSEUDO_END
-#define PSEUDO_END(name)						      \
-  SYSCALL_ERROR_HANDLER;						      \
-  END (name)
-
-#undef PSEUDO_NOERRNO
-#define	PSEUDO_NOERRNO(name, syscall_name, args)			      \
-  .text;								      \
-  ENTRY (name)								      \
-    DO_CALL (syscall_name, args)
-
-#undef PSEUDO_END_NOERRNO
-#define PSEUDO_END_NOERRNO(name)					      \
-  END (name)
-
-#define ret_NOERRNO rts
-
-/* The function has to return the error code.  */
-#undef	PSEUDO_ERRVAL
-#define	PSEUDO_ERRVAL(name, syscall_name, args) \
-  .text;								      \
-  ENTRY (name)								      \
-    DO_CALL (syscall_name, args);					      \
-    negl %d0
-
-#undef	PSEUDO_END_ERRVAL
-#define	PSEUDO_END_ERRVAL(name) \
-  END (name)
-
-#define ret_ERRVAL rts
-
-#ifdef PIC
-# if RTLD_PRIVATE_ERRNO
-#  define SYSCALL_ERROR_HANDLER						      \
-SYSCALL_ERROR_LABEL:							      \
-    lea (rtld_errno, %pc), %a0;					      	      \
-    neg.l %d0;								      \
-    move.l %d0, (%a0);							      \
-    move.l &-1, %d0;							      \
-    /* Copy return value to %a0 for syscalls that are declared to return      \
-       a pointer (e.g., mmap).  */					      \
-    move.l %d0, %a0;							      \
-    rts;
-# else /* !RTLD_PRIVATE_ERRNO */
-/* Store (- %d0) into errno through the GOT.  */
-#  if defined _LIBC_REENTRANT
-#   define SYSCALL_ERROR_HANDLER					      \
-SYSCALL_ERROR_LABEL:							      \
-    neg.l %d0;								      \
-    move.l %d0, -(%sp);							      \
-    jbsr __errno_location@PLTPC;					      \
-    move.l (%sp)+, (%a0);						      \
-    move.l &-1, %d0;							      \
-    /* Copy return value to %a0 for syscalls that are declared to return      \
-       a pointer (e.g., mmap).  */					      \
-    move.l %d0, %a0;							      \
-    rts;
-#  else /* !_LIBC_REENTRANT */
-#   define SYSCALL_ERROR_HANDLER					      \
-SYSCALL_ERROR_LABEL:							      \
-    move.l (errno@GOTPC, %pc), %a0;					      \
-    neg.l %d0;								      \
-    move.l %d0, (%a0);							      \
-    move.l &-1, %d0;							      \
-    /* Copy return value to %a0 for syscalls that are declared to return      \
-       a pointer (e.g., mmap).  */					      \
-    move.l %d0, %a0;							      \
-    rts;
-#  endif /* _LIBC_REENTRANT */
-# endif /* RTLD_PRIVATE_ERRNO */
-#else
-# define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
-#endif /* PIC */
-
-/* Linux takes system call arguments in registers:
-
-	syscall number	%d0	     call-clobbered
-	arg 1		%d1	     call-clobbered
-	arg 2		%d2	     call-saved
-	arg 3		%d3	     call-saved
-	arg 4		%d4	     call-saved
-	arg 5		%d5	     call-saved
-
-   The stack layout upon entering the function is:
-
-	20(%sp)		Arg# 5
-	16(%sp)		Arg# 4
-	12(%sp)		Arg# 3
-	 8(%sp)		Arg# 2
-	 4(%sp)		Arg# 1
-	  (%sp)		Return address
-
-   (Of course a function with say 3 arguments does not have entries for
-   arguments 4 and 5.)
-
-   Separate move's are faster than movem, but need more space.  Since
-   speed is more important, we don't use movem.  Since %a0 and %a1 are
-   scratch registers, we can use them for saving as well.  */
-
-#define DO_CALL(syscall_name, args)			      		      \
-    move.l &SYS_ify(syscall_name), %d0;					      \
-    DOARGS_##args							      \
-    trap &0;								      \
-    UNDOARGS_##args
-
-#define	DOARGS_0	/* No arguments to frob.  */
-#define	UNDOARGS_0	/* No arguments to unfrob.  */
-#define	_DOARGS_0(n)	/* No arguments to frob.  */
-
-#define	DOARGS_1	_DOARGS_1 (4)
-#define	_DOARGS_1(n)	move.l n(%sp), %d1; _DOARGS_0 (n)
-#define	UNDOARGS_1	UNDOARGS_0
-
-#define	DOARGS_2	_DOARGS_2 (8)
-#define	_DOARGS_2(n)	move.l %d2, %a0; move.l n(%sp), %d2; _DOARGS_1 (n-4)
-#define	UNDOARGS_2	UNDOARGS_1; move.l %a0, %d2
-
-#define DOARGS_3	_DOARGS_3 (12)
-#define _DOARGS_3(n)	move.l %d3, %a1; move.l n(%sp), %d3; _DOARGS_2 (n-4)
-#define UNDOARGS_3	UNDOARGS_2; move.l %a1, %d3
-
-#define DOARGS_4	_DOARGS_4 (16)
-#define _DOARGS_4(n)	move.l %d4, -(%sp); move.l n+4(%sp), %d4; _DOARGS_3 (n)
-#define UNDOARGS_4	UNDOARGS_3; move.l (%sp)+, %d4
-
-#define DOARGS_5	_DOARGS_5 (20)
-#define _DOARGS_5(n)	move.l %d5, -(%sp); move.l n+4(%sp), %d5; _DOARGS_4 (n)
-#define UNDOARGS_5	UNDOARGS_4; move.l (%sp)+, %d5
-
-
-#define	ret	rts
-#if 0 /* Not used by Linux */
-#define	r0	%d0
-#define	r1	%d1
-#define	MOVE(x,y)	movel x , y
-#endif
-
-#else /* not __ASSEMBLER__ */
-
-/* Define a macro which expands into the inline wrapper code for a system
-   call.  */
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...)				\
-  ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args);	\
-     if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\
-       {								\
-	 __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, ));		\
-	 _sys_result = (unsigned int) -1;				\
-       }								\
-     (int) _sys_result; })
-
-#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
-
-/* Define a macro which expands inline into the wrapper code for a system
-   call.  This use is for internal calls that do not need to handle errors
-   normally.  It will never touch errno.  This returns just what the kernel
-   gave back.  */
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...)	\
-  ({ unsigned int _sys_result;				\
-     {							\
-       /* Load argument values in temporary variables
-	  to perform side effects like function calls
-	  before the call used registers are set.  */	\
-       LOAD_ARGS_##nr (args)				\
-       LOAD_REGS_##nr					\
-       register int _d0 asm ("%d0") = __NR_##name;	\
-       asm volatile ("trap #0"				\
-		     : "=d" (_d0)			\
-		     : "0" (_d0) ASM_ARGS_##nr		\
-		     : "memory");			\
-       _sys_result = _d0;				\
-     }							\
-     (int) _sys_result; })
-
-#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err)		\
-  ((unsigned int) (val) >= -4095U)
-
-#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err)	(-(val))
-
-#define LOAD_ARGS_0()
-#define LOAD_REGS_0
-#define ASM_ARGS_0
-#define LOAD_ARGS_1(a1)				\
-  LOAD_ARGS_0 ()				\
-  int __arg1 = (int) (a1);
-#define LOAD_REGS_1				\
-  register int _d1 asm ("d1") = __arg1;		\
-  LOAD_REGS_0
-#define ASM_ARGS_1	ASM_ARGS_0, "d" (_d1)
-#define LOAD_ARGS_2(a1, a2)			\
-  LOAD_ARGS_1 (a1)				\
-  int __arg2 = (int) (a2);
-#define LOAD_REGS_2				\
-  register int _d2 asm ("d2") = __arg2;		\
-  LOAD_REGS_1
-#define ASM_ARGS_2	ASM_ARGS_1, "d" (_d2)
-#define LOAD_ARGS_3(a1, a2, a3)			\
-  LOAD_ARGS_2 (a1, a2)				\
-  int __arg3 = (int) (a3);
-#define LOAD_REGS_3				\
-  register int _d3 asm ("d3") = __arg3;		\
-  LOAD_REGS_2
-#define ASM_ARGS_3	ASM_ARGS_2, "d" (_d3)
-#define LOAD_ARGS_4(a1, a2, a3, a4)		\
-  LOAD_ARGS_3 (a1, a2, a3)			\
-  int __arg4 = (int) (a4);
-#define LOAD_REGS_4				\
-  register int _d4 asm ("d4") = __arg4;		\
-  LOAD_REGS_3
-#define ASM_ARGS_4	ASM_ARGS_3, "d" (_d4)
-#define LOAD_ARGS_5(a1, a2, a3, a4, a5)		\
-  LOAD_ARGS_4 (a1, a2, a3, a4)			\
-  int __arg5 = (int) (a5);
-#define LOAD_REGS_5				\
-  register int _d5 asm ("d5") = __arg5;		\
-  LOAD_REGS_4
-#define ASM_ARGS_5	ASM_ARGS_4, "d" (_d5)
-#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)	\
-  LOAD_ARGS_5 (a1, a2, a3, a4, a5)		\
-  int __arg6 = (int) (a6);
-#define LOAD_REGS_6				\
-  register int _a0 asm ("a0") = __arg6;		\
-  LOAD_REGS_5
-#define ASM_ARGS_6	ASM_ARGS_5, "a" (_a0)
-
-#endif /* not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/m68k/versionsort64.c b/sysdeps/unix/sysv/linux/m68k/versionsort64.c
deleted file mode 100644
index 144b691e56..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/versionsort64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/versionsort64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S
deleted file mode 100644
index 8027b2f801..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Schwab <schwab@gnu.org>.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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>
-#define _ERRNO_H	1
-#include <bits/errno.h>
-#include <kernel-features.h>
-
-/* Clone the calling process, but without copying the whole address space.
-   The calling process is suspended until the new process exits or is
-   replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
-   and the process ID of the new process to the old process.  */
-
-ENTRY (__vfork)
-
-#ifdef __NR_vfork
-
-	/* Pop the return PC value into A0.  */
-	movel	%sp@+, %a0
-
-	/* Stuff the syscall number in D0 and trap into the kernel.  */
-	movel	#SYS_ify (vfork), %d0
-	trap	#0
-	tstl	%d0
-	jmi	.Lerror		/* Branch forward if it failed.  */
-
-	/* Jump to the return PC.  */
-	jmp	%a0@
-
-.Lerror:
-	/* Push back the return PC.  */
-	movel	%a0,%sp@-
-
-# ifdef __ASSUME_VFORK_SYSCALL
-#  ifndef PIC
-	jbra	SYSCALL_ERROR_LABEL
-#  endif
-# else
-	/* Check if vfork syscall is known at all.  */
-	movel	#-ENOSYS,%d1
-	cmpl	%d0,%d1
-	jne	SYSCALL_ERROR_LABEL
-
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
-	/* If we don't have vfork, fork is close enough.  */
-
-	movel	#SYS_ify (fork), %d0
-	trap	#0
-	tstl	%d0
-	jmi	SYSCALL_ERROR_LABEL
-	rts
-#endif
-
-PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
-
-weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/m68k/xstat.c b/sysdeps/unix/sysv/linux/m68k/xstat.c
deleted file mode 100644
index e9869f5508..0000000000
--- a/sysdeps/unix/sysv/linux/m68k/xstat.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/xstat.c>
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
deleted file mode 100644
index 72fa87b3ff..0000000000
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ /dev/null
@@ -1,128 +0,0 @@
-ifeq ($(subdir),signal)
-#sysdep_routines += sigsuspend
-endif
-
-ifeq ($(subdir),misc)
-sysdep_routines += cachectl cacheflush sysmips _test_and_set
-
-sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
-
-no_syscall_list_h = 1
-
-# A callable macro that expands to a shell command.  Preprocess file $(1)
-# using ABI option $(2) and see which macros it defines.  Print FOO for each
-# macro of the form __NR$(3)_FOO, filtering out ABI-specific __NR macros
-# that have a prefix other than $(3).
-mips_list_syscalls =	$(filter-out -m%,$(CC)) -E -x c $(+includes) \
-			    $(sysincludes) -D_LIBC -dM -mabi=$(2) $(1) | \
-			sed -n 's@^\#define __NR$(3)_\([^ ]*\) .*@\1@p' | \
-			sed -e '/^[ON]32_/d' -e '/^N64_/d' -e '/^64_/d' | \
-			LC_ALL=C sort
-
-# Generate a list of SYS_* macros from the linux __NR macros.
-#
-# Before version 2.6, linux had separate 32-bit and 64-bit MIPS ports,
-# each with its own set of headers.  The ports were merged for 2.6 and
-# this merged port defines the syscalls in a slightly different way.
-# There are therefore three sets of headers that we need to consider:
-#
-#    (1) Headers from the separate 32-bit MIPS port.  They just define
-#	 a single list of __NR macros.
-#
-#    (2) Headers from the separate 64-bit MIPS port.  They unconditionally
-#	 define syscalls for all three ABIs, with o32 syscalls prefixed
-#	 by __NR_O32, n32 syscalls prefixed by __NR_N32 and n64 syscalls
-#	 prefixed by plain __NR.
-#
-#    (3) Headers from the combined port.  They use the _MIPS_SIM macro to
-#	 define the right set of syscalls for the current ABI.  The syscalls
-#	 themselves have no special ABI prefix, but the headers also define:
-#
-#	    __NR_O32_Linux{,_syscalls}
-#	    __NR_N32_Linux{,_syscalls}
-#	    __NR_64_Linux{,_syscalls}
-#
-# In case (1) we just want a simple list of SYS_* macros.  In cases (2)
-# and (3) we want a file that will work for all three ABIs, regardless
-# of which ABI we are currently using.  We also want the file to work
-# if the user later moves from (2) to (3).  Thus the file we create
-# for (2) and (3) has the form:
-#
-#    #if _MIPS_SIM == _ABIN32
-#    # ifdef __NR_N32_open
-#    #  define SYS_n32syscall1 __NR_N32_n32syscall1
-#    #  ...
-#    # else
-#    #  define SYS_n32syscall1 __NR_n32syscall1
-#    #  ...
-#    # endif
-#    #elif _MIPS_SIM == _ABI64
-#    # define SYS_n64syscall1 __NR_n64syscall1
-#    # ...
-#    #else
-#    # ifdef __NR_O32_open
-#    #  define SYS_o32syscall1 __NR_O32_o32syscall1
-#    #  ...
-#    # else
-#    #  define SYS_o32syscall1 __NR_o32syscall1
-#    #  ...
-#    # endif
-#    #endif
-#
-# Here, __NR_N32_open and __NR_O32_open are used to detect case (2)
-# over case (3).  The n64 SYS_* macros can always use the normal
-# ABI-less names.
-$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
-	$(make-target-directory)
-	$(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC $< -MD -MP \
-	      -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' > /dev/null
-	{ \
-	 echo '/* Generated at libc build time from kernel syscall list.  */';\
-	 echo ''; \
-	 echo '#ifndef _SYSCALL_H'; \
-	 echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
-	 echo '#endif'; \
-	 echo ''; \
-	 echo '#include <sgidefs.h>'; \
-	 rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \
-	 $(call mips_list_syscalls,$<,n32,_N32) > $(@:.d=.h).newn32; \
-	 if test -s $(@:.d=.h).newn32; then \
-	   if grep open $(@:.d=.h).newn32 > /dev/null; then \
-	     $(call mips_list_syscalls,$<,32,_O32) > $(@:.d=.h).new32; \
-	     $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \
-	   else \
-	     $(call mips_list_syscalls,$<,32,) > $(@:.d=.h).new32; \
-	     $(call mips_list_syscalls,$<,n32,) > $(@:.d=.h).newn32; \
-	     $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \
-	   fi; \
-	   echo '#if _MIPS_SIM == _ABIN32'; \
-	   echo '# ifdef __NR_N32_open'; \
-	   sed 's@\(.*\)@#  define SYS_\1 __NR_N32_\1@' < $(@:.d=.h).newn32; \
-	   echo '# else'; \
-	   sed 's@\(.*\)@#  define SYS_\1 __NR_\1@' < $(@:.d=.h).newn32; \
-	   echo '# endif'; \
-	   echo '#elif _MIPS_SIM == _ABI64'; \
-	   sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new64; \
-	   echo '#else'; \
-	   echo '# ifdef __NR_O32_open'; \
-	   sed 's@\(.*\)@#  define SYS_\1 __NR_O32_\1@' < $(@:.d=.h).new32; \
-	   echo '# else'; \
-	   sed 's@\(.*\)@#  define SYS_\1 __NR_\1@' < $(@:.d=.h).new32; \
-	   echo '# endif'; \
-	   echo '#endif'; \
-	 else \
-	   $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC -dM $< | \
-	   sed -n 's@^\#define __NR_\([^ ]*\) .*@\#define SYS_\1 __NR_\1@p' | \
-	   LC_ALL=C sort; \
-	 fi; \
-	 rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \
-	} > $(@:.d=.h).new
-	mv -f $(@:.d=.h).new $(@:.d=.h)
-ifneq (,$(objpfx))
-	sed $(sed-remove-objpfx) $(@:.h=.d)-t > $(@:.h=.d)-t2
-	rm -f $(@:.h=.d)-t
-	mv -f $(@:.h=.d)-t2 $(@:.h=.d)
-else
-	mv -f $(@:.h=.d)-t $(@:.h=.d)
-endif
-endif
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
deleted file mode 100644
index 50bfac5599..0000000000
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ /dev/null
@@ -1,31 +0,0 @@
-libc {
-  # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
-  # When you get an error from errlist-compat.awk, you need to add a new
-  # version here.  Don't do this blindly, since this means changing the ABI
-  # for all GNU/Linux configurations.
-
-  GLIBC_2.0 {
-    #errlist-compat	123
-    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
-
-    # Exception handling support functions from libgcc
-    __register_frame; __register_frame_table; __deregister_frame;
-    __frame_state_for; __register_frame_info_table;
-
-    # Needed by gcc:
-    _flush_cache;
-
-    # c*
-    cachectl; cacheflush;
-
-    # s*
-    sysmips;
-  }
-  GLIBC_2.2 {
-    #errlist-compat	1134
-    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
-
-    # _*
-    _test_and_set;
-  }
-}
diff --git a/sysdeps/unix/sysv/linux/mips/_test_and_set.c b/sysdeps/unix/sysv/linux/mips/_test_and_set.c
deleted file mode 100644
index 9fd48f753e..0000000000
--- a/sysdeps/unix/sysv/linux/mips/_test_and_set.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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.  */
-
-/* Define the real-function versions of all inline functions
-   defined in sys/tas.h  */
-
-#include <features.h>
-
-#define _EXTERN_INLINE
-#ifndef __USE_EXTERN_INLINES
-# define __USE_EXTERN_INLINES 1
-#endif
-
-#include "sys/tas.h"
diff --git a/sysdeps/unix/sysv/linux/mips/bits/endian.h b/sysdeps/unix/sysv/linux/mips/bits/endian.h
deleted file mode 100644
index 0a3d2fabe3..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/endian.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* The MIPS architecture has selectable endianness.
-   Linux/MIPS exists in two both little and big endian flavours and we
-   want to be able to share the installed headerfiles between both,
-   so we define __BYTE_ORDER based on GCC's predefines.  */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#ifdef __MIPSEB__
-# define __BYTE_ORDER __BIG_ENDIAN
-#else
-# ifdef __MIPSEL__
-#  define __BYTE_ORDER __LITTLE_ENDIAN
-# endif
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h
deleted file mode 100644
index 5ff11c0e77..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Error constants.  MIPS/Linux specific version.
-   Copyright (C) 1996, 1997, 1998, 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
-   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 _ERRNO_H
-
-# undef EDOM
-# undef EILSEQ
-# undef ERANGE
-# include <linux/errno.h>
-
-/* Linux has no ENOTSUP error code.  */
-# define ENOTSUP EOPNOTSUPP
-
-# ifndef ECANCELED
-#  define ECANCELED	158
-# endif
-
-/* Support for error codes to support robust mutexes was added later, too.  */
-# ifndef EOWNERDEAD
-#  define EOWNERDEAD		165
-#  define ENOTRECOVERABLE	166
-# endif
-
-# ifndef __ASSEMBLER__
-/* Function to get address of global `errno' variable.  */
-extern int *__errno_location (void) __THROW __attribute__ ((__const__));
-
-#  if !defined _LIBC || defined _LIBC_REENTRANT
-/* When using threads, errno is a per-thread value.  */
-#   define errno (*__errno_location ())
-#  endif
-# endif /* !__ASSEMBLER__ */
-#endif /* _ERRNO_H */
-
-#if !defined _ERRNO_H && defined __need_Emath
-/* This is ugly but the kernel header is not clean enough.  We must
-   define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
-   defined.  */
-# define EDOM	33	/* Math argument out of domain of function.  */
-# define EILSEQ	88	/* Illegal byte sequence.  */
-# define ERANGE	34	/* Math result not representable.  */
-#endif /* !_ERRNO_H && __need_Emath */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
deleted file mode 100644
index aa039b4c0e..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
-	Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _FCNTL_H
-# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
-#endif
-
-#include <sgidefs.h>
-#include <sys/types.h>
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
-   located on an ext2 file system */
-#define O_ACCMODE	0x0003
-#define O_RDONLY	0x0000
-#define O_WRONLY	0x0001
-#define O_RDWR		0x0002
-#define O_APPEND	0x0008
-#define O_SYNC		0x0010
-#define O_NONBLOCK	0x0080
-#define O_CREAT		0x0100	/* not fcntl */
-#define O_TRUNC		0x0200	/* not fcntl */
-#define O_EXCL		0x0400	/* not fcntl */
-#define O_NOCTTY	0x0800	/* not fcntl */
-#define O_FSYNC		O_SYNC
-#define O_ASYNC		0x1000
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE	0x2000	/* Allow large file opens.  */
-#endif
-
-#ifdef __USE_GNU
-# define O_NOFOLLOW	0x20000	/* Do not follow links.	 */
-# define O_DIRECT	0x8000	/* Direct disk access hint.  */
-# define O_DIRECTORY	0x10000	/* Must be a directory.	 */
-# define O_NOATIME	0x40000	/* Do not set atime.  */
-#endif
-
-#define O_NDELAY	O_NONBLOCK
-
-/* For now Linux has no synchronisity options for data and read
-   operations.	We define the symbols here but let them do the same as
-   O_SYNC since this is a superset.  */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC	O_SYNC	/* Synchronize data.  */
-# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
-#endif
-
-/* Values for the second argument to `fcntl'.  */
-#define F_DUPFD		0	/* Duplicate file descriptor.  */
-#define F_GETFD		1	/* Get file descriptor flags.  */
-#define F_SETFD		2	/* Set file descriptor flags.  */
-#define F_GETFL		3	/* Get file status flags.  */
-#define F_SETFL		4	/* Set file status flags.  */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK	14	/* Get record locking info.  */
-# define F_SETLK	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).	*/
-#else
-# define F_GETLK	F_GETLK64  /* Get record locking info.	*/
-# define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
-# define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
-#endif
-
-#define F_GETLK64	33	/* Get record locking info.  */
-#define F_SETLK64	34	/* Set record locking info (non-blocking).  */
-#define F_SETLKW64	35	/* Set record locking info (blocking).	*/
-
-#if defined __USE_BSD || defined __USE_UNIX98
-# define F_SETOWN	24	/* Get owner of socket (receiver of SIGIO).  */
-# define F_GETOWN	23	/* Set owner of socket (receiver of SIGIO).  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG	10	/* Set number of signal to be sent.  */
-# define F_GETSIG	11	/* Get number of signal to be sent.  */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE	1024	/* Set a lease.	 */
-# define F_GETLEASE	1025	/* Enquire what lease is active.  */
-# define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-#endif
-
-/* for F_[GET|SET]FL */
-#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
-#define F_RDLCK		0	/* Read lock.  */
-#define F_WRLCK		1	/* Write lock.	*/
-#define F_UNLCK		2	/* Remove lock.	 */
-
-/* for old implementation of bsd flock () */
-#define F_EXLCK		4	/* or 3 */
-#define F_SHLCK		8	/* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation */
-# define LOCK_SH	1	/* shared lock */
-# define LOCK_EX	2	/* exclusive lock */
-# define LOCK_NB	4	/* or'd with one of the above to prevent
-				   blocking */
-# define LOCK_UN	8	/* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND	32	/* This is a mandatory flock:	*/
-# define LOCK_READ	64	/* ... which allows concurrent read operations.	 */
-# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
-# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.	 */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY.  */
-# define DN_ACCESS	0x00000001	/* File accessed.  */
-# define DN_MODIFY	0x00000002	/* File modified.  */
-# define DN_CREATE	0x00000004	/* File created.  */
-# define DN_DELETE	0x00000008	/* File removed.  */
-# define DN_RENAME	0x00000010	/* File renamed.  */
-# define DN_ATTRIB	0x00000020	/* File changed attibutes.  */
-# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
-#endif
-
-typedef struct flock
-  {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
-    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
-#ifndef __USE_FILE_OFFSET64
-    __off_t l_start;	/* Offset where the lock begins.  */
-    __off_t l_len;	/* Size of the locked area; zero means until EOF.  */
-#if _MIPS_SIM != _ABI64
-    /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
-       fcntls in o32 and n32, never has this field.  */
-    long int l_sysid;
-#endif
-#else
-    __off64_t l_start;	/* Offset where the lock begins.  */
-    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
-#endif
-    __pid_t l_pid;	/* Process holding the lock.  */
-#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64
-    /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
-       flock in o32 and n32, never has this field.  */
-    long int pad[4];
-#endif
-} flock_t;
-
-#ifdef __USE_LARGEFILE64
-struct flock64
-  {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
-    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
-    __off64_t l_start;	/* Offset where the lock begins.  */
-    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
-    __pid_t l_pid;	/* Process holding the lock.  */
-  };
-#endif
-
-
-/* Define some more compatibility macros to be backward compatible with
-   BSD systems which did not managed to hide these kernel macros.  */
-#ifdef	__USE_BSD
-# define FAPPEND	O_APPEND
-# define FFSYNC		O_FSYNC
-# define FASYNC		O_ASYNC
-# define FNONBLOCK	O_NONBLOCK
-# define FNDELAY	O_NDELAY
-#endif /* Use BSD.  */
-
-/* Advise to `posix_fadvise'.  */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
-# define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
-# define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
-# define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
-# define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
deleted file mode 100644
index a8dcf242d3..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Structure types for pre-termios terminal ioctls.  Linux/MIPS version.
-   Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_IOCTL_H
-# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
-#endif
-
-/* Get definition of constants for use with `ioctl'.  */
-#include <asm/ioctls.h>
-
-struct winsize
-  {
-    unsigned short int ws_row;
-    unsigned short int ws_col;
-    unsigned short int ws_xpixel;
-    unsigned short int ws_ypixel;
-  };
-
-#define NCC	8
-struct termio
-  {
-    unsigned short int c_iflag;		/* input mode flags */
-    unsigned short int c_oflag;		/* output mode flags */
-    unsigned short int c_cflag;		/* control mode flags */
-    unsigned short int c_lflag;		/* local mode flags */
-    char c_line;			/* line discipline */
-    /* Yes, this is really NCCS.  */
-    unsigned char c_cc[32 /* NCCS */]; /* control characters */
-  };
-
-/* modem lines */
-#define TIOCM_LE	0x001		/* line enable */
-#define TIOCM_DTR	0x002		/* data terminal ready */
-#define TIOCM_RTS	0x004		/* request to send */
-#define TIOCM_ST	0x010		/* secondary transmit */
-#define TIOCM_SR	0x020		/* secondary receive */
-#define TIOCM_CTS	0x040		/* clear to send */
-#define TIOCM_CAR	0x100		/* carrier detect */
-#define TIOCM_CD	TIOCM_CAR
-#define TIOCM_RNG	0x200		/* ring */
-#define TIOCM_RI	TIOCM_RNG
-#define TIOCM_DSR	0x400		/* data set ready */
-
-/* line disciplines */
-#define N_TTY		0
-#define N_SLIP		1
-#define N_MOUSE		2
-#define N_PPP		3
-#define N_STRIP		4
-#define N_AX25		5
-#define N_X25		6	/* X.25 async  */
-#define N_6PACK		7
-#define N_MASC		8	/* Mobitex module  */
-#define N_R3964		9	/* Simatic R3964 module  */
-#define N_PROFIBUS_FDL	10	/* Profibus  */
-#define N_IRDA		11	/* Linux IR  */
-#define N_SMSBLOCK	12	/* SMS block mode  */
-#define N_HDLC		13	/* synchronous HDLC  */
-#define N_SYNC_PPP	14	/* synchronous PPP  */
-#define	N_HCI		15	/* Bluetooth HCI UART  */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
deleted file mode 100644
index 1f629ce665..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_IPC_H
-# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
-#endif
-
-#include <bits/types.h>
-
-/* Mode bits for `msgget', `semget', and `shmget'.  */
-#define IPC_CREAT	01000		/* Create key if key does not exist. */
-#define IPC_EXCL	02000		/* Fail if key exists.	*/
-#define IPC_NOWAIT	04000		/* Return error on wait.  */
-
-/* Control commands for `msgctl', `semctl', and `shmctl'.  */
-#define IPC_RMID	0		/* Remove identifier.  */
-#define IPC_SET		1		/* Set `ipc_perm' options.  */
-#define IPC_STAT	2		/* Get `ipc_perm' options.  */
-#ifdef __USE_GNU
-# define IPC_INFO	3		/* See ipcs.  */
-#endif
-
-/* Special key values.	*/
-#define IPC_PRIVATE	((__key_t) 0)	/* Private key.	 */
-
-
-/* Data structure used to pass permission information to IPC operations.  */
-struct ipc_perm
-  {
-    __key_t __key;			/* Key.  */
-    unsigned int uid;			/* Owner's user ID.  */
-    unsigned int gid;			/* Owner's group ID.  */
-    unsigned int cuid;			/* Creator's user ID.  */
-    unsigned int cgid;			/* Creator's group ID.	*/
-    unsigned int mode;			/* Read/write permission.  */
-    unsigned short int __seq;		/* Sequence number.  */
-    unsigned short int __pad1;
-    unsigned long int __unused1;
-    unsigned long int __unused2;
-};
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
deleted file mode 100644
index e287e3b378..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Definitions for POSIX memory map interface.  Linux/MIPS version.
-   Copyright (C) 1997, 2000, 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
-   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 _SYS_MMAN_H
-# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
-#endif
-
-/* The following definitions basically come from the kernel headers.
-   But the kernel header is not namespace clean.  */
-
-
-/* Protections are chosen from these bits, OR'd together.  The
-   implementation does not necessarily support PROT_EXEC or PROT_WRITE
-   without PROT_READ.  The only guarantees are that no writing will be
-   allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ	0x1		/* Page can be read.  */
-#define PROT_WRITE	0x2		/* Page can be written.  */
-#define PROT_EXEC	0x4		/* Page can be executed.  */
-#define PROT_NONE	0x0		/* Page can not be accessed.  */
-#define PROT_GROWSDOWN	0x01000000	/* Extend change to start of
-					   growsdown vma (mprotect only).  */
-#define PROT_GROWSUP	0x02000000	/* Extend change to start of
-					   growsup vma (mprotect only).  */
-
-/* Sharing types (must choose one and only one of these).  */
-#define MAP_SHARED	0x01		/* Share changes.  */
-#define MAP_PRIVATE	0x02		/* Changes are private.  */
-#ifdef __USE_MISC
-# define MAP_TYPE	0x0f		/* Mask for type of mapping.  */
-#endif
-
-/* Other flags.  */
-#define MAP_FIXED	0x10		/* Interpret addr exactly.  */
-#ifdef __USE_MISC
-# define MAP_FILE	0x00
-# define MAP_ANONYMOUS	0x0800		/* Don't use a file.  */
-# define MAP_ANON	MAP_ANONYMOUS
-# define MAP_RENAME	MAP_ANONYMOUS
-#endif
-
-/* These are Linux-specific.  */
-#ifdef __USE_MISC
-# define MAP_NORESERVE	0x0400		/* don't check for reservations */
-# define MAP_ANONYMOUS	0x0800		/* don't use a file */
-# define MAP_GROWSDOWN	0x1000		/* stack-like segment */
-# define MAP_DENYWRITE	0x2000		/* ETXTBSY */
-# define MAP_EXECUTABLE	0x4000		/* mark it as an executable */
-# define MAP_LOCKED	0x8000		/* pages are locked */
-# define MAP_POPULATE   0x10000         /* populate (prefault) pagetables */
-# define MAP_NONBLOCK   0x20000         /* do not block on IO */
-#endif
-
-/* Flags to `msync'.  */
-#define MS_ASYNC	1		/* Sync memory asynchronously.  */
-#define MS_INVALIDATE	2		/* Invalidate the caches.  */
-#define MS_SYNC		4		/* Synchronous memory sync.  */
-
-/* Flags for `mlockall'.  */
-#define MCL_CURRENT	1		/* Lock all currently mapped pages.  */
-#define MCL_FUTURE	2		/* Lock all additions to address
-					   space.  */
-
-/* Advice to `madvise'.  */
-#ifdef __USE_BSD
-#define MADV_NORMAL	0		/* default page-in behavior */
-#define MADV_RANDOM	1		/* page-in minimum required */
-#define MADV_SEQUENTIAL	2		/* read-ahead aggressively */
-#define MADV_WILLNEED	3		/* pre-fault pages */
-#define MADV_DONTNEED	4		/* discard these pages */
-#define MADV_REMOVE	5		/* remove these pages & resources */
-#endif
-
-/* Flags for `mremap'.  */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE	1
-# define MREMAP_FIXED	2
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/msq.h b/sysdeps/unix/sysv/linux/mips/bits/msq.h
deleted file mode 100644
index c2c1dd2e85..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/msq.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_MSG_H
-# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
-#endif
-
-#include <bits/types.h>
-
-/* Define options for message queue functions.  */
-#define MSG_NOERROR	010000	/* no error if message is too big */
-#ifdef __USE_GNU
-# define MSG_EXCEPT	020000	/* recv any msg except of specified type */
-#endif
-
-/* Types used in the structure definition.  */
-typedef unsigned long int msgqnum_t;
-typedef unsigned long int msglen_t;
-
-
-/* Structure of record for one message inside the kernel.
-   The type `struct msg' is opaque.  */
-struct msqid_ds
-{
-  struct ipc_perm msg_perm;	/* structure describing operation permission */
-  __time_t msg_stime;		/* time of last msgsnd command */
-  __time_t msg_rtime;		/* time of last msgrcv command */
-  __time_t msg_ctime;		/* time of last change */
-  unsigned long int __msg_cbytes; /* current number of bytes on queue */
-  msgqnum_t msg_qnum;		/* number of messages currently on queue */
-  msglen_t msg_qbytes;		/* max number of bytes allowed on queue */
-  __pid_t msg_lspid;		/* pid of last msgsnd() */
-  __pid_t msg_lrpid;		/* pid of last msgrcv() */
-  unsigned long int __unused1;
-  unsigned long int __unused2;
-};
-
-#ifdef __USE_MISC
-
-# define msg_cbytes	__msg_cbytes
-
-/* ipcs ctl commands */
-# define MSG_STAT 11
-# define MSG_INFO 12
-
-/* buffer for msgctl calls IPC_INFO, MSG_INFO */
-struct msginfo
-  {
-    int msgpool;
-    int msgmap;
-    int msgmax;
-    int msgmnb;
-    int msgmni;
-    int msgssz;
-    int msgtql;
-    unsigned short int msgseg;
-  };
-
-#endif /* __USE_MISC */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h
deleted file mode 100644
index f62b9c3948..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/poll.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_POLL_H
-# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
-#endif
-
-/* Event types that can be polled for.  These bits may be set in `events'
-   to indicate the interesting event types; they will appear in `revents'
-   to indicate the status of the file descriptor.  */
-#define POLLIN		0x001		/* There is data to read.  */
-#define POLLPRI		0x002		/* There is urgent data to read.  */
-#define POLLOUT		0x004		/* Writing now will not block.  */
-
-#ifdef __USE_XOPEN
-/* These values are defined in XPG4.2.  */
-# define POLLRDNORM	0x040		/* Normal data may be read.  */
-# define POLLRDBAND	0x080		/* Priority data may be read.  */
-# define POLLWRNORM	POLLOUT		/* Writing now will not block.  */
-# define POLLWRBAND	0x100		/* Priority data may be written.  */
-#endif
-
-#ifdef __USE_GNU
-/* This is an extension for Linux.  */
-# define POLLMSG	0x400
-#endif
-
-/* Event types always implicitly polled for.  These bits need not be set in
-   `events', but they will appear in `revents' to indicate the status of
-   the file descriptor.  */
-#define POLLERR		0x008		/* Error condition.  */
-#define POLLHUP		0x010		/* Hung up.  */
-#define POLLNVAL	0x020		/* Invalid polling request.  */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
deleted file mode 100644
index 7e7152935b..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* Bit values & structures for resource limits.  Linux/MIPS version.
-   Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   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 _SYS_RESOURCE_H
-# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
-#endif
-
-#include <bits/types.h>
-
-/* Transmute defines to enumerations.  The macro re-definitions are
-   necessary because some programs want to test for operating system
-   features with #ifdef RUSAGE_SELF.  In ISO C the reflexive
-   definition is a no-op.  */
-
-/* Kinds of resource limit.  */
-enum __rlimit_resource
-{
-  /* Per-process CPU limit, in seconds.  */
-  RLIMIT_CPU = 0,
-#define RLIMIT_CPU RLIMIT_CPU
-
-  /* Largest file that can be created, in bytes.  */
-  RLIMIT_FSIZE = 1,
-#define	RLIMIT_FSIZE RLIMIT_FSIZE
-
-  /* Maximum size of data segment, in bytes.  */
-  RLIMIT_DATA = 2,
-#define	RLIMIT_DATA RLIMIT_DATA
-
-  /* Maximum size of stack segment, in bytes.  */
-  RLIMIT_STACK = 3,
-#define	RLIMIT_STACK RLIMIT_STACK
-
-  /* Largest core file that can be created, in bytes.  */
-  RLIMIT_CORE = 4,
-#define	RLIMIT_CORE RLIMIT_CORE
-
-  /* Largest resident set size, in bytes.
-     This affects swapping; processes that are exceeding their
-     resident set size will be more likely to have physical memory
-     taken from them.  */
-  __RLIMIT_RSS = 7,
-#define	RLIMIT_RSS __RLIMIT_RSS
-
-  /* Number of open files.  */
-  RLIMIT_NOFILE = 5,
-  __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same.  */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE __RLIMIT_OFILE
-
-  /* Address space limit (?) */
-  RLIMIT_AS = 6,
-#define RLIMIT_AS RLIMIT_AS
-
-  /* Number of processes.  */
-  __RLIMIT_NPROC = 8,
-#define RLIMIT_NPROC __RLIMIT_NPROC
-
-  /* Locked-in-memory address space.  */
-  __RLIMIT_MEMLOCK = 9,
-#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
-
-  /* Maximum number of file locks.  */
-  __RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS __RLIMIT_LOCKS
-
-  /* Maximum number of pending signals.  */
-  __RLIMIT_SIGPENDING = 11,
-#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
-
-  /* Maximum bytes in POSIX message queues.  */
-  __RLIMIT_MSGQUEUE = 12,
-#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
-
-  /* Maximum nice priority allowed to raise to.
-     Nice levels 19 .. -20 correspond to 0 .. 39
-     values of this resource limit.  */
-  __RLIMIT_NICE = 13,
-#define RLIMIT_NICE __RLIMIT_NICE
-
-  /* Maximum realtime priority allowed for non-priviledged
-     processes.  */
-  __RLIMIT_RTPRIO = 14,
-#define RLIMIT_RTPRIO _RLIMIT_RTPRIO
-
-  __RLIMIT_NLIMITS = 15,
-  __RLIM_NLIMITS = __RLIMIT_NLIMITS
-#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
-#define RLIM_NLIMITS __RLIM_NLIMITS
-};
-
-/* Value to indicate that there is no limit.  */
-#ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((long int)(~0UL >> 1))
-#else
-# define RLIM_INFINITY 0x7fffffffffffffffLL
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0x7fffffffffffffffLL
-#endif
-
-/* We can represent all limits.  */
-#define RLIM_SAVED_MAX	RLIM_INFINITY
-#define RLIM_SAVED_CUR	RLIM_INFINITY
-
-
-/* Type for resource quantity measurement.  */
-#ifndef __USE_FILE_OFFSET64
-typedef __rlim_t rlim_t;
-#else
-typedef __rlim64_t rlim_t;
-#endif
-#ifdef __USE_LARGEFILE64
-typedef __rlim64_t rlim64_t;
-#endif
-
-struct rlimit
-  {
-    /* The current (soft) limit.  */
-    rlim_t rlim_cur;
-    /* The hard limit.  */
-    rlim_t rlim_max;
-  };
-
-#ifdef __USE_LARGEFILE64
-struct rlimit64
-  {
-    /* The current (soft) limit.  */
-    rlim64_t rlim_cur;
-    /* The hard limit.  */
-    rlim64_t rlim_max;
- };
-#endif
-
-/* Whose usage statistics do you want?  */
-enum __rusage_who
-{
-  /* The calling process.  */
-  RUSAGE_SELF = 0,
-#define RUSAGE_SELF RUSAGE_SELF
-
-  /* All of its terminated child processes.  */
-  RUSAGE_CHILDREN = -1
-#define RUSAGE_CHILDREN RUSAGE_CHILDREN
-};
-
-#define __need_timeval
-#include <bits/time.h>		/* For `struct timeval'.  */
-
-/* Structure which says how much of each resource has been used.  */
-struct rusage
-  {
-    /* Total amount of user time used.  */
-    struct timeval ru_utime;
-    /* Total amount of system time used.  */
-    struct timeval ru_stime;
-    /* Maximum resident set size (in kilobytes).  */
-    long int ru_maxrss;
-    /* Amount of sharing of text segment memory
-       with other processes (kilobyte-seconds).  */
-    long int ru_ixrss;
-    /* Amount of data segment memory used (kilobyte-seconds).  */
-    long int ru_idrss;
-    /* Amount of stack memory used (kilobyte-seconds).  */
-    long int ru_isrss;
-    /* Number of soft page faults (i.e. those serviced by reclaiming
-       a page from the list of pages awaiting reallocation.  */
-    long int ru_minflt;
-    /* Number of hard page faults (i.e. those that required I/O).  */
-    long int ru_majflt;
-    /* Number of times a process was swapped out of physical memory.  */
-    long int ru_nswap;
-    /* Number of input operations via the file system.  Note: This
-       and `ru_oublock' do not include operations with the cache.  */
-    long int ru_inblock;
-    /* Number of output operations via the file system.  */
-    long int ru_oublock;
-    /* Number of IPC messages sent.  */
-    long int ru_msgsnd;
-    /* Number of IPC messages received.  */
-    long int ru_msgrcv;
-    /* Number of signals delivered.  */
-    long int ru_nsignals;
-    /* Number of voluntary context switches, i.e. because the process
-       gave up the process before it had to (usually to wait for some
-       resource to be available).  */
-    long int ru_nvcsw;
-    /* Number of involuntary context switches, i.e. a higher priority process
-       became runnable or the current process used up its time slice.  */
-    long int ru_nivcsw;
-  };
-
-/* Priority limits.  */
-#define PRIO_MIN	-20	/* Minimum priority a process can have.  */
-#define PRIO_MAX	20	/* Maximum priority a process can have.  */
-
-/* The type of the WHICH argument to `getpriority' and `setpriority',
-   indicating what flavor of entity the WHO argument specifies.  */
-enum __priority_which
-{
-  PRIO_PROCESS = 0,		/* WHO is a process ID.  */
-#define PRIO_PROCESS PRIO_PROCESS
-  PRIO_PGRP = 1,		/* WHO is a process group ID.  */
-#define PRIO_PGRP PRIO_PGRP
-  PRIO_USER = 2			/* WHO is a user ID.  */
-#define PRIO_USER PRIO_USER
-};
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sem.h b/sysdeps/unix/sysv/linux/mips/bits/sem.h
deleted file mode 100644
index 6282de9cc8..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/sem.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_SEM_H
-# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
-#endif
-
-#include <sys/types.h>
-
-/* Flags for `semop'.  */
-#define SEM_UNDO	0x1000		/* undo the operation on exit */
-
-/* Commands for `semctl'.  */
-#define GETPID		11		/* get sempid */
-#define GETVAL		12		/* get semval */
-#define GETALL		13		/* get all semval's */
-#define GETNCNT		14		/* get semncnt */
-#define GETZCNT		15		/* get semzcnt */
-#define SETVAL		16		/* set semval */
-#define SETALL		17		/* set all semval's */
-
-
-/* Data structure describing a set of semaphores.  */
-struct semid_ds
-{
-  struct ipc_perm sem_perm;		/* operation permission struct */
-  __time_t sem_otime;			/* last semop() time */
-  __time_t sem_ctime;			/* last time changed by semctl() */
-  unsigned long int sem_nsems;		/* number of semaphores in set */
-  unsigned long int __unused1;
-  unsigned long int __unused2;
-};
-
-/* The user should define a union like the following to use it for arguments
-   for `semctl'.
-
-   union semun
-   {
-     int val;				<= value for SETVAL
-     struct semid_ds *buf;		<= buffer for IPC_STAT & IPC_SET
-     unsigned short int *array;		<= array for GETALL & SETALL
-     struct seminfo *__buf;		<= buffer for IPC_INFO
-   };
-
-   Previous versions of this file used to define this union but this is
-   incorrect.  One can test the macro _SEM_SEMUN_UNDEFINED to see whether
-   one must define the union or not.  */
-#define _SEM_SEMUN_UNDEFINED	1
-
-#ifdef __USE_MISC
-
-/* ipcs ctl cmds */
-# define SEM_STAT 18
-# define SEM_INFO 19
-
-struct  seminfo
-{
-  int semmap;
-  int semmni;
-  int semmns;
-  int semmnu;
-  int semmsl;
-  int semopm;
-  int semume;
-  int semusz;
-  int semvmx;
-  int semaem;
-};
-
-#endif /* __USE_MISC */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
deleted file mode 100644
index b3083346dd..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright (C) 1995,1996,1997,2000,2001,2002,2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_SHM_H
-# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
-#endif
-
-#include <bits/types.h>
-
-/* Permission flag for shmget.  */
-#define SHM_R		0400		/* or S_IRUGO from <linux/stat.h> */
-#define SHM_W		0200		/* or S_IWUGO from <linux/stat.h> */
-
-/* Flags for `shmat'.  */
-#define SHM_RDONLY	010000		/* attach read-only else read-write */
-#define SHM_RND		020000		/* round attach address to SHMLBA */
-#define SHM_REMAP	040000		/* take-over region on attach */
-
-/* Commands for `shmctl'.  */
-#define SHM_LOCK	11		/* lock segment (root only) */
-#define SHM_UNLOCK	12		/* unlock segment (root only) */
-
-/* Segment low boundary address multiple.  */
-#define SHMLBA		0x40000
-
-
-/* Type to count number of attaches.  */
-typedef unsigned long int shmatt_t;
-
-/* Data structure describing a set of semaphores.  */
-struct shmid_ds
-  {
-    struct ipc_perm shm_perm;		/* operation permission struct */
-    size_t shm_segsz;			/* size of segment in bytes */
-    __time_t shm_atime;			/* time of last shmat() */
-    __time_t shm_dtime;			/* time of last shmdt() */
-    __time_t shm_ctime;			/* time of last change by shmctl() */
-    __pid_t shm_cpid;			/* pid of creator */
-    __pid_t shm_lpid;			/* pid of last shmop */
-    shmatt_t shm_nattch;		/* number of current attaches */
-    unsigned long int __unused1;
-    unsigned long int __unused2;
-  };
-
-#ifdef __USE_MISC
-
-/* ipcs ctl commands */
-# define SHM_STAT	13
-# define SHM_INFO	14
-
-/* shm_mode upper byte flags */
-# define SHM_DEST	01000	/* segment will be destroyed on last detach */
-# define SHM_LOCKED	02000   /* segment will not be swapped */
-# define SHM_HUGETLB	04000	/* segment is mapped via hugetlb */
-
-struct shminfo
-  {
-    unsigned long int shmmax;
-    unsigned long int shmmin;
-    unsigned long int shmmni;
-    unsigned long int shmseg;
-    unsigned long int shmall;
-    unsigned long int __unused1;
-    unsigned long int __unused2;
-    unsigned long int __unused3;
-    unsigned long int __unused4;
-  };
-
-struct shm_info
-  {
-    int used_ids;
-    unsigned long int shm_tot;  /* total allocated shm */
-    unsigned long int shm_rss;  /* total resident shm */
-    unsigned long int shm_swp;  /* total swapped shm */
-    unsigned long int swap_attempts;
-    unsigned long int swap_successes;
-  };
-
-#endif /* __USE_MISC */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
deleted file mode 100644
index d04e25f76f..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* The proper definitions for Linux/MIPS's sigaction.
-   Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2003
-	Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SIGNAL_H
-# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
-#endif
-
-/* Structure describing the action to be taken when a signal arrives.  */
-struct sigaction
-  {
-    /* Special flags.  */
-    unsigned int sa_flags;
-
-    /* Signal handler.  */
-#ifdef __USE_POSIX199309
-    union
-      {
-	/* Used if SA_SIGINFO is not set.  */
-	__sighandler_t sa_handler;
-	/* Used if SA_SIGINFO is set.  */
-	void (*sa_sigaction) (int, siginfo_t *, void *);
-      }
-    __sigaction_handler;
-# define sa_handler    __sigaction_handler.sa_handler
-# define sa_sigaction  __sigaction_handler.sa_sigaction
-#else
-    __sighandler_t sa_handler;
-#endif
-    /* Additional set of signals to be blocked.  */
-    __sigset_t sa_mask;
-
-    /* The ABI says here are two unused ints following. */
-    /* Restore handler.  */
-    void (*sa_restorer) (void);
-
-#if _MIPS_SZPTR < 64
-    int sa_resv[1];
-#endif
-  };
-
-/* Bits in `sa_flags'.  */
-/* Please note that some Linux kernels versions use different values for these
-   flags which is a bug in those kernel versions.  */
-#define SA_NOCLDSTOP  0x00000001 /* Don't send SIGCHLD when children stop.  */
-#define SA_NOCLDWAIT  0x00010000 /* Don't create zombie on child death.  */
-#define SA_SIGINFO    0x00000008 /* Invoke signal-catching function with
-				    three arguments instead of one.  */
-#if defined __USE_UNIX98 || defined __USE_MISC
-# define SA_ONSTACK   0x08000000 /* Use signal stack by using `sa_restorer'. */
-# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler.  */
-# define SA_RESTART   0x10000000 /* Restart syscall on signal return.  */
-# define SA_NODEFER   0x40000000 /* Don't automatically block the signal when
-				    its handler is being executed.  */
-#endif
-#ifdef __USE_MISC
-# define SA_INTERRUPT 0x20000000 /* Historical no-op.  */
-
-/* Some aliases for the SA_ constants.  */
-# define SA_NOMASK    SA_NODEFER
-# define SA_ONESHOT   SA_RESETHAND
-# define SA_STACK     SA_ONSTACK
-#endif
-
-/* Values for the HOW argument to `sigprocmask'.  */
-#define SIG_NOP	      0		/* 0 is unused to catch errors */
-#define	SIG_BLOCK     1		/* Block signals.  */
-#define	SIG_UNBLOCK   2		/* Unblock signals.  */
-#define	SIG_SETMASK   3		/* Set the set of blocked signals.  */
-#ifdef __USE_MISC
-# define SIG_SETMASK32 256	/* Goodie from SGI for BSD compatibility:
-				   set only the low 32 bit of the sigset.  */
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
deleted file mode 100644
index 079964ed46..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
-# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
-#endif
-
-#include <sgidefs.h>
-
-#ifndef sigcontext_struct
-/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
-   we need sigcontext.  */
-# define sigcontext_struct sigcontext
-
-/* # include <asm/sigcontext.h> */
-/* Instead of including the kernel header, that will vary depending on
-   whether the 32- or the 64-bit kernel is installed, we paste the
-   contents here.  In case you're wondering about the different
-   licenses, the fact that the file is pasted, instead of included,
-   doesn't really make any difference for the program that includes
-   this header.  */
-#if _MIPS_SIM == _ABIO32
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1996, 1997, 2000 by Ralf Baechle
- */
-#ifndef _ASM_SIGCONTEXT_H
-#define _ASM_SIGCONTEXT_H
-
-/*
- * Keep this struct definition in sync with the sigcontext fragment
- * in arch/mips/tools/offset.c
- */
-struct sigcontext {
-	unsigned int       sc_regmask;		/* Unused */
-	unsigned int       sc_status;
-	unsigned long long sc_pc;
-	unsigned long long sc_regs[32];
-	unsigned long long sc_fpregs[32];
-	unsigned int       sc_ownedfp;		/* Unused */
-	unsigned int       sc_fpc_csr;
-	unsigned int       sc_fpc_eir;		/* Unused */
-	unsigned int       sc_used_math;
-	unsigned int       sc_ssflags;		/* Unused */
-	unsigned long long sc_mdhi;
-	unsigned long long sc_mdlo;
-
-	unsigned int       sc_cause;		/* Unused */
-	unsigned int       sc_badvaddr;		/* Unused */
-
-	unsigned long      sc_sigset[4];	/* kernel's sigset_t */
-};
-
-#endif /* _ASM_SIGCONTEXT_H */
-#else /* _MIPS_SIM != _ABIO32 */
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1996, 1997, 1999 by Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
- */
-#ifndef _ASM_SIGCONTEXT_H
-#define _ASM_SIGCONTEXT_H
-
-/*
- * Keep this struct definition in sync with the sigcontext fragment
- * in arch/mips/tools/offset.c
- */
-struct sigcontext {
-	unsigned long long sc_regs[32];
-	unsigned long long sc_fpregs[32];
-	unsigned long long sc_mdhi;
-	unsigned long long sc_mdlo;
-	unsigned long long sc_pc;
-	unsigned int       sc_status;
-	unsigned int       sc_fpc_csr;
-	unsigned int       sc_fpc_eir;
-	unsigned int       sc_used_math;
-	unsigned int       sc_cause;
-	unsigned int       sc_badvaddr;
-};
-
-#endif /* _ASM_SIGCONTEXT_H */
-#endif /* _MIPS_SIM != _ABIO32 */
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
deleted file mode 100644
index 787e365139..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/* siginfo_t, sigevent and constants.  Linux/MIPS version.
-   Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-	Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#if !defined _SIGNAL_H && !defined __need_siginfo_t \
-    && !defined __need_sigevent_t
-# error "Never include this file directly.  Use <signal.h> instead"
-#endif
-
-#include <bits/wordsize.h>
-
-#if (!defined __have_sigval_t \
-     && (defined _SIGNAL_H || defined __need_siginfo_t \
-	 || defined __need_sigevent_t))
-# define __have_sigval_t	1
-
-/* Type for data associated with a signal.  */
-typedef union sigval
-  {
-    int sival_int;
-    void *sival_ptr;
-  } sigval_t;
-#endif
-
-#if (!defined __have_siginfo_t \
-     && (defined _SIGNAL_H || defined __need_siginfo_t))
-# define __have_siginfo_t	1
-
-# define __SI_MAX_SIZE		128
-# if __WORDSIZE == 64
-#  define __SI_PAD_SIZE		((__SI_MAX_SIZE / sizeof (int)) - 4)
-# else
-#  define __SI_PAD_SIZE		((__SI_MAX_SIZE / sizeof (int)) - 3)
-# endif
-
-
-typedef struct siginfo
-  {
-    int si_signo;		/* Signal number.  */
-    int si_code;		/* Signal code.  */
-    int si_errno;		/* If non-zero, an errno value associated with
-				   this signal, as defined in <errno.h>.  */
-    int __pad0[__SI_MAX_SIZE / sizeof (int) - __SI_PAD_SIZE - 3];
-				/* Explicit padding.  */
-
-    union
-      {
-	int _pad[__SI_PAD_SIZE];
-
-	 /* kill().  */
-	struct
-	  {
-	    __pid_t si_pid;	/* Sending process ID.  */
-	    __uid_t si_uid;	/* Real user ID of sending process.  */
-	  } _kill;
-
-	/* SIGCHLD.  */
-	struct
-	  {
-	    __pid_t si_pid;	/* Which child.  */
-	    __uid_t si_uid;	/* Real user ID of sending process.  */
-	    int si_status;	/* Exit value or signal.  */
-	    __clock_t si_utime;
-	    __clock_t si_stime;
-	  } _sigchld;
-
-	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS.  */
-	struct
-	  {
-	    void *si_addr;	/* Faulting insn/memory ref.  */
-	  } _sigfault;
-
-	/* SIGPOLL.  */
-	struct
-	  {
-	    int si_band;	/* Band event for SIGPOLL.  */
-	    int si_fd;
-	  } _sigpoll;
-
-	/* POSIX.1b timers.  */
-	struct
-	  {
-	    unsigned int _timer1;
-	    unsigned int _timer2;
-	  } _timer;
-
-	/* POSIX.1b signals.  */
-	struct
-	  {
-	    __pid_t si_pid;	/* Sending process ID.  */
-	    __uid_t si_uid;	/* Real user ID of sending process.  */
-	    sigval_t si_sigval;	/* Signal value.  */
-	  } _rt;
-      } _sifields;
-  } siginfo_t;
-
-
-/* X/Open requires some more fields with fixed names.  */
-# define si_pid		_sifields._kill.si_pid
-# define si_uid		_sifields._kill.si_uid
-# define si_status	_sifields._sigchld.si_status
-# define si_utime	_sifields._sigchld.si_utime
-# define si_stime	_sifields._sigchld.si_stime
-# define si_value	_sifields._rt.si_sigval
-# define si_int		_sifields._rt.si_sigval.sival_int
-# define si_ptr		_sifields._rt.si_sigval.sival_ptr
-# define si_addr	_sifields._sigfault.si_addr
-# define si_band	_sifields._sigpoll.si_band
-# define si_fd		_sifields._sigpoll.si_fd
-
-
-/* Values for `si_code'.  Positive values are reserved for kernel-generated
-   signals.  */
-enum
-{
-  SI_ASYNCNL = -60,		/* Sent by asynch name lookup completion.  */
-# define SI_ASYNCNL	SI_ASYNCNL
-  SI_TKILL = -6,		/* Sent by tkill.  */
-# define SI_TKILL	SI_TKILL
-  SI_SIGIO,			/* Sent by queued SIGIO.  */
-# define SI_SIGIO	SI_SIGIO
-  SI_MESGQ,			/* Sent by real time mesq state change.  */
-# define SI_MESGQ	SI_MESGQ
-  SI_TIMER,			/* Sent by real time mesq state change.  */
-# define SI_TIMER	SI_TIMER
-  SI_ASYNCIO,			/* Sent by AIO completion.  */
-# define SI_ASYNCIO	SI_ASYNCIO
-  SI_QUEUE,			/* Sent by sigqueue.  */
-# define SI_QUEUE	SI_QUEUE
-  SI_USER,			/* Sent by kill, sigsend, raise.  */
-# define SI_USER	SI_USER
-  SI_KERNEL = 0x80		/* Send by kernel.  */
-#define SI_KERNEL	SI_KERNEL
-};
-
-
-/* `si_code' values for SIGILL signal.  */
-enum
-{
-  ILL_ILLOPC = 1,		/* Illegal opcode.  */
-# define ILL_ILLOPC	ILL_ILLOPC
-  ILL_ILLOPN,			/* Illegal operand.  */
-# define ILL_ILLOPN	ILL_ILLOPN
-  ILL_ILLADR,			/* Illegal addressing mode.  */
-# define ILL_ILLADR	ILL_ILLADR
-  ILL_ILLTRP,			/* Illegal trap.  */
-# define ILL_ILLTRP	ILL_ILLTRP
-  ILL_PRVOPC,			/* Privileged opcode.  */
-# define ILL_PRVOPC	ILL_PRVOPC
-  ILL_PRVREG,			/* Privileged register.  */
-# define ILL_PRVREG	ILL_PRVREG
-  ILL_COPROC,			/* Coprocessor error.  */
-# define ILL_COPROC	ILL_COPROC
-  ILL_BADSTK			/* Internal stack error.  */
-# define ILL_BADSTK	ILL_BADSTK
-};
-
-/* `si_code' values for SIGFPE signal.  */
-enum
-{
-  FPE_INTDIV = 1,		/* Integer divide by zero.  */
-# define FPE_INTDIV	FPE_INTDIV
-  FPE_INTOVF,			/* Integer overflow.  */
-# define FPE_INTOVF	FPE_INTOVF
-  FPE_FLTDIV,			/* Floating point divide by zero.  */
-# define FPE_FLTDIV	FPE_FLTDIV
-  FPE_FLTOVF,			/* Floating point overflow.  */
-# define FPE_FLTOVF	FPE_FLTOVF
-  FPE_FLTUND,			/* Floating point underflow.  */
-# define FPE_FLTUND	FPE_FLTUND
-  FPE_FLTRES,			/* Floating point inexact result.  */
-# define FPE_FLTRES	FPE_FLTRES
-  FPE_FLTINV,			/* Floating point invalid operation.  */
-# define FPE_FLTINV	FPE_FLTINV
-  FPE_FLTSUB			/* Subscript out of range.  */
-# define FPE_FLTSUB	FPE_FLTSUB
-};
-
-/* `si_code' values for SIGSEGV signal.  */
-enum
-{
-  SEGV_MAPERR = 1,		/* Address not mapped to object.  */
-# define SEGV_MAPERR	SEGV_MAPERR
-  SEGV_ACCERR			/* Invalid permissions for mapped object.  */
-# define SEGV_ACCERR	SEGV_ACCERR
-};
-
-/* `si_code' values for SIGBUS signal.  */
-enum
-{
-  BUS_ADRALN = 1,		/* Invalid address alignment.  */
-# define BUS_ADRALN	BUS_ADRALN
-  BUS_ADRERR,			/* Non-existant physical address.  */
-# define BUS_ADRERR	BUS_ADRERR
-  BUS_OBJERR			/* Object specific hardware error.  */
-# define BUS_OBJERR	BUS_OBJERR
-};
-
-/* `si_code' values for SIGTRAP signal.  */
-enum
-{
-  TRAP_BRKPT = 1,		/* Process breakpoint.  */
-# define TRAP_BRKPT	TRAP_BRKPT
-  TRAP_TRACE			/* Process trace trap.  */
-# define TRAP_TRACE	TRAP_TRACE
-};
-
-/* `si_code' values for SIGCHLD signal.  */
-enum
-{
-  CLD_EXITED = 1,		/* Child has exited.  */
-# define CLD_EXITED	CLD_EXITED
-  CLD_KILLED,			/* Child was killed.  */
-# define CLD_KILLED	CLD_KILLED
-  CLD_DUMPED,			/* Child terminated abnormally.  */
-# define CLD_DUMPED	CLD_DUMPED
-  CLD_TRAPPED,			/* Traced child has trapped.  */
-# define CLD_TRAPPED	CLD_TRAPPED
-  CLD_STOPPED,			/* Child has stopped.  */
-# define CLD_STOPPED	CLD_STOPPED
-  CLD_CONTINUED			/* Stopped child has continued.  */
-# define CLD_CONTINUED	CLD_CONTINUED
-};
-
-/* `si_code' values for SIGPOLL signal.  */
-enum
-{
-  POLL_IN = 1,			/* Data input available.  */
-# define POLL_IN	POLL_IN
-  POLL_OUT,			/* Output buffers available.  */
-# define POLL_OUT	POLL_OUT
-  POLL_MSG,			/* Input message available.   */
-# define POLL_MSG	POLL_MSG
-  POLL_ERR,			/* I/O error.  */
-# define POLL_ERR	POLL_ERR
-  POLL_PRI,			/* High priority input available.  */
-# define POLL_PRI	POLL_PRI
-  POLL_HUP			/* Device disconnected.  */
-# define POLL_HUP	POLL_HUP
-};
-
-# undef __need_siginfo_t
-#endif	/* !have siginfo_t && (have _SIGNAL_H || need siginfo_t).  */
-
-
-#if (defined _SIGNAL_H || defined __need_sigevent_t) \
-    && !defined __have_sigevent_t
-# define __have_sigevent_t	1
-
-/* Structure to transport application-defined values with signals.  */
-# define __SIGEV_MAX_SIZE	64
-# define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
-
-/* Forward declaration of the `pthread_attr_t' type.  */
-struct __pthread_attr_s;
-
-/* XXX This one might need to change!!!  */
-typedef struct sigevent
-  {
-    sigval_t sigev_value;
-    int sigev_signo;
-    int sigev_notify;
-
-    union
-      {
-	int _pad[__SIGEV_PAD_SIZE];
-
-	struct
-	  {
-	    void (*_function) (sigval_t);	/* Function to start.  */
-	    void *_attribute;			/* Really pthread_attr_t.  */
-	  } _sigev_thread;
-      } _sigev_un;
-  } sigevent_t;
-
-/* POSIX names to access some of the members.  */
-# define sigev_notify_function   _sigev_un._sigev_thread._function
-# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
-
-/* `sigev_notify' values.  */
-enum
-{
-  SIGEV_SIGNAL = 0,		/* Notify via signal.  */
-# define SIGEV_SIGNAL	SIGEV_SIGNAL
-  SIGEV_NONE,			/* Other notification: meaningless.  */
-# define SIGEV_NONE	SIGEV_NONE
-  SIGEV_THREAD,			/* Deliver via thread creation.  */
-# define SIGEV_THREAD	SIGEV_THREAD
-
-  SIGEV_THREAD_ID = 4		/* Send signal to specific thread.  */
-#define SIGEV_THREAD_ID	SIGEV_THREAD_ID
-};
-
-#endif	/* have _SIGNAL_H.  */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h
deleted file mode 100644
index a9b6848346..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/signum.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Signal number definitions.  Linux version.
-   Copyright (C) 1995, 1997, 1998 Free Software 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	_SIGNAL_H
-
-/* Fake signal functions.  */
-#define SIG_ERR ((__sighandler_t) -1)		/* Error return.  */
-#define SIG_DFL ((__sighandler_t) 0)		/* Default action.  */
-#define SIG_IGN ((__sighandler_t) 1)		/* Ignore signal.  */
-
-#ifdef __USE_UNIX98
-# define SIG_HOLD	((__sighandler_t) 2)	/* Add signal to hold mask.  */
-#endif
-
-
-#define SIGHUP		 1	/* Hangup (POSIX).  */
-#define SIGINT		 2	/* Interrupt (ANSI).  */
-#define SIGQUIT		 3	/* Quit (POSIX).  */
-#define SIGILL		 4	/* Illegal instruction (ANSI).  */
-#define SIGTRAP		 5	/* Trace trap (POSIX).  */
-#define SIGIOT		 6	/* IOT trap (4.2 BSD).  */
-#define SIGABRT		 SIGIOT	/* Abort (ANSI).  */
-#define SIGEMT		 7
-#define SIGFPE		 8	/* Floating-point exception (ANSI).  */
-#define SIGKILL		 9	/* Kill, unblockable (POSIX).  */
-#define SIGBUS		10	/* BUS error (4.2 BSD).  */
-#define SIGSEGV		11	/* Segmentation violation (ANSI).  */
-#define SIGSYS		12
-#define SIGPIPE		13	/* Broken pipe (POSIX).  */
-#define SIGALRM		14	/* Alarm clock (POSIX).  */
-#define SIGTERM		15	/* Termination (ANSI).  */
-#define SIGUSR1		16	/* User-defined signal 1 (POSIX).  */
-#define SIGUSR2		17	/* User-defined signal 2 (POSIX).  */
-#define SIGCHLD		18	/* Child status has changed (POSIX).  */
-#define SIGCLD		SIGCHLD	/* Same as SIGCHLD (System V).  */
-#define SIGPWR		19	/* Power failure restart (System V).  */
-#define SIGWINCH	20	/* Window size change (4.3 BSD, Sun).  */
-#define SIGURG		21	/* Urgent condition on socket (4.2 BSD).  */
-#define SIGIO		22	/* I/O now possible (4.2 BSD).  */
-#define SIGPOLL		SIGIO	/* Pollable event occurred (System V).  */
-#define SIGSTOP		23	/* Stop, unblockable (POSIX).  */
-#define SIGTSTP		24	/* Keyboard stop (POSIX).  */
-#define SIGCONT		25	/* Continue (POSIX).  */
-#define SIGTTIN		26	/* Background read from tty (POSIX).  */
-#define SIGTTOU		27	/* Background write to tty (POSIX).  */
-#define SIGVTALRM	28	/* Virtual alarm clock (4.2 BSD).  */
-#define SIGPROF		29	/* Profiling alarm clock (4.2 BSD).  */
-#define SIGXCPU		30	/* CPU limit exceeded (4.2 BSD).  */
-#define SIGXFSZ		31	/* File size limit exceeded (4.2 BSD).  */
-
-
-#define _NSIG		128	/* Biggest signal number + 1
-				   (including real-time signals).  */
-
-#define SIGRTMIN	(__libc_current_sigrtmin ())
-#define SIGRTMAX	(__libc_current_sigrtmax ())
-
-/* These are the hard limits of the kernel.  These values should not be
-   used directly at user level.  */
-#define __SIGRTMIN	32
-#define __SIGRTMAX	(_NSIG - 1)
-
-#endif	/* <signal.h> included.  */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h
deleted file mode 100644
index d2c8552209..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* sigstack, sigaltstack definitions.
-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SIGNAL_H
-# error "Never include this file directly.  Use <signal.h> instead"
-#endif
-
-
-/* Structure describing a signal stack (obsolete).  */
-struct sigstack
-  {
-    void *ss_sp;		/* Signal stack pointer.  */
-    int ss_onstack;		/* Nonzero if executing on this stack.  */
-  };
-
-
-/* Possible values for `ss_flags.'.  */
-enum
-{
-  SS_ONSTACK = 1,
-#define SS_ONSTACK	SS_ONSTACK
-  SS_DISABLE
-#define SS_DISABLE	SS_DISABLE
-};
-
-/* Minimum stack size for a signal handler.  */
-#define MINSIGSTKSZ	2048
-
-/* System default stack size.  */
-#define SIGSTKSZ	8192
-
-
-/* Alternate, preferred interface.  */
-typedef struct sigaltstack
-  {
-    void *ss_sp;
-    size_t ss_size;
-    int ss_flags;
-  } stack_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
deleted file mode 100644
index 0e4a2beac7..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* System-specific socket constants and types.  Linux/MIPS version.
-   Copyright (C) 1991, 92, 1994-1999, 2000, 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
-   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 __BITS_SOCKET_H
-#define __BITS_SOCKET_H
-
-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
-# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
-#endif
-
-#define	__need_size_t
-#define __need_NULL
-#include <stddef.h>
-
-#include <limits.h>
-#include <sys/types.h>
-
-/* Type for length arguments in socket calls.  */
-#ifndef __socklen_t_defined
-typedef __socklen_t socklen_t;
-# define __socklen_t_defined
-#endif
-
-/* Types of sockets.  */
-enum __socket_type
-{
-  SOCK_DGRAM = 1,		/* Connectionless, unreliable datagrams
-				   of fixed maximum length.  */
-#define SOCK_DGRAM SOCK_DGRAM
-  SOCK_STREAM = 2,		/* Sequenced, reliable, connection-based
-				   byte streams.  */
-#define SOCK_STREAM SOCK_STREAM
-  SOCK_RAW = 3,			/* Raw protocol interface.  */
-#define SOCK_RAW SOCK_RAW
-  SOCK_RDM = 4,			/* Reliably-delivered messages.  */
-#define SOCK_RDM SOCK_RDM
-  SOCK_SEQPACKET = 5,		/* Sequenced, reliable, connection-based,
-				   datagrams of fixed maximum length.  */
-#define SOCK_SEQPACKET SOCK_SEQPACKET
-  SOCK_PACKET = 10		/* Linux specific way of getting packets
-				   at the dev level.  For writing rarp and
-				   other similar things on the user level. */
-#define SOCK_PACKET SOCK_PACKET
-};
-
-/* Protocol families.  */
-#define	PF_UNSPEC	0	/* Unspecified.  */
-#define	PF_LOCAL	1	/* Local to host (pipes and file-domain).  */
-#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.  */
-#define	PF_IPX		4	/* Novell Internet Protocol.  */
-#define	PF_APPLETALK	5	/* Appletalk DDP.  */
-#define	PF_NETROM	6	/* Amateur radio NetROM.  */
-#define	PF_BRIDGE	7	/* Multiprotocol bridge.  */
-#define	PF_ATMPVC	8	/* ATM PVCs.  */
-#define	PF_X25		9	/* Reserved for X.25 project.  */
-#define	PF_INET6	10	/* IP version 6.  */
-#define	PF_ROSE		11	/* Amateur Radio X.25 PLP.  */
-#define	PF_DECnet	12	/* Reserved for DECnet project.  */
-#define	PF_NETBEUI	13	/* Reserved for 802.2LLC project.  */
-#define	PF_SECURITY	14	/* Security callback pseudo AF.  */
-#define	PF_KEY		15	/* PF_KEY key management API.  */
-#define	PF_NETLINK	16
-#define	PF_ROUTE	PF_NETLINK /* Alias to emulate 4.4BSD.  */
-#define	PF_PACKET	17	/* Packet family.  */
-#define	PF_ASH		18	/* Ash.  */
-#define	PF_ECONET	19	/* Acorn Econet.  */
-#define	PF_ATMSVC	20	/* ATM SVCs.  */
-#define	PF_SNA		22	/* Linux SNA Project */
-#define	PF_IRDA		23	/* IRDA sockets.  */
-#define	PF_PPPOX	24	/* PPPoX sockets.  */
-#define	PF_WANPIPE	25	/* Wanpipe API sockets.  */
-#define	PF_BLUETOOTH	31	/* Bluetooth sockets.  */
-#define	PF_MAX		32	/* For now..  */
-
-/* Address families.  */
-#define	AF_UNSPEC	PF_UNSPEC
-#define	AF_LOCAL	PF_LOCAL
-#define	AF_UNIX		PF_UNIX
-#define	AF_FILE		PF_FILE
-#define	AF_INET		PF_INET
-#define	AF_AX25		PF_AX25
-#define	AF_IPX		PF_IPX
-#define	AF_APPLETALK	PF_APPLETALK
-#define	AF_NETROM	PF_NETROM
-#define	AF_BRIDGE	PF_BRIDGE
-#define	AF_ATMPVC	PF_ATMPVC
-#define	AF_X25		PF_X25
-#define	AF_INET6	PF_INET6
-#define	AF_ROSE		PF_ROSE
-#define	AF_DECnet	PF_DECnet
-#define	AF_NETBEUI	PF_NETBEUI
-#define	AF_SECURITY	PF_SECURITY
-#define	AF_KEY		PF_KEY
-#define	AF_NETLINK	PF_NETLINK
-#define	AF_ROUTE	PF_ROUTE
-#define	AF_PACKET	PF_PACKET
-#define	AF_ASH		PF_ASH
-#define	AF_ECONET	PF_ECONET
-#define	AF_ATMSVC	PF_ATMSVC
-#define	AF_SNA		PF_SNA
-#define	AF_IRDA		PF_IRDA
-#define	AF_PPPOX	PF_PPPOX
-#define	AF_WANPIPE	PF_WANPIPE
-#define	AF_BLUETOOTH	PF_BLUETOOTH
-#define	AF_MAX		PF_MAX
-
-/* Socket level values.  Others are defined in the appropriate headers.
-
-   XXX These definitions also should go into the appropriate headers as
-   far as they are available.  */
-#define SOL_RAW		255
-#define SOL_DECNET      261
-#define SOL_X25         262
-#define SOL_PACKET	263
-#define SOL_ATM		264	/* ATM layer (cell level).  */
-#define SOL_AAL		265	/* ATM Adaption Layer (packet level).  */
-#define SOL_IRDA	266
-
-/* Maximum queue length specifiable by listen.  */
-#define SOMAXCONN	128
-
-/* Get the definition of the macro to define the common sockaddr members.  */
-#include <bits/sockaddr.h>
-
-/* Structure describing a generic socket address.  */
-struct sockaddr
-  {
-    __SOCKADDR_COMMON (sa_);	/* Common data: address family and length.  */
-    char sa_data[14];		/* Address data.  */
-  };
-
-
-/* Structure large enough to hold any socket address (with the historical
-   exception of AF_UNIX).  We reserve 128 bytes.  */
-#if ULONG_MAX > 0xffffffff
-# define __ss_aligntype	__uint64_t
-#else
-# define __ss_aligntype	__uint32_t
-#endif
-#define _SS_SIZE	128
-#define _SS_PADSIZE	(_SS_SIZE - (2 * sizeof (__ss_aligntype)))
-
-struct sockaddr_storage
-  {
-    __SOCKADDR_COMMON (ss_);	/* Address family, etc.  */
-    __ss_aligntype __ss_align;	/* Force desired alignment.  */
-    char __ss_padding[_SS_PADSIZE];
-  };
-
-
-/* Bits in the FLAGS argument to `send', `recv', et al.  */
-enum
-  {
-    MSG_OOB		= 0x01,	/* Process out-of-band data.  */
-#define MSG_OOB		MSG_OOB
-    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
-#define MSG_PEEK	MSG_PEEK
-    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
-#define MSG_DONTROUTE	MSG_DONTROUTE
-#ifdef __USE_GNU
-    /* DECnet uses a different name.  */
-    MSG_TRYHARD		= MSG_DONTROUTE,
-# define MSG_TRYHARD	MSG_DONTROUTE
-#endif
-    MSG_CTRUNC		= 0x08,	/* Control data lost before delivery.  */
-#define MSG_CTRUNC	MSG_CTRUNC
-    MSG_PROXY		= 0x10,	/* Supply or ask second address.  */
-#define MSG_PROXY	MSG_PROXY
-    MSG_TRUNC		= 0x20,
-#define	MSG_TRUNC	MSG_TRUNC
-    MSG_DONTWAIT	= 0x40, /* Nonblocking IO.  */
-#define	MSG_DONTWAIT	MSG_DONTWAIT
-    MSG_EOR		= 0x80, /* End of record.  */
-#define	MSG_EOR		MSG_EOR
-    MSG_WAITALL		= 0x100, /* Wait for a full request.  */
-#define	MSG_WAITALL	MSG_WAITALL
-    MSG_FIN		= 0x200,
-#define	MSG_FIN		MSG_FIN
-    MSG_SYN		= 0x400,
-#define	MSG_SYN		MSG_SYN
-    MSG_CONFIRM		= 0x800, /* Confirm path validity.  */
-#define	MSG_CONFIRM	MSG_CONFIRM
-    MSG_RST		= 0x1000,
-#define	MSG_RST		MSG_RST
-    MSG_ERRQUEUE	= 0x2000, /* Fetch message from error queue.  */
-#define	MSG_ERRQUEUE	MSG_ERRQUEUE
-    MSG_NOSIGNAL	= 0x4000, /* Do not generate SIGPIPE.  */
-#define	MSG_NOSIGNAL	MSG_NOSIGNAL
-    MSG_MORE		= 0x8000  /* Sender will send more.  */
-#define	MSG_MORE	MSG_MORE
-  };
-
-
-/* Structure describing messages sent by
-   `sendmsg' and received by `recvmsg'.  */
-struct msghdr
-  {
-    void *msg_name;		/* Address to send to/receive from.  */
-    socklen_t msg_namelen;	/* Length of address data.  */
-
-    struct iovec *msg_iov;	/* Vector of data to send/receive into.  */
-    size_t msg_iovlen;		/* Number of elements in the vector.  */
-
-    void *msg_control;		/* Ancillary data (eg BSD filedesc passing). */
-    size_t msg_controllen;	/* Ancillary data buffer length.  */
-
-    int msg_flags;		/* Flags on received message.  */
-  };
-
-/* Structure used for storage of ancillary data object information.  */
-struct cmsghdr
-  {
-    size_t cmsg_len;		/* Length of data in cmsg_data plus length
-				   of cmsghdr structure.  */
-    int cmsg_level;		/* Originating protocol.  */
-    int cmsg_type;		/* Protocol specific type.  */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
-    __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data.  */
-#endif
-  };
-
-/* Ancillary data object manipulation macros.  */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
-#else
-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
-#endif
-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
-#define CMSG_FIRSTHDR(mhdr) \
-  ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
-   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
-#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
-			 & (size_t) ~(sizeof (size_t) - 1))
-#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
-			 + CMSG_ALIGN (sizeof (struct cmsghdr)))
-#define CMSG_LEN(len)   (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-
-extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
-				      struct cmsghdr *__cmsg) __THROW;
-#ifdef __USE_EXTERN_INLINES
-# ifndef _EXTERN_INLINE
-#  define _EXTERN_INLINE extern __inline
-# endif
-_EXTERN_INLINE struct cmsghdr *
-__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
-{
-  if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
-    /* The kernel header does this so there may be a reason.  */
-    return 0;
-
-  __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
-			       + CMSG_ALIGN (__cmsg->cmsg_len));
-  if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
-					+ __mhdr->msg_controllen)
-      || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
-	  > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
-    /* No more entries.  */
-    return 0;
-  return __cmsg;
-}
-#endif	/* Use `extern inline'.  */
-
-/* Socket level message types.  This must match the definitions in
-   <linux/socket.h>.  */
-enum
-  {
-    SCM_RIGHTS = 0x01		/* Transfer file descriptors.  */
-#define SCM_RIGHTS SCM_RIGHTS
-#ifdef __USE_BSD
-    , SCM_CREDENTIALS = 0x02	/* Credentials passing.  */
-# define SCM_CREDENTIALS SCM_CREDENTIALS
-#endif
-  };
-
-/* User visible structure for SCM_CREDENTIALS message */
-
-struct ucred
-{
-  pid_t pid;			/* PID of sending process.  */
-  uid_t uid;			/* UID of sending process.  */
-  gid_t gid;			/* GID of sending process.  */
-};
-
-/* Get socket manipulation related informations from kernel headers.  */
-#include <asm/socket.h>
-
-
-/* Structure used to manipulate the SO_LINGER option.  */
-struct linger
-  {
-    int l_onoff;		/* Nonzero to linger on close.  */
-    int l_linger;		/* Time to linger.  */
-  };
-
-#endif	/* bits/socket.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
deleted file mode 100644
index 9ae38cd8d0..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
-	Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_STAT_H
-# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
-#endif
-
-#include <sgidefs.h>
-
-/* Versions of the `struct stat' data structure.  */
-#define _STAT_VER_LINUX_OLD	1
-#define _STAT_VER_KERNEL	1
-#define _STAT_VER_SVR4		2
-#define _STAT_VER_LINUX		3
-#define _STAT_VER		_STAT_VER_LINUX /* The one defined below.  */
-
-/* Versions of the `xmknod' interface.  */
-#define _MKNOD_VER_LINUX	1
-#define _MKNOD_VER_SVR4		2
-#define _MKNOD_VER		_MKNOD_VER_LINUX /* The bits defined below.  */
-
-
-#if _MIPS_SIM == _ABIO32
-/* Structure describing file characteristics.  */
-struct stat
-  {
-    unsigned long int st_dev;
-    long int st_pad1[3];
-#ifndef __USE_FILE_OFFSET64
-    __ino_t st_ino;		/* File serial number.		*/
-#else
-    __ino64_t st_ino;		/* File serial number.		*/
-#endif
-    __mode_t st_mode;		/* File mode.  */
-    __nlink_t st_nlink;		/* Link count.  */
-    __uid_t st_uid;		/* User ID of the file's owner.	*/
-    __gid_t st_gid;		/* Group ID of the file's group.*/
-    unsigned long int st_rdev;	/* Device number, if device.  */
-#ifndef __USE_FILE_OFFSET64
-    long int st_pad2[2];
-    __off_t st_size;		/* Size of file, in bytes.  */
-    /* SVR4 added this extra long to allow for expansion of off_t.  */
-    long int st_pad3;
-#else
-    long int st_pad2[3];
-    __off64_t st_size;		/* Size of file, in bytes.  */
-#endif
-    /*
-     * Actually this should be timestruc_t st_atime, st_mtime and
-     * st_ctime but we don't have it under Linux.
-     */
-    __time_t st_atime;		/* Time of last access.  */
-    long int __reserved0;
-    __time_t st_mtime;		/* Time of last modification.  */
-    long int __reserved1;
-    __time_t st_ctime;		/* Time of last status change.  */
-    long int __reserved2;
-    __blksize_t st_blksize;	/* Optimal block size for I/O.  */
-#ifndef __USE_FILE_OFFSET64
-    __blkcnt_t st_blocks;	/* Number of 512-byte blocks allocated.  */
-#else
-    long int st_pad4;
-    __blkcnt64_t st_blocks;	/* Number of 512-byte blocks allocated.  */
-#endif
-    long int st_pad5[14];
-  };
-
-#ifdef __USE_LARGEFILE64
-struct stat64
-  {
-    unsigned long int st_dev;
-    long int st_pad1[3];
-    __ino64_t st_ino;		/* File serial number.		*/
-    __mode_t st_mode;		/* File mode.  */
-    __nlink_t st_nlink;		/* Link count.  */
-    __uid_t st_uid;		/* User ID of the file's owner.	*/
-    __gid_t st_gid;		/* Group ID of the file's group.*/
-    unsigned long int st_rdev;	/* Device number, if device.  */
-    long int st_pad2[3];
-    __off64_t st_size;		/* Size of file, in bytes.  */
-    /*
-     * Actually this should be timestruc_t st_atime, st_mtime and
-     * st_ctime but we don't have it under Linux.
-     */
-    __time_t st_atime;		/* Time of last access.  */
-    long int __reserved0;
-    __time_t st_mtime;		/* Time of last modification.  */
-    long int __reserved1;
-    __time_t st_ctime;		/* Time of last status change.  */
-    long int __reserved2;
-    __blksize_t st_blksize;	/* Optimal block size for I/O.  */
-    long int st_pad3;
-    __blkcnt64_t st_blocks;	/* Number of 512-byte blocks allocated.  */
-    long int st_pad4[14];
-  };
-#endif
-#else
-struct stat
-  {
-    __dev_t st_dev;
-    int	st_pad1[3];		/* Reserved for st_dev expansion  */
-#ifndef __USE_FILE_OFFSET64
-    __ino_t st_ino;
-#else
-    __ino64_t st_ino;
-#endif
-    __mode_t st_mode;
-    __nlink_t st_nlink;
-    __uid_t st_uid;
-    __gid_t st_gid;
-    __dev_t st_rdev;
-#if !defined __USE_FILE_OFFSET64
-    unsigned int st_pad2[2];	/* Reserved for st_rdev expansion  */
-    __off_t st_size;
-    int st_pad3;
-#else
-    unsigned int st_pad2[3];	/* Reserved for st_rdev expansion  */
-    __off64_t st_size;
-#endif
-    __time_t st_atime;
-    int __reserved0;
-    __time_t st_mtime;
-    int __reserved1;
-    __time_t st_ctime;
-    int __reserved2;
-    __blksize_t st_blksize;
-    unsigned int st_pad4;
-#ifndef __USE_FILE_OFFSET64
-    __blkcnt_t st_blocks;
-#else
-    __blkcnt64_t st_blocks;
-#endif
-    int st_pad5[14];
-  };
-
-#ifdef __USE_LARGEFILE64
-struct stat64
-  {
-    __dev_t st_dev;
-    unsigned int st_pad1[3];	/* Reserved for st_dev expansion  */
-    __ino64_t st_ino;
-    __mode_t st_mode;
-    __nlink_t st_nlink;
-    __uid_t st_uid;
-    __gid_t st_gid;
-    __dev_t st_rdev;
-    unsigned int st_pad2[3];	/* Reserved for st_rdev expansion  */
-    __off64_t st_size;
-    __time_t st_atime;
-    int __reserved0;
-    __time_t st_mtime;
-    int __reserved1;
-    __time_t st_ctime;
-    int __reserved2;
-    __blksize_t st_blksize;
-    unsigned int st_pad3;
-    __blkcnt64_t st_blocks;
-    int st_pad4[14];
-};
-#endif
-#endif
-
-/* Tell code we have these members.  */
-#define	_STATBUF_ST_BLKSIZE
-#define	_STATBUF_ST_RDEV
-
-/* Encoding of the file mode.  */
-
-#define	__S_IFMT	0170000	/* These bits determine file type.  */
-
-/* File types.  */
-#define	__S_IFDIR	0040000	/* Directory.  */
-#define	__S_IFCHR	0020000	/* Character device.  */
-#define	__S_IFBLK	0060000	/* Block device.  */
-#define	__S_IFREG	0100000	/* Regular file.  */
-#define	__S_IFIFO	0010000	/* FIFO.  */
-#define	__S_IFLNK	0120000	/* Symbolic link.  */
-#define	__S_IFSOCK	0140000	/* Socket.  */
-
-/* POSIX.1b objects.  Note that these macros always evaluate to zero.  But
-   they do it by enforcing the correct use of the macros.  */
-#define __S_TYPEISMQ(buf)  ((buf)->st_mode - (buf)->st_mode)
-#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
-#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
-
-/* Protection bits.  */
-
-#define	__S_ISUID	04000	/* Set user ID on execution.  */
-#define	__S_ISGID	02000	/* Set group ID on execution.  */
-#define	__S_ISVTX	01000	/* Save swapped text after use (sticky).  */
-#define	__S_IREAD	0400	/* Read by owner.  */
-#define	__S_IWRITE	0200	/* Write by owner.  */
-#define	__S_IEXEC	0100	/* Execute by owner.  */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
deleted file mode 100644
index 2f9bd54edc..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_STATFS_H
-# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
-#endif
-
-#include <bits/types.h>  /* for __fsid_t and __fsblkcnt_t*/
-
-struct statfs
-  {
-    long int f_type;
-#define f_fstyp f_type
-    long int f_bsize;
-    long int f_frsize;	/* Fragment size - unsupported */
-#ifndef __USE_FILE_OFFSET64
-    __fsblkcnt_t f_blocks;
-    __fsblkcnt_t f_bfree;
-    __fsblkcnt_t f_files;
-    __fsblkcnt_t f_ffree;
-    __fsblkcnt_t f_bavail;
-#else
-    __fsblkcnt64_t f_blocks;
-    __fsblkcnt64_t f_bfree;
-    __fsblkcnt64_t f_files;
-    __fsblkcnt64_t f_ffree;
-    __fsblkcnt64_t f_bavail;
-#endif
-
-	/* Linux specials */
-    __fsid_t f_fsid;
-    long int f_namelen;
-    long int f_spare[6];
-  };
-
-#ifdef __USE_LARGEFILE64
-struct statfs64
-  {
-    long int f_type;
-#define f_fstyp f_type
-    long int f_bsize;
-    long int f_frsize;	/* Fragment size - unsupported */
-    __fsblkcnt64_t f_blocks;
-    __fsblkcnt64_t f_bfree;
-    __fsblkcnt64_t f_files;
-    __fsblkcnt64_t f_ffree;
-    __fsblkcnt64_t f_bavail;
-
-	/* Linux specials */
-    __fsid_t f_fsid;
-    long int f_namelen;
-    long int f_spare[6];
-  };
-#endif
-
-/* Tell code we have these members.  */
-#define _STATFS_F_NAMELEN
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
deleted file mode 100644
index 4ff6e37ad6..0000000000
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/* termios type and macro definitions.  Linux/MIPS version.
-   Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software 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 _TERMIOS_H
-# error "Never include <bits/termios.h> directly; use <termios.h> instead."
-#endif
-
-typedef unsigned char	cc_t;
-typedef unsigned int	speed_t;
-typedef unsigned int	tcflag_t;
-
-#define NCCS 32
-struct termios
-  {
-    tcflag_t c_iflag;		/* input mode flags */
-    tcflag_t c_oflag;		/* output mode flags */
-    tcflag_t c_cflag;		/* control mode flags */
-    tcflag_t c_lflag;		/* local mode flags */
-    cc_t c_line;		/* line discipline */
-    cc_t c_cc[NCCS];		/* control characters */
-  };
-
-/* c_cc characters */
-#define VINTR		0	/* Interrupt character [ISIG].  */
-#define VQUIT		1	/* Quit character [ISIG].  */
-#define VERASE		2	/* Erase character [ICANON].  */
-#define VKILL		3	/* Kill-line character [ICANON].  */
-#define VMIN		4	/* Minimum number of bytes read at once [!ICANON].  */
-#define VTIME		5	/* Time-out value (tenths of a second) [!ICANON].  */
-#define VEOL2		6	/* Second EOL character [ICANON].  */
-#define VSWTC		7
-#define VSWTCH		VSWTC
-#define VSTART		8	/* Start (X-ON) character [IXON, IXOFF].  */
-#define VSTOP		9	/* Stop (X-OFF) character [IXON, IXOFF].  */
-#define VSUSP		10	/* Suspend character [ISIG].  */
-				/* VDSUSP is not supported on Linux. */
-/* #define VDSUSP	11	/ * Delayed suspend character [ISIG].  */
-#define VREPRINT	12	/* Reprint-line character [ICANON].  */
-#define VDISCARD	13	/* Discard character [IEXTEN].  */
-#define VWERASE		14	/* Word-erase character [ICANON].  */
-#define VLNEXT		15	/* Literal-next character [IEXTEN].  */
-#define VEOF		16	/* End-of-file character [ICANON].  */
-#define VEOL		17	/* End-of-line character [ICANON].  */
-
-/* c_iflag bits */
-#define IGNBRK	0000001		/* Ignore break condition.  */
-#define BRKINT	0000002		/* Signal interrupt on break.  */
-#define IGNPAR	0000004		/* Ignore characters with parity errors.  */
-#define PARMRK	0000010		/* Mark parity and framing errors.  */
-#define INPCK	0000020		/* Enable input parity check.  */
-#define ISTRIP	0000040		/* Strip 8th bit off characters.  */
-#define INLCR	0000100		/* Map NL to CR on input.  */
-#define IGNCR	0000200		/* Ignore CR.  */
-#define ICRNL	0000400		/* Map CR to NL on input.  */
-#define IUCLC	0001000		/* Map upper case to lower case on input.  */
-#define IXON	0002000		/* Enable start/stop output control.  */
-#define IXANY	0004000		/* Any character will restart after stop.  */
-#define IXOFF	0010000		/* Enable start/stop input control.  */
-#define IMAXBEL 0020000		/* Ring bell when input queue is full.  */
-#define IUTF8	0040000		/* Input is UTF8.  */
-
-/* c_oflag bits */
-#define OPOST	0000001		/* Perform output processing.  */
-#define OLCUC	0000002		/* Map lower case to upper case on output.  */
-#define ONLCR	0000004		/* Map NL to CR-NL on output.  */
-#define OCRNL	0000010
-#define ONOCR	0000020
-#define ONLRET	0000040
-#define OFILL	0000100
-#define OFDEL	0000200
-#if defined __USE_MISC || defined __USE_XOPEN
-# define NLDLY	0000400
-# define   NL0	0000000
-# define   NL1	0000400
-# define CRDLY	0003000
-# define   CR0	0000000
-# define   CR1	0001000
-# define   CR2	0002000
-# define   CR3	0003000
-# define TABDLY	0014000
-# define   TAB0	0000000
-# define   TAB1	0004000
-# define   TAB2	0010000
-# define   TAB3	0014000
-# define BSDLY	0020000
-# define   BS0	0000000
-# define   BS1	0020000
-# define FFDLY	0100000
-# define   FF0	0000000
-# define   FF1	0100000
-#endif
-
-#define VTDLY	0040000
-#define   VT0	0000000
-#define   VT1	0040000
-
-#ifdef __USE_MISC
-# define XTABS  0014000
-#endif
-
-/* c_cflag bit meaning */
-#ifdef __USE_MISC
-# define CBAUD	0010017
-#endif
-#define  B0	0000000		/* hang up */
-#define  B50	0000001
-#define  B75	0000002
-#define  B110	0000003
-#define  B134	0000004
-#define  B150	0000005
-#define  B200	0000006
-#define  B300	0000007
-#define  B600	0000010
-#define  B1200	0000011
-#define  B1800	0000012
-#define  B2400	0000013
-#define  B4800	0000014
-#define  B9600	0000015
-#define  B19200	0000016
-#define  B38400	0000017
-#ifdef __USE_MISC
-# define EXTA B19200
-# define EXTB B38400
-#endif
-#define CSIZE	0000060		/* Number of bits per byte (mask).  */
-#define   CS5	0000000		/* 5 bits per byte.  */
-#define   CS6	0000020		/* 6 bits per byte.  */
-#define   CS7	0000040		/* 7 bits per byte.  */
-#define   CS8	0000060		/* 8 bits per byte.  */
-#define CSTOPB	0000100		/* Two stop bits instead of one.  */
-#define CREAD	0000200		/* Enable receiver.  */
-#define PARENB	0000400		/* Parity enable.  */
-#define PARODD	0001000		/* Odd parity instead of even.  */
-#define HUPCL	0002000		/* Hang up on last close.  */
-#define CLOCAL	0004000		/* Ignore modem status lines.  */
-#ifdef __USE_MISC
-# define CBAUDEX   0010000
-#endif
-#define  B57600   0010001
-#define  B115200  0010002
-#define  B230400  0010003
-#define  B460800  0010004
-#define  B500000  0010005
-#define  B576000  0010006
-#define  B921600  0010007
-#define  B1000000 0010010
-#define  B1152000 0010011
-#define  B1500000 0010012
-#define  B2000000 0010013
-#define  B2500000 0010014
-#define  B3000000 0010015
-#define  B3500000 0010016
-#define  B4000000 0010017
-#define __MAX_BAUD B4000000
-#ifdef __USE_MISC
-# define CIBAUD	  002003600000	/* input baud rate (not used) */
-# define CRTSCTS  020000000000		/* flow control */
-#endif
-
-/* c_lflag bits */
-#define ISIG	0000001		/* Enable signals.  */
-#define ICANON	0000002		/* Do erase and kill processing.  */
-#if defined __USE_MISC || defined __USE_XOPEN
-# define XCASE	0000004
-#endif
-#define ECHO	0000010		/* Enable echo.  */
-#define ECHOE	0000020		/* Visual erase for ERASE.  */
-#define ECHOK	0000040		/* Echo NL after KILL.  */
-#define ECHONL	0000100		/* Echo NL even if ECHO is off.  */
-#define NOFLSH	0000200		/* Disable flush after interrupt.  */
-#define IEXTEN	0000400		/* Enable DISCARD and LNEXT.  */
-#ifdef __USE_MISC
-# define ECHOCTL 0001000	/* Echo control characters as ^X.  */
-# define ECHOPRT 0002000	/* Hardcopy visual erase.  */
-# define ECHOKE	 0004000	/* Visual erase for KILL.  */
-# define FLUSHO	0020000
-# define PENDIN	0040000		/* Retype pending input (state).  */
-#endif
-#define TOSTOP	0100000		/* Send SIGTTOU for background output.  */
-#define ITOSTOP	TOSTOP
-
-/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
-
-/* tcflow() and TCXONC use these */
-#define	TCOOFF		0	/* Suspend output.  */
-#define	TCOON		1	/* Restart suspended output.  */
-#define	TCIOFF		2	/* Send a STOP character.  */
-#define	TCION		3	/* Send a START character.  */
-
-/* tcflush() and TCFLSH use these */
-#define	TCIFLUSH	0	/* Discard data received but not yet read.  */
-#define	TCOFLUSH	1	/* Discard data written but not yet sent.  */
-#define	TCIOFLUSH	2	/* Discard all pending data.  */
-
-/* tcsetattr uses these */
-#define	TCSANOW		0x540e	/* Same as TCSETS; change immediately.  */
-#define	TCSADRAIN	0x540f	/* Same as TCSETSW; change when pending output is written.  */
-#define	TCSAFLUSH	0x5410	/* Same as TCSETSF; flush pending input before changing.  */
-
-#define _IOT_termios /* Hurd ioctl type field.  */ \
-  _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
deleted file mode 100644
index 00056bee7a..0000000000
--- a/sysdeps/unix/sysv/linux/mips/brk.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* brk system call for Linux/MIPS.
-   Copyright (C) 2000, 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <unistd.h>
-#include <sysdep.h>
-
-void *__curbrk = 0;
-
-/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
-   to work around different old braindamage in the old Linux/x86 ELF
-   dynamic linker.  Sigh.  */
-weak_alias (__curbrk, ___brk_addr)
-
-int
-__brk (void *addr)
-{
-  void *newbrk;
-
-  {
-    register long int res __asm__ ("$2");
-
-    asm ("move\t$4,%2\n\t"
-	 "li\t%0,%1\n\t"
-	 "syscall"		/* Perform the system call.  */
-	 : "=r" (res)
-	 : "I" (SYS_ify (brk)), "r" (addr)
-	 : "$4", "$7", __SYSCALL_CLOBBERS);
-    newbrk = (void *) res;
-  }
-  __curbrk = newbrk;
-
-  if (newbrk < addr)
-    {
-      __set_errno (ENOMEM);
-      return -1;
-    }
-
-  return 0;
-}
-weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
deleted file mode 100644
index f521df1771..0000000000
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ /dev/null
@@ -1,166 +0,0 @@
-/* Copyright (C) 1996, 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ralf Baechle <ralf@linux-mips.org>, 1996.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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.  */
-
-/* clone() is even more special than fork() as it mucks with stacks
-   and invokes a function in the right context after its all over.  */
-
-#include <sys/asm.h>
-#include <sysdep.h>
-#define _ERRNO_H	1
-#include <bits/errno.h>
-#ifdef RESET_PID
-#include <tls.h>
-#endif
-
-#define CLONE_VM      0x00000100
-#define CLONE_THREAD  0x00010000
-
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
-	     void *parent_tidptr, void *tls, void *child_tidptr) */
-
-	.text
-#if _MIPS_SIM == _ABIO32
-# define EXTRA_LOCALS 1
-#else
-# define EXTRA_LOCALS 0
-#endif
-LOCALSZ= 4
-FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
-GPOFF= FRAMESZ-(1*SZREG)
-NESTED(__clone,4*SZREG,sp)
-#ifdef __PIC__
-	SETUP_GP
-#endif
-	PTR_SUBU sp, FRAMESZ
-	SETUP_GP64 (GPOFF, __clone)
-#ifdef __PIC__
-	SAVE_GP (GPOFF)
-#endif
-#ifdef PROF
-	.set		noat
-	move		$1,ra
-	jal		_mcount
-	.set		at
-#endif
-
-
-	/* Sanity check arguments.  */
-	li		v0,EINVAL
-	beqz		a0,L(error)	/* No NULL function pointers.  */
-	beqz		a1,L(error)	/* No NULL stack pointers.  */
-
-	PTR_SUBU	a1,32		/* Reserve argument save space.  */
-	PTR_S		a0,0(a1)	/* Save function pointer.  */
-	PTR_S		a3,PTRSIZE(a1)	/* Save argument pointer.  */
-#ifdef RESET_PID
-	LONG_S		a2,(PTRSIZE*2)(a1)	/* Save clone flags.  */
-#endif
-
-	move		a0,a2
-
-	/* Shuffle in the last three arguments - arguments 5, 6, and 7 to
-	   this function, but arguments 3, 4, and 5 to the syscall.  */
-#if _MIPS_SIM == _ABIO32
-	PTR_L		a2,(FRAMESZ+PTRSIZE+PTRSIZE+16)(sp)
-	PTR_S		a2,16(sp)
-	PTR_L		a2,(FRAMESZ+16)(sp)
-	PTR_L		a3,(FRAMESZ+PTRSIZE+16)(sp)
-#else
-	move		a2,a4
-	move		a3,a5
-	move		a4,a6
-#endif
-
-	/* Do the system call */
-	li		v0,__NR_clone
-	syscall
-
-	bnez		a3,L(error)
-	beqz		v0,L(thread_start)
-
-	/* Successful return from the parent */
-	RESTORE_GP64
-	PTR_ADDU	sp, FRAMESZ
-	ret
-
-	/* Something bad happened -- no child created */
-L(error):
-#ifdef __PIC__
-	PTR_LA		t9,__syscall_error
-	RESTORE_GP64
-	PTR_ADDU	sp, FRAMESZ
-	jr		t9
-#else
-	RESTORE_GP64
-	PTR_ADDU	sp, FRAMESZ
-	j		__syscall_error
-#endif
-	END(__clone)
-
-/* Load up the arguments to the function.  Put this block of code in
-   its own function so that we can terminate the stack trace with our
-   debug info.  */
-
-ENTRY(__thread_start)
-L(thread_start):
-	/* cp is already loaded.  */
-	SAVE_GP (GPOFF)
-	/* The stackframe has been created on entry of clone().  */
-
-#ifdef RESET_PID
-	/* Check and see if we need to reset the PID.  */
-	LONG_L		a0,(PTRSIZE*2)(sp)
-	and		a1,a0,CLONE_THREAD
-	beqz		a1,L(restore_pid)
-L(donepid):
-#endif
-
-	/* Restore the arg for user's function.  */
-	PTR_L		t9,0(sp)	/* Function pointer.  */
-	PTR_L		a0,PTRSIZE(sp)	/* Argument pointer.  */
-
-	/* Call the user's function.  */
-	jal		t9
-
-	/* Call _exit rather than doing it inline for breakpoint purposes.  */
-	move		a0,v0
-#ifdef __PIC__
-	PTR_LA		t9,_exit
-	jalr		t9
-#else
-	jal		_exit
-#endif
-
-#ifdef RESET_PID
-L(restore_pid):
-	and		a1,a0,CLONE_VM
-	li		v0,-1
-	bnez		a1,L(gotpid)
-	li		v0,__NR_getpid
-	syscall
-L(gotpid):
-	READ_THREAD_POINTER(v1)
-	INT_S		v0,PID_OFFSET(v1)
-	INT_S		v0,TID_OFFSET(v1)
-	b		L(donepid)
-#endif
-
-	END(__thread_start)
-
-weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
deleted file mode 100755
index 4d9568f001..0000000000
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ /dev/null
@@ -1,78 +0,0 @@
-# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
- # Local configure fragment for sysdeps/unix/sysv/linux/mips.
-
-case $machine in
-mips*64*)
-  rm -f asm-unistd.h
-  asm_unistd_h=$sysheaders/asm/unistd.h
-  if test ! -f $asm_unistd_h; then
-    # Try to find asm/unistd.h in compiler header search path.
-    try_asm_unistd_h=`echo '#include <asm/unistd.h>' | $CPP - |
-			sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'`
-    if test -n "$try_asm_unistd_h" &&
-       test -f "$try_asm_unistd_h"; then
-      asm_unistd_h=$try_asm_unistd_h
-    fi
-  fi
-  if test ! -f "$asm_unistd_h"; then
-    { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5
-echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
-    echo '#include <asm/unistd.h>' > asm-unistd.h
-  elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
-    # The point of this preprocessing is to turn __NR_<syscall> into
-    # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
-    # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
-    # and <abi> is the compiler-enabled ABI.
-    cat "$asm_unistd_h" |
-    sed -e 's,__NR_,__NR_N64_,g' \
-        -e 's,__NR_N64_##,__NR_##,g' \
-	-e 's,__NR_N64_O32_,__NR_O32_,g' \
-	-e 's,__NR_N64_N32_,__NR_N32_,g' \
-	-e 's,__NR_N64_N64_,__NR_N64_,g' \
-    | awk > asm-unistd.h '
-BEGIN { print "#include <sgidefs.h>"; }
-/^#define __NR.*unused/ { print; next; }
-/^#define __NR_N64__exit __NR_N64_exit/ {
-	print "#define __NR__exit __NR_exit";
-	print "#define __NR_O32__exit __NR_O32_exit";
-	print "#define __NR_N32__exit __NR_N32_exit";
-	print; next;
-}
-/^#define __NR_O32_/ {
-	name = $2;
-	sub (/_O32_/, "_", name);
-	print;
-	print "#if _MIPS_SIM == _ABIO32";
-	print "# define " name " " $2;
-	print "#endif";
-	next;
-}
-/^#define __NR_N32_/ {
-	name = $2;
-	sub (/_N32_/, "_", name);
-	print;
-	print "#if _MIPS_SIM == _ABIN32";
-	print "# define " name " " $2;
-	print "#endif";
-	next;
-}
-/^#define __NR_N64_/ {
-	name = $2;
-	sub (/_N64_/, "_", name);
-	print;
-	print "#if _MIPS_SIM == _ABI64";
-	print "# define " name " " $2;
-	print "#endif";
-	next;
-}
-{
-	print;
-}'
-  else
-    echo '#include <asm/unistd.h>' > asm-unistd.h
-  fi ;;
-mips*)
-  rm -f asm-unistd.h
-  echo '#include <asm/unistd.h>' > asm-unistd.h
-  ;;
-esac
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
deleted file mode 100644
index e2e5d16c55..0000000000
--- a/sysdeps/unix/sysv/linux/mips/configure.in
+++ /dev/null
@@ -1,78 +0,0 @@
-sinclude(./aclocal.m4)dnl Autoconf lossage
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/unix/sysv/linux/mips.
-
-case $machine in
-mips*64*)
-  rm -f asm-unistd.h
-  asm_unistd_h=$sysheaders/asm/unistd.h
-  if test ! -f $asm_unistd_h; then
-    # Try to find asm/unistd.h in compiler header search path.
-    try_asm_unistd_h=`echo '#include <asm/unistd.h>' | $CPP - |
-			sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'`
-    if test -n "$try_asm_unistd_h" &&
-       test -f "$try_asm_unistd_h"; then
-      asm_unistd_h=$try_asm_unistd_h
-    fi
-  fi
-  if test ! -f "$asm_unistd_h"; then
-    AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed])
-    echo '#include <asm/unistd.h>' > asm-unistd.h
-  elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
-    # The point of this preprocessing is to turn __NR_<syscall> into
-    # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
-    # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
-    # and <abi> is the compiler-enabled ABI.
-    cat "$asm_unistd_h" |
-    sed -e 's,__NR_,__NR_N64_,g' \
-        -e 's,__NR_N64_##,__NR_##,g' \
-	-e 's,__NR_N64_O32_,__NR_O32_,g' \
-	-e 's,__NR_N64_N32_,__NR_N32_,g' \
-	-e 's,__NR_N64_N64_,__NR_N64_,g' \
-    | awk > asm-unistd.h '
-BEGIN { print "#include <sgidefs.h>"; }
-/^#define __NR.*unused/ { print; next; }
-/^#define __NR_N64__exit __NR_N64_exit/ {
-	print "#define __NR__exit __NR_exit";
-	print "#define __NR_O32__exit __NR_O32_exit";
-	print "#define __NR_N32__exit __NR_N32_exit";
-	print; next;
-}
-/^#define __NR_O32_/ {
-	name = $2;
-	sub (/_O32_/, "_", name);
-	print;
-	print "#if _MIPS_SIM == _ABIO32";
-	print "# define " name " " $2;
-	print "#endif";
-	next;
-}
-/^#define __NR_N32_/ {
-	name = $2;
-	sub (/_N32_/, "_", name);
-	print;
-	print "#if _MIPS_SIM == _ABIN32";
-	print "# define " name " " $2;
-	print "#endif";
-	next;
-}
-/^#define __NR_N64_/ {
-	name = $2;
-	sub (/_N64_/, "_", name);
-	print;
-	print "#if _MIPS_SIM == _ABI64";
-	print "# define " name " " $2;
-	print "#endif";
-	next;
-}
-{
-	print;
-}'
-  else
-    echo '#include <asm/unistd.h>' > asm-unistd.h
-  fi ;;
-mips*)
-  rm -f asm-unistd.h
-  echo '#include <asm/unistd.h>' > asm-unistd.h
-  ;;
-esac
diff --git a/sysdeps/unix/sysv/linux/mips/dl-cache.h b/sysdeps/unix/sysv/linux/mips/dl-cache.h
deleted file mode 100644
index 4fa5d3ad22..0000000000
--- a/sysdeps/unix/sysv/linux/mips/dl-cache.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
-   Copyright (C) 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#define add_system_dir(dir) \
-  do								\
-    {								\
-      size_t len = strlen (dir);				\
-      char path[len + 3];					\
-      memcpy (path, dir, len + 1);				\
-      if (len >= 6						\
-	  && (! memcmp (path + len - 6, "/lib64", 6)		\
-	      || ! memcmp (path + len - 6, "/lib32", 6)))	\
-	{							\
-	  len -= 2;						\
-	  path[len] = '\0';					\
-	}							\
-      add_dir (path);						\
-      if (len >= 4 && ! memcmp (path + len - 4, "/lib", 4))	\
-	{							\
-	  memcpy (path + len, "32", 3);				\
-	  add_dir (path);					\
-	  memcpy (path + len, "64", 3);				\
-	  add_dir (path);					\
-	}							\
-    } while (0)
-
-#include_next <dl-cache.h>
diff --git a/sysdeps/unix/sysv/linux/mips/entry.h b/sysdeps/unix/sysv/linux/mips/entry.h
deleted file mode 100644
index 04d05d2b0a..0000000000
--- a/sysdeps/unix/sysv/linux/mips/entry.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef __ASSEMBLY__
-extern void __start (void);
-#endif
-
-#define ENTRY_POINT __start
diff --git a/sysdeps/unix/sysv/linux/mips/fcntl.c b/sysdeps/unix/sysv/linux/mips/fcntl.c
deleted file mode 100644
index ea951bc4f9..0000000000
--- a/sysdeps/unix/sysv/linux/mips/fcntl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
deleted file mode 100644
index a46e22f828..0000000000
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1997,1998,1999,2000,2001,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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <endian.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <kernel-features.h>
-
-#ifdef __NR_ftruncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls.  */
-extern int __have_no_truncate64;
-#endif
-
-/* Truncate the file FD refers to to LENGTH bytes.  */
-int
-__ftruncate64 (int fd, off64_t length)
-{
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! __have_no_truncate64)
-#endif
-    {
-      unsigned int low = length & 0xffffffff;
-      unsigned int high = length >> 32;
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      int saved_errno = errno;
-#endif
-      int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
-				   __LONG_LONG_PAIR (high, low));
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      if (result != -1 || errno != ENOSYS)
-#endif
-	return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      __set_errno (saved_errno);
-      __have_no_truncate64 = 1;
-#endif
-    }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if ((off_t) length != length)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  return __ftruncate (fd, (off_t) length);
-#endif
-}
-weak_alias (__ftruncate64, ftruncate64)
-
-#else
-/* Use the generic implementation.  */
-# include <misc/ftruncate64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/getmsg.c b/sysdeps/unix/sysv/linux/mips/getmsg.c
deleted file mode 100644
index 3a1fa08525..0000000000
--- a/sysdeps/unix/sysv/linux/mips/getmsg.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/getpagesize.c b/sysdeps/unix/sysv/linux/mips/getpagesize.c
deleted file mode 100644
index 49492e5137..0000000000
--- a/sysdeps/unix/sysv/linux/mips/getpagesize.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/ia64/getpagesize.c>
diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/sysdeps/unix/sysv/linux/mips/getsysstats.c
deleted file mode 100644
index 9b521ac76a..0000000000
--- a/sysdeps/unix/sysv/linux/mips/getsysstats.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Determine various system internal values, Linux/MIPS version.
-   Copyright (C) 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-
-/* We need to define a special parser for /proc/cpuinfo.  */
-#define GET_NPROCS_PARSER(FP, BUFFER, RESULT)				  \
-  do									  \
-    {									  \
-      (RESULT) = 0;							  \
-      /* Read all lines and count the lines starting with the string	  \
-	 "cpu model".  We don't have to fear extremely long lines since	  \
-	 the kernel will not generate them.  8192 bytes are really	  \
-	 enough.  */							  \
-      while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL)	  \
-	if (strncmp (BUFFER, "cpu model", 9) == 0)			  \
-	  ++(RESULT);							  \
-    }									  \
-  while (0)
-
-#include <sysdeps/unix/sysv/linux/getsysstats.c>
diff --git a/sysdeps/unix/sysv/linux/mips/ipc_priv.h b/sysdeps/unix/sysv/linux/mips/ipc_priv.h
deleted file mode 100644
index 9b85386a7c..0000000000
--- a/sysdeps/unix/sysv/linux/mips/ipc_priv.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/alpha/ipc_priv.h>
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
deleted file mode 100644
index b6f52cc9c9..0000000000
--- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* This is the sigaction structure from the Linux 2.1.24 kernel.  */
-
-#include <sgidefs.h>
-
-#define HAVE_SA_RESTORER
-
-struct old_kernel_sigaction {
-	unsigned int	sa_flags;
-	__sighandler_t	k_sa_handler;
-	unsigned long	sa_mask;
-	unsigned int    __pad0[3]; /* reserved, keep size constant */
-
-	/* Abi says here follows reserved int[2] */
-	void		(*sa_restorer)(void);
-#if (_MIPS_SZPTR < 64)
-	/*
-	 * For 32 bit code we have to pad struct sigaction to get
-	 * constant size for the ABI
-	 */
-	int		pad1[1]; /* reserved */
-#endif
-};
-
-
-#define _KERNEL_NSIG	       128
-#define _KERNEL_NSIG_BPW       _MIPS_SZLONG
-#define _KERNEL_NSIG_WORDS     (_KERNEL_NSIG / _KERNEL_NSIG_BPW)
-
-typedef struct {
-	unsigned long sig[_KERNEL_NSIG_WORDS];
-} kernel_sigset_t;
-
-/* This is the sigaction structure from the Linux 2.1.68 kernel.  */
-struct kernel_sigaction {
-	unsigned int	sa_flags;
-	__sighandler_t	k_sa_handler;
-	kernel_sigset_t	sa_mask;
-	void		(*sa_restorer)(void);
-	int		s_resv[1]; /* reserved */
-};
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
deleted file mode 100644
index cab1e7110e..0000000000
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#include <sgidefs.h>
-/* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the
-   userland data structures are not identical, because of different
-   padding.  */
-/* Definition of `struct stat' used in the kernel.  */
-#if _MIPS_SIM != _ABIO32
-struct kernel_stat
-  {
-    unsigned int st_dev;
-    unsigned int __pad1[3];
-    unsigned long long st_ino;
-    unsigned int st_mode;
-    unsigned int st_nlink;
-    int st_uid;
-    int st_gid;
-    unsigned int st_rdev;
-    unsigned int __pad2[3];
-    long long st_size;
-    unsigned int st_atime;
-    unsigned int __unused1;
-    unsigned int st_mtime;
-    unsigned int __unused2;
-    unsigned int st_ctime;
-    unsigned int __unused3;
-    unsigned int st_blksize;
-    unsigned int __pad3;
-    unsigned long long st_blocks;
-  };
-#else
-struct kernel_stat
-  {
-    unsigned long int st_dev;
-    long int __pad1[3];			/* Reserved for network id */
-    unsigned long int st_ino;
-    unsigned long int st_mode;
-    unsigned long int st_nlink;
-    long int st_uid;
-    long int st_gid;
-    unsigned long int st_rdev;
-    long int __pad2[2];
-    long int st_size;
-    long int __pad3;
-    long int st_atime;
-    long int __unused1;
-    long int st_mtime;
-    long int __unused2;
-    long int st_ctime;
-    long int __unused3;
-    long int st_blksize;
-    long int st_blocks;
-    char st_fstype[16];			/* Filesystem type name, unsupported */
-    long st_pad4[8];
-    /* Linux specific fields */
-    unsigned int st_flags;
-    unsigned int st_gen;
-  };
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
deleted file mode 100644
index 9b622f4d1f..0000000000
--- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU 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 _KERNEL_TERMIOS_H
-#define _KERNEL_TERMIOS_H 1
-/* The following corresponds to the values from the Linux 2.1.24 kernel.  */
-
-#define __KERNEL_NCCS 23
-
-struct __kernel_termios
-  {
-    tcflag_t c_iflag;		/* input mode flags */
-    tcflag_t c_oflag;		/* output mode flags */
-    tcflag_t c_cflag;		/* control mode flags */
-    tcflag_t c_lflag;		/* local mode flags */
-    cc_t c_line;		/* line discipline */
-    cc_t c_cc[__KERNEL_NCCS];	/* control characters */
-  };
-
-#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/mips/lockf64.c b/sysdeps/unix/sysv/linux/mips/lockf64.c
deleted file mode 100644
index a88f5a784a..0000000000
--- a/sysdeps/unix/sysv/linux/mips/lockf64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
deleted file mode 100644
index 3da2412259..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ /dev/null
@@ -1,292 +0,0 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   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 _LINUX_MIPS_MIPS32_SYSDEP_H
-#define _LINUX_MIPS_MIPS32_SYSDEP_H 1
-
-/* There is some commonality.  */
-#include <sysdeps/unix/mips/mips32/sysdep.h>
-
-/* For Linux we can use the system call table in the header file
-	/usr/include/asm/unistd.h
-   of the kernel.  But these symbols do not follow the SYS_* syntax
-   so we have to redefine the `SYS_ify' macro here.  */
-#undef SYS_ify
-#ifdef __STDC__
-# define SYS_ify(syscall_name)	__NR_##syscall_name
-#else
-# define SYS_ify(syscall_name)	__NR_/**/syscall_name
-#endif
-
-#ifdef __ASSEMBLER__
-
-/* We don't want the label for the error handler to be visible in the symbol
-   table when we define it here.  */
-#ifdef __PIC__
-# define SYSCALL_ERROR_LABEL 99b
-#endif
-
-#else   /* ! __ASSEMBLER__ */
-
-/* Define a macro which expands into the inline wrapper code for a system
-   call.  */
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...)                               \
-  ({ INTERNAL_SYSCALL_DECL(err);					\
-     long result_var = INTERNAL_SYSCALL (name, err, nr, args);		\
-     if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) )			\
-       {								\
-	 __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err));	\
-	 result_var = -1L;						\
-       }								\
-     result_var; })
-
-#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long err
-
-#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err)   ((long) (err))
-
-#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err)     (val)
-
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
-	internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t",	\
-			      "i" (SYS_ify (name)), err, args)
-
-#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
-	internal_syscall##nr (= number, , "r" (__v0), err, args)
-
-#define internal_syscall0(ncs_init, cs_init, input, err, dummy...)	\
-({									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2") ncs_init;				\
-	register long __a3 asm("$7");					\
-	__asm__ volatile (						\
-	".set\tnoreorder\n\t"						\
-	cs_init								\
-	"syscall\n\t"							\
-	".set reorder"							\
-	: "=r" (__v0), "=r" (__a3)					\
-	: input								\
-	: __SYSCALL_CLOBBERS);						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall1(ncs_init, cs_init, input, err, arg1)		\
-({									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2") ncs_init;				\
-	register long __a0 asm("$4") = (long) arg1;			\
-	register long __a3 asm("$7");					\
-	__asm__ volatile (						\
-	".set\tnoreorder\n\t"						\
-	cs_init								\
-	"syscall\n\t"							\
-	".set reorder"							\
-	: "=r" (__v0), "=r" (__a3)					\
-	: input, "r" (__a0)						\
-	: __SYSCALL_CLOBBERS);						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2)	\
-({									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2") ncs_init;				\
-	register long __a0 asm("$4") = (long) arg1;			\
-	register long __a1 asm("$5") = (long) arg2;			\
-	register long __a3 asm("$7");					\
-	__asm__ volatile (						\
-	".set\tnoreorder\n\t"						\
-	cs_init								\
-	"syscall\n\t"							\
-	".set\treorder"						\
-	: "=r" (__v0), "=r" (__a3)					\
-	: input, "r" (__a0), "r" (__a1)					\
-	: __SYSCALL_CLOBBERS);						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3)\
-({									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2") ncs_init;				\
-	register long __a0 asm("$4") = (long) arg1;			\
-	register long __a1 asm("$5") = (long) arg2;			\
-	register long __a2 asm("$6") = (long) arg3;			\
-	register long __a3 asm("$7");					\
-	__asm__ volatile (						\
-	".set\tnoreorder\n\t"						\
-	cs_init								\
-	"syscall\n\t"							\
-	".set\treorder"						\
-	: "=r" (__v0), "=r" (__a3)					\
-	: input, "r" (__a0), "r" (__a1), "r" (__a2)			\
-	: __SYSCALL_CLOBBERS);						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4)\
-({									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2") ncs_init;				\
-	register long __a0 asm("$4") = (long) arg1;			\
-	register long __a1 asm("$5") = (long) arg2;			\
-	register long __a2 asm("$6") = (long) arg3;			\
-	register long __a3 asm("$7") = (long) arg4;			\
-	__asm__ volatile (						\
-	".set\tnoreorder\n\t"						\
-	cs_init								\
-	"syscall\n\t"							\
-	".set\treorder"						\
-	: "=r" (__v0), "+r" (__a3)					\
-	: input, "r" (__a0), "r" (__a1), "r" (__a2)			\
-	: __SYSCALL_CLOBBERS);						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-/* We need to use a frame pointer for the functions in which we
-   adjust $sp around the syscall, or debug information and unwind
-   information will be $sp relative and thus wrong during the syscall.  As
-   of GCC 3.4.3, this is sufficient.  */
-#define FORCE_FRAME_POINTER alloca (4)
-
-#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5)\
-({									\
-	long _sys_result;						\
-									\
-	FORCE_FRAME_POINTER;						\
-	{								\
-	register long __v0 asm("$2") ncs_init;				\
-	register long __a0 asm("$4") = (long) arg1;			\
-	register long __a1 asm("$5") = (long) arg2;			\
-	register long __a2 asm("$6") = (long) arg3;			\
-	register long __a3 asm("$7") = (long) arg4;			\
-	__asm__ volatile (						\
-	".set\tnoreorder\n\t"						\
-	"subu\t$29, 32\n\t"						\
-	"sw\t%6, 16($29)\n\t"						\
-	cs_init								\
-	"syscall\n\t"							\
-	"addiu\t$29, 32\n\t"						\
-	".set\treorder"						\
-	: "=r" (__v0), "+r" (__a3)					\
-	: input, "r" (__a0), "r" (__a1), "r" (__a2),			\
-	  "r" ((long)arg5)						\
-	: __SYSCALL_CLOBBERS);						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6)\
-({									\
-	long _sys_result;						\
-									\
-	FORCE_FRAME_POINTER;						\
-	{								\
-	register long __v0 asm("$2") ncs_init;				\
-	register long __a0 asm("$4") = (long) arg1;			\
-	register long __a1 asm("$5") = (long) arg2;			\
-	register long __a2 asm("$6") = (long) arg3;			\
-	register long __a3 asm("$7") = (long) arg4;			\
-	__asm__ volatile (						\
-	".set\tnoreorder\n\t"						\
-	"subu\t$29, 32\n\t"						\
-	"sw\t%6, 16($29)\n\t"						\
-	"sw\t%7, 20($29)\n\t"						\
-	cs_init								\
-	"syscall\n\t"							\
-	"addiu\t$29, 32\n\t"						\
-	".set\treorder"						\
-	: "=r" (__v0), "+r" (__a3)					\
-	: input, "r" (__a0), "r" (__a1), "r" (__a2),			\
-	  "r" ((long)arg5), "r" ((long)arg6)				\
-	: __SYSCALL_CLOBBERS);						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall7(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
-({									\
-	long _sys_result;						\
-									\
-	FORCE_FRAME_POINTER;						\
-	{								\
-	register long __v0 asm("$2") ncs_init;				\
-	register long __a0 asm("$4") = (long) arg1;			\
-	register long __a1 asm("$5") = (long) arg2;			\
-	register long __a2 asm("$6") = (long) arg3;			\
-	register long __a3 asm("$7") = (long) arg4;			\
-	__asm__ volatile (						\
-	".set\tnoreorder\n\t"						\
-	"subu\t$29, 32\n\t"						\
-	"sw\t%6, 16($29)\n\t"						\
-	"sw\t%7, 20($29)\n\t"						\
-	"sw\t%8, 24($29)\n\t"						\
-	cs_init								\
-	"syscall\n\t"							\
-	"addiu\t$29, 32\n\t"						\
-	".set\treorder"						\
-	: "=r" (__v0), "+r" (__a3)					\
-	: input, "r" (__a0), "r" (__a1), "r" (__a2),			\
-	  "r" ((long)arg5), "r" ((long)arg6), "r" ((long)arg7)		\
-	: __SYSCALL_CLOBBERS);						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
-
-#endif /* __ASSEMBLER__ */
-
-#endif /* linux/mips/mips32/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h b/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h
deleted file mode 100644
index d490fb95e2..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sysdeps/generic/ldconfig.h>
-
-#define SYSDEP_KNOWN_INTERPRETER_NAMES \
-  { "/lib32/ld.so.1", FLAG_ELF_LIBC6 }, \
-  { "/lib64/ld.so.1", FLAG_ELF_LIBC6 },
-#define SYSDEP_KNOWN_LIBRARY_NAMES \
-  { "libc.so.6", FLAG_ELF_LIBC6 },	\
-  { "libm.so.6", FLAG_ELF_LIBC6 },
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
deleted file mode 100644
index 2c327327e0..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
+++ /dev/null
@@ -1 +0,0 @@
-s_^\(RTLDLIST=\)\(.*lib\)\(\|32\|64\)\(/[^/]*\.so\.[0-9.]*\)[ 	]*$_\1"\232\4 \264\4 \2\4"_
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/llseek.c b/sysdeps/unix/sysv/linux/mips/mips64/llseek.c
deleted file mode 100644
index 24013a8224..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/llseek.c
+++ /dev/null
@@ -1 +0,0 @@
-/* lseek() is 64-bit capable already.  */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c
deleted file mode 100644
index 42efcba315..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sys/types.h>
-
-#include <sysdep.h>
-
-extern int ftruncate (int fd, off64_t length);
-
-int __ftruncate64 (int fd, off64_t length) {
-  return ftruncate (fd, length);
-}
-weak_alias (__ftruncate64, ftruncate64)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
deleted file mode 100644
index e6013669a4..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   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 _LINUX_MIPS_SYSDEP_H
-#define _LINUX_MIPS_SYSDEP_H 1
-
-/* There is some commonality.  */
-#include <sysdeps/unix/mips/mips64/n32/sysdep.h>
-
-/* For Linux we can use the system call table in the header file
-	/usr/include/asm/unistd.h
-   of the kernel.  But these symbols do not follow the SYS_* syntax
-   so we have to redefine the `SYS_ify' macro here.  */
-#undef SYS_ify
-#ifdef __STDC__
-# define SYS_ify(syscall_name)	__NR_##syscall_name
-#else
-# define SYS_ify(syscall_name)	__NR_/**/syscall_name
-#endif
-
-#ifdef __ASSEMBLER__
-
-/* We don't want the label for the error handler to be visible in the symbol
-   table when we define it here.  */
-#ifdef __PIC__
-# define SYSCALL_ERROR_LABEL 99b
-#endif
-
-#else   /* ! __ASSEMBLER__ */
-
-/* Define a macro which expands into the inline wrapper code for a system
-   call.  */
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...)                               \
-  ({ INTERNAL_SYSCALL_DECL(err);					\
-     long result_var = INTERNAL_SYSCALL (name, err, nr, args);      	\
-     if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) )  		\
-       {                                                                \
-         __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err));      	\
-         result_var = -1L;                               		\
-       }                                                                \
-     result_var; })
-
-#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long err
-
-#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err)   ((long) (err))
-
-#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err)     (val)
-
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args)
-
-#define internal_syscall0(name, err, dummy...) 				\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2"); 					\
-	register long __a3 asm("$7"); 					\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %2\t\t\t# " #name "\n\t"				\
-	"syscall\n\t" 							\
-	".set reorder" 							\
-	: "=r" (__v0), "=r" (__a3) 					\
-	: "i" (SYS_ify(name))						\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall1(name, err, arg1) 				\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long long __v0 asm("$2"); 				\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a3 asm("$7"); 				\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %3\t\t\t# " #name "\n\t"				\
-	"syscall\n\t" 							\
-	".set reorder" 							\
-	: "=r" (__v0), "=r" (__a3) 					\
-	: "r" (__a0), "i" (SYS_ify(name)) 				\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall2(name, err, arg1, arg2) 			\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long long __v0 asm("$2"); 				\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a3 asm("$7"); 				\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %4\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "=r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "i" (SYS_ify(name))			\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall3(name, err, arg1, arg2, arg3) 			\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long long __v0 asm("$2"); 				\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a2 asm("$6") = (long long) arg3; 		\
-	register long long __a3 asm("$7"); 				\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %5\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "=r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) 	\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) 		\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long long __v0 asm("$2"); 				\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a2 asm("$6") = (long long) arg3; 		\
-	register long long __a3 asm("$7") = (long long) arg4; 		\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %5\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "+r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) 	\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) 	\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long long __v0 asm("$2"); 				\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a2 asm("$6") = (long long) arg3; 		\
-	register long long __a3 asm("$7") = (long long) arg4; 		\
-	register long long __a4 asm("$8") = (long long) arg5; 		\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %5\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "+r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), 	\
-	  "r" (__a4) 							\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long long __v0 asm("$2"); 				\
-	register long long __a0 asm("$4") = (long long) arg1; 		\
-	register long long __a1 asm("$5") = (long long) arg2; 		\
-	register long long __a2 asm("$6") = (long long) arg3; 		\
-	register long long __a3 asm("$7") = (long long) arg4; 		\
-	register long long __a4 asm("$8") = (long long) arg5; 		\
-	register long long __a5 asm("$9") = (long long) arg6; 		\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %5\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "+r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), 	\
-	  "r" (__a4), "r" (__a5)					\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
-#endif /* __ASSEMBLER__ */
-
-#endif /* linux/mips/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c
deleted file mode 100644
index 339023f14f..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sys/types.h>
-
-#include <sysdep.h>
-#include <bp-checks.h>
-
-extern int truncate (const char *__unbounded path, int dummy,
-		     off64_t length);
-
-int truncate64 (const char *__unbounded path, int dummy,
-		off64_t length) {
-  return truncate (path, dummy, length);
-}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c
deleted file mode 100644
index 33918ea6a5..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* glob64 is in glob.c */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
deleted file mode 100644
index e4b4f00a8c..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright 2003, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sysdep.h>
-
-#include <sys/asm.h>
-
-/* Sign-extend the ioctl number, since the kernel wants it as a
-   sign-extended 32-bit value, but our prototype is that of a long.  */
-
-	.text
-ENTRY (__ioctl)
-	sll a1, a1, 0
-	li v0, __NR_ioctl
-	syscall			/* Do the system call.  */
-	bne a3, zero, L(error)
-	ret
-
-L(error):
-	SETUP_GP64 (a0, __ioctl)
-	PTR_LA t9, __syscall_error
-	RESTORE_GP64
-	jr t9
-
-PSEUDO_END (__ioctl)
-
-weak_alias (__ioctl, ioctl)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
deleted file mode 100644
index dc0a1a0edc..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   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 _LINUX_MIPS_SYSDEP_H
-#define _LINUX_MIPS_SYSDEP_H 1
-
-/* There is some commonality.  */
-#include <sysdeps/unix/mips/mips64/n64/sysdep.h>
-
-/* For Linux we can use the system call table in the header file
-	/usr/include/asm/unistd.h
-   of the kernel.  But these symbols do not follow the SYS_* syntax
-   so we have to redefine the `SYS_ify' macro here.  */
-#undef SYS_ify
-#ifdef __STDC__
-# define SYS_ify(syscall_name)	__NR_##syscall_name
-#else
-# define SYS_ify(syscall_name)	__NR_/**/syscall_name
-#endif
-
-#ifdef __ASSEMBLER__
-
-/* We don't want the label for the error handler to be visible in the symbol
-   table when we define it here.  */
-#ifdef __PIC__
-# define SYSCALL_ERROR_LABEL 99b
-#endif
-
-#else   /* ! __ASSEMBLER__ */
-
-/* Define a macro which expands into the inline wrapper code for a system
-   call.  */
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...)                               \
-  ({ INTERNAL_SYSCALL_DECL(err);					\
-     long result_var = INTERNAL_SYSCALL (name, err, nr, args);      	\
-     if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) )  		\
-       {                                                                \
-         __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err));      	\
-         result_var = -1L;                               		\
-       }                                                                \
-     result_var; })
-
-#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long err
-
-#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err)   ((long) (err))
-
-#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err)     (val)
-
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args)
-
-#define internal_syscall0(name, err, dummy...) 				\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2"); 					\
-	register long __a3 asm("$7"); 					\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %2\t\t\t# " #name "\n\t"				\
-	"syscall\n\t" 							\
-	".set reorder" 							\
-	: "=r" (__v0), "=r" (__a3) 					\
-	: "i" (SYS_ify(name))						\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall1(name, err, arg1) 				\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2"); 					\
-	register long __a0 asm("$4") = (long) arg1; 			\
-	register long __a3 asm("$7"); 					\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %3\t\t\t# " #name "\n\t"				\
-	"syscall\n\t" 							\
-	".set reorder" 							\
-	: "=r" (__v0), "=r" (__a3) 					\
-	: "r" (__a0), "i" (SYS_ify(name)) 				\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall2(name, err, arg1, arg2) 			\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2"); 					\
-	register long __a0 asm("$4") = (long) arg1; 			\
-	register long __a1 asm("$5") = (long) arg2; 			\
-	register long __a3 asm("$7"); 					\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %4\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "=r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "i" (SYS_ify(name))			\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall3(name, err, arg1, arg2, arg3) 			\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2"); 					\
-	register long __a0 asm("$4") = (long) arg1; 			\
-	register long __a1 asm("$5") = (long) arg2; 			\
-	register long __a2 asm("$6") = (long) arg3; 			\
-	register long __a3 asm("$7"); 					\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %5\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "=r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) 	\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) 		\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2"); 					\
-	register long __a0 asm("$4") = (long) arg1; 			\
-	register long __a1 asm("$5") = (long) arg2; 			\
-	register long __a2 asm("$6") = (long) arg3; 			\
-	register long __a3 asm("$7") = (long) arg4; 			\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %5\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "+r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) 	\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) 	\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2"); 					\
-	register long __a0 asm("$4") = (long) arg1; 			\
-	register long __a1 asm("$5") = (long) arg2; 			\
-	register long __a2 asm("$6") = (long) arg3; 			\
-	register long __a3 asm("$7") = (long) arg4; 			\
-	register long __a4 asm("$8") = (long) arg5; 			\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %5\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "+r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), 	\
-	  "r" (__a4) 							\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\
-({ 									\
-	long _sys_result;						\
-									\
-	{								\
-	register long __v0 asm("$2"); 					\
-	register long __a0 asm("$4") = (long) arg1; 			\
-	register long __a1 asm("$5") = (long) arg2; 			\
-	register long __a2 asm("$6") = (long) arg3; 			\
-	register long __a3 asm("$7") = (long) arg4; 			\
-	register long __a4 asm("$8") = (long) arg5; 			\
-	register long __a5 asm("$9") = (long) arg6; 			\
-	__asm__ volatile ( 						\
-	".set\tnoreorder\n\t" 						\
-	"li\t$2, %5\t\t\t# " #name "\n\t" 				\
-	"syscall\n\t" 							\
-	".set\treorder" 						\
-	: "=r" (__v0), "+r" (__a3) 					\
-	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), 	\
-	  "r" (__a4), "r" (__a5)					\
-	: __SYSCALL_CLOBBERS); 						\
-	err = __a3;							\
-	_sys_result = __v0;						\
-	}								\
-	_sys_result;							\
-})
-
-#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
-#endif /* __ASSEMBLER__ */
-
-#endif /* linux/mips/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/recv.c b/sysdeps/unix/sysv/linux/mips/mips64/recv.c
deleted file mode 100644
index b910525c92..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/recv.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/recv.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/send.c b/sysdeps/unix/sysv/linux/mips/mips64/send.c
deleted file mode 100644
index d2c2996a21..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/send.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/send.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
deleted file mode 100644
index 3c6aaac810..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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 <sys/asm.h>
-
-/* Usage:
-   long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-
-   We need to do some arg shifting, syscall_number will be in v0.  */
-
-
-	.text
-NESTED (syscall, SZREG, ra)
-	.mask 0x00010000, -SZREG
-	.fmask 0x00000000, 0
-	PTR_ADDIU sp, -SZREG
-	REG_S s0, (sp)
-
-	move s0, a0
-	move a0, a1		/* shift arg1 - arg7.  */
-	move a1, a2
-	move a2, a3
-	move a3, a4
-	move a4, a5
-	move a5, a6
-	move a6, a7
-
-	move v0, s0		/* Syscall number -> v0 */
-	syscall			/* Do the system call.  */
-
-	REG_L s0, (sp)
-	PTR_ADDIU sp, SZREG
-	bne a3, zero, L(error)
-
-	ret
-
-L(error):
-	SETUP_GP64 (a0, syscall)
-	PTR_LA t9, __syscall_error
-	RESTORE_GP64
-	jr t9
-
-END (syscall)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
deleted file mode 100644
index b0d79ff6a4..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ /dev/null
@@ -1,21 +0,0 @@
-# File name	Caller	Syscall name	Args	Strong name	Weak names
-
-lseek		-	lseek		i:iii	__libc_lseek	__lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
-
-# proper socket implementations:
-recvfrom	-	recvfrom	i:ibniBN __libc_recvfrom __recvfrom recvfrom
-sendto		-	sendto		i:ibnibn __libc_sendto	__sendto sendto
-
-# semaphore and shm system calls
-msgctl		-	msgctl		i:iip	__msgctl	msgctl
-msgget		-	msgget		i:ii	__msgget	msgget
-msgrcv		-	msgrcv		i:ibnii	__msgrcv	msgrcv
-msgsnd		-	msgsnd		i:ibni	__msgsnd	msgsnd
-shmat		-	shmat		i:ipi	__shmat		shmat
-shmctl		-	shmctl		i:iip	__shmctl	shmctl
-shmdt		-	shmdt		i:s	__shmdt		shmdt
-shmget		-	shmget		i:iii	__shmget	shmget
-semop		-	semop		i:ipi	__semop		semop
-semtimedop	-	semtimedop	i:ipip	semtimedop
-semget		-	semget		i:iii	__semget	semget
-semctl		-	semctl		i:iiii	__semctl	semctl
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/umount.c b/sysdeps/unix/sysv/linux/mips/mips64/umount.c
deleted file mode 100644
index 9a91ba5b2f..0000000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/umount.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/hppa/umount.c>
diff --git a/sysdeps/unix/sysv/linux/mips/pipe.S b/sysdeps/unix/sysv/linux/mips/pipe.S
deleted file mode 100644
index 1708888da4..0000000000
--- a/sysdeps/unix/sysv/linux/mips/pipe.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/mips/pipe.S>
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
deleted file mode 100644
index eff7d473d0..0000000000
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <assert.h>
-#include <errno.h>
-#ifndef NO_SGIDEFS_H
-#include <sgidefs.h>
-#endif
-#include <unistd.h>
-#include <endian.h>
-
-#include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include <kernel-features.h>
-
-#ifdef __NR_pread64             /* Newer kernels renamed but it's the same.  */
-# ifdef __NR_pread
-#  error "__NR_pread and __NR_pread64 both defined???"
-# endif
-# define __NR_pread __NR_pread64
-#endif
-
-#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
-
-# if __ASSUME_PREAD_SYSCALL == 0
-static ssize_t __emulate_pread (int fd, void *buf, size_t count,
-				off_t offset) internal_function;
-# endif
-
-ssize_t
-__libc_pread (fd, buf, count, offset)
-     int fd;
-     void *buf;
-     size_t count;
-     off_t offset;
-{
-  ssize_t result;
-
-#if _MIPS_SIM != _ABI64
-  assert (sizeof (offset) == 4);
-#endif
-
-  if (SINGLE_THREAD_P)
-    {
-      /* First try the syscall.  */
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-      result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
-			       offset);
-#else
-      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
-			       __LONG_LONG_PAIR (offset >> 31, offset));
-#endif
-# if __ASSUME_PREAD_SYSCALL == 0
-      if (result == -1 && errno == ENOSYS)
-        /* No system call available.  Use the emulation.  */
-        result = __emulate_pread (fd, buf, count, offset);
-# endif
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* First try the syscall.  */
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-  result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
-#else
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR (offset >> 31, offset));
-#endif
-# if __ASSUME_PREAD_SYSCALL == 0
-  if (result == -1 && errno == ENOSYS)
-    /* No system call available.  Use the emulation.  */
-    result = __emulate_pread (fd, buf, count, offset);
-# endif
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-
-strong_alias (__libc_pread, __pread)
-weak_alias (__libc_pread, pread)
-
-# define __libc_pread(fd, buf, count, offset) \
-     static internal_function __emulate_pread (fd, buf, count, offset)
-#endif
-
-#if __ASSUME_PREAD_SYSCALL == 0
-# include <sysdeps/posix/pread.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
deleted file mode 100644
index d8763acabb..0000000000
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#ifndef NO_SGIDEFS_H
-#include <sgidefs.h>
-#endif
-#include <unistd.h>
-#include <endian.h>
-
-#include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include <kernel-features.h>
-
-#ifdef __NR_pread64             /* Newer kernels renamed but it's the same.  */
-# ifdef __NR_pread
-#  error "__NR_pread and __NR_pread64 both defined???"
-# endif
-# define __NR_pread __NR_pread64
-#endif
-
-#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
-
-# if __ASSUME_PREAD_SYSCALL == 0
-static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
-				  off64_t offset) internal_function;
-# endif
-
-ssize_t
-__libc_pread64 (fd, buf, count, offset)
-     int fd;
-     void *buf;
-     size_t count;
-     off64_t offset;
-{
-  ssize_t result;
-
-
-  if (SINGLE_THREAD_P)
-    {
-     /* First try the syscall.  */
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-      result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
-			       offset);
-#else
-     result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
-			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
-			      (off_t) (offset & 0xffffffff)));
-#endif
-# if __ASSUME_PREAD_SYSCALL == 0
-     if (result == -1 && errno == ENOSYS)
-     /* No system call available.  Use the emulation.  */
-     result = __emulate_pread64 (fd, buf, count, offset);
-# endif
-     return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* First try the syscall.  */
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-  result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
-#else
-  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
-					     (off_t) (offset & 0xffffffff)));
-#endif
-# if __ASSUME_PREAD_SYSCALL == 0
-  if (result == -1 && errno == ENOSYS)
-    /* No system call available.  Use the emulation.  */
-    result = __emulate_pread64 (fd, buf, count, offset);
-# endif
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-
-weak_alias (__libc_pread64, __pread64)
-weak_alias (__libc_pread64, pread64)
-
-# define __libc_pread64(fd, buf, count, offset) \
-     static internal_function __emulate_pread64 (fd, buf, count, offset)
-#endif
-
-#if __ASSUME_PREAD_SYSCALL == 0
-# include <sysdeps/posix/pread64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/profil-counter.h b/sysdeps/unix/sysv/linux/mips/profil-counter.h
deleted file mode 100644
index 8a6a0bcf3d..0000000000
--- a/sysdeps/unix/sysv/linux/mips/profil-counter.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We can use the ix86 version.  */
-#include <sysdeps/unix/sysv/linux/i386/profil-counter.h>
diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c
deleted file mode 100644
index 19d7c2d927..0000000000
--- a/sysdeps/unix/sysv/linux/mips/ptrace.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
-	Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <sgidefs.h>
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <sys/user.h>
-#include <stdarg.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-#include <sgidefs.h>
-
-#if _MIPS_SIM == _ABIN32
-__extension__ typedef long long int reg_type;
-#else
-typedef long int reg_type;
-#endif
-
-reg_type
-ptrace (enum __ptrace_request request, ...)
-{
-  reg_type res, ret;
-  va_list ap;
-  pid_t pid;
-  void *addr;
-  reg_type data;
-
-  va_start (ap, request);
-  pid = va_arg (ap, pid_t);
-  addr = va_arg (ap, void *);
-  data = va_arg (ap, reg_type);
-  va_end (ap);
-
-  if (request > 0 && request < 4)
-    data = &ret;
-
-#if __BOUNDED_POINTERS__
-  switch (request)
-    {
-    case PTRACE_PEEKTEXT:
-    case PTRACE_PEEKDATA:
-    case PTRACE_PEEKUSER:
-    case PTRACE_POKETEXT:
-    case PTRACE_POKEDATA:
-    case PTRACE_POKEUSER:
-      (void) CHECK_1 ((int *) addr);
-      (void) CHECK_1 ((int *) data);
-      break;
-
-    case PTRACE_GETREGS:
-    case PTRACE_SETREGS:
-      /* We don't know the size of data, so the best we can do is ensure
-	 that `data' is valid for at least one word.  */
-      (void) CHECK_1 ((int *) data);
-      break;
-
-    case PTRACE_GETFPREGS:
-    case PTRACE_SETFPREGS:
-      /* We don't know the size of data, so the best we can do is ensure
-	 that `data' is valid for at least one word.  */
-      (void) CHECK_1 ((int *) data);
-      break;
-
-    case PTRACE_GETFPXREGS:
-    case PTRACE_SETFPXREGS:
-      /* We don't know the size of data, so the best we can do is ensure
-	 that `data' is valid for at least one word.  */
-      (void) CHECK_1 ((int *) data);
-      break;
-
-    case PTRACE_TRACEME:
-    case PTRACE_CONT:
-    case PTRACE_KILL:
-    case PTRACE_SINGLESTEP:
-    case PTRACE_ATTACH:
-    case PTRACE_DETACH:
-    case PTRACE_SYSCALL:
-      /* Neither `data' nor `addr' needs any checks.  */
-      break;
-    };
-#endif
-
-  res = INLINE_SYSCALL (ptrace, 4, request, pid,
-			__ptrvalue (addr), __ptrvalue (data));
-  if (res >= 0 && request > 0 && request < 4)
-    {
-      __set_errno (0);
-      return ret;
-    }
-
-  return res;
-}
diff --git a/sysdeps/unix/sysv/linux/mips/putmsg.c b/sysdeps/unix/sysv/linux/mips/putmsg.c
deleted file mode 100644
index ebc1680ca7..0000000000
--- a/sysdeps/unix/sysv/linux/mips/putmsg.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/putmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
deleted file mode 100644
index 4378ebc859..0000000000
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <assert.h>
-#include <errno.h>
-#ifndef NO_SGIDEFS_H
-#include <sgidefs.h>
-#endif
-#include <unistd.h>
-#include <endian.h>
-
-#include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include <kernel-features.h>
-
-#ifdef __NR_pwrite64            /* Newer kernels renamed but it's the same.  */
-# ifdef __NR_pwrite
-#  error "__NR_pwrite and __NR_pwrite64 both defined???"
-# endif
-# define __NR_pwrite __NR_pwrite64
-#endif
-
-#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-
-# if __ASSUME_PWRITE_SYSCALL == 0
-static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
-				 off_t offset) internal_function;
-# endif
-
-ssize_t
-__libc_pwrite (fd, buf, count, offset)
-     int fd;
-     const void *buf;
-     size_t count;
-     off_t offset;
-{
-  ssize_t result;
-
-#if _MIPS_SIM != _ABI64
-  assert (sizeof (offset) == 4);
-#endif
-
-  if (SINGLE_THREAD_P)
-    {
-      /* First try the syscall.  */
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-      result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
-			       offset);
-#else
-      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
-			       __LONG_LONG_PAIR (offset >> 31, offset));
-#endif
-# if __ASSUME_PWRITE_SYSCALL == 0
-      if (result == -1 && errno == ENOSYS)
-        /* No system call available.  Use the emulation.  */
-        result = __emulate_pwrite (fd, buf, count, offset);
-# endif
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* First try the syscall.  */
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-  result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
-#else
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR (offset >> 31, offset));
-#endif
-# if __ASSUME_PWRITE_SYSCALL == 0
-  if (result == -1 && errno == ENOSYS)
-    /* No system call available.  Use the emulation.  */
-    result = __emulate_pwrite (fd, buf, count, offset);
-# endif
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-
-strong_alias (__libc_pwrite, __pwrite)
-weak_alias (__libc_pwrite, pwrite)
-
-# define __libc_pwrite(fd, buf, count, offset) \
-     static internal_function __emulate_pwrite (fd, buf, count, offset)
-#endif
-
-#if __ASSUME_PWRITE_SYSCALL == 0
-# include <sysdeps/posix/pwrite.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
deleted file mode 100644
index e5853e432e..0000000000
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#ifndef NO_SGIDEFS_H
-#include <sgidefs.h>
-#endif
-#include <unistd.h>
-#include <endian.h>
-
-#include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include <kernel-features.h>
-
-#ifdef __NR_pwrite64            /* Newer kernels renamed but it's the same.  */
-# ifdef __NR_pwrite
-#  error "__NR_pwrite and __NR_pwrite64 both defined???"
-# endif
-# define __NR_pwrite __NR_pwrite64
-#endif
-
-#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-
-# if __ASSUME_PWRITE_SYSCALL == 0
-static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
-				   off64_t offset) internal_function;
-# endif
-
-ssize_t
-__libc_pwrite64 (fd, buf, count, offset)
-     int fd;
-     const void *buf;
-     size_t count;
-     off64_t offset;
-{
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
-     /* First try the syscall.  */
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-      result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
-			       offset);
-#else
-     result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
-			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
-			     (off_t) (offset & 0xffffffff)));
-#endif
-# if __ASSUME_PWRITE_SYSCALL == 0
-     if (result == -1 && errno == ENOSYS)
-     /* No system call available.  Use the emulation.  */
-     result = __emulate_pwrite64 (fd, buf, count, offset);
-# endif
-
-     return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* First try the syscall.  */
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-  result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
-#else
-  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
-					     (off_t) (offset & 0xffffffff)));
-#endif
-# if __ASSUME_PWRITE_SYSCALL == 0
-  if (result == -1 && errno == ENOSYS)
-    /* No system call available.  Use the emulation.  */
-    result = __emulate_pwrite64 (fd, buf, count, offset);
-# endif
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-
-weak_alias (__libc_pwrite64, __pwrite64)
-libc_hidden_weak (__pwrite64)
-weak_alias (__libc_pwrite64, pwrite64)
-
-# define __libc_pwrite64(fd, buf, count, offset) \
-     static internal_function __emulate_pwrite64 (fd, buf, count, offset)
-#endif
-
-#if __ASSUME_PWRITE_SYSCALL == 0
-# include <sysdeps/posix/pwrite64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c
deleted file mode 100644
index baa92fe57c..0000000000
--- a/sysdeps/unix/sysv/linux/mips/readelflib.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Alexandre Oliva <aoliva@redhat.com>
-   Based on work ../x86_64/readelflib.c,
-   contributed by Andreas Jaeger <aj@suse.de>, 1999 and
-		  Jakub Jelinek <jakub@redhat.com>, 1999.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-
-int process_elf32_file (const char *file_name, const char *lib, int *flag,
-			unsigned int *osversion, char **soname,
-			void *file_contents, size_t file_length);
-int process_elf64_file (const char *file_name, const char *lib, int *flag,
-			unsigned int *osversion, char **soname,
-			void *file_contents, size_t file_length);
-
-/* Returns 0 if everything is ok, != 0 in case of error.  */
-int
-process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, char **soname, void *file_contents,
-		  size_t file_length)
-{
-  ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
-  int ret;
-
-  if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
-    {
-      ret = process_elf32_file (file_name, lib, flag, osversion, soname,
-				file_contents, file_length);
-
-      /* n32 libraries are always libc.so.6+.  */
-      if (ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0)
-	*flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6;
-    }
-  else
-    {
-      ret = process_elf64_file (file_name, lib, flag, osversion, soname,
-				file_contents, file_length);
-      /* n64 libraries are always libc.so.6+.  */
-      if (!ret)
-	*flag = FLAG_MIPS64_LIBN64|FLAG_ELF_LIBC6;
-    }
-
-  return ret;
-}
-
-#undef __ELF_NATIVE_CLASS
-#undef process_elf_file
-#define process_elf_file process_elf32_file
-#define __ELF_NATIVE_CLASS 32
-#include "elf/readelflib.c"
-
-#undef __ELF_NATIVE_CLASS
-#undef process_elf_file
-#define process_elf_file process_elf64_file
-#define __ELF_NATIVE_CLASS 64
-#include "elf/readelflib.c"
diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h
deleted file mode 100644
index f5bd3a2735..0000000000
--- a/sysdeps/unix/sysv/linux/mips/register-dump.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Dump registers.
-   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Jaeger <aj@suse.de>, 2000.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sys/uio.h>
-#include <stdio-common/_itoa.h>
-
-/* We will print the register dump in this format:
-
- R0   XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
- R8   XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
- R16  XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
- R24  XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
-           pc    cause  status   badvaddr       lo       hi
-      XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
- The FPU registers will not be printed.
-*/
-
-static void
-hexvalue (unsigned long int value, char *buf, size_t len)
-{
-  char *cp = _itoa_word (value, buf + len, 16, 0);
-  while (cp > buf)
-    *--cp = '0';
-}
-
-static void
-register_dump (int fd, struct sigcontext *ctx)
-{
-  char regs[38][8];
-  struct iovec iov[38 * 2 + 10];
-  size_t nr = 0;
-  int i;
-
-#define ADD_STRING(str) \
-  iov[nr].iov_base = (char *) str;					      \
-  iov[nr].iov_len = strlen (str);					      \
-  ++nr
-#define ADD_MEM(str, len) \
-  iov[nr].iov_base = str;						      \
-  iov[nr].iov_len = len;						      \
-  ++nr
-
-  /* Generate strings of register contents.  */
-  for (i = 0; i < 32; i++)
-    hexvalue (ctx->sc_regs[i], regs[i], 8);
-  hexvalue (ctx->sc_pc, regs[32], 8);
-  hexvalue (ctx->sc_cause, regs[33], 8);
-  hexvalue (ctx->sc_status, regs[34], 8);
-  hexvalue (ctx->sc_badvaddr, regs[35], 8);
-  hexvalue (ctx->sc_mdhi, regs[36], 8);
-  hexvalue (ctx->sc_mdlo, regs[37], 8);
-
-  /* Generate the output.  */
-  ADD_STRING ("Register dump:\n\n R0   ");
-  for (i = 0; i < 8; i++)
-    {
-      ADD_MEM (regs[i], 8);
-      ADD_STRING (" ");
-    }
-  ADD_STRING ("\n R8   ");
-  for (i = 8; i < 16; i++)
-    {
-      ADD_MEM (regs[i], 8);
-      ADD_STRING (" ");
-    }
-  ADD_STRING ("\n R16  ");
-  for (i = 16; i < 24; i++)
-    {
-      ADD_MEM (regs[i], 8);
-      ADD_STRING (" ");
-    }
-  ADD_STRING ("\n R24  ");
-  for (i = 24; i < 32; i++)
-    {
-      ADD_MEM (regs[i], 8);
-      ADD_STRING (" ");
-    }
-  ADD_STRING ("\n           pc    cause  status   badvaddr       lo       hi\n      ");
-  for (i = 32; i < 38; i++)
-    {
-      ADD_MEM (regs[i], 8);
-      ADD_STRING (" ");
-    }
-  ADD_STRING ("\n");
-
-  /* Write the stuff out.  */
-  writev (fd, iov, nr);
-}
-
-
-#define REGISTER_DUMP register_dump (fd, ctx)
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
deleted file mode 100644
index 8e2ca42bb4..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <sgidefs.h>
-#include <signal.h>
-#include <string.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <sgidefs.h>
-
-#include <kernel-features.h>
-
-/* The difference here is that the sigaction structure used in the
-   kernel is not the same as we use in the libc.  Therefore we must
-   translate it here.  */
-#include <kernel_sigaction.h>
-
-#if __ASSUME_REALTIME_SIGNALS == 0
-/* The variable is shared between all wrappers around signal handling
-   functions which have RT equivalents.	 This is the definition.  */
-int __libc_missing_rt_sigs;
-
-#endif
-
-#if _MIPS_SIM != _ABIO32
-
-# ifdef __NR_rt_sigreturn
-static void restore_rt (void) asm ("__restore_rt");
-# endif
-# ifdef __NR_sigreturn
-static void restore (void) asm ("__restore");
-# endif
-#endif
-
-/* If ACT is not NULL, change the action for SIG to *ACT.
-   If OACT is not NULL, put the old action for SIG in *OACT.  */
-int
-__libc_sigaction (sig, act, oact)
-     int sig;
-     const struct sigaction *act;
-     struct sigaction *oact;
-{
-#if __ASSUME_REALTIME_SIGNALS == 0
-  struct old_kernel_sigaction k_sigact, k_osigact;
-#endif
-  int result;
-
-#if defined __NR_rt_sigaction || __ASSUME_REALTIME_SIGNALS > 0
-  /* First try the RT signals.	*/
-# if __ASSUME_REALTIME_SIGNALS == 0
-  if (!__libc_missing_rt_sigs)
-# endif
-    {
-      struct kernel_sigaction kact, koact;
-      /* Save the current error value for later.  We need not do this
-	 if we are guaranteed to have realtime signals.	 */
-# if __ASSUME_REALTIME_SIGNALS == 0
-      int saved_errno = errno;
-# endif
-
-      if (act)
-	{
-	  kact.k_sa_handler = act->sa_handler;
-	  memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t));
-	  kact.sa_flags = act->sa_flags;
-# ifdef HAVE_SA_RESTORER
-#  if _MIPS_SIM == _ABIO32
-	  kact.sa_restorer = act->sa_restorer;
-#  else
-	  kact.sa_restorer = &restore_rt;
-#  endif
-# endif
-	}
-
-      /* XXX The size argument hopefully will have to be changed to the
-	 real size of the user-level sigset_t.	*/
-      result = INLINE_SYSCALL (rt_sigaction, 4, sig,
-			       act ? __ptrvalue (&kact) : NULL,
-			       oact ? __ptrvalue (&koact) : NULL,
-			       sizeof (kernel_sigset_t));
-
-# if __ASSUME_REALTIME_SIGNALS == 0
-      if (result >= 0 || errno != ENOSYS)
-# endif
-	{
-	  if (oact && result >= 0)
-	    {
-	      oact->sa_handler = koact.k_sa_handler;
-	      memcpy (&oact->sa_mask, &koact.sa_mask,
-				sizeof (kernel_sigset_t));
-	      oact->sa_flags = koact.sa_flags;
-# ifdef HAVE_SA_RESTORER
-	      oact->sa_restorer = koact.sa_restorer;
-# endif
-	    }
-	  return result;
-	}
-
-# if __ASSUME_REALTIME_SIGNALS == 0
-      __set_errno (saved_errno);
-      __libc_missing_rt_sigs = 1;
-# endif
-    }
-#endif
-
-#if __ASSUME_REALTIME_SIGNALS == 0
-  if (act)
-    {
-      k_sigact.k_sa_handler = act->sa_handler;
-      k_sigact.sa_mask = act->sa_mask.__val[0];
-      k_sigact.sa_flags = act->sa_flags;
-# ifdef HAVE_SA_RESTORER
-      k_sigact.sa_restorer = act->sa_restorer;
-# endif
-    }
-  result = INLINE_SYSCALL (sigaction, 3, sig,
-			   act ? __ptrvalue (&k_sigact) : NULL,
-			   oact ? __ptrvalue (&k_osigact) : NULL);
-  if (oact && result >= 0)
-    {
-      oact->sa_handler = k_osigact.k_sa_handler;
-      oact->sa_mask.__val[0] = k_osigact.sa_mask;
-      oact->sa_flags = k_osigact.sa_flags;
-# ifdef HAVE_SA_RESTORER
-#  if _MIPS_SIM == _ABIO32
-      oact->sa_restorer = k_osigact.sa_restorer;
-#  else
-      oact->sa_restorer = &restore;
-#  endif
-# endif
-    }
-  return result;
-#endif
-}
-libc_hidden_def (__libc_sigaction)
-
-#ifndef LIBC_SIGACTION
-weak_alias (__libc_sigaction, __sigaction)
-libc_hidden_weak (__sigaction)
-weak_alias (__libc_sigaction, sigaction)
-#endif
-
-/* NOTE: Please think twice before making any changes to the bits of
-   code below.  GDB needs some intimate knowledge about it to
-   recognize them as signal trampolines, and make backtraces through
-   signal handlers work right.  Important are both the names
-   (__restore_rt) and the exact instruction sequence.
-   If you ever feel the need to make any changes, please notify the
-   appropriate GDB maintainer.  */
-
-#define RESTORE(name, syscall) RESTORE2 (name, syscall)
-#define RESTORE2(name, syscall) \
-asm						\
-  (						\
-   ".align 4\n"					\
-   "__" #name ":\n"				\
-   "	li $2, " #syscall "\n"			\
-   "	syscall\n"				\
-   );
-
-/* The return code for realtime-signals.  */
-#if _MIPS_SIM != _ABIO32
-# ifdef __NR_rt_sigreturn
-RESTORE (restore_rt, __NR_rt_sigreturn)
-# endif
-# ifdef __NR_sigreturn
-RESTORE (restore, __NR_sigreturn)
-# endif
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
deleted file mode 100644
index f453c8d9b5..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Andreas Jaeger <aj@suse.de>, 2000.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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 <sgidefs.h>
-
-#if _MIPS_SIM == _ABIO32
-
-#define SIGCONTEXT unsigned long _code, struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS _code,
-#define GET_PC(ctx)	((void *) ctx->sc_pc)
-#define GET_FRAME(ctx)	((void *) ctx->sc_regs[30])
-#define GET_STACK(ctx)	((void *) ctx->sc_regs[29])
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
-
-#else
-
-#define SIGCONTEXT unsigned long _code, ucontext_t *
-#define SIGCONTEXT_EXTRA_ARGS _code,
-#define GET_PC(ctx)	((void *) ctx->uc_mcontext.pc)
-#define GET_FRAME(ctx)	((void *) ctx->uc_mcontext.gregs[30])
-#define GET_STACK(ctx)	((void *) ctx->uc_mcontext.gregs[29])
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
deleted file mode 100644
index a93e1fb6d1..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_CACHECTL_H
-#define _SYS_CACHECTL_H 1
-
-#include <features.h>
-
-/*
- * Get the kernel definition for the op bits.
- */
-#include <asm/cachectl.h>
-
-__BEGIN_DECLS
-
-#ifdef __USE_MISC
-extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW;
-#endif
-extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW;
-#ifdef __USE_MISC
-extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW;
-#endif
-extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW;
-
-__END_DECLS
-
-#endif /* sys/cachectl.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
deleted file mode 100644
index 2bf07be3e9..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
-	Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_PROCFS_H
-#define _SYS_PROCFS_H	1
-
-/* This is somehow modelled after the file of the same name on SysVr4
-   systems.  It provides a definition of the core file format for ELF
-   used on Linux.  */
-
-#include <features.h>
-#include <sgidefs.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/user.h>
-#include <sgidefs.h>
-
-/* ELF register definitions */
-#define ELF_NGREG	45
-#define ELF_NFPREG	33
-
-#if _MIPS_SIM == _ABIN32
-__extension__ typedef unsigned long long elf_greg_t;
-#else
-typedef unsigned long elf_greg_t;
-#endif
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-typedef double elf_fpreg_t;
-typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
-
-__BEGIN_DECLS
-
-struct elf_siginfo
-  {
-    int si_signo;			/* Signal number.  */
-    int si_code;			/* Extra code.  */
-    int si_errno;			/* Errno.  */
-  };
-
-
-/* Definitions to generate Intel SVR4-like core files.  These mostly
-   have the same names as the SVR4 types with "elf_" tacked on the
-   front to prevent clashes with linux definitions, and the typedef
-   forms have been avoided.  This is mostly like the SVR4 structure,
-   but more Linuxy, with things that Linux does not support and which
-   gdb doesn't really use excluded.  Fields present but not used are
-   marked with "XXX".  */
-struct elf_prstatus
-  {
-    struct elf_siginfo pr_info;		/* Info associated with signal.  */
-    short int pr_cursig;		/* Current signal.  */
-#if _MIPS_SIM == _ABIN32
-    __extension__ unsigned long long int pr_sigpend;
-    __extension__ unsigned long long int pr_sighold;
-#else
-    unsigned long int pr_sigpend;	/* Set of pending signals.  */
-    unsigned long int pr_sighold;	/* Set of held signals.  */
-#endif
-    __pid_t pr_pid;
-    __pid_t pr_ppid;
-    __pid_t pr_pgrp;
-    __pid_t pr_sid;
-    struct timeval pr_utime;		/* User time.  */
-    struct timeval pr_stime;		/* System time.  */
-    struct timeval pr_cutime;		/* Cumulative user time.  */
-    struct timeval pr_cstime;		/* Cumulative system time.  */
-    elf_gregset_t pr_reg;		/* GP registers.  */
-    int pr_fpvalid;			/* True if math copro being used.  */
-  };
-
-
-#define ELF_PRARGSZ     (80)    /* Number of chars for args */
-
-struct elf_prpsinfo
-  {
-    char pr_state;			/* Numeric process state.  */
-    char pr_sname;			/* Char for pr_state.  */
-    char pr_zomb;			/* Zombie.  */
-    char pr_nice;			/* Nice val.  */
-#if _MIPS_SIM == _ABIN32
-    __extension__ unsigned long long int pr_flag;
-#else
-    unsigned long int pr_flag;		/* Flags.  */
-#endif
-    long pr_uid;
-    long pr_gid;
-    int pr_pid, pr_ppid, pr_pgrp, pr_sid;
-    /* Lots missing */
-    char pr_fname[16];			/* Filename of executable.  */
-    char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
-  };
-
-
-/* Addresses.  */
-typedef void *psaddr_t;
-
-/* Register sets.  Linux has different names.  */
-typedef elf_gregset_t prgregset_t;
-typedef elf_fpregset_t prfpregset_t;
-
-/* We don't have any differences between processes and threads,
-   therefore habe only ine PID type.  */
-typedef __pid_t lwpid_t;
-
-
-typedef struct elf_prstatus prstatus_t;
-typedef struct elf_prpsinfo prpsinfo_t;
-
-__END_DECLS
-
-#endif	/* sys/procfs.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
deleted file mode 100644
index d05853da77..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* `ptrace' debugger support interface.  Linux version.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
-	Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_PTRACE_H
-#define _SYS_PTRACE_H	1
-
-#include <features.h>
-#include <sgidefs.h>
-
-__BEGIN_DECLS
-
-/* Type of the REQUEST argument to `ptrace.'  */
-enum __ptrace_request
-{
-  /* Indicate that the process making this request should be traced.
-     All signals received by this process can be intercepted by its
-     parent, and its parent can use the other `ptrace' requests.  */
-  PTRACE_TRACEME = 0,
-#define PT_TRACE_ME PTRACE_TRACEME
-
-  /* Return the word in the process's text space at address ADDR.  */
-  PTRACE_PEEKTEXT = 1,
-#define PT_READ_I PTRACE_PEEKTEXT
-
-  /* Return the word in the process's data space at address ADDR.  */
-  PTRACE_PEEKDATA = 2,
-#define PT_READ_D PTRACE_PEEKDATA
-
-  /* Return the word in the process's user area at offset ADDR.  */
-  PTRACE_PEEKUSER = 3,
-#define PT_READ_U PTRACE_PEEKUSER
-
-  /* Write the word DATA into the process's text space at address ADDR.  */
-  PTRACE_POKETEXT = 4,
-#define PT_WRITE_I PTRACE_POKETEXT
-
-  /* Write the word DATA into the process's data space at address ADDR.  */
-  PTRACE_POKEDATA = 5,
-#define PT_WRITE_D PTRACE_POKEDATA
-
-  /* Write the word DATA into the process's user area at offset ADDR.  */
-  PTRACE_POKEUSER = 6,
-#define PT_WRITE_U PTRACE_POKEUSER
-
-  /* Continue the process.  */
-  PTRACE_CONT = 7,
-#define PT_CONTINUE PTRACE_CONT
-
-  /* Kill the process.  */
-  PTRACE_KILL = 8,
-#define PT_KILL PTRACE_KILL
-
-  /* Single step the process.
-     This is not supported on all machines.  */
-  PTRACE_SINGLESTEP = 9,
-#define PT_STEP PTRACE_SINGLESTEP
-
-  /* Get all general purpose registers used by a processes.
-     This is not supported on all machines.  */
-   PTRACE_GETREGS = 12,
-#define PT_GETREGS PTRACE_GETREGS
-
-  /* Set all general purpose registers used by a processes.
-     This is not supported on all machines.  */
-   PTRACE_SETREGS = 13,
-#define PT_SETREGS PTRACE_SETREGS
-
-  /* Get all floating point registers used by a processes.
-     This is not supported on all machines.  */
-   PTRACE_GETFPREGS = 14,
-#define PT_GETFPREGS PTRACE_GETFPREGS
-
-  /* Set all floating point registers used by a processes.
-     This is not supported on all machines.  */
-   PTRACE_SETFPREGS = 15,
-#define PT_SETFPREGS PTRACE_SETFPREGS
-
-  /* Attach to a process that is already running. */
-  PTRACE_ATTACH = 16,
-#define PT_ATTACH PTRACE_ATTACH
-
-  /* Detach from a process attached to with PTRACE_ATTACH.  */
-  PTRACE_DETACH = 17,
-#define PT_DETACH PTRACE_DETACH
-
-  /* Get all extended floating point registers used by a processes.
-     This is not supported on all machines.  */
-   PTRACE_GETFPXREGS = 18,
-#define PT_GETFPXREGS PTRACE_GETFPXREGS
-
-  /* Set all extended floating point registers used by a processes.
-     This is not supported on all machines.  */
-   PTRACE_SETFPXREGS = 19,
-#define PT_SETFPXREGS PTRACE_SETFPXREGS
-
-  /* Continue and stop at the next (return from) syscall.  */
-  PTRACE_SYSCALL = 24
-#define PT_SYSCALL PTRACE_SYSCALL
-};
-
-/* 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
-   traced.
-
-   PID and the other arguments described above for the various requests should
-   appear (those that are used for the particular request) as:
-     pid_t PID, void *ADDR, int DATA, void *ADDR2
-   after REQUEST.  */
-#if _MIPS_SIM == _ABIN32
-__extension__ extern long long int ptrace
-  (enum __ptrace_request __request, ...) __THROW;
-#else
-extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
-#endif
-
-__END_DECLS
-
-#endif /* _SYS_PTRACE_H */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
deleted file mode 100644
index f6458cd316..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYSCALL_H
-#define _SYSCALL_H	1
-
-/* This file should list the numbers of the system the system knows.
-   But instead of duplicating this we use the information available
-   from the kernel sources.  */
-#ifdef _LIBC
-/* Since the kernel doesn't define macro names in a way usable for
-   glibc, we preprocess this header, and use it during the glibc build
-   process.  */
-# include <asm-unistd.h>
-#else
-# include <asm/unistd.h>
-#endif
-
-#ifndef _LIBC
-/* The Linux kernel header file defines macros `__NR_<name>', but some
-   programs expect the traditional form `SYS_<name>'.  So in building libc
-   we scan the kernel's list and produce <bits/syscall.h> with macros for
-   all the `SYS_' names.  */
-# include <bits/syscall.h>
-#endif
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
deleted file mode 100644
index 0677cafaa4..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_SYSMIPS_H
-#define _SYS_SYSMIPS_H 1
-
-#include <features.h>
-
-/*
- * Commands for the sysmips(2) call
- *
- * sysmips(2) is deprecated - though some existing software uses it.
- * We only support the following commands.  Sysmips exists for compatibility
- * purposes only so new software should avoid it.
- */
-#define SETNAME                   1	/* set hostname                  */
-#define FLUSH_CACHE		   3	/* writeback and invalidate caches */
-#define MIPS_FIXADE               7	/* control address error fixing  */
-#define MIPS_RDNVRAM              10	/* read NVRAM			 */
-#define MIPS_ATOMIC_SET		2001	/* atomically set variable       */
-
-__BEGIN_DECLS
-
-extern int sysmips (__const int cmd, ...) __THROW;
-
-__END_DECLS
-
-#endif /* sys/sysmips.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
deleted file mode 100644
index 1183b867b8..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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 _SYS_TAS_H
-#define _SYS_TAS_H 1
-
-#include <features.h>
-#include <sgidefs.h>
-
-__BEGIN_DECLS
-
-extern int _test_and_set (int *p, int v) __THROW;
-
-#ifdef __USE_EXTERN_INLINES
-
-# ifndef _EXTERN_INLINE
-#  define _EXTERN_INLINE extern __inline
-# endif
-
-_EXTERN_INLINE int
-__NTH (_test_and_set (int *p, int v))
-{
-  int r, t;
-
-  __asm__ __volatile__
-    ("/* Inline test and set */\n"
-     "1:\n\t"
-     ".set	push\n\t"
-#if _MIPS_SIM == _ABIO32
-     ".set	mips2\n\t"
-#endif
-     "ll	%0,%3\n\t"
-     "move	%1,%4\n\t"
-     "beq	%0,%4,2f\n\t"
-     "sc	%1,%2\n\t"
-     ".set	pop\n\t"
-     "beqz	%1,1b\n"
-     "2:\n\t"
-     "/* End test and set */"
-     : "=&r" (r), "=&r" (t), "=m" (*p)
-     : "m" (*p), "r" (v)
-     : "memory");
-
-  return r;
-}
-
-#endif /* __USE_EXTERN_INLINES */
-
-__END_DECLS
-
-#endif /* sys/tas.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
deleted file mode 100644
index ddb499f20c..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* Don't rely on this, the interface is currently messed up and may need to
-   be broken to be fixed.  */
-#ifndef _SYS_UCONTEXT_H
-#define _SYS_UCONTEXT_H	1
-
-#include <features.h>
-#include <sgidefs.h>
-#include <signal.h>
-
-/* We need the signal context definitions even if they are not used
-   included in <signal.h>.  */
-#include <bits/sigcontext.h>
-
-/* Type for general register.  Even in o32 we assume 64-bit registers,
-   like the kernel.  */
-__extension__ typedef unsigned long long int greg_t;
-
-/* Number of general registers.  */
-#define NGREG	32
-#define NFPREG	32
-
-/* Container for all general registers.  */
-typedef greg_t gregset_t[NGREG];
-
-/* Container for all FPU registers.  */
-typedef struct fpregset {
-	union {
-		double	fp_dregs[NFPREG];
-		struct {
-			float		_fp_fregs;
-			unsigned int	_fp_pad;
-		} fp_fregs[NFPREG];
-	} fp_r;
-} fpregset_t;
-
-
-/* Context to describe whole processor state.  */
-#if _MIPS_SIM == _ABIO32
-/* Earlier versions of glibc for mips had an entirely different
-   definition of mcontext_t, that didn't even resemble the
-   corresponding kernel data structure.  Since all legitimate uses of
-   ucontext_t in glibc mustn't have accessed anything beyond
-   uc_mcontext and, even then, taking a pointer to it, casting it to
-   sigcontext_t, and accessing it as such, which is what it has always
-   been, this can still be rectified.  Fortunately, makecontext,
-   [gs]etcontext et all have never been implemented.  */
-typedef struct
-  {
-    unsigned int regmask;
-    unsigned int status;
-    greg_t pc;
-    gregset_t gregs;
-    fpregset_t fpregs;
-    unsigned int fp_owned;
-    unsigned int fpc_csr;
-    unsigned int fpc_eir;
-    unsigned int used_math;
-    unsigned int ssflags;
-    greg_t mdhi;
-    greg_t mdlo;
-    unsigned int cause;
-    unsigned int badvaddr;
-  } mcontext_t;
-#else
-typedef struct
-  {
-    gregset_t gregs;
-    fpregset_t fpregs;
-    greg_t mdhi;
-    greg_t mdlo;
-    greg_t pc;
-    unsigned int status;
-    unsigned int fpc_csr;
-    unsigned int fpc_eir;
-    unsigned int used_math;
-    unsigned int cause;
-    unsigned int badvaddr;
-  } mcontext_t;
-#endif
-
-/* Userlevel context.  */
-typedef struct ucontext
-  {
-    unsigned long int uc_flags;
-    struct ucontext *uc_link;
-    stack_t uc_stack;
-    mcontext_t uc_mcontext;
-    __sigset_t uc_sigmask;
-  } ucontext_t;
-
-#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h
deleted file mode 100644
index d5b3b0508b..0000000000
--- a/sysdeps/unix/sysv/linux/mips/sys/user.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SYS_USER_H
-#define _SYS_USER_H	1
-
-#include <sgidefs.h>
-
-/* The whole purpose of this file is for GDB and GDB only.  Don't read
-   too much into it.  Don't use it for anything other than GDB unless
-   you know what you are doing.  */
-
-/* #include <asm/reg.h> */
-/* Instead of including the kernel header, that will vary depending on
-   whether the 32- or the 64-bit kernel is installed, we paste its
-   contents here.  Note that the fact that the file is inline here,
-   instead of included separately, doesn't change in any way the
-   licensing status of a program that includes user.h.  Since this is
-   for gdb alone, and gdb is GPLed, no surprises here.  */
-#if _MIPS_SIM == _ABIO32
-/*
- * Various register offset definitions for debuggers, core file
- * examiners and whatnot.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1995, 1999 by Ralf Baechle
- */
-#ifndef __ASM_MIPS_REG_H
-#define __ASM_MIPS_REG_H
-
-/*
- * This defines/structures correspond to the register layout on stack -
- * if the order here is changed, it needs to be updated in
- * include/asm-mips/stackframe.h
- */
-#define EF_REG0			6
-#define EF_REG1			7
-#define EF_REG2			8
-#define EF_REG3			9
-#define EF_REG4			10
-#define EF_REG5			11
-#define EF_REG6			12
-#define EF_REG7			13
-#define EF_REG8			14
-#define EF_REG9			15
-#define EF_REG10		16
-#define EF_REG11		17
-#define EF_REG12		18
-#define EF_REG13		19
-#define EF_REG14		20
-#define EF_REG15		21
-#define EF_REG16		22
-#define EF_REG17		23
-#define EF_REG18		24
-#define EF_REG19		25
-#define EF_REG20		26
-#define EF_REG21		27
-#define EF_REG22		28
-#define EF_REG23		29
-#define EF_REG24		30
-#define EF_REG25		31
-/*
- * k0/k1 unsaved
- */
-#define EF_REG28		34
-#define EF_REG29		35
-#define EF_REG30		36
-#define EF_REG31		37
-
-/*
- * Saved special registers
- */
-#define EF_LO			38
-#define EF_HI			39
-
-#define EF_CP0_EPC		40
-#define EF_CP0_BADVADDR		41
-#define EF_CP0_STATUS		42
-#define EF_CP0_CAUSE		43
-
-#define EF_SIZE			180	/* size in bytes */
-
-#endif /* __ASM_MIPS_REG_H */
-
-#else /* _MIPS_SIM != _ABIO32 */
-
-/*
- * Various register offset definitions for debuggers, core file
- * examiners and whatnot.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1995, 1999 Ralf Baechle
- * Copyright (C) 1995, 1999 Silicon Graphics
- */
-#ifndef _ASM_REG_H
-#define _ASM_REG_H
-
-/*
- * This defines/structures correspond to the register layout on stack -
- * if the order here is changed, it needs to be updated in
- * include/asm-mips/stackframe.h
- */
-#define EF_REG0			 0
-#define EF_REG1			 1
-#define EF_REG2			 2
-#define EF_REG3			 3
-#define EF_REG4			 4
-#define EF_REG5			 5
-#define EF_REG6			 6
-#define EF_REG7			 7
-#define EF_REG8			 8
-#define EF_REG9			 9
-#define EF_REG10		10
-#define EF_REG11		11
-#define EF_REG12		12
-#define EF_REG13		13
-#define EF_REG14		14
-#define EF_REG15		15
-#define EF_REG16		16
-#define EF_REG17		17
-#define EF_REG18		18
-#define EF_REG19		19
-#define EF_REG20		20
-#define EF_REG21		21
-#define EF_REG22		22
-#define EF_REG23		23
-#define EF_REG24		24
-#define EF_REG25		25
-/*
- * k0/k1 unsaved
- */
-#define EF_REG28		28
-#define EF_REG29		29
-#define EF_REG30		30
-#define EF_REG31		31
-
-/*
- * Saved special registers
- */
-#define EF_LO			32
-#define EF_HI			33
-
-#define EF_CP0_EPC		34
-#define EF_CP0_BADVADDR		35
-#define EF_CP0_STATUS		36
-#define EF_CP0_CAUSE		37
-
-#define EF_SIZE			304	/* size in bytes */
-
-#endif /* _ASM_REG_H */
-
-#endif /* _MIPS_SIM != _ABIO32 */
-
-#if _MIPS_SIM == _ABIO32
-
-struct user
-{
-  unsigned long	regs[EF_SIZE/4+64];	/* integer and fp regs */
-  size_t	u_tsize;		/* text size (pages) */
-  size_t	u_dsize;		/* data size (pages) */
-  size_t	u_ssize;		/* stack size (pages) */
-  unsigned long	start_code;		/* text starting address */
-  unsigned long	start_data;		/* data starting address */
-  unsigned long	start_stack;		/* stack starting address */
-  long int	signal;			/* signal causing core dump */
-  void*		u_ar0;			/* help gdb find registers */
-  unsigned long	magic;			/* identifies a core file */
-  char		u_comm[32];		/* user command name */
-};
-
-#else
-
-struct user {
-  __extension__ unsigned long	regs[EF_SIZE/8+64]; /* integer and fp regs */
-  __extension__ unsigned long	u_tsize;	/* text size (pages) */
-  __extension__ unsigned long	u_dsize;	/* data size (pages) */
-  __extension__ unsigned long	u_ssize;	/* stack size (pages) */
-  __extension__ unsigned long long start_code;	/* text starting address */
-  __extension__ unsigned long long start_data;	/* data starting address */
-  __extension__ unsigned long long start_stack;	/* stack starting address */
-  __extension__ long long	signal;		/* signal causing core dump */
-  __extension__ unsigned long long u_ar0;	/* help gdb find registers */
-  __extension__ unsigned long long magic;	/* identifies a core file */
-  char		u_comm[32];		/* user command name */
-};
-
-#endif
-
-#define PAGE_SHIFT		12
-#define PAGE_SIZE		(1UL << PAGE_SHIFT)
-#define PAGE_MASK		(~(PAGE_SIZE-1))
-#define NBPG			PAGE_SIZE
-#define UPAGES			1
-#define HOST_TEXT_START_ADDR	(u.start_code)
-#define HOST_DATA_START_ADDR	(u.start_data)
-#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
-
-#endif	/* _SYS_USER_H */
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
deleted file mode 100644
index 518f2a2522..0000000000
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ /dev/null
@@ -1,31 +0,0 @@
-# File name	Caller	Syscall name	Args	Strong name	Weak names
-
-#
-# Calls for compatibility with existing MIPS OS implementations and
-# compilers.
-#
-cachectl	-	cachectl	i:pii	__cachectl	cachectl
-cacheflush	-	cacheflush	i:pii	_flush_cache	cacheflush
-sysmips		-	sysmips		i:iiii	__sysmips	sysmips
-
-#
-# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
-# it's provided for compatibility, though.
-#
-accept		-	accept		Ci:iBN	__libc_accept	__accept accept
-bind		-	bind		i:ipi	__bind		bind
-connect		-	connect		Ci:ipi	__libc_connect	__connect_internal __connect connect
-getpeername	-	getpeername	i:ipp	__getpeername	getpeername
-getsockname	-	getsockname	i:ipp	__getsockname	getsockname
-getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
-listen		-	listen		i:ii	__listen	listen
-recv		-	recv		Ci:ibni	__libc_recv	__recv recv
-recvfrom	-	recvfrom	Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
-send		-	send		Ci:ibni	__libc_send	__send send
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
-sendto		-	sendto		Ci:ibnibn __libc_sendto	__sendto sendto
-setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
-shutdown	-	shutdown	i:ii	__shutdown	shutdown
-socket		-	socket		i:iii	__socket	socket
-socketpair	-	socketpair	i:iiif	__socketpair	socketpair
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
deleted file mode 100644
index 01cc148be9..0000000000
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1997,1998,1999,2000,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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <sys/types.h>
-#include <endian.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include <kernel-features.h>
-
-#ifdef __NR_truncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls.  */
-int __have_no_truncate64;
-#endif
-
-/* Truncate the file FD refers to to LENGTH bytes.  */
-int
-truncate64 (const char *path, off64_t length)
-{
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! __have_no_truncate64)
-#endif
-    {
-      unsigned int low = length & 0xffffffff;
-      unsigned int high = length >> 32;
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      int saved_errno = errno;
-#endif
-      int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
-				   __LONG_LONG_PAIR (high, low));
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      if (result != -1 || errno != ENOSYS)
-#endif
-	return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      __set_errno (saved_errno);
-      __have_no_truncate64 = 1;
-#endif
-    }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if ((off_t) length != length)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  return truncate (path, (off_t) length);
-#endif
-}
-
-#else
-/* Use the generic implementation.  */
-# include <misc/truncate64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c
deleted file mode 100644
index a309f7104c..0000000000
--- a/sysdeps/unix/sysv/linux/mips/ustat.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <sys/ustat.h>
-#include <sys/sysmacros.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-int
-ustat (dev_t dev, struct ustat *ubuf)
-{
-  unsigned long k_dev;
-
-  /* We must convert the value to dev_t type used by the kernel.  */
-  k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
-
-  return INLINE_SYSCALL (ustat, 2, k_dev, CHECK_1 (ubuf));
-}
diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S
deleted file mode 100644
index 38b6195282..0000000000
--- a/sysdeps/unix/sysv/linux/mips/vfork.S
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-/* vfork() is just a special case of clone().  */
-
-#include <sys/asm.h>
-#include <sysdep.h>
-#include <asm/unistd.h>
-#include <sgidefs.h>
-
-#ifndef SAVE_PID
-#define SAVE_PID
-#endif
-
-#ifndef RESTORE_PID
-#define RESTORE_PID
-#endif
-
-
-/* int vfork() */
-
-	.text
-LOCALSZ= 1
-FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
-GPOFF= FRAMESZ-(1*SZREG)
-NESTED(__vfork,FRAMESZ,sp)
-#ifdef __PIC__
-	SETUP_GP
-#endif
-	PTR_SUBU sp, FRAMESZ
-	SETUP_GP64 (a5, __vfork)
-#ifdef __PIC__
-	SAVE_GP (GPOFF)
-#endif
-#ifdef PROF
-# if (_MIPS_SIM != _ABIO32)
-	PTR_S		a5, GPOFF(sp)
-# endif
-	.set		noat
-	move		$1, ra
-# if (_MIPS_SIM == _ABIO32)
-	subu		sp,sp,8
-# endif
-	jal		_mcount
-	.set		at
-# if (_MIPS_SIM != _ABIO32)
-	PTR_L		a5, GPOFF(sp)
-# endif
-#endif
-
-	PTR_ADDU	sp, FRAMESZ
-
-	SAVE_PID
-
-	li		a0, 0x4112	/* CLONE_VM | CLONE_VFORK | SIGCHLD */
-	move		a1, sp
-
-	/* Do the system call */
-	li		v0,__NR_clone
-	syscall
-
-	RESTORE_PID
-
-	bnez		a3,L(error)
-
-	/* Successful return from the parent or child.  */
-	RESTORE_GP64
-	ret
-
-	/* Something bad happened -- no child created.  */
-L(error):
-#ifdef __PIC__
-	PTR_LA		t9, __syscall_error
-	RESTORE_GP64
-	jr		t9
-#else
-	RESTORE_GP64
-	j		__syscall_error
-#endif
-	END(__vfork)
-
-libc_hidden_def(__vfork)
-weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c
deleted file mode 100644
index 2d09752405..0000000000
--- a/sysdeps/unix/sysv/linux/mips/xmknod.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* xmknod call using old-style Unix mknod system call.
-   Copyright (C) 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2002, 2003
-   Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-/* Create a device file named PATH, with permission and special bits MODE
-   and device number DEV (which can be constructed from major and minor
-   device numbers with the `makedev' macro above).  */
-int
-__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
-{
-  unsigned long k_dev;
-
-  if (vers != _MKNOD_VER)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  /* We must convert the value to dev_t type used by the kernel.  */
-  k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
-
-  return INLINE_SYSCALL (mknod, 3, CHECK_STRING (path), mode, k_dev);
-}
-
-weak_alias (__xmknod, _xmknod)
-libc_hidden_def (__xmknod)
diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c
deleted file mode 100644
index 41d1cbb768..0000000000
--- a/sysdeps/unix/sysv/linux/mips/xstatconv.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Convert between the kernel's `struct stat' format, and libc's.
-   Copyright (C) 1991,1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <kernel_stat.h>
-
-#ifdef STAT_IS_KERNEL_STAT
-
-/* Dummy.  */
-struct kernel_stat;
-
-#else
-
-#include <string.h>
-
-
-int
-__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
-{
-  switch (vers)
-    {
-    case _STAT_VER_KERNEL:
-      /* Nothing to do.  The struct is in the form the kernel expects.
-         We should have short-circuted before we got here, but for
-         completeness... */
-      *(struct kernel_stat *) ubuf = *kbuf;
-      break;
-
-    case _STAT_VER_LINUX:
-      {
-	struct stat *buf = ubuf;
-
-	/* Convert to current kernel version of `struct stat'.  */
-	buf->st_dev = kbuf->st_dev;
-	buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
-	buf->st_ino = kbuf->st_ino;
-	buf->st_mode = kbuf->st_mode;
-	buf->st_nlink = kbuf->st_nlink;
-	buf->st_uid = kbuf->st_uid;
-	buf->st_gid = kbuf->st_gid;
-	buf->st_rdev = kbuf->st_rdev;
-	buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
-	buf->st_pad3 = 0;
-	buf->st_size = kbuf->st_size;
-	buf->st_blksize = kbuf->st_blksize;
-	buf->st_blocks = kbuf->st_blocks;
-
-	buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
-	buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
-	buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
-
-	buf->st_pad5[0] = 0; buf->st_pad5[1] = 0;
-	buf->st_pad5[2] = 0; buf->st_pad5[3] = 0;
-	buf->st_pad5[4] = 0; buf->st_pad5[5] = 0;
-	buf->st_pad5[6] = 0; buf->st_pad5[7] = 0;
-      }
-      break;
-
-    default:
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  return 0;
-}
-
-int
-__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
-{
-#ifdef XSTAT_IS_XSTAT64
-  return xstat_conv (vers, kbuf, ubuf);
-#else
-  switch (vers)
-    {
-    case _STAT_VER_LINUX:
-      {
-	struct stat64 *buf = ubuf;
-
-	buf->st_dev = kbuf->st_dev;
-	buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
-	buf->st_ino = kbuf->st_ino;
-	buf->st_mode = kbuf->st_mode;
-	buf->st_nlink = kbuf->st_nlink;
-	buf->st_uid = kbuf->st_uid;
-	buf->st_gid = kbuf->st_gid;
-	buf->st_rdev = kbuf->st_rdev;
-	buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; buf->st_pad2[2] = 0;
-	buf->st_pad3 = 0;
-	buf->st_size = kbuf->st_size;
-	buf->st_blksize = kbuf->st_blksize;
-	buf->st_blocks = kbuf->st_blocks;
-
-	buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
-	buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
-	buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
-
-	buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
-	buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
-	buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
-	buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
-      }
-      break;
-
-      /* If struct stat64 is different from struct stat then
-	 _STAT_VER_KERNEL does not make sense.  */
-    case _STAT_VER_KERNEL:
-    default:
-      __set_errno (EINVAL);
-      return -1;
-    }
-
-  return 0;
-#endif
-}
-
-#endif /* ! STAT_IS_KERNEL_STAT */
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index 38ffe85b56..7dfe367425 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -135,12 +135,16 @@ OPENAT_NOT_CANCEL (fd, file, oflag, mode)
 #endif
 }
 
+#define UNDERIZE(name) UNDERIZE_1 (name)
+#define UNDERIZE_1(name) __##name
+#define __OPENAT UNDERIZE (OPENAT)
+
 
 /* Open FILE with access OFLAG.  Interpret relative paths relative to
    the directory associated with FD.  If OFLAG includes O_CREAT, a
    third argument is the file protection.  */
 int
-OPENAT (fd, file, oflag)
+__OPENAT (fd, file, oflag)
      int fd;
      const char *file;
      int oflag;
@@ -165,3 +169,5 @@ OPENAT (fd, file, oflag)
 
   return res;
 }
+libc_hidden_def (__OPENAT)
+weak_alias (__OPENAT, OPENAT)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c
index 9a91ba5b2f..e10b40f96c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/linux/hppa/umount.c>
+#include <sysdeps/unix/sysv/linux/x86_64/umount.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index 50c3f42469..b86072bd30 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
+/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
@@ -149,19 +149,28 @@
 	arg 3		4	     call-clobbered
 	arg 4		5	     call-clobbered
 	arg 5		6	     call-saved
+	arg 6		7	     call-saved
 
    (Of course a function with say 3 arguments does not have entries for
    arguments 4 and 5.)
-   S390 does not need to do ANY stack operations to get its parameters
-   right.
+   For system calls with 6 parameters a stack operation is required
+   to load the 6th parameter to register 7. Call saved register 7 is
+   moved to register 0 and back to avoid an additional stack frame.
  */
 
 #define DO_CALL(syscall, args)						      \
+  .if args > 5;								      \
+    lr %r0,%r7;								      \
+    l %r7,96(%r15);							      \
+  .endif;								      \
   .if SYS_ify (syscall) < 256;						      \
     svc SYS_ify (syscall);						      \
   .else;								      \
     lhi %r1,SYS_ify (syscall);						      \
     svc 0;								      \
+  .endif;								      \
+  .if args > 5;								      \
+    lr %r7,%r0;								      \
   .endif
 
 #define ret                                                                   \
@@ -255,6 +264,9 @@
 #define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
 	DECLARGS_4(arg1, arg2, arg3, arg4) \
 	register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);
+#define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
+	DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
+	register unsigned long gpr7 asm ("7") = (unsigned long)(arg6);
 
 #define ASMFMT_0
 #define ASMFMT_1 , "0" (gpr2)
@@ -262,6 +274,7 @@
 #define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
 #define ASMFMT_4 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
 #define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
+#define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
 
 
 /* Pointer mangling support.  */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index aadbf74c2b..fc80c9ff86 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -1,5 +1,6 @@
 /* Assembler macros for 64 bit S/390.
-   Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -150,19 +151,28 @@
 	arg 3		4	     call-clobbered
 	arg 4		5	     call-clobbered
 	arg 5		6	     call-saved
+	arg 6		7	     call-saved
 
    (Of course a function with say 3 arguments does not have entries for
    arguments 4 and 5.)
-   S390 does not need to do ANY stack operations to get its parameters
-   right.
+   For system calls with 6 parameters a stack operation is required
+   to load the 6th parameter to register 7. Call saved register 7 is
+   moved to register 0 and back to avoid an additional stack frame.
  */
 
 #define DO_CALL(syscall, args)						      \
+  .if args > 5;								      \
+    lgr %r0,%r7;							      \
+    lg %r7,160(%r15);							      \
+  .endif;								      \
   .if SYS_ify (syscall) < 256;						      \
     svc SYS_ify (syscall);						      \
   .else;								      \
     lghi %r1,SYS_ify (syscall);						      \
     svc 0;								      \
+  .endif;								      \
+  .if args > 5;								      \
+    lgr %r7,%r0;							      \
   .endif
 
 #define ret								      \
@@ -256,6 +266,9 @@
 #define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
 	DECLARGS_4(arg1, arg2, arg3, arg4) \
 	register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);
+#define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
+	DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
+	register unsigned long gpr6 asm ("7") = (unsigned long)(arg6);
 
 #define ASMFMT_0
 #define ASMFMT_1 , "0" (gpr2)
@@ -263,6 +276,7 @@
 #define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
 #define ASMFMT_4 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
 #define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
+#define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
 
 /* Pointer mangling support.  */
 #if defined NOT_IN_libc && defined IS_IN_rtld
diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
index c883002641..9065825b98 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
@@ -43,18 +43,18 @@
 #define O_ASYNC		 020000
 
 #ifdef __USE_GNU
-# define O_DIRECT	 040000	/* Direct disk access.  */
-# define O_DIRECTORY	0200000	/* Must be a directory.  */
-# define O_NOFOLLOW	0400000	/* Do not follow links.  */
+# define O_DIRECT	 040000	/* Direct disk access.	*/
+# define O_DIRECTORY	0200000	/* Must be a directory.	 */
+# define O_NOFOLLOW	0400000	/* Do not follow links.	 */
 # define O_NOATIME     01000000 /* Do not set atime.  */
 #endif
 
 /* For now Linux has synchronisity options for data and read operations.
    We define the symbols here but let them do the same as O_SYNC since
-   this is a superset.  */
+   this is a superset.	*/
 #if defined __USE_POSIX199309 || defined __USE_UNIX98
 # define O_DSYNC	O_SYNC	/* Synchronize data.  */
-# define O_RSYNC	O_SYNC	/* Synchronize read operations.  */
+# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
 #endif
 
 #ifdef __USE_LARGEFILE64
@@ -70,15 +70,15 @@
 #ifndef __USE_FILE_OFFSET64
 # define F_GETLK	5	/* Get record locking info.  */
 # define F_SETLK	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).  */
+# define F_SETLKW	7	/* Set record locking info (blocking).	*/
 #else
-# define F_GETLK	F_GETLK64  /* Get record locking info.  */
+# define F_GETLK	F_GETLK64  /* Get record locking info.	*/
 # define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
 # define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
 #endif
 #define F_GETLK64	12	/* Get record locking info.  */
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */
-#define F_SETLKW64	14	/* Set record locking info (blocking).  */
+#define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 
 #if defined __USE_BSD || defined __USE_UNIX98
 # define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
@@ -90,20 +90,26 @@
 # define F_GETSIG	11	/* Get number of signal to be sent.  */
 #endif
 
+#ifdef __USE_GNU
+# define F_SETLEASE	1024	/* Set a lease.	 */
+# define F_GETLEASE	1025	/* Enquire what lease is active.  */
+# define F_NOTIFY	1026	/* Request notfications on a directory.	 */
+#endif
+
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */
 
 /* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
 #define F_RDLCK		0	/* Read lock.  */
-#define F_WRLCK		1	/* Write lock.  */
-#define F_UNLCK		2	/* Remove lock.  */
+#define F_WRLCK		1	/* Write lock.	*/
+#define F_UNLCK		2	/* Remove lock.	 */
 
 /* For old implementation of bsd flock().  */
 #define F_EXLCK		4	/* or 3 */
 #define F_SHLCK		8	/* or 4 */
 
 #ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation.  */
+/* Operations for bsd flock(), also used by the kernel implementation.	*/
 # define LOCK_SH	1	/* shared lock */
 # define LOCK_EX	2	/* exclusive lock */
 # define LOCK_NB	4	/* or'd with one of the above to prevent
@@ -111,9 +117,27 @@
 # define LOCK_UN	8	/* remove lock */
 #endif
 
+#ifdef __USE_GNU
+# define LOCK_MAND	32	/* This is a mandatory flock:	*/
+# define LOCK_READ	64	/* ... which allows concurrent read operations.	 */
+# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
+# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.	 */
+#endif
+
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY.  */
+# define DN_ACCESS	0x00000001	/* File accessed.  */
+# define DN_MODIFY	0x00000002	/* File modified.  */
+# define DN_CREATE	0x00000004	/* File created.  */
+# define DN_DELETE	0x00000008	/* File removed.  */
+# define DN_RENAME	0x00000010	/* File renamed.  */
+# define DN_ATTRIB	0x00000020	/* File changed attibutes.  */
+# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
+#endif
+
 struct flock
   {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
+    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
     short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
 #ifndef __USE_FILE_OFFSET64
     __off_t l_start;	/* Offset where the lock begins.  */
@@ -128,7 +152,7 @@ struct flock
 #ifdef __USE_LARGEFILE64
 struct flock64
   {
-    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
+    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
     short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
     __off64_t l_start;	/* Offset where the lock begins.  */
     __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
@@ -150,7 +174,7 @@ struct flock64
 #ifdef __USE_XOPEN2K
 # define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
 # define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
-# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.  */
+# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
 # define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
 # define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
 # define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
diff --git a/sysdeps/unix/sysv/linux/sh/chown.c b/sysdeps/unix/sysv/linux/sh/chown.c
index 1961622564..e7193dc23b 100644
--- a/sysdeps/unix/sysv/linux/sh/chown.c
+++ b/sysdeps/unix/sysv/linux/sh/chown.c
@@ -1 +1,69 @@
-#include <sysdeps/unix/sysv/linux/m68k/chown.c>
+/* Copyright (C) 1998,2000,2002,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., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <linux/posix_types.h>
+#include <kernel-features.h>
+
+#ifdef __NR_chown32
+# if __ASSUME_32BITUIDS == 0
+/* This variable is shared with all files that need to check for 32bit
+   uids.  */
+extern int __libc_missing_32bit_uids;
+# endif
+#endif /* __NR_chown32 */
+
+int
+__chown (const char *file, uid_t owner, gid_t group)
+{
+#if __ASSUME_32BITUIDS > 0
+  return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
+#else
+# ifdef __NR_chown32
+  if (__libc_missing_32bit_uids <= 0)
+    {
+      int result;
+      int saved_errno = errno;
+
+      result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
+      if (result == 0 || errno != ENOSYS)
+	return result;
+
+      __set_errno (saved_errno);
+      __libc_missing_32bit_uids = 1;
+    }
+# endif /* __NR_chown32 */
+
+  if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U))
+      || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group);
+#endif
+}
+libc_hidden_def (__chown)
+weak_alias (__chown, chown)
diff --git a/sysdeps/unix/sysv/linux/sh/fchownat.c b/sysdeps/unix/sysv/linux/sh/fchownat.c
index 7acf7918ee..6cc093222d 100644
--- a/sysdeps/unix/sysv/linux/sh/fchownat.c
+++ b/sysdeps/unix/sysv/linux/sh/fchownat.c
@@ -1 +1,122 @@
-#include <sysdeps/unix/sysv/linux/m68k/fchownat.c>
+/* 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <linux/posix_types.h>
+#include <kernel-features.h>
+
+#ifdef __NR_chown32
+# if __ASSUME_32BITUIDS == 0
+/* This variable is shared with all files that need to check for 32bit
+   uids.  */
+extern int __libc_missing_32bit_uids;
+# endif
+#endif /* __NR_chown32 */
+
+int
+fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
+{
+  if (flag & ~AT_SYMLINK_NOFOLLOW)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  char *buf = NULL;
+
+  if (fd != AT_FDCWD && file[0] != '/')
+    {
+      size_t filelen = strlen (file);
+      static const char procfd[] = "/proc/self/fd/%d/%s";
+      /* Buffer for the path name we are going to use.  It consists of
+	 - the string /proc/self/fd/
+	 - the file descriptor number
+	 - the file name provided.
+	 The final NUL is included in the sizeof.   A bit of overhead
+	 due to the format elements compensates for possible negative
+	 numbers.  */
+      size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen;
+      buf = alloca (buflen);
+
+      __snprintf (buf, buflen, procfd, fd, file);
+      file = buf;
+    }
+
+  int result;
+  INTERNAL_SYSCALL_DECL (err);
+
+#if __ASSUME_32BITUIDS > 0
+  if (flag & AT_SYMLINK_NOFOLLOW)
+    result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner,
+			       group);
+  else
+    result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
+			       group);
+#else
+# ifdef __NR_chown32
+  if (__libc_missing_32bit_uids <= 0)
+    {
+      if (flag & AT_SYMLINK_NOFOLLOW)
+	result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file),
+				   owner, group);
+      else
+	result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
+				   group);
+
+      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+	return result;
+      if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS)
+	goto fail;
+
+      __libc_missing_32bit_uids = 1;
+    }
+# endif /* __NR_chown32 */
+
+  if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U))
+      || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  if (flag & AT_SYMLINK_NOFOLLOW)
+    result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner,
+			       group);
+  else
+    result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner,
+			       group);
+#endif
+
+  if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
+    {
+    fail:
+      __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+      result = -1;
+    }
+
+  return result;
+}
diff --git a/sysdeps/unix/sysv/linux/sh/pread.c b/sysdeps/unix/sysv/linux/sh/pread.c
index 9ded53ebaa..0186e40c9c 100644
--- a/sysdeps/unix/sysv/linux/sh/pread.c
+++ b/sysdeps/unix/sysv/linux/sh/pread.c
@@ -1,3 +1,93 @@
-#define NO_SGIDEFS_H
-#define _MIPS_SIM -1
-#include <sysdeps/unix/sysv/linux/mips/pread.c>
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004, 2006
+   Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <assert.h>
+#include <errno.h>
+#include <unistd.h>
+#include <endian.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <kernel-features.h>
+
+#ifdef __NR_pread64             /* Newer kernels renamed but it's the same.  */
+# ifdef __NR_pread
+#  error "__NR_pread and __NR_pread64 both defined???"
+# endif
+# define __NR_pread __NR_pread64
+#endif
+
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
+
+# if __ASSUME_PREAD_SYSCALL == 0
+static ssize_t __emulate_pread (int fd, void *buf, size_t count,
+				off_t offset) internal_function;
+# endif
+
+ssize_t
+__libc_pread (fd, buf, count, offset)
+     int fd;
+     void *buf;
+     size_t count;
+     off_t offset;
+{
+  ssize_t result;
+
+  if (SINGLE_THREAD_P)
+    {
+      /* First try the syscall.  */
+      result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+			       __LONG_LONG_PAIR (offset >> 31, offset));
+# if __ASSUME_PREAD_SYSCALL == 0
+      if (result == -1 && errno == ENOSYS)
+        /* No system call available.  Use the emulation.  */
+        result = __emulate_pread (fd, buf, count, offset);
+# endif
+      return result;
+    }
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  /* First try the syscall.  */
+  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR (offset >> 31, offset));
+# if __ASSUME_PREAD_SYSCALL == 0
+  if (result == -1 && errno == ENOSYS)
+    /* No system call available.  Use the emulation.  */
+    result = __emulate_pread (fd, buf, count, offset);
+# endif
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
+}
+
+strong_alias (__libc_pread, __pread)
+weak_alias (__libc_pread, pread)
+
+# define __libc_pread(fd, buf, count, offset) \
+     static internal_function __emulate_pread (fd, buf, count, offset)
+#endif
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/sh/pread64.c b/sysdeps/unix/sysv/linux/sh/pread64.c
index 5b22a395ec..f23d619090 100644
--- a/sysdeps/unix/sysv/linux/sh/pread64.c
+++ b/sysdeps/unix/sysv/linux/sh/pread64.c
@@ -1,3 +1,94 @@
-#define NO_SGIDEFS_H
-#define _MIPS_SIM -1
-#include <sysdeps/unix/sysv/linux/mips/pread64.c>
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004, 2006
+   Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <unistd.h>
+#include <endian.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <kernel-features.h>
+
+#ifdef __NR_pread64             /* Newer kernels renamed but it's the same.  */
+# ifdef __NR_pread
+#  error "__NR_pread and __NR_pread64 both defined???"
+# endif
+# define __NR_pread __NR_pread64
+#endif
+
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
+
+# if __ASSUME_PREAD_SYSCALL == 0
+static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
+				  off64_t offset) internal_function;
+# endif
+
+ssize_t
+__libc_pread64 (fd, buf, count, offset)
+     int fd;
+     void *buf;
+     size_t count;
+     off64_t offset;
+{
+  ssize_t result;
+
+  if (SINGLE_THREAD_P)
+    {
+     /* First try the syscall.  */
+     result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
+			      (off_t) (offset & 0xffffffff)));
+# if __ASSUME_PREAD_SYSCALL == 0
+     if (result == -1 && errno == ENOSYS)
+     /* No system call available.  Use the emulation.  */
+     result = __emulate_pread64 (fd, buf, count, offset);
+# endif
+     return result;
+    }
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  /* First try the syscall.  */
+  result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
+					     (off_t) (offset & 0xffffffff)));
+# if __ASSUME_PREAD_SYSCALL == 0
+  if (result == -1 && errno == ENOSYS)
+    /* No system call available.  Use the emulation.  */
+    result = __emulate_pread64 (fd, buf, count, offset);
+# endif
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
+}
+
+weak_alias (__libc_pread64, __pread64)
+weak_alias (__libc_pread64, pread64)
+
+# define __libc_pread64(fd, buf, count, offset) \
+     static internal_function __emulate_pread64 (fd, buf, count, offset)
+#endif
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/sh/pwrite.c b/sysdeps/unix/sysv/linux/sh/pwrite.c
index b75a6a968e..f0e2bc7e0f 100644
--- a/sysdeps/unix/sysv/linux/sh/pwrite.c
+++ b/sysdeps/unix/sysv/linux/sh/pwrite.c
@@ -1,3 +1,93 @@
-#define NO_SGIDEFS_H
-#define _MIPS_SIM -1
-#include <sysdeps/unix/sysv/linux/mips/pwrite.c>
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004, 2006
+   Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <assert.h>
+#include <errno.h>
+#include <unistd.h>
+#include <endian.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <kernel-features.h>
+
+#ifdef __NR_pwrite64            /* Newer kernels renamed but it's the same.  */
+# ifdef __NR_pwrite
+#  error "__NR_pwrite and __NR_pwrite64 both defined???"
+# endif
+# define __NR_pwrite __NR_pwrite64
+#endif
+
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
+
+# if __ASSUME_PWRITE_SYSCALL == 0
+static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
+				 off_t offset) internal_function;
+# endif
+
+ssize_t
+__libc_pwrite (fd, buf, count, offset)
+     int fd;
+     const void *buf;
+     size_t count;
+     off_t offset;
+{
+  ssize_t result;
+
+  if (SINGLE_THREAD_P)
+    {
+      /* First try the syscall.  */
+      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+			       __LONG_LONG_PAIR (offset >> 31, offset));
+# if __ASSUME_PWRITE_SYSCALL == 0
+      if (result == -1 && errno == ENOSYS)
+        /* No system call available.  Use the emulation.  */
+        result = __emulate_pwrite (fd, buf, count, offset);
+# endif
+      return result;
+    }
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  /* First try the syscall.  */
+  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR (offset >> 31, offset));
+# if __ASSUME_PWRITE_SYSCALL == 0
+  if (result == -1 && errno == ENOSYS)
+    /* No system call available.  Use the emulation.  */
+    result = __emulate_pwrite (fd, buf, count, offset);
+# endif
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
+}
+
+strong_alias (__libc_pwrite, __pwrite)
+weak_alias (__libc_pwrite, pwrite)
+
+# define __libc_pwrite(fd, buf, count, offset) \
+     static internal_function __emulate_pwrite (fd, buf, count, offset)
+#endif
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/sh/pwrite64.c b/sysdeps/unix/sysv/linux/sh/pwrite64.c
index ae29280f85..eb1e507287 100644
--- a/sysdeps/unix/sysv/linux/sh/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/sh/pwrite64.c
@@ -1,3 +1,96 @@
-#define NO_SGIDEFS_H
-#define _MIPS_SIM -1
-#include <sysdeps/unix/sysv/linux/mips/pwrite64.c>
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004, 2006
+   Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <unistd.h>
+#include <endian.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <kernel-features.h>
+
+#ifdef __NR_pwrite64            /* Newer kernels renamed but it's the same.  */
+# ifdef __NR_pwrite
+#  error "__NR_pwrite and __NR_pwrite64 both defined???"
+# endif
+# define __NR_pwrite __NR_pwrite64
+#endif
+
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
+
+# if __ASSUME_PWRITE_SYSCALL == 0
+static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
+				   off64_t offset) internal_function;
+# endif
+
+ssize_t
+__libc_pwrite64 (fd, buf, count, offset)
+     int fd;
+     const void *buf;
+     size_t count;
+     off64_t offset;
+{
+  ssize_t result;
+
+  if (SINGLE_THREAD_P)
+    {
+     /* First try the syscall.  */
+     result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
+			     (off_t) (offset & 0xffffffff)));
+# if __ASSUME_PWRITE_SYSCALL == 0
+     if (result == -1 && errno == ENOSYS)
+     /* No system call available.  Use the emulation.  */
+     result = __emulate_pwrite64 (fd, buf, count, offset);
+# endif
+
+     return result;
+    }
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  /* First try the syscall.  */
+  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
+					     (off_t) (offset & 0xffffffff)));
+# if __ASSUME_PWRITE_SYSCALL == 0
+  if (result == -1 && errno == ENOSYS)
+    /* No system call available.  Use the emulation.  */
+    result = __emulate_pwrite64 (fd, buf, count, offset);
+# endif
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
+}
+
+weak_alias (__libc_pwrite64, __pwrite64)
+libc_hidden_weak (__pwrite64)
+weak_alias (__libc_pwrite64, pwrite64)
+
+# define __libc_pwrite64(fd, buf, count, offset) \
+     static internal_function __emulate_pwrite64 (fd, buf, count, offset)
+#endif
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/chown.c b/sysdeps/unix/sysv/linux/sparc/sparc32/chown.c
index 1961622564..374131695c 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/chown.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/chown.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/linux/m68k/chown.c>
+#include <sysdeps/unix/sysv/linux/sh/chown.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c b/sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c
deleted file mode 100644
index e9042d9717..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Data for Linux/sparc32 version of processor capability information.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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
-   definition 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 ar equite 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_sparc32_cap_flags
-#else
-PROCINFO_CLASS const char _dl_sparc32_cap_flags[6][7]
-#endif
-#ifndef PROCINFO_DECL
-= {
-    "flush", "stbar", "swap", "muldiv", "v9", "ultra3"
-  }
-#endif
-#if !defined SHARED || defined PROCINFO_DECL
-;
-#else
-,
-#endif
-
-#undef PROCINFO_DECL
-#undef PROCINFO_CLASS
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h b/sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h
deleted file mode 100644
index 82a94fca9c..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Linux/sparc32 version of processor capability information handling macros.
-   Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jj@ultra.linux.cz>, 1999.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _DL_PROCINFO_H
-#define _DL_PROCINFO_H	1
-
-#include <ldsodefs.h>
-
-#define _DL_HWCAP_COUNT 6
-
-static inline int
-__attribute__ ((unused))
-_dl_procinfo (int word)
-{
-  int i;
-
-  _dl_printf ("AT_HWCAP:   ");
-
-  for (i = 0; i < _DL_HWCAP_COUNT; ++i)
-    if (word & (1 << i))
-      _dl_printf (" %s", GLRO(dl_sparc32_cap_flags)[i]);
-
-  _dl_printf ("\n");
-
-  return 0;
-}
-
-static inline const char *
-__attribute__ ((unused))
-_dl_hwcap_string (int idx)
-{
-  return GLRO(dl_sparc32_cap_flags)[idx];
-};
-
-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_sparc32_cap_flags) [i]) == 0)
-	return i;
-    }
-  return -1;
-};
-
-#define HWCAP_IMPORTANT (HWCAP_SPARC_V9|HWCAP_SPARC_ULTRA3)
-
-/* There are no different platforms defined.  */
-#define _dl_platform_string(idx) ""
-
-/* There're no platforms to filter out.  */
-#define _DL_HWCAP_PLATFORM 0
-
-#define _dl_string_platform(str) (-1)
-
-#endif /* dl-procinfo.h */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c b/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c
index 7acf7918ee..7ba5bf44a1 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/linux/m68k/fchownat.c>
+#include <sysdeps/unix/sysv/linux/sh/fchownat.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies b/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies
deleted file mode 100644
index 17ed964f79..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies
+++ /dev/null
@@ -1 +0,0 @@
-unix/sysv/linux/sparc/sparc32/sparcv9
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c b/sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c
deleted file mode 100644
index 0a453a6811..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Data for Linux/sparc64 version of processor capability information.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   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
-   definition 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 ar equite 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_sparc64_cap_flags
-#else
-PROCINFO_CLASS const char _dl_sparc64_cap_flags[6][7]
-#endif
-#ifndef PROCINFO_DECL
-= {
-    "flush", "stbar", "swap", "muldiv", "v9", "ultra3"
-  }
-#endif
-#if !defined SHARED || defined PROCINFO_DECL
-;
-#else
-,
-#endif
-
-#undef PROCINFO_DECL
-#undef PROCINFO_CLASS
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h b/sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h
deleted file mode 100644
index 3ce77a40e8..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Linux/sparc64 version of processor capability information handling macros.
-   Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jj@ultra.linux.cz>, 1999.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _DL_PROCINFO_H
-#define _DL_PROCINFO_H	1
-
-#include <ldsodefs.h>
-
-#define _DL_HWCAP_COUNT 6
-
-static inline int
-__attribute__ ((unused))
-_dl_procinfo (int word)
-{
-  int i;
-
-  _dl_printf ("AT_HWCAP:   ");
-
-  for (i = 0; i < _DL_HWCAP_COUNT; ++i)
-    if (word & (1 << i))
-      _dl_printf (" %s", GLRO(dl_sparc64_cap_flags)[i]);
-
-  _dl_printf ("\n");
-
-  return 0;
-}
-
-static inline const char *
-__attribute__ ((unused))
-_dl_hwcap_string (int idx)
-{
-  return GLRO(dl_sparc64_cap_flags)[idx];
-};
-
-
-static inline int
-__attribute__ ((unused))
-_dl_string_hwcap (const char *str)
-{
-  int i;
-  for (i = 0; i < _DL_HWCAP_COUNT; i++)
-    {
-      if (strcmp (str, GLRO(dl_sparc64_cap_flags) [i]) == 0)
-	return i;
-    }
-  return -1;
-};
-
-#define HWCAP_IMPORTANT (HWCAP_SPARC_ULTRA3)
-
-/* There are no different platforms defined.  */
-#define _dl_platform_string(idx) ""
-
-/* There're no platforms to filter out.  */
-#define _DL_HWCAP_PLATFORM 0
-
-#define _dl_string_platform(str) (-1)
-
-#endif /* dl-procinfo.h */
diff --git a/sysdeps/unix/sysv/linux/x86_64/brk.c b/sysdeps/unix/sysv/linux/x86_64/brk.c
index 09b7dd4707..8b18c4dbb9 100644
--- a/sysdeps/unix/sysv/linux/x86_64/brk.c
+++ b/sysdeps/unix/sysv/linux/x86_64/brk.c
@@ -1 +1,42 @@
-#include <sysdeps/unix/sysv/linux/hppa/brk.c>
+/* brk system call for Linux/x86_64.
+   Copyright (C) 1995, 1996, 2000, 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sysdep.h>
+
+/* This must be initialized data because commons can't have aliases.  */
+void *__curbrk = 0;
+
+int
+__brk (void *addr)
+{
+  void *newbrk;
+
+  __curbrk = newbrk = (void *) INLINE_SYSCALL (brk, 1, addr);
+
+  if (newbrk < addr)
+    {
+      __set_errno (ENOMEM);
+      return -1;
+    }
+
+  return 0;
+}
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
index cffddb58b3..02672d3c75 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 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
@@ -98,9 +98,12 @@ extern int epoll_ctl (int __epfd, int __op, int __fd,
    "events" parameter is a buffer that will contain triggered
    events. The "maxevents" is the maximum number of events to be
    returned ( usually size of "events" ). The "timeout" parameter
-   specifies the maximum wait time in milliseconds (-1 == infinite).  */
+   specifies the maximum wait time in milliseconds (-1 == infinite).
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
 extern int epoll_wait (int __epfd, struct epoll_event *__events,
-		       int __maxevents, int __timeout) __THROW;
+		       int __maxevents, int __timeout);
 
 __END_DECLS
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/umount.c b/sysdeps/unix/sysv/linux/x86_64/umount.c
index 9a91ba5b2f..a17c5c5799 100644
--- a/sysdeps/unix/sysv/linux/x86_64/umount.c
+++ b/sysdeps/unix/sysv/linux/x86_64/umount.c
@@ -1 +1,31 @@
-#include <sysdeps/unix/sysv/linux/hppa/umount.c>
+/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   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.  */
+
+/* Since we don't have an oldumount system call, do what the kernel
+   does down here.  */
+
+extern long int __umount2 (const char *name, int flags);
+
+long int
+__umount (const char *name)
+{
+  return __umount2 (name, 0);
+}
+
+weak_alias (__umount, umount);