This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Use the same set of header files for x86-64 and i386


Here is a patch to use the same set of header files for x86-64 and i386.
It is on hjl/pr14117 branch.  This change is pretty much straight
forward by using x86-64 headers for both x86-64 and i386.  There are
3 exceptions:

1.  bits/wchar.h.  wchar_t is different for -m32, depending on how
GCC is configured:

http://gcc.gnu.org/ml/gcc/2012-05/msg00397.html

2. sys/elf.h.  It isn't supported for x86-64.
3. sys/vm86.h.  It isn't supported for x86-64.

For bits/wchar.h, I did:

#ifdef __x86_64__
# define __WCHAR_MIN	(-2147483647 - 1)
# define __WCHAR_MAX	(2147483647)
#else
# define __WCHAR_MIN	(-2147483647l - 1l)
# define __WCHAR_MAX	(2147483647l)
#endif

For sys/elf.h and sys/vm86.h, I added

#ifdef __x86_64__
# error This header is unsupported on x86-64.
#else

Tested on ia32, x86-64 and x32.  OK to install?

Thanks.

---
 ChangeLog                                          |   84 +++++
 nptl/ChangeLog                                     |   13 +
 nptl/sysdeps/unix/sysv/linux/i386/Implies          |    1 +
 .../unix/sysv/linux/i386/bits/pthreadtypes.h       |  176 ----------
 nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h |   35 --
 .../unix/sysv/linux/x86/bits/pthreadtypes.h        |  240 ++++++++++++++
 nptl/sysdeps/unix/sysv/linux/x86/bits/semaphore.h  |   40 +++
 nptl/sysdeps/unix/sysv/linux/x86_64/Implies        |    1 +
 .../unix/sysv/linux/x86_64/bits/pthreadtypes.h     |  240 --------------
 .../unix/sysv/linux/x86_64/bits/semaphore.h        |   40 ---
 sysdeps/i386/Implies                               |    1 +
 sysdeps/i386/bits/byteswap-16.h                    |   49 ---
 sysdeps/i386/bits/byteswap.h                       |  126 --------
 sysdeps/i386/bits/endian.h                         |    7 -
 sysdeps/i386/bits/huge_vall.h                      |   42 ---
 sysdeps/i386/bits/link.h                           |   59 ----
 sysdeps/i386/bits/linkmap.h                        |    6 -
 sysdeps/i386/bits/mathdef.h                        |   59 ----
 sysdeps/i386/bits/select.h                         |   54 ---
 sysdeps/i386/bits/setjmp.h                         |   31 --
 sysdeps/unix/sysv/linux/i386/bits/a.out.h          |    3 -
 sysdeps/unix/sysv/linux/i386/bits/environments.h   |   67 ----
 sysdeps/unix/sysv/linux/i386/bits/fcntl.h          |  321 -------------------
 sysdeps/unix/sysv/linux/i386/bits/mman.h           |  112 -------
 sysdeps/unix/sysv/linux/i386/bits/wchar.h          |   25 --
 sysdeps/unix/sysv/linux/i386/sys/debugreg.h        |   90 ------
 sysdeps/unix/sysv/linux/i386/sys/elf.h             |   25 --
 sysdeps/unix/sysv/linux/i386/sys/io.h              |  184 -----------
 sysdeps/unix/sysv/linux/i386/sys/perm.h            |   35 --
 sysdeps/unix/sysv/linux/i386/sys/procfs.h          |  130 --------
 sysdeps/unix/sysv/linux/i386/sys/reg.h             |   42 ---
 sysdeps/unix/sysv/linux/i386/sys/ucontext.h        |  128 --------
 sysdeps/unix/sysv/linux/i386/sys/user.h            |  102 ------
 sysdeps/unix/sysv/linux/i386/sys/vm86.h            |   34 --
 sysdeps/unix/sysv/linux/x86/bits/a.out.h           |   11 +
 sysdeps/unix/sysv/linux/x86/bits/environments.h    |   96 ++++++
 sysdeps/unix/sysv/linux/x86/bits/epoll.h           |   31 ++
 sysdeps/unix/sysv/linux/x86/bits/fcntl.h           |  337 ++++++++++++++++++++
 sysdeps/unix/sysv/linux/x86/bits/ipctypes.h        |   33 ++
 sysdeps/unix/sysv/linux/x86/bits/mman.h            |  113 +++++++
 sysdeps/unix/sysv/linux/x86/bits/msq.h             |   81 +++++
 sysdeps/unix/sysv/linux/x86/bits/sem.h             |   86 +++++
 sysdeps/unix/sysv/linux/x86/bits/shm.h             |  109 +++++++
 sysdeps/unix/sysv/linux/x86/bits/sigcontext.h      |  160 +++++++++
 sysdeps/unix/sysv/linux/x86/bits/siginfo.h         |  330 +++++++++++++++++++
 sysdeps/unix/sysv/linux/x86/bits/stat.h            |  212 ++++++++++++
 sysdeps/unix/sysv/linux/x86/bits/sysctl.h          |   20 ++
 sysdeps/unix/sysv/linux/x86/bits/typesizes.h       |   79 +++++
 sysdeps/unix/sysv/linux/x86/bits/wchar.h           |   30 ++
 sysdeps/unix/sysv/linux/x86/sys/debugreg.h         |   86 +++++
 sysdeps/unix/sysv/linux/x86/sys/elf.h              |   29 ++
 sysdeps/unix/sysv/linux/x86/sys/io.h               |  180 +++++++++++
 sysdeps/unix/sysv/linux/x86/sys/perm.h             |   35 ++
 sysdeps/unix/sysv/linux/x86/sys/procfs.h           |  145 +++++++++
 sysdeps/unix/sysv/linux/x86/sys/reg.h              |   77 +++++
 sysdeps/unix/sysv/linux/x86/sys/ucontext.h         |  246 ++++++++++++++
 sysdeps/unix/sysv/linux/x86/sys/user.h             |  180 +++++++++++
 sysdeps/unix/sysv/linux/x86/sys/vm86.h             |   38 +++
 sysdeps/unix/sysv/linux/x86_64/bits/a.out.h        |   11 -
 sysdeps/unix/sysv/linux/x86_64/bits/environments.h |   96 ------
 sysdeps/unix/sysv/linux/x86_64/bits/epoll.h        |   31 --
 sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h        |  337 --------------------
 sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h     |   33 --
 sysdeps/unix/sysv/linux/x86_64/bits/mman.h         |  113 -------
 sysdeps/unix/sysv/linux/x86_64/bits/msq.h          |   81 -----
 sysdeps/unix/sysv/linux/x86_64/bits/sem.h          |   86 -----
 sysdeps/unix/sysv/linux/x86_64/bits/shm.h          |  109 -------
 sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h   |  160 ---------
 sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h      |  330 -------------------
 sysdeps/unix/sysv/linux/x86_64/bits/stat.h         |  212 ------------
 sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h       |   20 --
 sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h    |   79 -----
 sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h      |   86 -----
 sysdeps/unix/sysv/linux/x86_64/sys/io.h            |  180 -----------
 sysdeps/unix/sysv/linux/x86_64/sys/perm.h          |   35 --
 sysdeps/unix/sysv/linux/x86_64/sys/procfs.h        |  145 ---------
 sysdeps/unix/sysv/linux/x86_64/sys/reg.h           |   77 -----
 sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h      |  246 --------------
 sysdeps/unix/sysv/linux/x86_64/sys/user.h          |  180 -----------
 sysdeps/x86/bits/byteswap-16.h                     |   49 +++
 sysdeps/x86/bits/byteswap.h                        |  154 +++++++++
 sysdeps/x86/bits/endian.h                          |    7 +
 sysdeps/x86/bits/huge_vall.h                       |   42 +++
 sysdeps/x86/bits/link.h                            |  147 +++++++++
 sysdeps/x86/bits/linkmap.h                         |   16 +
 sysdeps/x86/bits/mathdef.h                         |   59 ++++
 sysdeps/x86/bits/select.h                          |   63 ++++
 sysdeps/x86/bits/setjmp.h                          |   40 +++
 sysdeps/x86/bits/string.h                          |   25 ++
 sysdeps/x86/bits/wordsize.h                        |   13 +
 sysdeps/x86/bits/xtitypes.h                        |   33 ++
 sysdeps/x86_64/Implies                             |    1 +
 sysdeps/x86_64/bits/byteswap-16.h                  |   49 ---
 sysdeps/x86_64/bits/byteswap.h                     |  154 ---------
 sysdeps/x86_64/bits/endian.h                       |    7 -
 sysdeps/x86_64/bits/link.h                         |  147 ---------
 sysdeps/x86_64/bits/linkmap.h                      |   16 -
 sysdeps/x86_64/bits/mathdef.h                      |   59 ----
 sysdeps/x86_64/bits/select.h                       |   63 ----
 sysdeps/x86_64/bits/setjmp.h                       |   40 ---
 sysdeps/x86_64/bits/string.h                       |   25 --
 sysdeps/x86_64/bits/wordsize.h                     |   13 -
 sysdeps/x86_64/bits/xtitypes.h                     |   33 --
 103 files changed, 3773 insertions(+), 5475 deletions(-)
 create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/Implies
 delete mode 100644 nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
 delete mode 100644 nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
 create mode 100644 nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
 create mode 100644 nptl/sysdeps/unix/sysv/linux/x86/bits/semaphore.h
 create mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/Implies
 delete mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
 delete mode 100644 nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
 delete mode 100644 sysdeps/i386/bits/byteswap-16.h
 delete mode 100644 sysdeps/i386/bits/byteswap.h
 delete mode 100644 sysdeps/i386/bits/endian.h
 delete mode 100644 sysdeps/i386/bits/huge_vall.h
 delete mode 100644 sysdeps/i386/bits/link.h
 delete mode 100644 sysdeps/i386/bits/linkmap.h
 delete mode 100644 sysdeps/i386/bits/mathdef.h
 delete mode 100644 sysdeps/i386/bits/select.h
 delete mode 100644 sysdeps/i386/bits/setjmp.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/bits/a.out.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/bits/environments.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/bits/fcntl.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/bits/mman.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/bits/wchar.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/debugreg.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/elf.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/io.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/perm.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/procfs.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/reg.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/ucontext.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/user.h
 delete mode 100644 sysdeps/unix/sysv/linux/i386/sys/vm86.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/a.out.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/environments.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/epoll.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/fcntl.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/ipctypes.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/mman.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/msq.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/sem.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/shm.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/siginfo.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/stat.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/sysctl.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/typesizes.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/bits/wchar.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/debugreg.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/elf.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/io.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/perm.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/procfs.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/reg.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/ucontext.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/user.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/sys/vm86.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/a.out.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/environments.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/epoll.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/mman.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/msq.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/sem.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/shm.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/stat.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sys/io.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sys/perm.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sys/reg.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sys/user.h
 create mode 100644 sysdeps/x86/bits/byteswap-16.h
 create mode 100644 sysdeps/x86/bits/byteswap.h
 create mode 100644 sysdeps/x86/bits/endian.h
 create mode 100644 sysdeps/x86/bits/huge_vall.h
 create mode 100644 sysdeps/x86/bits/link.h
 create mode 100644 sysdeps/x86/bits/linkmap.h
 create mode 100644 sysdeps/x86/bits/mathdef.h
 create mode 100644 sysdeps/x86/bits/select.h
 create mode 100644 sysdeps/x86/bits/setjmp.h
 create mode 100644 sysdeps/x86/bits/string.h
 create mode 100644 sysdeps/x86/bits/wordsize.h
 create mode 100644 sysdeps/x86/bits/xtitypes.h
 delete mode 100644 sysdeps/x86_64/bits/byteswap-16.h
 delete mode 100644 sysdeps/x86_64/bits/byteswap.h
 delete mode 100644 sysdeps/x86_64/bits/endian.h
 delete mode 100644 sysdeps/x86_64/bits/link.h
 delete mode 100644 sysdeps/x86_64/bits/linkmap.h
 delete mode 100644 sysdeps/x86_64/bits/mathdef.h
 delete mode 100644 sysdeps/x86_64/bits/select.h
 delete mode 100644 sysdeps/x86_64/bits/setjmp.h
 delete mode 100644 sysdeps/x86_64/bits/string.h
 delete mode 100644 sysdeps/x86_64/bits/wordsize.h
 delete mode 100644 sysdeps/x86_64/bits/xtitypes.h

diff --git a/ChangeLog b/ChangeLog
index 42df8d7..ec36d4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,89 @@
 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
 
+	[BZ #14117]
+	* sysdeps/i386/bits/byteswap.h: Removed.
+	* sysdeps/i386/bits/byteswap-16.h: Likewise.
+	* sysdeps/i386/bits/endian.h: Likewise.
+	* sysdeps/i386/bits/link.h: Likewise.
+	* sysdeps/i386/bits/linkmap.h: Likewise.
+	* sysdeps/i386/bits/mathdef.h: Likewise.
+	* sysdeps/i386/bits/select.h: Likewise.
+	* sysdeps/i386/bits/setjmp.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/a.out.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/a.out.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/environments.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/environments.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/epoll.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/epoll.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/fcntl.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/ipctypes.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/mman.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/msq.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/msq.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/sem.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/sem.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/shm.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/sigcontext.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/siginfo.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/stat.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/sysctl.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/typesizes.h: This.
+	* sysdeps/unix/sysv/linux/i386/bits/wchar.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/wchar.h: This.  Support x86-64.
+	* sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/debugreg.h: This.
+	* sysdeps/unix/sysv/linux/i386/sys/elf.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/elf.h: This.  Support x86-64.
+	* sysdeps/unix/sysv/linux/x86_64/sys/io.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/io.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/sys/perm.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/perm.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/sys/procfs.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/procfs.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/sys/reg.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/reg.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/sys/user.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/user.h: This.
+	* sysdeps/unix/sysv/linux/i386/sys/vm86.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/sys/vm86.h: This.  Support x86-64.
+	* sysdeps/x86_64/bits/byteswap.h: Renamed to ...
+	* sysdeps/x86/bits/byteswap.h: This.
+	* sysdeps/x86_64/bits/byteswap-16.h: Renamed to ...
+	* sysdeps/x86/bits/byteswap-16.h: This.
+	* sysdeps/x86_64/bits/endian.h: Renamed to ...
+	* sysdeps/x86/bits/endian.h: This.
+	* sysdeps/i386/bits/huge_vall.h: Renamed to ...
+	* sysdeps/x86/bits/huge_vall.h: This.
+	* sysdeps/x86_64/bits/link.h: Renamed to ...
+	* sysdeps/x86/bits/link.h: This.
+	* sysdeps/x86_64/bits/linkmap.h: Renamed to ...
+	* sysdeps/x86/bits/linkmap.h: This.
+	* sysdeps/x86_64/bits/mathdef.h: Renamed to ...
+	* sysdeps/x86/bits/mathdef.h: This.
+	* sysdeps/x86_64/bits/select.h: Renamed to ...
+	* sysdeps/x86/bits/select.h: This.
+	* sysdeps/x86_64/bits/setjmp.h: Renamed to ...
+	* sysdeps/x86/bits/setjmp.h: This.
+	* sysdeps/x86_64/bits/string.h: Renamed to ...
+	* sysdeps/x86/bits/string.h: This.
+	* sysdeps/x86_64/bits/wordsize.h: Renamed to ...
+	* sysdeps/x86/bits/wordsize.h: This.
+	* sysdeps/x86_64/bits/xtitypes.h: Renamed to ...
+	* sysdeps/x86/bits/xtitypes.h: This.
+	* sysdeps/i386/Implies: Add x86.
+	* sysdeps/x86_64/Implies: Likewise.
+
 	[BZ #14183]
 	* sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h (__NLINK_T_TYPE):
 	Defined with __UWORD_TYPE if __x86_64__ isn't defined.
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 4c56f13..daad57f 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,16 @@
+2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #14117]
+	* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
+	* sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
+	* sysdeps/unix/sysv/linux/i386/Implies: New file.
+	* sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
+	* sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
+	* 
+
 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
 
 	[BZ #14132]
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/Implies b/nptl/sysdeps/unix/sysv/linux/i386/Implies
new file mode 100644
index 0000000..ccc7eaa
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/i386/Implies
@@ -0,0 +1 @@
+unix/sysv/linux/x86
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
deleted file mode 100644
index 5952454..0000000
--- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/* Copyright (C) 2002-2007, 2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _BITS_PTHREADTYPES_H
-#define _BITS_PTHREADTYPES_H	1
-
-#define __SIZEOF_PTHREAD_ATTR_T 36
-#define __SIZEOF_PTHREAD_MUTEX_T 24
-#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-#define __SIZEOF_PTHREAD_COND_T 48
-#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
-#define __SIZEOF_PTHREAD_CONDATTR_T 4
-#define __SIZEOF_PTHREAD_RWLOCK_T 32
-#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-#define __SIZEOF_PTHREAD_BARRIER_T 20
-#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-
-
-/* Thread identifiers.  The structure of the attribute type is not
-   exposed on purpose.  */
-typedef unsigned long int pthread_t;
-
-
-union pthread_attr_t
-{
-  char __size[__SIZEOF_PTHREAD_ATTR_T];
-  long int __align;
-};
-#ifndef __have_pthread_attr_t
-typedef union pthread_attr_t pthread_attr_t;
-# define __have_pthread_attr_t	1
-#endif
-
-
-typedef struct __pthread_internal_slist
-{
-  struct __pthread_internal_slist *__next;
-} __pthread_slist_t;
-
-
-/* Data structures for mutex handling.  The structure of the attribute
-   type is not exposed on purpose.  */
-typedef union
-{
-  struct __pthread_mutex_s
-  {
-    int __lock;
-    unsigned int __count;
-    int __owner;
-    /* KIND must stay at this position in the structure to maintain
-       binary compatibility.  */
-    int __kind;
-    unsigned int __nusers;
-    __extension__ union
-    {
-      int __spins;
-      __pthread_slist_t __list;
-    };
-  } __data;
-  char __size[__SIZEOF_PTHREAD_MUTEX_T];
-  long int __align;
-} pthread_mutex_t;
-
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
-  long int __align;
-} pthread_mutexattr_t;
-
-
-/* Data structure for conditional variable handling.  The structure of
-   the attribute type is not exposed on purpose.  */
-typedef union
-{
-  struct
-  {
-    int __lock;
-    unsigned int __futex;
-    __extension__ unsigned long long int __total_seq;
-    __extension__ unsigned long long int __wakeup_seq;
-    __extension__ unsigned long long int __woken_seq;
-    void *__mutex;
-    unsigned int __nwaiters;
-    unsigned int __broadcast_seq;
-  } __data;
-  char __size[__SIZEOF_PTHREAD_COND_T];
-  __extension__ long long int __align;
-} pthread_cond_t;
-
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_CONDATTR_T];
-  long int __align;
-} pthread_condattr_t;
-
-
-/* Keys for thread-specific data */
-typedef unsigned int pthread_key_t;
-
-
-/* Once-only execution */
-typedef int pthread_once_t;
-
-
-#if defined __USE_UNIX98 || defined __USE_XOPEN2K
-/* Data structure for read-write lock variable handling.  The
-   structure of the attribute type is not exposed on purpose.  */
-typedef union
-{
-  struct
-  {
-    int __lock;
-    unsigned int __nr_readers;
-    unsigned int __readers_wakeup;
-    unsigned int __writer_wakeup;
-    unsigned int __nr_readers_queued;
-    unsigned int __nr_writers_queued;
-    /* FLAGS must stay at this position in the structure to maintain
-       binary compatibility.  */
-    unsigned char __flags;
-    unsigned char __shared;
-    unsigned char __pad1;
-    unsigned char __pad2;
-    int __writer;
-  } __data;
-  char __size[__SIZEOF_PTHREAD_RWLOCK_T];
-  long int __align;
-} pthread_rwlock_t;
-
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
-  long int __align;
-} pthread_rwlockattr_t;
-#endif
-
-
-#ifdef __USE_XOPEN2K
-/* POSIX spinlock data type.  */
-typedef volatile int pthread_spinlock_t;
-
-
-/* POSIX barriers data type.  The structure of the type is
-   deliberately not exposed.  */
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_BARRIER_T];
-  long int __align;
-} pthread_barrier_t;
-
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
-  int __align;
-} pthread_barrierattr_t;
-#endif
-
-
-/* Extra attributes for the cleanup functions.  */
-#define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
-
-#endif	/* bits/pthreadtypes.h */
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
deleted file mode 100644
index 9da293a..0000000
--- a/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SEMAPHORE_H
-# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
-#endif
-
-
-#define __SIZEOF_SEM_T	16
-
-
-/* Value returned if `sem_open' failed.  */
-#define SEM_FAILED      ((sem_t *) 0)
-
-
-typedef union
-{
-  char __size[__SIZEOF_SEM_T];
-  long int __align;
-} sem_t;
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
new file mode 100644
index 0000000..e22947f
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
@@ -0,0 +1,240 @@
+/* Copyright (C) 2002-2007, 2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_PTHREADTYPES_H
+#define _BITS_PTHREADTYPES_H	1
+
+#include <bits/wordsize.h>
+
+#ifdef __x86_64__
+# if __WORDSIZE == 64
+#  define __SIZEOF_PTHREAD_ATTR_T 56
+#  define __SIZEOF_PTHREAD_MUTEX_T 40
+#  define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#  define __SIZEOF_PTHREAD_COND_T 48
+#  define __SIZEOF_PTHREAD_CONDATTR_T 4
+#  define __SIZEOF_PTHREAD_RWLOCK_T 56
+#  define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#  define __SIZEOF_PTHREAD_BARRIER_T 32
+#  define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+# else
+#  define __SIZEOF_PTHREAD_ATTR_T 32
+#  define __SIZEOF_PTHREAD_MUTEX_T 32
+#  define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#  define __SIZEOF_PTHREAD_COND_T 48
+#  define __SIZEOF_PTHREAD_CONDATTR_T 4
+#  define __SIZEOF_PTHREAD_RWLOCK_T 44
+#  define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#  define __SIZEOF_PTHREAD_BARRIER_T 20
+#  define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+# endif
+#else
+# define __SIZEOF_PTHREAD_ATTR_T 36
+# define __SIZEOF_PTHREAD_MUTEX_T 24
+# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+# define __SIZEOF_PTHREAD_COND_T 48
+# define __SIZEOF_PTHREAD_CONDATTR_T 4
+# define __SIZEOF_PTHREAD_RWLOCK_T 32
+# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+# define __SIZEOF_PTHREAD_BARRIER_T 20
+# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+#endif
+
+
+/* Thread identifiers.  The structure of the attribute type is not
+   exposed on purpose.  */
+typedef unsigned long int pthread_t;
+
+
+union pthread_attr_t
+{
+  char __size[__SIZEOF_PTHREAD_ATTR_T];
+  long int __align;
+};
+#ifndef __have_pthread_attr_t
+typedef union pthread_attr_t pthread_attr_t;
+# define __have_pthread_attr_t	1
+#endif
+
+
+#ifdef __x86_64__
+typedef struct __pthread_internal_list
+{
+  struct __pthread_internal_list *__prev;
+  struct __pthread_internal_list *__next;
+} __pthread_list_t;
+#else
+typedef struct __pthread_internal_slist
+{
+  struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+#endif
+
+
+/* Data structures for mutex handling.  The structure of the attribute
+   type is not exposed on purpose.  */
+typedef union
+{
+  struct __pthread_mutex_s
+  {
+    int __lock;
+    unsigned int __count;
+    int __owner;
+#ifdef __x86_64__
+    unsigned int __nusers;
+#endif
+    /* KIND must stay at this position in the structure to maintain
+       binary compatibility.  */
+    int __kind;
+#ifdef __x86_64__
+    int __spins;
+    __pthread_list_t __list;
+# define __PTHREAD_MUTEX_HAVE_PREV	1
+#else
+    unsigned int __nusers;
+    __extension__ union
+    {
+      int __spins;
+      __pthread_slist_t __list;
+    };
+#endif
+  } __data;
+  char __size[__SIZEOF_PTHREAD_MUTEX_T];
+  long int __align;
+} pthread_mutex_t;
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
+  int __align;
+} pthread_mutexattr_t;
+
+
+/* Data structure for conditional variable handling.  The structure of
+   the attribute type is not exposed on purpose.  */
+typedef union
+{
+  struct
+  {
+    int __lock;
+    unsigned int __futex;
+    __extension__ unsigned long long int __total_seq;
+    __extension__ unsigned long long int __wakeup_seq;
+    __extension__ unsigned long long int __woken_seq;
+    void *__mutex;
+    unsigned int __nwaiters;
+    unsigned int __broadcast_seq;
+  } __data;
+  char __size[__SIZEOF_PTHREAD_COND_T];
+  __extension__ long long int __align;
+} pthread_cond_t;
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_CONDATTR_T];
+  int __align;
+} pthread_condattr_t;
+
+
+/* Keys for thread-specific data */
+typedef unsigned int pthread_key_t;
+
+
+/* Once-only execution */
+typedef int pthread_once_t;
+
+
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+/* Data structure for read-write lock variable handling.  The
+   structure of the attribute type is not exposed on purpose.  */
+typedef union
+{
+# ifdef __x86_64__
+  struct
+  {
+    int __lock;
+    unsigned int __nr_readers;
+    unsigned int __readers_wakeup;
+    unsigned int __writer_wakeup;
+    unsigned int __nr_readers_queued;
+    unsigned int __nr_writers_queued;
+    int __writer;
+    int __shared;
+    unsigned long int __pad1;
+    unsigned long int __pad2;
+    /* FLAGS must stay at this position in the structure to maintain
+       binary compatibility.  */
+    unsigned int __flags;
+# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED	1
+  } __data;
+# else
+  struct
+  {
+    int __lock;
+    unsigned int __nr_readers;
+    unsigned int __readers_wakeup;
+    unsigned int __writer_wakeup;
+    unsigned int __nr_readers_queued;
+    unsigned int __nr_writers_queued;
+    /* FLAGS must stay at this position in the structure to maintain
+       binary compatibility.  */
+    unsigned char __flags;
+    unsigned char __shared;
+    unsigned char __pad1;
+    unsigned char __pad2;
+    int __writer;
+  } __data;
+# endif
+  char __size[__SIZEOF_PTHREAD_RWLOCK_T];
+  long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
+  long int __align;
+} pthread_rwlockattr_t;
+#endif
+
+
+#ifdef __USE_XOPEN2K
+/* POSIX spinlock data type.  */
+typedef volatile int pthread_spinlock_t;
+
+
+/* POSIX barriers data type.  The structure of the type is
+   deliberately not exposed.  */
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_BARRIER_T];
+  long int __align;
+} pthread_barrier_t;
+
+typedef union
+{
+  char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
+  int __align;
+} pthread_barrierattr_t;
+#endif
+
+
+#ifndef __x86_64__
+/* Extra attributes for the cleanup functions.  */
+# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
+#endif
+
+#endif	/* bits/pthreadtypes.h */
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/x86/bits/semaphore.h
new file mode 100644
index 0000000..662af98
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/x86/bits/semaphore.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 64
+# define __SIZEOF_SEM_T	32
+#else
+# define __SIZEOF_SEM_T	16
+#endif
+
+
+/* Value returned if `sem_open' failed.  */
+#define SEM_FAILED      ((sem_t *) 0)
+
+
+typedef union
+{
+  char __size[__SIZEOF_SEM_T];
+  long int __align;
+} sem_t;
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/Implies b/nptl/sysdeps/unix/sysv/linux/x86_64/Implies
new file mode 100644
index 0000000..ccc7eaa
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/Implies
@@ -0,0 +1 @@
+unix/sysv/linux/x86
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
deleted file mode 100644
index e22947f..0000000
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
+++ /dev/null
@@ -1,240 +0,0 @@
-/* Copyright (C) 2002-2007, 2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _BITS_PTHREADTYPES_H
-#define _BITS_PTHREADTYPES_H	1
-
-#include <bits/wordsize.h>
-
-#ifdef __x86_64__
-# if __WORDSIZE == 64
-#  define __SIZEOF_PTHREAD_ATTR_T 56
-#  define __SIZEOF_PTHREAD_MUTEX_T 40
-#  define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-#  define __SIZEOF_PTHREAD_COND_T 48
-#  define __SIZEOF_PTHREAD_CONDATTR_T 4
-#  define __SIZEOF_PTHREAD_RWLOCK_T 56
-#  define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-#  define __SIZEOF_PTHREAD_BARRIER_T 32
-#  define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-# else
-#  define __SIZEOF_PTHREAD_ATTR_T 32
-#  define __SIZEOF_PTHREAD_MUTEX_T 32
-#  define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-#  define __SIZEOF_PTHREAD_COND_T 48
-#  define __SIZEOF_PTHREAD_CONDATTR_T 4
-#  define __SIZEOF_PTHREAD_RWLOCK_T 44
-#  define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-#  define __SIZEOF_PTHREAD_BARRIER_T 20
-#  define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-# endif
-#else
-# define __SIZEOF_PTHREAD_ATTR_T 36
-# define __SIZEOF_PTHREAD_MUTEX_T 24
-# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-# define __SIZEOF_PTHREAD_COND_T 48
-# define __SIZEOF_PTHREAD_CONDATTR_T 4
-# define __SIZEOF_PTHREAD_RWLOCK_T 32
-# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-# define __SIZEOF_PTHREAD_BARRIER_T 20
-# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-#endif
-
-
-/* Thread identifiers.  The structure of the attribute type is not
-   exposed on purpose.  */
-typedef unsigned long int pthread_t;
-
-
-union pthread_attr_t
-{
-  char __size[__SIZEOF_PTHREAD_ATTR_T];
-  long int __align;
-};
-#ifndef __have_pthread_attr_t
-typedef union pthread_attr_t pthread_attr_t;
-# define __have_pthread_attr_t	1
-#endif
-
-
-#ifdef __x86_64__
-typedef struct __pthread_internal_list
-{
-  struct __pthread_internal_list *__prev;
-  struct __pthread_internal_list *__next;
-} __pthread_list_t;
-#else
-typedef struct __pthread_internal_slist
-{
-  struct __pthread_internal_slist *__next;
-} __pthread_slist_t;
-#endif
-
-
-/* Data structures for mutex handling.  The structure of the attribute
-   type is not exposed on purpose.  */
-typedef union
-{
-  struct __pthread_mutex_s
-  {
-    int __lock;
-    unsigned int __count;
-    int __owner;
-#ifdef __x86_64__
-    unsigned int __nusers;
-#endif
-    /* KIND must stay at this position in the structure to maintain
-       binary compatibility.  */
-    int __kind;
-#ifdef __x86_64__
-    int __spins;
-    __pthread_list_t __list;
-# define __PTHREAD_MUTEX_HAVE_PREV	1
-#else
-    unsigned int __nusers;
-    __extension__ union
-    {
-      int __spins;
-      __pthread_slist_t __list;
-    };
-#endif
-  } __data;
-  char __size[__SIZEOF_PTHREAD_MUTEX_T];
-  long int __align;
-} pthread_mutex_t;
-
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
-  int __align;
-} pthread_mutexattr_t;
-
-
-/* Data structure for conditional variable handling.  The structure of
-   the attribute type is not exposed on purpose.  */
-typedef union
-{
-  struct
-  {
-    int __lock;
-    unsigned int __futex;
-    __extension__ unsigned long long int __total_seq;
-    __extension__ unsigned long long int __wakeup_seq;
-    __extension__ unsigned long long int __woken_seq;
-    void *__mutex;
-    unsigned int __nwaiters;
-    unsigned int __broadcast_seq;
-  } __data;
-  char __size[__SIZEOF_PTHREAD_COND_T];
-  __extension__ long long int __align;
-} pthread_cond_t;
-
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_CONDATTR_T];
-  int __align;
-} pthread_condattr_t;
-
-
-/* Keys for thread-specific data */
-typedef unsigned int pthread_key_t;
-
-
-/* Once-only execution */
-typedef int pthread_once_t;
-
-
-#if defined __USE_UNIX98 || defined __USE_XOPEN2K
-/* Data structure for read-write lock variable handling.  The
-   structure of the attribute type is not exposed on purpose.  */
-typedef union
-{
-# ifdef __x86_64__
-  struct
-  {
-    int __lock;
-    unsigned int __nr_readers;
-    unsigned int __readers_wakeup;
-    unsigned int __writer_wakeup;
-    unsigned int __nr_readers_queued;
-    unsigned int __nr_writers_queued;
-    int __writer;
-    int __shared;
-    unsigned long int __pad1;
-    unsigned long int __pad2;
-    /* FLAGS must stay at this position in the structure to maintain
-       binary compatibility.  */
-    unsigned int __flags;
-# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED	1
-  } __data;
-# else
-  struct
-  {
-    int __lock;
-    unsigned int __nr_readers;
-    unsigned int __readers_wakeup;
-    unsigned int __writer_wakeup;
-    unsigned int __nr_readers_queued;
-    unsigned int __nr_writers_queued;
-    /* FLAGS must stay at this position in the structure to maintain
-       binary compatibility.  */
-    unsigned char __flags;
-    unsigned char __shared;
-    unsigned char __pad1;
-    unsigned char __pad2;
-    int __writer;
-  } __data;
-# endif
-  char __size[__SIZEOF_PTHREAD_RWLOCK_T];
-  long int __align;
-} pthread_rwlock_t;
-
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
-  long int __align;
-} pthread_rwlockattr_t;
-#endif
-
-
-#ifdef __USE_XOPEN2K
-/* POSIX spinlock data type.  */
-typedef volatile int pthread_spinlock_t;
-
-
-/* POSIX barriers data type.  The structure of the type is
-   deliberately not exposed.  */
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_BARRIER_T];
-  long int __align;
-} pthread_barrier_t;
-
-typedef union
-{
-  char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
-  int __align;
-} pthread_barrierattr_t;
-#endif
-
-
-#ifndef __x86_64__
-/* Extra attributes for the cleanup functions.  */
-# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
-#endif
-
-#endif	/* bits/pthreadtypes.h */
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
deleted file mode 100644
index 662af98..0000000
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SEMAPHORE_H
-# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
-#endif
-
-#include <bits/wordsize.h>
-
-#if __WORDSIZE == 64
-# define __SIZEOF_SEM_T	32
-#else
-# define __SIZEOF_SEM_T	16
-#endif
-
-
-/* Value returned if `sem_open' failed.  */
-#define SEM_FAILED      ((sem_t *) 0)
-
-
-typedef union
-{
-  char __size[__SIZEOF_SEM_T];
-  long int __align;
-} sem_t;
diff --git a/sysdeps/i386/Implies b/sysdeps/i386/Implies
index 3a32442..20b2dff 100644
--- a/sysdeps/i386/Implies
+++ b/sysdeps/i386/Implies
@@ -1,3 +1,4 @@
+x86
 wordsize-32
 ieee754/ldbl-96
 ieee754/dbl-64
diff --git a/sysdeps/i386/bits/byteswap-16.h b/sysdeps/i386/bits/byteswap-16.h
deleted file mode 100644
index 584eb86..0000000
--- a/sysdeps/i386/bits/byteswap-16.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Macros to swap the order of bytes in 16-bit integer values.
-   Copyright (C) 2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _BITS_BYTESWAP_H
-# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
-#endif
-
-#ifdef __GNUC__
-# if __GNUC__ >= 2
-#  define __bswap_16(x) \
-     (__extension__							      \
-      ({ register unsigned short int __v, __x = (unsigned short int) (x);     \
-	 if (__builtin_constant_p (__x))				      \
-	   __v = __bswap_constant_16 (__x);				      \
-	 else								      \
-	   __asm__ ("rorw $8, %w0"					      \
-		    : "=r" (__v)					      \
-		    : "0" (__x)						      \
-		    : "cc");						      \
-	 __v; }))
-# else
-/* This is better than nothing.  */
-#  define __bswap_16(x) \
-     (__extension__							      \
-      ({ register unsigned short int __x = (unsigned short int) (x);	      \
-	 __bswap_constant_16 (__x); }))
-# endif
-#else
-static __inline unsigned short int
-__bswap_16 (unsigned short int __bsx)
-{
-  return __bswap_constant_16 (__bsx);
-}
-#endif
diff --git a/sysdeps/i386/bits/byteswap.h b/sysdeps/i386/bits/byteswap.h
deleted file mode 100644
index 3542816..0000000
--- a/sysdeps/i386/bits/byteswap.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Macros to swap the order of bytes in integer values.
-   Copyright (C) 1997-2012  Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
-# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
-#endif
-
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H 1
-
-/* Swap bytes in 16 bit value.  */
-#define __bswap_constant_16(x) \
-     ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
-
-/* Get __bswap_16.  */
-#include <bits/byteswap-16.h>
-
-/* Swap bytes in 32 bit value.  */
-#define __bswap_constant_32(x) \
-     ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |		      \
-      (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
-
-#ifdef __GNUC__
-# if __GNUC__ >= 2
-/* To swap the bytes in a word the i486 processors and up provide the
-   `bswap' opcode.  On i386 we have to use three instructions.  */
-#  if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ \
-      && !defined __pentium4__ && !defined __k8__ && !defined __athlon__ \
-      && !defined __k6__ && !defined __nocona__ && !defined __core2__ \
-      && !defined __geode__ && !defined __amdfam10__
-#   define __bswap_32(x)						      \
-     (__extension__							      \
-      ({ register unsigned int __v, __x = (x);				      \
-	 if (__builtin_constant_p (__x))				      \
-	   __v = __bswap_constant_32 (__x);				      \
-	 else								      \
-	   __asm__ ("rorw $8, %w0;"					      \
-		    "rorl $16, %0;"					      \
-		    "rorw $8, %w0"					      \
-		    : "=r" (__v)					      \
-		    : "0" (__x)						      \
-		    : "cc");						      \
-	 __v; }))
-#  else
-#   define __bswap_32(x) \
-     (__extension__							      \
-      ({ register unsigned int __v, __x = (x);				      \
-	 if (__builtin_constant_p (__x))				      \
-	   __v = __bswap_constant_32 (__x);				      \
-	 else								      \
-	   __asm__ ("bswap %0" : "=r" (__v) : "0" (__x));		      \
-	 __v; }))
-#  endif
-# else
-#  define __bswap_32(x) \
-     (__extension__							      \
-      ({ register unsigned int __x = (x); __bswap_constant_32 (__x); }))
-# endif
-#else
-static __inline unsigned int
-__bswap_32 (unsigned int __bsx)
-{
-  return __bswap_constant_32 (__bsx);
-}
-#endif
-
-
-#if defined __GNUC__ && __GNUC__ >= 2
-/* Swap bytes in 64 bit value.  */
-# define __bswap_constant_64(x) \
-     (__extension__ ((((x) & 0xff00000000000000ull) >> 56)		      \
-		     | (((x) & 0x00ff000000000000ull) >> 40)		      \
-		     | (((x) & 0x0000ff0000000000ull) >> 24)		      \
-		     | (((x) & 0x000000ff00000000ull) >> 8)		      \
-		     | (((x) & 0x00000000ff000000ull) << 8)		      \
-		     | (((x) & 0x0000000000ff0000ull) << 24)		      \
-		     | (((x) & 0x000000000000ff00ull) << 40)		      \
-		     | (((x) & 0x00000000000000ffull) << 56)))
-
-# define __bswap_64(x) \
-     (__extension__							      \
-      ({ union { __extension__ unsigned long long int __ll;		      \
-		 unsigned long int __l[2]; } __w, __r;			      \
-	 if (__builtin_constant_p (x))					      \
-	   __r.__ll = __bswap_constant_64 (x);				      \
-	 else								      \
-	   {								      \
-	     __w.__ll = (x);						      \
-	     __r.__l[0] = __bswap_32 (__w.__l[1]);			      \
-	     __r.__l[1] = __bswap_32 (__w.__l[0]);			      \
-	   }								      \
-	 __r.__ll; }))
-#elif __GLIBC_HAVE_LONG_LONG
-# define __bswap_constant_64(x) \
-     ((((x) & 0xff00000000000000ull) >> 56)				      \
-      | (((x) & 0x00ff000000000000ull) >> 40)				      \
-      | (((x) & 0x0000ff0000000000ull) >> 24)				      \
-      | (((x) & 0x000000ff00000000ull) >> 8)				      \
-      | (((x) & 0x00000000ff000000ull) << 8)				      \
-      | (((x) & 0x0000000000ff0000ull) << 24)				      \
-      | (((x) & 0x000000000000ff00ull) << 40)				      \
-      | (((x) & 0x00000000000000ffull) << 56))
-
-static __inline unsigned long long int
-__bswap_64 (unsigned long long int __bsx)
-{
-  return __bswap_constant_64 (__bsx);
-}
-#endif
-
-#endif /* _BITS_BYTESWAP_H */
diff --git a/sysdeps/i386/bits/endian.h b/sysdeps/i386/bits/endian.h
deleted file mode 100644
index 54bd9d1..0000000
--- a/sysdeps/i386/bits/endian.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* i386 is little-endian.  */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/i386/bits/huge_vall.h b/sysdeps/i386/bits/huge_vall.h
deleted file mode 100644
index 7e9c24d..0000000
--- a/sysdeps/i386/bits/huge_vall.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* `HUGE_VALL' constant for ix86 (where it is infinity).
-   Used by <stdlib.h> and <math.h> functions for overflow.
-   Copyright (C) 1992, 1995, 1996, 1997, 1999, 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _MATH_H
-# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
-#endif
-
-#if __GNUC_PREREQ(3,3)
-# define HUGE_VALL	(__builtin_huge_vall())
-#elif __GNUC_PREREQ(2,96)
-# define HUGE_VALL	(__extension__ 0x1.0p32767L)
-#else
-
-# define __HUGE_VALL_bytes	{ 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
-
-# define __huge_vall_t	union { unsigned char __c[12]; long double __ld; }
-# ifdef __GNUC__
-#  define HUGE_VALL	(__extension__ \
-			 ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
-# else	/* Not GCC.  */
-static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
-#  define HUGE_VALL	(__huge_vall.__ld)
-#  endif /* GCC.  */
-
-#endif /* GCC 2.95 */
diff --git a/sysdeps/i386/bits/link.h b/sysdeps/i386/bits/link.h
deleted file mode 100644
index 1a6d51a..0000000
--- a/sysdeps/i386/bits/link.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 2004, 2005, 2009 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef	_LINK_H
-# error "Never include <bits/link.h> directly; use <link.h> instead."
-#endif
-
-
-/* Registers for entry into PLT on IA-32.  */
-typedef struct La_i86_regs
-{
-  uint32_t lr_edx;
-  uint32_t lr_ecx;
-  uint32_t lr_eax;
-  uint32_t lr_ebp;
-  uint32_t lr_esp;
-} La_i86_regs;
-
-/* Return values for calls from PLT on IA-32.  */
-typedef struct La_i86_retval
-{
-  uint32_t lrv_eax;
-  uint32_t lrv_edx;
-  long double lrv_st0;
-  long double lrv_st1;
-} La_i86_retval;
-
-
-__BEGIN_DECLS
-
-extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
-				       uintptr_t *__refcook,
-				       uintptr_t *__defcook,
-				       La_i86_regs *__regs,
-				       unsigned int *__flags,
-				       const char *__symname,
-				       long int *__framesizep);
-extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
-					uintptr_t *__refcook,
-					uintptr_t *__defcook,
-					const La_i86_regs *__inregs,
-					La_i86_retval *__outregs,
-					const char *__symname);
-
-__END_DECLS
diff --git a/sysdeps/i386/bits/linkmap.h b/sysdeps/i386/bits/linkmap.h
deleted file mode 100644
index 978d526..0000000
--- a/sysdeps/i386/bits/linkmap.h
+++ /dev/null
@@ -1,6 +0,0 @@
-struct link_map_machine
-  {
-    Elf32_Addr plt; /* Address of .plt + 0x16 */
-    Elf32_Addr gotplt; /* Address of .got + 0x0c */
-    void *tlsdesc_table; /* Address of TLS descriptor hash table.  */
-  };
diff --git a/sysdeps/i386/bits/mathdef.h b/sysdeps/i386/bits/mathdef.h
deleted file mode 100644
index efb46de..0000000
--- a/sysdeps/i386/bits/mathdef.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2004, 2010 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#if !defined _MATH_H && !defined _COMPLEX_H
-# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
-#endif
-
-#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
-# define _MATH_H_MATHDEF	1
-
-# if defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0
-/* When using -mfpmath=sse, values are computed with the precission of the
-   used type.  */
-typedef float float_t;		/* `float' expressions are evaluated as `float'.  */
-typedef double double_t;	/* `double' expressions are evaluated as
-				   `double'.  */
-# else
-/* The ix87 FPUs evaluate all values in the 80 bit floating-point format
-   which is also available for the user as `long double'.  Therefore we
-   define:  */
-typedef long double float_t;	/* `float' expressions are evaluated as
-				   `long double'.  */
-typedef long double double_t;	/* `double' expressions are evaluated as
-				   `long double'.  */
-# endif
-
-/* The values returned by `ilogb' for 0 and NaN respectively.  */
-# define FP_ILOGB0	(-2147483647 - 1)
-# define FP_ILOGBNAN	(-2147483647 - 1)
-
-/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
-   builtins are supported.  */
-# if __FP_FAST_FMA
-#  define FP_FAST_FMA 1
-# endif
-
-# if __FP_FAST_FMAF
-#  define FP_FAST_FMAF 1
-# endif
-
-# if __FP_FAST_FMAL
-#  define FP_FAST_FMAL 1
-# endif
-
-#endif	/* ISO C99 */
diff --git a/sysdeps/i386/bits/select.h b/sysdeps/i386/bits/select.h
deleted file mode 100644
index 8684047..0000000
--- a/sysdeps/i386/bits/select.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2001, 2011 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_SELECT_H
-# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
-#endif
-
-
-#if defined __GNUC__ && __GNUC__ >= 2
-# define __FD_ZERO(fdsp) \
-  do {									      \
-    int __d0, __d1;							      \
-    __asm__ __volatile__ ("cld; rep; stosl"				      \
-			  : "=c" (__d0), "=D" (__d1)			      \
-			  : "a" (0), "0" (sizeof (fd_set)		      \
-					  / sizeof (__fd_mask)),	      \
-			    "1" (&__FDS_BITS (fdsp)[0])			      \
-			  : "memory");					      \
-  } while (0)
-
-#else	/* ! GNU CC */
-
-/* We don't use `memset' because this would require a prototype and
-   the array isn't too big.  */
-# define __FD_ZERO(set)  \
-  do {									      \
-    unsigned int __i;							      \
-    fd_set *__arr = (set);						      \
-    for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i)	      \
-      __FDS_BITS (__arr)[__i] = 0;					      \
-  } while (0)
-
-#endif	/* GNU CC */
-
-#define __FD_SET(d, set) \
-  ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)))
-#define __FD_CLR(d, set) \
-  ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)))
-#define __FD_ISSET(d, set) \
-  ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
diff --git a/sysdeps/i386/bits/setjmp.h b/sysdeps/i386/bits/setjmp.h
deleted file mode 100644
index dc065ce..0000000
--- a/sysdeps/i386/bits/setjmp.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1997,1998,2000,2001,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, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* Define the machine-dependent type `jmp_buf'.  Intel 386 version.  */
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H	1
-
-#if !defined _SETJMP_H && !defined _PTHREAD_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-#ifndef	_ASM
-typedef int __jmp_buf[6];
-#endif
-
-#endif	/* bits/setjmp.h */
diff --git a/sysdeps/unix/sysv/linux/i386/bits/a.out.h b/sysdeps/unix/sysv/linux/i386/bits/a.out.h
deleted file mode 100644
index 0fb52c3..0000000
--- a/sysdeps/unix/sysv/linux/i386/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/i386/bits/environments.h b/sysdeps/unix/sysv/linux/i386/bits/environments.h
deleted file mode 100644
index d4afd12..0000000
--- a/sysdeps/unix/sysv/linux/i386/bits/environments.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 1999, 2001, 2004, 2009 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNISTD_H
-# error "Never include this file directly.  Use <unistd.h> instead"
-#endif
-
-/* This header should define the following symbols under the described
-   situations.  A value `1' means that the model is always supported,
-   `-1' means it is never supported.  Undefined means it cannot be
-   statically decided.
-
-   _POSIX_V7_ILP32_OFF32   32bit int, long, pointers, and off_t type
-   _POSIX_V7_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
-
-   _POSIX_V7_LP64_OFF32	   64bit long and pointers and 32bit off_t type
-   _POSIX_V7_LPBIG_OFFBIG  64bit long and pointers and large off_t type
-
-   The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
-   _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
-   _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
-   used in previous versions of the Unix standard and are available
-   only for compatibility.
-*/
-
-/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
-   and all platforms support LFS.  */
-#define _POSIX_V7_ILP32_OFF32	1
-#define _POSIX_V7_ILP32_OFFBIG	1
-#define _POSIX_V6_ILP32_OFF32	1
-#define _POSIX_V6_ILP32_OFFBIG	1
-#define _XBS5_ILP32_OFF32	1
-#define _XBS5_ILP32_OFFBIG	1
-
-/* We optionally provide an environment with the above size but an 64-bit
-   side `off_t'.  Therefore we don't define _POSIX_V7_ILP32_OFFBIG.  */
-
-/* Environments with 64-bit wide pointers can be provided,
-   so these macros aren't defined:
-   # undef _POSIX_V7_LP64_OFF64
-   # undef _POSIX_V7_LPBIG_OFFBIG
-   # undef _POSIX_V6_LP64_OFF64
-   # undef _POSIX_V6_LPBIG_OFFBIG
-   # undef _XBS5_LP64_OFF64
-   # undef _XBS5_LPBIG_OFFBIG
-   and sysconf tests for it at runtime.  */
-
-#define __ILP32_OFF32_CFLAGS	"-m32"
-#define __ILP32_OFFBIG_CFLAGS	"-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-#define __ILP32_OFF32_LDFLAGS	"-m32"
-#define __ILP32_OFFBIG_LDFLAGS	"-m32"
-#define __LP64_OFF64_CFLAGS	"-m64"
-#define __LP64_OFF64_LDFLAGS	"-m64"
diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
deleted file mode 100644
index 5406b4c..0000000
--- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010, 2011
-   Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef	_FCNTL_H
-# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
-#endif
-
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
-   located on a few file systems.  */
-#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	       04010000
-#define O_FSYNC		 O_SYNC
-#define O_ASYNC		 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY	0200000	/* Must be a directory.	 */
-# define O_NOFOLLOW	0400000	/* Do not follow links.	 */
-# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT	 040000	/* Direct disk access.	*/
-# define O_NOATIME     01000000 /* Do not set atime.  */
-# define O_PATH	      010000000 /* Resolve pathname but do not open file.  */
-#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	010000	/* Synchronize data.  */
-# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE	0100000
-#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 || defined __USE_XOPEN2K8
-# define F_SETOWN	8	/* Get owner (process receiving SIGIO).  */
-# define F_GETOWN	9	/* Set owner (process receiving 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.  */
-# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
-# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
-#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.	 */
-# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
-# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set.  */
-#endif
-
-/* For F_[GET|SET]FD.  */
-#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
-
-#ifdef __USE_GNU
-/* Owner types.  */
-enum __pid_type
-  {
-    F_OWNER_TID = 0,		/* Kernel thread.  */
-    F_OWNER_PID,		/* Process.  */
-    F_OWNER_PGRP,		/* Process group.  */
-    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
-  };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
-struct f_owner_ex
-  {
-    enum __pid_type type;	/* Owner type of ID.  */
-    __pid_t pid;		/* ID of owner.  */
-  };
-#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
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE.  */
-# define SYNC_FILE_RANGE_WAIT_BEFORE	1 /* Wait upon writeout of all pages
-					     in the range before performing the
-					     write.  */
-# define SYNC_FILE_RANGE_WRITE		2 /* Initiate writeout of all those
-					     dirty pages in the range which are
-					     not presently under writeback.  */
-# define SYNC_FILE_RANGE_WAIT_AFTER	4 /* Wait upon writeout of all pages in
-					     the range after performing the
-					     write.  */
-
-/* Flags for SPLICE and VMSPLICE.  */
-# define SPLICE_F_MOVE		1	/* Move pages instead of copying.  */
-# define SPLICE_F_NONBLOCK	2	/* Don't block on the pipe splicing
-					   (but we may still block on the fd
-					   we splice from/to).  */
-# define SPLICE_F_MORE		4	/* Expect more data.  */
-# define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
-
-
-/* File handle structure.  */
-struct file_handle
-{
-  unsigned int handle_bytes;
-  int handle_type;
-  /* File identifier.  */
-  unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now).  */
-# define MAX_HANDLE_SZ	128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead.  */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-    __THROW;
-
-
-/* Selective file content synch'ing.  */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
-			    unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
-			 size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
-		       __off64_t *__offout, size_t __len,
-		       unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
-		    unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-#  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
-				   __off64_t __len),
-		       fallocate64);
-#  else
-#   define fallocate fallocate64
-#  endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
-			__off64_t __len);
-# endif
-
-
-/* Map file name to file handle.  */
-extern int name_to_handle_at (int __dfd, const char *__name,
-			      struct file_handle *__handle, int *__mnt_id,
-			      int __flags) __THROW;
-
-/* Open file using the file handle.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
-			      int __flags);
-
-#endif
-
-__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h
deleted file mode 100644
index 2bc2ca9..0000000
--- a/sysdeps/unix/sysv/linux/i386/bits/mman.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Definitions for POSIX memory map interface.  Linux/i386 version.
-   Copyright (C) 1997-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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.  */
-# define MAP_STACK	0x20000		/* Allocation is for a stack.  */
-# define MAP_HUGETLB	0x40000		/* Create huge page mapping.  */
-#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_REMOVE	  9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	  11	/* Do inherit across fork.  */
-# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
-# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
-# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
-# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
-# define MADV_DONTDUMP	  16    /* Explicity exclude from the core dump,
-                                   overrides the coredump filter bits.  */
-# define MADV_DODUMP	  17	/* Clear the MADV_DONTDUMP flag.  */
-# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
-#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/i386/bits/wchar.h b/sysdeps/unix/sysv/linux/i386/bits/wchar.h
deleted file mode 100644
index b94fc7a..0000000
--- a/sysdeps/unix/sysv/linux/i386/bits/wchar.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* wchar_t type related definitions.
-   Copyright (C) 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _BITS_WCHAR_H
-#define _BITS_WCHAR_H	1
-
-#define __WCHAR_MIN	(-2147483647l - 1l)
-#define __WCHAR_MAX	(2147483647l)
-
-#endif	/* bits/wchar.h */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/debugreg.h b/sysdeps/unix/sysv/linux/i386/sys/debugreg.h
deleted file mode 100644
index ac1926b..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/debugreg.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Copyright (C) 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_DEBUGREG_H
-#define _SYS_DEBUGREG_H	1
-
-/* Indicate the register numbers for a number of the specific
-   debug registers.  Registers 0-3 contain the addresses we wish to trap on */
-#define DR_FIRSTADDR 0        /* u_debugreg[DR_FIRSTADDR] */
-#define DR_LASTADDR 3         /* u_debugreg[DR_LASTADDR]  */
-
-#define DR_STATUS 6           /* u_debugreg[DR_STATUS]     */
-#define DR_CONTROL 7          /* u_debugreg[DR_CONTROL] */
-
-/* Define a few things for the status register.  We can use this to determine
-   which debugging register was responsible for the trap.  The other bits
-   are either reserved or not of interest to us. */
-
-#define DR_TRAP0	(0x1)		/* db0 */
-#define DR_TRAP1	(0x2)		/* db1 */
-#define DR_TRAP2	(0x4)		/* db2 */
-#define DR_TRAP3	(0x8)		/* db3 */
-
-#define DR_STEP		(0x4000)	/* single-step */
-#define DR_SWITCH	(0x8000)	/* task switch */
-
-/* Now define a bunch of things for manipulating the control register.
-   The top two bytes of the control register consist of 4 fields of 4
-   bits - each field corresponds to one of the four debug registers,
-   and indicates what types of access we trap on, and how large the data
-   field is that we are looking at */
-
-#define DR_CONTROL_SHIFT 16   /* Skip this many bits in ctl register */
-#define DR_CONTROL_SIZE  4    /* 4 control bits per register */
-
-#define DR_RW_EXECUTE	(0x0) /* Settings for the access types to trap on */
-#define DR_RW_WRITE	(0x1)
-#define DR_RW_READ	(0x3)
-
-#define DR_LEN_1 (0x0)	      /* Settings for data length to trap on */
-#define DR_LEN_2 (0x4)
-#define DR_LEN_4 (0xC)
-
-/* The low byte to the control register determine which registers are
-   enabled.  There are 4 fields of two bits.  One bit is "local", meaning
-   that the processor will reset the bit after a task switch and the other
-   is global meaning that we have to explicitly reset the bit.  With linux,
-   you can use either one, since we explicitly zero the register when we enter
-   kernel mode. */
-
-#define DR_LOCAL_ENABLE_SHIFT  0   /* Extra shift to the local enable bit */
-#define DR_GLOBAL_ENABLE_SHIFT 1   /* Extra shift to the global enable bit */
-#define DR_ENABLE_SIZE	       2   /* 2 enable bits per register */
-
-#define DR_LOCAL_ENABLE_MASK  (0x55) /* Set  local bits for all 4 regs */
-#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
-
-/* The second byte to the control register has a few special things.
-
-    On the i386, you should set the DR_LOCAL_SLOWDOWN or
-    DR_GLOBAL_SLOWDOWN bits if you want to know exactly which
-    instruction triggered the watchpoint.  Setting these bits causes
-    the processor to run more slowly, but leaving them clear makes it
-    treat watchpoint hits as imprecise exceptions, so you can't
-    reliably determine which instruction caused the hit.
-
-    The i486 and all later IA-32 processors ignore DR_LOCAL_SLOWDOWN
-    and DR_GLOBAL_SLOWDOWN.  They always report the exception
-    precisely, except in some rare cases, which the user can't do
-    anything about.  */
-
-#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */
-#define DR_LOCAL_SLOWDOWN   (0x100)  /* Local slow the pipeline */
-#define DR_GLOBAL_SLOWDOWN  (0x200)  /* Global slow the pipeline */
-
-#endif	/* sys/debugreg.h */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/elf.h b/sysdeps/unix/sysv/linux/i386/sys/elf.h
deleted file mode 100644
index 9d64e97..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/elf.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_ELF_H
-#define _SYS_ELF_H	1
-
-#warning "This header is obsolete; use <sys/procfs.h> instead."
-
-#include <sys/procfs.h>
-
-#endif	/* _SYS_ELF_H */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/io.h b/sysdeps/unix/sysv/linux/i386/sys/io.h
deleted file mode 100644
index 3ddcee7..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/io.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* Copyright (C) 1996, 2000, 2009 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef	_SYS_IO_H
-#define	_SYS_IO_H	1
-
-#include <features.h>
-
-__BEGIN_DECLS
-
-/* If TURN_ON is TRUE, request for permission to do direct i/o on the
-   port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
-   permission off for that range.  This call requires root privileges.
-
-   Portability note: not all Linux platforms support this call.  Most
-   platforms based on the PC I/O architecture probably will, however.
-   E.g., Linux/Alpha for Alpha PCs supports this.  */
-extern int ioperm (unsigned long int __from, unsigned long int __num,
-                   int __turn_on) __THROW;
-
-/* Set the I/O privilege level to LEVEL.  If LEVEL>3, permission to
-   access any I/O port is granted.  This call requires root
-   privileges. */
-extern int iopl (int __level) __THROW;
-
-#if defined __GNUC__ && __GNUC__ >= 2
-
-static __inline unsigned char
-inb (unsigned short int __port)
-{
-  unsigned char _v;
-
-  __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned char
-inb_p (unsigned short int __port)
-{
-  unsigned char _v;
-
-  __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned short int
-inw (unsigned short int __port)
-{
-  unsigned short _v;
-
-  __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned short int
-inw_p (unsigned short int __port)
-{
-  unsigned short int _v;
-
-  __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned int
-inl (unsigned short int __port)
-{
-  unsigned int _v;
-
-  __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned int
-inl_p (unsigned short int __port)
-{
-  unsigned int _v;
-  __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v)
-			:"Nd" (__port));
-  return _v;
-}
-
-static __inline void
-outb (unsigned char value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (__port));
-}
-
-static __inline void
-outb_p (unsigned char value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (value),
-			"Nd" (__port));
-}
-
-static __inline void
-outw (unsigned short int value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (__port));
-
-}
-
-static __inline void
-outw_p (unsigned short int value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (value),
-			"Nd" (__port));
-}
-
-static __inline void
-outl (unsigned int value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (__port));
-}
-
-static __inline void
-outl_p (unsigned int value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (value),
-			"Nd" (__port));
-}
-
-static __inline void
-insb (unsigned short int __port, void *__addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
-			:"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-insw (unsigned short int __port, void *__addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
-			:"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-insl (unsigned short int __port, void *__addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
-			:"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-outsb (unsigned short int __port, const void *__addr,
-       unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
-			:"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-outsw (unsigned short int __port, const void *__addr,
-       unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
-			:"d" (__port), "0" (__addr), "1" (__count));
-}
-
-static __inline void
-outsl (unsigned short int __port, const void *__addr,
-       unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
-			:"d" (__port), "0" (__addr), "1" (__count));
-}
-
-#endif	/* GNU C */
-
-__END_DECLS
-#endif /* _SYS_IO_H */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/perm.h b/sysdeps/unix/sysv/linux/i386/sys/perm.h
deleted file mode 100644
index c268681..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/perm.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1996, 1999 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_PERM_H
-
-#define _SYS_PERM_H	1
-#include <features.h>
-
-__BEGIN_DECLS
-
-/* Set port input/output permissions.  */
-extern int ioperm (unsigned long int __from, unsigned long int __num,
-		   int __turn_on) __THROW;
-
-
-/* Change I/O privilege level.  */
-extern int iopl (int __level) __THROW;
-
-__END_DECLS
-
-#endif	/* _SYS_PERM_H */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/procfs.h b/sysdeps/unix/sysv/linux/i386/sys/procfs.h
deleted file mode 100644
index 673baa1..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/procfs.h
+++ /dev/null
@@ -1,130 +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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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_fpregs_struct elf_fpregset_t;
-
-/* Register set for the extended floating-point registers.  Includes
-   the Pentium III SSE registers in addition to the classic
-   floating-point stuff.  */
-typedef struct user_fpxregs_struct elf_fpxregset_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/i386/sys/reg.h b/sysdeps/unix/sysv/linux/i386/sys/reg.h
deleted file mode 100644
index b993f99..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/reg.h
+++ /dev/null
@@ -1,42 +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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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. */
-
-#define EBX 0
-#define ECX 1
-#define EDX 2
-#define ESI 3
-#define EDI 4
-#define EBP 5
-#define EAX 6
-#define DS 7
-#define ES 8
-#define FS 9
-#define GS 10
-#define ORIG_EAX 11
-#define EIP 12
-#define CS  13
-#define EFL 14
-#define UESP 15
-#define SS   16
-
-#endif	/* _SYS_REG_H */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/ucontext.h b/sysdeps/unix/sysv/linux/i386/sys/ucontext.h
deleted file mode 100644
index 6306623..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/ucontext.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Copyright (C) 1997, 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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 int greg_t;
-
-/* Number of general registers.  */
-#define NGREG	19
-
-/* Container for all general registers.  */
-typedef greg_t gregset_t[NGREG];
-
-#ifdef __USE_GNU
-/* Number of each register is the `gregset_t' array.  */
-enum
-{
-  REG_GS = 0,
-# define REG_GS		REG_GS
-  REG_FS,
-# define REG_FS		REG_FS
-  REG_ES,
-# define REG_ES		REG_ES
-  REG_DS,
-# define REG_DS		REG_DS
-  REG_EDI,
-# define REG_EDI	REG_EDI
-  REG_ESI,
-# define REG_ESI	REG_ESI
-  REG_EBP,
-# define REG_EBP	REG_EBP
-  REG_ESP,
-# define REG_ESP	REG_ESP
-  REG_EBX,
-# define REG_EBX	REG_EBX
-  REG_EDX,
-# define REG_EDX	REG_EDX
-  REG_ECX,
-# define REG_ECX	REG_ECX
-  REG_EAX,
-# define REG_EAX	REG_EAX
-  REG_TRAPNO,
-# define REG_TRAPNO	REG_TRAPNO
-  REG_ERR,
-# define REG_ERR	REG_ERR
-  REG_EIP,
-# define REG_EIP	REG_EIP
-  REG_CS,
-# define REG_CS		REG_CS
-  REG_EFL,
-# define REG_EFL	REG_EFL
-  REG_UESP,
-# define REG_UESP	REG_UESP
-  REG_SS
-# define REG_SS	REG_SS
-};
-#endif
-
-/* Definitions taken from the kernel headers.  */
-struct _libc_fpreg
-{
-  unsigned short int significand[4];
-  unsigned short int exponent;
-};
-
-struct _libc_fpstate
-{
-  unsigned long int cw;
-  unsigned long int sw;
-  unsigned long int tag;
-  unsigned long int ipoff;
-  unsigned long int cssel;
-  unsigned long int dataoff;
-  unsigned long int datasel;
-  struct _libc_fpreg _st[8];
-  unsigned long int status;
-};
-
-/* Structure to describe FPU registers.  */
-typedef struct _libc_fpstate *fpregset_t;
-
-/* Context to describe whole processor state.  */
-typedef struct
-  {
-    gregset_t gregs;
-    /* Due to Linux's history we have to use a pointer here.  The SysV/i386
-       ABI requires a struct with the values.  */
-    fpregset_t fpregs;
-    unsigned long int oldmask;
-    unsigned long int cr2;
-  } 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;
-    struct _libc_fpstate __fpregs_mem;
-  } ucontext_t;
-
-#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/user.h b/sysdeps/unix/sysv/linux/i386/sys/user.h
deleted file mode 100644
index e426afe..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/user.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Copyright (C) 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_USER_H
-#define _SYS_USER_H	1
-
-/* 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.  */
-
-struct user_fpregs_struct
-{
-  long int cwd;
-  long int swd;
-  long int twd;
-  long int fip;
-  long int fcs;
-  long int foo;
-  long int fos;
-  long int st_space [20];
-};
-
-struct user_fpxregs_struct
-{
-  unsigned short int cwd;
-  unsigned short int swd;
-  unsigned short int twd;
-  unsigned short int fop;
-  long int fip;
-  long int fcs;
-  long int foo;
-  long int fos;
-  long int mxcsr;
-  long int reserved;
-  long int st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
-  long int xmm_space[32];  /* 8*16 bytes for each XMM-reg = 128 bytes */
-  long int padding[56];
-};
-
-struct user_regs_struct
-{
-  long int ebx;
-  long int ecx;
-  long int edx;
-  long int esi;
-  long int edi;
-  long int ebp;
-  long int eax;
-  long int xds;
-  long int xes;
-  long int xfs;
-  long int xgs;
-  long int orig_eax;
-  long int eip;
-  long int xcs;
-  long int eflags;
-  long int esp;
-  long int xss;
-};
-
-struct user
-{
-  struct user_regs_struct	regs;
-  int				u_fpvalid;
-  struct user_fpregs_struct	i387;
-  unsigned long int		u_tsize;
-  unsigned long int		u_dsize;
-  unsigned long int		u_ssize;
-  unsigned long			start_code;
-  unsigned long			start_stack;
-  long int			signal;
-  int				reserved;
-  struct user_regs_struct*	u_ar0;
-  struct user_fpregs_struct*	u_fpstate;
-  unsigned long int		magic;
-  char				u_comm [32];
-  int				u_debugreg [8];
-};
-
-#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_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
-
-#endif	/* _SYS_USER_H */
diff --git a/sysdeps/unix/sysv/linux/i386/sys/vm86.h b/sysdeps/unix/sysv/linux/i386/sys/vm86.h
deleted file mode 100644
index cd2ac07..0000000
--- a/sysdeps/unix/sysv/linux/i386/sys/vm86.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1996, 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_VM86_H
-
-#define _SYS_VM86_H	1
-#include <features.h>
-
-/* Get constants and data types from kernel header file.  */
-#include <asm/vm86.h>
-
-__BEGIN_DECLS
-
-/* Enter virtual 8086 mode.  */
-extern int vm86 (unsigned long int __subfunction,
-		 struct vm86plus_struct *__info) __THROW;
-
-__END_DECLS
-
-#endif	/* _SYS_VM86_H */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/a.out.h b/sysdeps/unix/sysv/linux/x86/bits/a.out.h
new file mode 100644
index 0000000..0e4a7c9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/a.out.h
@@ -0,0 +1,11 @@
+#ifndef __A_OUT_GNU_H__
+# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
+#endif
+
+#ifdef __x86_64__
+
+/* Signal to users of this header that this architecture really doesn't
+   support a.out binary format.  */
+#define __NO_A_OUT_SUPPORT 1
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/x86/bits/environments.h b/sysdeps/unix/sysv/linux/x86/bits/environments.h
new file mode 100644
index 0000000..793a04f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/environments.h
@@ -0,0 +1,96 @@
+/* Copyright (C) 1999, 2001, 2004, 2009 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNISTD_H
+# error "Never include this file directly.  Use <unistd.h> instead"
+#endif
+
+#include <bits/wordsize.h>
+
+/* This header should define the following symbols under the described
+   situations.  A value `1' means that the model is always supported,
+   `-1' means it is never supported.  Undefined means it cannot be
+   statically decided.
+
+   _POSIX_V7_ILP32_OFF32   32bit int, long, pointers, and off_t type
+   _POSIX_V7_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
+
+   _POSIX_V7_LP64_OFF32	   64bit long and pointers and 32bit off_t type
+   _POSIX_V7_LPBIG_OFFBIG  64bit long and pointers and large off_t type
+
+   The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
+   _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
+   _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
+   used in previous versions of the Unix standard and are available
+   only for compatibility.
+*/
+
+#if __WORDSIZE == 64
+
+/* Environments with 32-bit wide pointers are optionally provided.
+   Therefore following macros aren't defined:
+   # undef _POSIX_V7_ILP32_OFF32
+   # undef _POSIX_V7_ILP32_OFFBIG
+   # undef _POSIX_V6_ILP32_OFF32
+   # undef _POSIX_V6_ILP32_OFFBIG
+   # undef _XBS5_ILP32_OFF32
+   # undef _XBS5_ILP32_OFFBIG
+   and users need to check at runtime.  */
+
+/* We also have no use (for now) for an environment with bigger pointers
+   and offsets.  */
+# define _POSIX_V7_LPBIG_OFFBIG	-1
+# define _POSIX_V6_LPBIG_OFFBIG	-1
+# define _XBS5_LPBIG_OFFBIG	-1
+
+/* By default we have 64-bit wide `long int', pointers and `off_t'.  */
+# define _POSIX_V7_LP64_OFF64	1
+# define _POSIX_V6_LP64_OFF64	1
+# define _XBS5_LP64_OFF64	1
+
+#else /* __WORDSIZE == 32 */
+
+/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
+   and all platforms support LFS.  */
+# define _POSIX_V7_ILP32_OFF32	1
+# define _POSIX_V7_ILP32_OFFBIG	1
+# define _POSIX_V6_ILP32_OFF32	1
+# define _POSIX_V6_ILP32_OFFBIG	1
+# define _XBS5_ILP32_OFF32	1
+# define _XBS5_ILP32_OFFBIG	1
+
+/* We optionally provide an environment with the above size but an 64-bit
+   side `off_t'.  Therefore we don't define _POSIX_V7_ILP32_OFFBIG.  */
+
+/* Environments with 64-bit wide pointers can be provided,
+   so these macros aren't defined:
+   # undef _POSIX_V7_LP64_OFF64
+   # undef _POSIX_V7_LPBIG_OFFBIG
+   # undef _POSIX_V6_LP64_OFF64
+   # undef _POSIX_V6_LPBIG_OFFBIG
+   # undef _XBS5_LP64_OFF64
+   # undef _XBS5_LPBIG_OFFBIG
+   and sysconf tests for it at runtime.  */
+
+#endif /* __WORDSIZE == 32 */
+
+#define __ILP32_OFF32_CFLAGS	"-m32"
+#define __ILP32_OFFBIG_CFLAGS	"-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+#define __ILP32_OFF32_LDFLAGS	"-m32"
+#define __ILP32_OFFBIG_LDFLAGS	"-m32"
+#define __LP64_OFF64_CFLAGS	"-m64"
+#define __LP64_OFF64_LDFLAGS	"-m64"
diff --git a/sysdeps/unix/sysv/linux/x86/bits/epoll.h b/sysdeps/unix/sysv/linux/x86/bits/epoll.h
new file mode 100644
index 0000000..be1f5a6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/epoll.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2002-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef	_SYS_EPOLL_H
+# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
+#endif
+
+/* Flags to be passed to epoll_create1.  */
+enum
+  {
+    EPOLL_CLOEXEC = 02000000,
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+    EPOLL_NONBLOCK = 00004000
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK
+  };
+
+#define __EPOLL_PACKED __attribute__ ((__packed__))
diff --git a/sysdeps/unix/sysv/linux/x86/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
new file mode 100644
index 0000000..9fa5ecb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
@@ -0,0 +1,337 @@
+/* O_*, F_*, FD_* bit values for Linux/x86-64.
+   Copyright (C) 2001-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef	_FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+#include <sys/types.h>
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
+
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+   located on a few file systems.  */
+#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	       04010000
+#define O_FSYNC		 O_SYNC
+#define O_ASYNC		 020000
+
+#ifdef __USE_XOPEN2K8
+# define O_DIRECTORY	0200000	/* Must be a directory.	 */
+# define O_NOFOLLOW	0400000	/* Do not follow links.	 */
+# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
+#endif
+#ifdef __USE_GNU
+# define O_DIRECT	 040000	/* Direct disk access.	*/
+# define O_NOATIME     01000000 /* Do not set atime.  */
+# define O_PATH	      010000000 /* Resolve pathname but do not open file.  */
+#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	010000	/* Synchronize data.  */
+# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# ifdef __x86_64__
+#  define O_LARGEFILE	0
+# else
+#  define O_LARGEFILE	0100000
+# endif
+#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.  */
+#ifdef __x86_64__
+# 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).	*/
+/* Not necessary, we always have 64-bit offsets.  */
+# define F_GETLK64	5	/* Get record locking info.  */
+# define F_SETLK64	6	/* Set record locking info (non-blocking).  */
+# define F_SETLKW64	7	/* Set record locking info (blocking).	*/
+#else
+# 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).	*/
+#endif
+
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
+# define F_SETOWN	8	/* Get owner (process receiving SIGIO).  */
+# define F_GETOWN	9	/* Set owner (process receiving 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.  */
+# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
+# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
+#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.	 */
+# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
+# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
+#endif
+#ifdef __USE_XOPEN2K8
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set.  */
+#endif
+
+/* For F_[GET|SET]FD.  */
+#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
+
+#ifdef __USE_GNU
+/* Owner types.  */
+enum __pid_type
+  {
+    F_OWNER_TID = 0,		/* Kernel thread.  */
+    F_OWNER_PID,		/* Process.  */
+    F_OWNER_PGRP,		/* Process group.  */
+    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
+  };
+
+/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
+struct f_owner_ex
+  {
+    enum __pid_type type;	/* Owner type of ID.  */
+    __pid_t pid;		/* ID of owner.  */
+  };
+#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
+
+
+#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE.  */
+# define SYNC_FILE_RANGE_WAIT_BEFORE	1 /* Wait upon writeout of all pages
+					     in the range before performing the
+					     write.  */
+# define SYNC_FILE_RANGE_WRITE		2 /* Initiate writeout of all those
+					     dirty pages in the range which are
+					     not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER	4 /* Wait upon writeout of all pages in
+					     the range after performing the
+					     write.  */
+
+/* Flags for SPLICE and VMSPLICE.  */
+# define SPLICE_F_MOVE		1	/* Move pages instead of copying.  */
+# define SPLICE_F_NONBLOCK	2	/* Don't block on the pipe splicing
+					   (but we may still block on the fd
+					   we splice from/to).  */
+# define SPLICE_F_MORE		4	/* Expect more data.  */
+# define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+
+
+/* File handle structure.  */
+struct file_handle
+{
+  unsigned int handle_bytes;
+  int handle_type;
+  /* File identifier.  */
+  unsigned char f_handle[0];
+};
+
+/* Maximum handle size (for now).  */
+# define MAX_HANDLE_SZ	128
+#endif
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+
+/* Provide kernel hint to read ahead.  */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+    __THROW;
+
+
+/* Selective file content synch'ing.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
+			    unsigned int __flags);
+
+
+/* Splice address range into a pipe.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+			 size_t __count, unsigned int __flags);
+
+/* Splice two files together.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+		       __off64_t *__offout, size_t __len,
+		       unsigned int __flags);
+
+/* In-kernel implementation of tee for pipe buffers.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+		    unsigned int __flags);
+
+/* Reserve storage for the data of the file associated with FD.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+#  ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
+		       fallocate64);
+#  else
+#   define fallocate fallocate64
+#  endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+			__off64_t __len);
+# endif
+
+
+/* Map file name to file handle.  */
+extern int name_to_handle_at (int __dfd, const char *__name,
+			      struct file_handle *__handle, int *__mnt_id,
+			      int __flags) __THROW;
+
+/* Open file using the file handle.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
+			      int __flags);
+
+#endif	/* use GNU */
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h b/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h
new file mode 100644
index 0000000..7c242ad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h
@@ -0,0 +1,33 @@
+/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
+   Copyright (C) 2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead."
+#endif
+
+#ifndef _BITS_IPCTYPES_H
+#define _BITS_IPCTYPES_H	1
+
+/* Used in `struct shmid_ds'.  */
+# ifdef __x86_64__
+typedef int __ipc_pid_t;
+# else
+typedef unsigned short int __ipc_pid_t;
+# endif
+
+#endif /* bits/ipctypes.h */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/mman.h b/sysdeps/unix/sysv/linux/x86/bits/mman.h
new file mode 100644
index 0000000..28b9160
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/mman.h
@@ -0,0 +1,113 @@
+/* Definitions for POSIX memory map interface.  Linux/x86_64 version.
+   Copyright (C) 2001-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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
+# define MAP_32BIT	0x40		/* Only give out 32-bit addresses.  */
+#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.  */
+# define MAP_STACK	0x20000		/* Allocation is for a stack.  */
+# define MAP_HUGETLB	0x40000		/* Create huge page mapping.  */
+#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_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
+# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
+# define MADV_DONTDUMP	  16    /* Explicity exclude from the core dump,
+                                   overrides the coredump filter bits.  */
+# define MADV_DODUMP	  17	/* Clear the MADV_DONTDUMP flag.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
+#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/x86/bits/msq.h b/sysdeps/unix/sysv/linux/x86/bits/msq.h
new file mode 100644
index 0000000..7f23500
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/msq.h
@@ -0,0 +1,81 @@
+/* Copyright (C) 1995-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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 __syscall_ulong_t msgqnum_t;
+typedef __syscall_ulong_t 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 */
+#ifndef __x86_64__
+  unsigned long int __unused1;
+#endif
+  __time_t msg_rtime;		/* time of last msgrcv command */
+#ifndef __x86_64__
+  unsigned long int __unused2;
+#endif
+  __time_t msg_ctime;		/* time of last change */
+#ifndef __x86_64__
+  unsigned long int __unused3;
+#endif
+  __syscall_ulong_t __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() */
+  __syscall_ulong_t __unused4;
+  __syscall_ulong_t __unused5;
+};
+
+#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/x86/bits/sem.h b/sysdeps/unix/sysv/linux/x86/bits/sem.h
new file mode 100644
index 0000000..92bbcef
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/sem.h
@@ -0,0 +1,86 @@
+/* Copyright (C) 2002-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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 */
+  __syscall_ulong_t __unused1;
+  __time_t sem_ctime;			/* last time changed by semctl() */
+  __syscall_ulong_t __unused2;
+  __syscall_ulong_t sem_nsems;		/* number of semaphores in set */
+  __syscall_ulong_t __unused3;
+  __syscall_ulong_t __unused4;
+};
+
+/* 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/x86/bits/shm.h b/sysdeps/unix/sysv/linux/x86/bits/shm.h
new file mode 100644
index 0000000..cba25ed
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/shm.h
@@ -0,0 +1,109 @@
+/* Copyright (C) 1995-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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 */
+#define SHM_EXEC	0100000		/* execution access */
+
+/* Commands for `shmctl'.  */
+#define SHM_LOCK	11		/* lock segment (root only) */
+#define SHM_UNLOCK	12		/* unlock segment (root only) */
+
+__BEGIN_DECLS
+
+/* Segment low boundary address multiple.  */
+#define SHMLBA		(__getpagesize ())
+extern int __getpagesize (void) __THROW __attribute__ ((__const__));
+
+
+/* Type to count number of attaches.  */
+typedef __syscall_ulong_t shmatt_t;
+
+/* Data structure describing a shared memory segment.  */
+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() */
+#ifndef __x86_64__
+    unsigned long int __unused1;
+#endif
+    __time_t shm_dtime;			/* time of last shmdt() */
+#ifndef __x86_64__
+    unsigned long int __unused2;
+#endif
+    __time_t shm_ctime;			/* time of last change by shmctl() */
+#ifndef __x86_64__
+    unsigned long int __unused3;
+#endif
+    __pid_t shm_cpid;			/* pid of creator */
+    __pid_t shm_lpid;			/* pid of last shmop */
+    shmatt_t shm_nattch;		/* number of current attaches */
+    __syscall_ulong_t __unused4;
+    __syscall_ulong_t __unused5;
+  };
+
+#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
+  {
+    __syscall_ulong_t shmmax;
+    __syscall_ulong_t shmmin;
+    __syscall_ulong_t shmmni;
+    __syscall_ulong_t shmseg;
+    __syscall_ulong_t shmall;
+    __syscall_ulong_t __unused1;
+    __syscall_ulong_t __unused2;
+    __syscall_ulong_t __unused3;
+    __syscall_ulong_t __unused4;
+  };
+
+struct shm_info
+  {
+    int used_ids;
+    __syscall_ulong_t shm_tot;	/* total allocated shm */
+    __syscall_ulong_t shm_rss;	/* total resident shm */
+    __syscall_ulong_t shm_swp;	/* total swapped shm */
+    __syscall_ulong_t swap_attempts;
+    __syscall_ulong_t swap_successes;
+  };
+
+#endif /* __USE_MISC */
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h b/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
new file mode 100644
index 0000000..d9ba716
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
@@ -0,0 +1,160 @@
+/* Copyright (C) 2002-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H  1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+struct _fpreg
+{
+  unsigned short significand[4];
+  unsigned short exponent;
+};
+
+struct _fpxreg
+{
+  unsigned short significand[4];
+  unsigned short exponent;
+  unsigned short padding[3];
+};
+
+struct _xmmreg
+{
+  __uint32_t	element[4];
+};
+
+
+
+#ifndef __x86_64__
+
+struct _fpstate
+{
+  /* Regular FPU environment.  */
+  __uint32_t	cw;
+  __uint32_t		sw;
+  __uint32_t		tag;
+  __uint32_t		ipoff;
+  __uint32_t		cssel;
+  __uint32_t		dataoff;
+  __uint32_t		datasel;
+  struct _fpreg	_st[8];
+  unsigned short status;
+  unsigned short magic;
+
+  /* FXSR FPU environment.  */
+  __uint32_t		_fxsr_env[6];
+  __uint32_t		mxcsr;
+  __uint32_t		reserved;
+  struct _fpxreg	_fxsr_st[8];
+  struct _xmmreg	_xmm[8];
+  __uint32_t		padding[56];
+};
+
+#ifndef sigcontext_struct
+/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
+   we need sigcontext.  Some packages have come to rely on
+   sigcontext_struct being defined on 32-bit x86, so define this for
+   their benefit.  */
+# define sigcontext_struct sigcontext
+#endif
+
+struct sigcontext
+{
+  unsigned short gs, __gsh;
+  unsigned short fs, __fsh;
+  unsigned short es, __esh;
+  unsigned short ds, __dsh;
+  unsigned long edi;
+  unsigned long esi;
+  unsigned long ebp;
+  unsigned long esp;
+  unsigned long ebx;
+  unsigned long edx;
+  unsigned long ecx;
+  unsigned long eax;
+  unsigned long trapno;
+  unsigned long err;
+  unsigned long eip;
+  unsigned short cs, __csh;
+  unsigned long eflags;
+  unsigned long esp_at_signal;
+  unsigned short ss, __ssh;
+  struct _fpstate * fpstate;
+  unsigned long oldmask;
+  unsigned long cr2;
+};
+
+#else /* __x86_64__ */
+
+struct _fpstate
+{
+  /* FPU environment matching the 64-bit FXSAVE layout.  */
+  __uint16_t		cwd;
+  __uint16_t		swd;
+  __uint16_t		ftw;
+  __uint16_t		fop;
+  __uint64_t		rip;
+  __uint64_t		rdp;
+  __uint32_t		mxcsr;
+  __uint32_t		mxcr_mask;
+  struct _fpxreg	_st[8];
+  struct _xmmreg	_xmm[16];
+  __uint32_t		padding[24];
+};
+
+struct sigcontext
+{
+  __uint64_t r8;
+  __uint64_t r9;
+  __uint64_t r10;
+  __uint64_t r11;
+  __uint64_t r12;
+  __uint64_t r13;
+  __uint64_t r14;
+  __uint64_t r15;
+  __uint64_t rdi;
+  __uint64_t rsi;
+  __uint64_t rbp;
+  __uint64_t rbx;
+  __uint64_t rdx;
+  __uint64_t rax;
+  __uint64_t rcx;
+  __uint64_t rsp;
+  __uint64_t rip;
+  __uint64_t eflags;
+  unsigned short cs;
+  unsigned short gs;
+  unsigned short fs;
+  unsigned short __pad0;
+  __uint64_t err;
+  __uint64_t trapno;
+  __uint64_t oldmask;
+  __uint64_t cr2;
+  __extension__ union
+    {
+      struct _fpstate * fpstate;
+      __uint64_t __fpstate_word;
+    };
+  __uint64_t __reserved1 [8];
+};
+
+#endif /* __x86_64__ */
+
+#endif /* _BITS_SIGCONTEXT_H */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
new file mode 100644
index 0000000..2e05e65
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
@@ -0,0 +1,330 @@
+/* siginfo_t, sigevent and constants.  Linux x86-64 version.
+   Copyright (C) 2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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
+
+# if defined __x86_64__ && __WORDSIZE == 32
+/* si_utime and si_stime must be 4 byte aligned for x32 to match the
+   kernel.  We align siginfo_t to 8 bytes so that si_utime and si_stime
+   are actually aligned to 8 bytes since their offsets are multiple of
+   8 bytes.  */
+typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
+#  define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
+# else
+typedef __clock_t __sigchld_clock_t;
+#  define __SI_ALIGNMENT
+# endif
+
+typedef struct
+  {
+    int si_signo;		/* Signal number.  */
+    int si_errno;		/* If non-zero, an errno value associated with
+				   this signal, as defined in <errno.h>.  */
+    int si_code;		/* Signal code.  */
+
+    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;
+
+	/* POSIX.1b timers.  */
+	struct
+	  {
+	    int si_tid;		/* Timer ID.  */
+	    int si_overrun;	/* Overrun count.  */
+	    sigval_t si_sigval;	/* Signal value.  */
+	  } _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;
+
+	/* 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.  */
+	    __sigchld_clock_t si_utime;
+	    __sigchld_clock_t si_stime;
+	  } _sigchld;
+
+	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS.  */
+	struct
+	  {
+	    void *si_addr;	/* Faulting insn/memory ref.  */
+	  } _sigfault;
+
+	/* SIGPOLL.  */
+	struct
+	  {
+	    long int si_band;	/* Band event for SIGPOLL.  */
+	    int si_fd;
+	  } _sigpoll;
+      } _sifields;
+  } siginfo_t __SI_ALIGNMENT;
+
+
+/* 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_timerid	_sifields._timer.si_tid
+# define si_overrun	_sifields._timer.si_overrun
+# 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_ASYNCIO,			/* Sent by AIO completion.  */
+# define SI_ASYNCIO	SI_ASYNCIO
+  SI_MESGQ,			/* Sent by real time mesq state change.  */
+# define SI_MESGQ	SI_MESGQ
+  SI_TIMER,			/* Sent by timer expiration.  */
+# define SI_TIMER	SI_TIMER
+  SI_QUEUE,			/* Sent by sigqueue.  */
+# define SI_QUEUE	SI_QUEUE
+  SI_USER,			/* Sent by kill, sigsend.  */
+# 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
+# if __WORDSIZE == 64
+#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+/* Forward declaration.  */
+# ifndef __have_pthread_attr_t
+typedef union pthread_attr_t pthread_attr_t;
+#  define __have_pthread_attr_t	1
+# endif
+
+typedef struct sigevent
+  {
+    sigval_t sigev_value;
+    int sigev_signo;
+    int sigev_notify;
+
+    union
+      {
+	int _pad[__SIGEV_PAD_SIZE];
+
+	/* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
+	   thread to receive the signal.  */
+	__pid_t _tid;
+
+	struct
+	  {
+	    void (*_function) (sigval_t);	/* Function to start.  */
+	    pthread_attr_t *_attribute;		/* Thread attributes.  */
+	  } _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/x86/bits/stat.h b/sysdeps/unix/sysv/linux/x86/bits/stat.h
new file mode 100644
index 0000000..691c437
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/stat.h
@@ -0,0 +1,212 @@
+/* Copyright (C) 1999-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H	1
+
+/* Versions of the `struct stat' data structure.  */
+#define _STAT_VER_KERNEL	0
+
+#ifndef __x86_64__
+# define _STAT_VER_SVR4		2
+# define _STAT_VER_LINUX	3
+
+/* i386 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.  */
+#else
+# define _STAT_VER_LINUX	1
+
+/* x86-64 versions of the `xmknod' interface.  */
+# define _MKNOD_VER_LINUX	0
+#endif
+
+#define _STAT_VER		_STAT_VER_LINUX
+
+struct stat
+  {
+    __dev_t st_dev;		/* Device.  */
+#ifndef __x86_64__
+    unsigned short int __pad1;
+#endif
+#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+    __ino_t st_ino;		/* File serial number.	*/
+#else
+    __ino_t __st_ino;			/* 32bit file serial number.	*/
+#endif
+#ifndef __x86_64__
+    __mode_t st_mode;			/* File mode.  */
+    __nlink_t st_nlink;			/* Link count.  */
+#else
+    __nlink_t st_nlink;		/* Link count.  */
+    __mode_t st_mode;		/* File mode.  */
+#endif
+    __uid_t st_uid;		/* User ID of the file's owner.	*/
+    __gid_t st_gid;		/* Group ID of the file's group.*/
+#ifdef __x86_64__
+    int __pad0;
+#endif
+    __dev_t st_rdev;		/* Device number, if device.  */
+#ifndef __x86_64__
+    unsigned short int __pad2;
+#endif
+#if defined __x86_64__ || !defined __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.  */
+#if defined __x86_64__  || !defined __USE_FILE_OFFSET64
+    __blkcnt_t st_blocks;		/* Number 512-byte blocks allocated. */
+#else
+    __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */
+#endif
+#if defined __USE_MISC || defined __USE_XOPEN2K8
+    /* 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.  */
+    __syscall_ulong_t st_atimensec;	/* Nscecs of last access.  */
+    __time_t st_mtime;			/* Time of last modification.  */
+    __syscall_ulong_t st_mtimensec;	/* Nsecs of last modification.  */
+    __time_t st_ctime;			/* Time of last status change.  */
+    __syscall_ulong_t st_ctimensec;	/* Nsecs of last status change.  */
+#endif
+#ifdef __x86_64__
+    __syscall_slong_t __unused[3];
+#else
+# ifndef __USE_FILE_OFFSET64
+    unsigned long int __unused4;
+    unsigned long int __unused5;
+# else
+    __ino64_t st_ino;			/* File serial number.	*/
+# endif
+#endif
+  };
+
+#ifdef __USE_LARGEFILE64
+/* Note stat64 has the same shape as stat for x86-64.  */
+struct stat64
+  {
+    __dev_t st_dev;		/* Device.  */
+# ifdef __x86_64__
+    __ino64_t st_ino;		/* File serial number.  */
+    __nlink_t st_nlink;		/* Link count.  */
+    __mode_t st_mode;		/* File mode.  */
+# else
+    unsigned int __pad1;
+    __ino_t __st_ino;			/* 32bit file serial number.	*/
+    __mode_t st_mode;			/* File mode.  */
+    __nlink_t st_nlink;			/* Link count.  */
+# endif
+    __uid_t st_uid;		/* User ID of the file's owner.	*/
+    __gid_t st_gid;		/* Group ID of the file's group.*/
+# ifdef __x86_64__
+    int __pad0;
+    __dev_t st_rdev;		/* Device number, if device.  */
+    __off_t st_size;		/* Size of file, in bytes.  */
+# else
+    __dev_t st_rdev;			/* Device number, if device.  */
+    unsigned int __pad2;
+    __off64_t st_size;			/* Size of file, in bytes.  */
+# endif
+    __blksize_t st_blksize;	/* Optimal block size for I/O.  */
+    __blkcnt64_t st_blocks;	/* Nr. 512-byte blocks allocated.  */
+# if defined __USE_MISC || defined __USE_XOPEN2K8
+    /* 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.  */
+    __syscall_ulong_t st_atimensec;	/* Nscecs of last access.  */
+    __time_t st_mtime;			/* Time of last modification.  */
+    __syscall_ulong_t st_mtimensec;	/* Nsecs of last modification.  */
+    __time_t st_ctime;			/* Time of last status change.  */
+    __syscall_ulong_t st_ctimensec;	/* Nsecs of last status change.  */
+# endif
+# ifdef __x86_64__
+    __syscall_slong_t __unused[3];
+# else
+    __ino64_t st_ino;			/* File serial number.		*/
+# endif
+  };
+#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.  */
+
+#ifdef __USE_ATFILE
+# define UTIME_NOW	((1l << 30) - 1l)
+# define UTIME_OMIT	((1l << 30) - 2l)
+#endif
+
+#endif	/* bits/stat.h */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/sysctl.h b/sysdeps/unix/sysv/linux/x86/bits/sysctl.h
new file mode 100644
index 0000000..520ccb9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/sysctl.h
@@ -0,0 +1,20 @@
+/* Copyright (C) 2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#if defined __x86_64__ && defined __ILP32__
+# error "sysctl system call is unsupported in x32 kernel"
+#endif
diff --git a/sysdeps/unix/sysv/linux/x86/bits/typesizes.h b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
new file mode 100644
index 0000000..a52a1d3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
@@ -0,0 +1,79 @@
+/* bits/typesizes.h -- underlying types for *_t.  Linux/x86-64 version.
+   Copyright (C) 2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_TYPES_H
+# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
+#endif
+
+#ifndef	_BITS_TYPESIZES_H
+#define	_BITS_TYPESIZES_H	1
+
+/* See <bits/types.h> for the meaning of these macros.  This file exists so
+   that <bits/types.h> need not vary across different GNU platforms.  */
+
+/* X32 kernel interface is 64-bit.  */
+#if defined __x86_64__ && defined __ILP32__
+# define __SYSCALL_SLONG_TYPE	__SQUAD_TYPE
+# define __SYSCALL_ULONG_TYPE	__UQUAD_TYPE
+#else
+# define __SYSCALL_SLONG_TYPE	__SLONGWORD_TYPE
+# define __SYSCALL_ULONG_TYPE	__ULONGWORD_TYPE
+#endif
+
+#define __DEV_T_TYPE		__UQUAD_TYPE
+#define __UID_T_TYPE		__U32_TYPE
+#define __GID_T_TYPE		__U32_TYPE
+#define __INO_T_TYPE		__SYSCALL_ULONG_TYPE
+#define __INO64_T_TYPE		__UQUAD_TYPE
+#define __MODE_T_TYPE		__U32_TYPE
+#ifdef __x86_64__
+# define __NLINK_T_TYPE		__SYSCALL_ULONG_TYPE
+#else
+# define __NLINK_T_TYPE		__UWORD_TYPE
+#endif
+#define __OFF_T_TYPE		__SYSCALL_SLONG_TYPE
+#define __OFF64_T_TYPE		__SQUAD_TYPE
+#define __PID_T_TYPE		__S32_TYPE
+#define __RLIM_T_TYPE		__SYSCALL_ULONG_TYPE
+#define __RLIM64_T_TYPE		__UQUAD_TYPE
+#define __BLKCNT_T_TYPE		__SYSCALL_SLONG_TYPE
+#define __BLKCNT64_T_TYPE	__SQUAD_TYPE
+#define __FSBLKCNT_T_TYPE	__SYSCALL_ULONG_TYPE
+#define __FSBLKCNT64_T_TYPE	__UQUAD_TYPE
+#define __FSFILCNT_T_TYPE	__SYSCALL_ULONG_TYPE
+#define __FSFILCNT64_T_TYPE	__UQUAD_TYPE
+#define __FSWORD_T_TYPE		__SYSCALL_SLONG_TYPE
+#define __ID_T_TYPE		__U32_TYPE
+#define __CLOCK_T_TYPE		__SYSCALL_SLONG_TYPE
+#define __TIME_T_TYPE		__SYSCALL_SLONG_TYPE
+#define __USECONDS_T_TYPE	__U32_TYPE
+#define __SUSECONDS_T_TYPE	__SYSCALL_SLONG_TYPE
+#define __DADDR_T_TYPE		__S32_TYPE
+#define __SWBLK_T_TYPE		__SYSCALL_SLONG_TYPE
+#define __KEY_T_TYPE		__S32_TYPE
+#define __CLOCKID_T_TYPE	__S32_TYPE
+#define __TIMER_T_TYPE		void *
+#define __BLKSIZE_T_TYPE	__SYSCALL_SLONG_TYPE
+#define __FSID_T_TYPE		struct { int __val[2]; }
+#define __SSIZE_T_TYPE		__SWORD_TYPE
+
+/* Number of descriptors that can fit in an `fd_set'.  */
+#define __FD_SETSIZE		1024
+
+
+#endif /* bits/typesizes.h */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/wchar.h b/sysdeps/unix/sysv/linux/x86/bits/wchar.h
new file mode 100644
index 0000000..0aeda79
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/bits/wchar.h
@@ -0,0 +1,30 @@
+/* wchar_t type related definitions.
+   Copyright (C) 2000-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_WCHAR_H
+#define _BITS_WCHAR_H	1
+
+#ifdef __x86_64__
+# define __WCHAR_MIN	(-2147483647 - 1)
+# define __WCHAR_MAX	(2147483647)
+#else
+# define __WCHAR_MIN	(-2147483647l - 1l)
+# define __WCHAR_MAX	(2147483647l)
+#endif
+
+#endif	/* bits/wchar.h */
diff --git a/sysdeps/unix/sysv/linux/x86/sys/debugreg.h b/sysdeps/unix/sysv/linux/x86/sys/debugreg.h
new file mode 100644
index 0000000..84a9017
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/debugreg.h
@@ -0,0 +1,86 @@
+/* Copyright (C) 2001-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_DEBUGREG_H
+#define _SYS_DEBUGREG_H	1
+
+/* Indicate the register numbers for a number of the specific
+   debug registers.  Registers 0-3 contain the addresses we wish to trap on */
+#define DR_FIRSTADDR 0        /* u_debugreg[DR_FIRSTADDR] */
+#define DR_LASTADDR 3         /* u_debugreg[DR_LASTADDR]  */
+
+#define DR_STATUS 6           /* u_debugreg[DR_STATUS]     */
+#define DR_CONTROL 7          /* u_debugreg[DR_CONTROL] */
+
+/* Define a few things for the status register.  We can use this to determine
+   which debugging register was responsible for the trap.  The other bits
+   are either reserved or not of interest to us. */
+
+#define DR_TRAP0	(0x1)		/* db0 */
+#define DR_TRAP1	(0x2)		/* db1 */
+#define DR_TRAP2	(0x4)		/* db2 */
+#define DR_TRAP3	(0x8)		/* db3 */
+
+#define DR_STEP		(0x4000)	/* single-step */
+#define DR_SWITCH	(0x8000)	/* task switch */
+
+/* Now define a bunch of things for manipulating the control register.
+   The top two bytes of the control register consist of 4 fields of 4
+   bits - each field corresponds to one of the four debug registers,
+   and indicates what types of access we trap on, and how large the data
+   field is that we are looking at */
+
+#define DR_CONTROL_SHIFT 16   /* Skip this many bits in ctl register */
+#define DR_CONTROL_SIZE  4    /* 4 control bits per register */
+
+#define DR_RW_EXECUTE	(0x0) /* Settings for the access types to trap on */
+#define DR_RW_WRITE	(0x1)
+#define DR_RW_READ	(0x3)
+
+#define DR_LEN_1 (0x0)	      /* Settings for data length to trap on */
+#define DR_LEN_2 (0x4)
+#define DR_LEN_4 (0xC)
+#define DR_LEN_8 (0x8)
+
+/* The low byte to the control register determine which registers are
+   enabled.  There are 4 fields of two bits.  One bit is "local", meaning
+   that the processor will reset the bit after a task switch and the other
+   is global meaning that we have to explicitly reset the bit.  With linux,
+   you can use either one, since we explicitly zero the register when we enter
+   kernel mode. */
+
+#define DR_LOCAL_ENABLE_SHIFT  0   /* Extra shift to the local enable bit */
+#define DR_GLOBAL_ENABLE_SHIFT 1   /* Extra shift to the global enable bit */
+#define DR_ENABLE_SIZE	       2   /* 2 enable bits per register */
+
+#define DR_LOCAL_ENABLE_MASK  (0x55) /* Set  local bits for all 4 regs */
+#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
+
+/* The second byte to the control register has a few special
+   things.  */
+
+
+
+#ifdef __x86_64__
+# define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00ULL) /* Reserved */
+#else
+# define DR_CONTROL_RESERVED (0x00FC00U) /* Reserved */
+#endif
+#define DR_LOCAL_SLOWDOWN   (0x100)  /* Local slow the pipeline */
+#define DR_GLOBAL_SLOWDOWN  (0x200)  /* Global slow the pipeline */
+
+#endif	/* sys/debugreg.h */
diff --git a/sysdeps/unix/sysv/linux/x86/sys/elf.h b/sysdeps/unix/sysv/linux/x86/sys/elf.h
new file mode 100644
index 0000000..1f4524c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/elf.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 1998-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_ELF_H
+#define _SYS_ELF_H	1
+
+#ifdef __x86_64__
+# error This header is unsupported on x86-64.
+#else
+# warning "This header is obsolete; use <sys/procfs.h> instead."
+
+# include <sys/procfs.h>
+#endif
+
+#endif	/* _SYS_ELF_H */
diff --git a/sysdeps/unix/sysv/linux/x86/sys/io.h b/sysdeps/unix/sysv/linux/x86/sys/io.h
new file mode 100644
index 0000000..d8fc271
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/io.h
@@ -0,0 +1,180 @@
+/* Copyright (C) 1996, 2000, 2002, 2009 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef	_SYS_IO_H
+#define	_SYS_IO_H	1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* If TURN_ON is TRUE, request for permission to do direct i/o on the
+   port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
+   permission off for that range.  This call requires root privileges.
+
+   Portability note: not all Linux platforms support this call.  Most
+   platforms based on the PC I/O architecture probably will, however.
+   E.g., Linux/Alpha for Alpha PCs supports this.  */
+extern int ioperm (unsigned long int __from, unsigned long int __num,
+                   int __turn_on) __THROW;
+
+/* Set the I/O privilege level to LEVEL.  If LEVEL>3, permission to
+   access any I/O port is granted.  This call requires root
+   privileges. */
+extern int iopl (int __level) __THROW;
+
+#if defined __GNUC__ && __GNUC__ >= 2
+
+static __inline unsigned char
+inb (unsigned short int __port)
+{
+  unsigned char _v;
+
+  __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
+  return _v;
+}
+
+static __inline unsigned char
+inb_p (unsigned short int __port)
+{
+  unsigned char _v;
+
+  __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
+  return _v;
+}
+
+static __inline unsigned short int
+inw (unsigned short int __port)
+{
+  unsigned short _v;
+
+  __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
+  return _v;
+}
+
+static __inline unsigned short int
+inw_p (unsigned short int __port)
+{
+  unsigned short int _v;
+
+  __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
+  return _v;
+}
+
+static __inline unsigned int
+inl (unsigned short int __port)
+{
+  unsigned int _v;
+
+  __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
+  return _v;
+}
+
+static __inline unsigned int
+inl_p (unsigned short int __port)
+{
+  unsigned int _v;
+  __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
+  return _v;
+}
+
+static __inline void
+outb (unsigned char __value, unsigned short int __port)
+{
+  __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
+}
+
+static __inline void
+outb_p (unsigned char __value, unsigned short int __port)
+{
+  __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
+			"Nd" (__port));
+}
+
+static __inline void
+outw (unsigned short int __value, unsigned short int __port)
+{
+  __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
+
+}
+
+static __inline void
+outw_p (unsigned short int __value, unsigned short int __port)
+{
+  __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
+			"Nd" (__port));
+}
+
+static __inline void
+outl (unsigned int __value, unsigned short int __port)
+{
+  __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
+}
+
+static __inline void
+outl_p (unsigned int __value, unsigned short int __port)
+{
+  __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
+			"Nd" (__port));
+}
+
+static __inline void
+insb (unsigned short int __port, void *addr, unsigned long int __count)
+{
+  __asm__ __volatile__ ("cld ; rep ; insb":"=D" (addr), "=c" (__count)
+			:"d" (__port), "0" (addr), "1" (__count));
+}
+
+static __inline void
+insw (unsigned short int __port, void *addr, unsigned long int __count)
+{
+  __asm__ __volatile__ ("cld ; rep ; insw":"=D" (addr), "=c" (__count)
+			:"d" (__port), "0" (addr), "1" (__count));
+}
+
+static __inline void
+insl (unsigned short int __port, void *addr, unsigned long int __count)
+{
+  __asm__ __volatile__ ("cld ; rep ; insl":"=D" (addr), "=c" (__count)
+			:"d" (__port), "0" (addr), "1" (__count));
+}
+
+static __inline void
+outsb (unsigned short int __port, const void *addr, unsigned long int __count)
+{
+  __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (addr), "=c" (__count)
+			:"d" (__port), "0" (addr), "1" (__count));
+}
+
+static __inline void
+outsw (unsigned short int __port, const void *addr, unsigned long int __count)
+{
+  __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (addr), "=c" (__count)
+  			:"d" (__port), "0" (addr), "1" (__count));
+}
+
+static __inline void
+outsl (unsigned short int __port, const void *addr, unsigned long int __count)
+{
+  __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (addr), "=c" (__count)
+			:"d" (__port), "0" (addr), "1" (__count));
+}
+
+#endif	/* GNU C */
+
+__END_DECLS
+#endif /* _SYS_IO_H */
diff --git a/sysdeps/unix/sysv/linux/x86/sys/perm.h b/sysdeps/unix/sysv/linux/x86/sys/perm.h
new file mode 100644
index 0000000..cbfeaf8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/perm.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 1996, 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_PERM_H
+
+#define _SYS_PERM_H	1
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* Set port input/output permissions.  */
+extern int ioperm (unsigned long int __from, unsigned long int __num,
+		   int __turn_on) __THROW;
+
+
+/* Change I/O privilege level.  */
+extern int iopl (int __level) __THROW;
+
+__END_DECLS
+
+#endif	/* _SYS_PERM_H */
diff --git a/sysdeps/unix/sysv/linux/x86/sys/procfs.h b/sysdeps/unix/sysv/linux/x86/sys/procfs.h
new file mode 100644
index 0000000..d7a0c88
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/procfs.h
@@ -0,0 +1,145 @@
+/* Copyright (C) 2001-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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.  */
+#ifdef __x86_64__
+typedef unsigned long long elf_greg_t;
+#else
+typedef unsigned long elf_greg_t;
+#endif
+
+/* 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];
+
+#ifndef __x86_64__
+/* Register set for the floating-point registers.  */
+typedef struct user_fpregs_struct elf_fpregset_t;
+
+/* Register set for the extended floating-point registers.  Includes
+   the Pentium III SSE registers in addition to the classic
+   floating-point stuff.  */
+typedef struct user_fpxregs_struct elf_fpxregset_t;
+#else
+/* Register set for the extended floating-point registers.  Includes
+   the Pentium III SSE registers in addition to the classic
+   floating-point stuff.  */
+typedef struct user_fpregs_struct elf_fpregset_t;
+#endif
+
+/* 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.  */
+#if __WORDSIZE == 32
+    unsigned short int pr_uid;
+    unsigned short int pr_gid;
+#else
+    unsigned int pr_uid;
+    unsigned int pr_gid;
+#endif
+    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/x86/sys/reg.h b/sysdeps/unix/sysv/linux/x86/sys/reg.h
new file mode 100644
index 0000000..9a23ee0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/reg.h
@@ -0,0 +1,77 @@
+/* Copyright (C) 2001-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_REG_H
+#define _SYS_REG_H	1
+
+
+#ifdef __x86_64__
+/* Index into an array of 8 byte longs returned from ptrace for
+   location of the users' stored general purpose registers.  */
+
+# define R15	0
+# define R14	1
+# define R13	2
+# define R12	3
+# define RBP	4
+# define RBX	5
+# define R11	6
+# define R10	7
+# define R9	8
+# define R8	9
+# define RAX	10
+# define RCX	11
+# define RDX	12
+# define RSI	13
+# define RDI	14
+# define ORIG_RAX 15
+# define RIP	16
+# define CS	17
+# define EFLAGS	18
+# define RSP	19
+# define SS	20
+# define FS_BASE 21
+# define GS_BASE 22
+# define DS	23
+# define ES	24
+# define FS	25
+# define GS	26
+#else
+
+/* Index into an array of 4 byte integers returned from ptrace for
+ * location of the users' stored general purpose registers. */
+
+# define EBX 0
+# define ECX 1
+# define EDX 2
+# define ESI 3
+# define EDI 4
+# define EBP 5
+# define EAX 6
+# define DS 7
+# define ES 8
+# define FS 9
+# define GS 10
+# define ORIG_EAX 11
+# define EIP 12
+# define CS  13
+# define EFL 14
+# define UESP 15
+# define SS   16
+#endif
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/x86/sys/ucontext.h b/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
new file mode 100644
index 0000000..7a3938c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
@@ -0,0 +1,246 @@
+/* Copyright (C) 2001-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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>
+
+#ifdef __x86_64__
+
+/* Type for general register.  */
+__extension__ typedef long long int greg_t;
+
+/* Number of general registers.  */
+#define NGREG	23
+
+/* Container for all general registers.  */
+typedef greg_t gregset_t[NGREG];
+
+#ifdef __USE_GNU
+/* Number of each register in the `gregset_t' array.  */
+enum
+{
+  REG_R8 = 0,
+# define REG_R8		REG_R8
+  REG_R9,
+# define REG_R9		REG_R9
+  REG_R10,
+# define REG_R10	REG_R10
+  REG_R11,
+# define REG_R11	REG_R11
+  REG_R12,
+# define REG_R12	REG_R12
+  REG_R13,
+# define REG_R13	REG_R13
+  REG_R14,
+# define REG_R14	REG_R14
+  REG_R15,
+# define REG_R15	REG_R15
+  REG_RDI,
+# define REG_RDI	REG_RDI
+  REG_RSI,
+# define REG_RSI	REG_RSI
+  REG_RBP,
+# define REG_RBP	REG_RBP
+  REG_RBX,
+# define REG_RBX	REG_RBX
+  REG_RDX,
+# define REG_RDX	REG_RDX
+  REG_RAX,
+# define REG_RAX	REG_RAX
+  REG_RCX,
+# define REG_RCX	REG_RCX
+  REG_RSP,
+# define REG_RSP	REG_RSP
+  REG_RIP,
+# define REG_RIP	REG_RIP
+  REG_EFL,
+# define REG_EFL	REG_EFL
+  REG_CSGSFS,		/* Actually short cs, gs, fs, __pad0.  */
+# define REG_CSGSFS	REG_CSGSFS
+  REG_ERR,
+# define REG_ERR	REG_ERR
+  REG_TRAPNO,
+# define REG_TRAPNO	REG_TRAPNO
+  REG_OLDMASK,
+# define REG_OLDMASK	REG_OLDMASK
+  REG_CR2
+# define REG_CR2	REG_CR2
+};
+#endif
+
+struct _libc_fpxreg
+{
+  unsigned short int significand[4];
+  unsigned short int exponent;
+  unsigned short int padding[3];
+};
+
+struct _libc_xmmreg
+{
+  __uint32_t	element[4];
+};
+
+struct _libc_fpstate
+{
+  /* 64-bit FXSAVE format.  */
+  __uint16_t		cwd;
+  __uint16_t		swd;
+  __uint16_t		ftw;
+  __uint16_t		fop;
+  __uint64_t		rip;
+  __uint64_t		rdp;
+  __uint32_t		mxcsr;
+  __uint32_t		mxcr_mask;
+  struct _libc_fpxreg	_st[8];
+  struct _libc_xmmreg	_xmm[16];
+  __uint32_t		padding[24];
+};
+
+/* Structure to describe FPU registers.  */
+typedef struct _libc_fpstate *fpregset_t;
+
+/* Context to describe whole processor state.  */
+typedef struct
+  {
+    gregset_t gregs;
+    /* Note that fpregs is a pointer.  */
+    fpregset_t fpregs;
+    __extension__ unsigned long long __reserved1 [8];
+} 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;
+    struct _libc_fpstate __fpregs_mem;
+  } ucontext_t;
+
+#else /* !__x86_64__ */
+
+/* Type for general register.  */
+typedef int greg_t;
+
+/* Number of general registers.  */
+#define NGREG	19
+
+/* Container for all general registers.  */
+typedef greg_t gregset_t[NGREG];
+
+#ifdef __USE_GNU
+/* Number of each register is the `gregset_t' array.  */
+enum
+{
+  REG_GS = 0,
+# define REG_GS		REG_GS
+  REG_FS,
+# define REG_FS		REG_FS
+  REG_ES,
+# define REG_ES		REG_ES
+  REG_DS,
+# define REG_DS		REG_DS
+  REG_EDI,
+# define REG_EDI	REG_EDI
+  REG_ESI,
+# define REG_ESI	REG_ESI
+  REG_EBP,
+# define REG_EBP	REG_EBP
+  REG_ESP,
+# define REG_ESP	REG_ESP
+  REG_EBX,
+# define REG_EBX	REG_EBX
+  REG_EDX,
+# define REG_EDX	REG_EDX
+  REG_ECX,
+# define REG_ECX	REG_ECX
+  REG_EAX,
+# define REG_EAX	REG_EAX
+  REG_TRAPNO,
+# define REG_TRAPNO	REG_TRAPNO
+  REG_ERR,
+# define REG_ERR	REG_ERR
+  REG_EIP,
+# define REG_EIP	REG_EIP
+  REG_CS,
+# define REG_CS		REG_CS
+  REG_EFL,
+# define REG_EFL	REG_EFL
+  REG_UESP,
+# define REG_UESP	REG_UESP
+  REG_SS
+# define REG_SS	REG_SS
+};
+#endif
+
+/* Definitions taken from the kernel headers.  */
+struct _libc_fpreg
+{
+  unsigned short int significand[4];
+  unsigned short int exponent;
+};
+
+struct _libc_fpstate
+{
+  unsigned long int cw;
+  unsigned long int sw;
+  unsigned long int tag;
+  unsigned long int ipoff;
+  unsigned long int cssel;
+  unsigned long int dataoff;
+  unsigned long int datasel;
+  struct _libc_fpreg _st[8];
+  unsigned long int status;
+};
+
+/* Structure to describe FPU registers.  */
+typedef struct _libc_fpstate *fpregset_t;
+
+/* Context to describe whole processor state.  */
+typedef struct
+  {
+    gregset_t gregs;
+    /* Due to Linux's history we have to use a pointer here.  The SysV/i386
+       ABI requires a struct with the values.  */
+    fpregset_t fpregs;
+    unsigned long int oldmask;
+    unsigned long int cr2;
+  } 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;
+    struct _libc_fpstate __fpregs_mem;
+  } ucontext_t;
+
+#endif /* !__x86_64__ */
+
+#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/x86/sys/user.h b/sysdeps/unix/sysv/linux/x86/sys/user.h
new file mode 100644
index 0000000..9db2937
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/user.h
@@ -0,0 +1,180 @@
+/* Copyright (C) 2001-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_USER_H
+#define _SYS_USER_H	1
+
+/* 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.  */
+
+#ifdef __x86_64__
+
+struct user_fpregs_struct
+{
+  unsigned short int	cwd;
+  unsigned short int	swd;
+  unsigned short int	ftw;
+  unsigned short int	fop;
+  __extension__ unsigned long long int rip;
+  __extension__ unsigned long long int rdp;
+  unsigned int		mxcsr;
+  unsigned int		mxcr_mask;
+  unsigned int		st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
+  unsigned int		xmm_space[64];  /* 16*16 bytes for each XMM-reg = 256 bytes */
+  unsigned int		padding[24];
+};
+
+struct user_regs_struct
+{
+  __extension__ unsigned long long int r15;
+  __extension__ unsigned long long int r14;
+  __extension__ unsigned long long int r13;
+  __extension__ unsigned long long int r12;
+  __extension__ unsigned long long int rbp;
+  __extension__ unsigned long long int rbx;
+  __extension__ unsigned long long int r11;
+  __extension__ unsigned long long int r10;
+  __extension__ unsigned long long int r9;
+  __extension__ unsigned long long int r8;
+  __extension__ unsigned long long int rax;
+  __extension__ unsigned long long int rcx;
+  __extension__ unsigned long long int rdx;
+  __extension__ unsigned long long int rsi;
+  __extension__ unsigned long long int rdi;
+  __extension__ unsigned long long int orig_rax;
+  __extension__ unsigned long long int rip;
+  __extension__ unsigned long long int cs;
+  __extension__ unsigned long long int eflags;
+  __extension__ unsigned long long int rsp;
+  __extension__ unsigned long long int ss;
+  __extension__ unsigned long long int fs_base;
+  __extension__ unsigned long long int gs_base;
+  __extension__ unsigned long long int ds;
+  __extension__ unsigned long long int es;
+  __extension__ unsigned long long int fs;
+  __extension__ unsigned long long int gs;
+};
+
+struct user
+{
+  struct user_regs_struct	regs;
+  int				u_fpvalid;
+  struct user_fpregs_struct	i387;
+  __extension__ unsigned long long int	u_tsize;
+  __extension__ unsigned long long int	u_dsize;
+  __extension__ unsigned long long int	u_ssize;
+  __extension__ unsigned long long int	start_code;
+  __extension__ unsigned long long int	start_stack;
+  __extension__ long long int		signal;
+  int				reserved;
+  __extension__ union
+    {
+      struct user_regs_struct*	u_ar0;
+      __extension__ unsigned long long int	__u_ar0_word;
+    };
+  __extension__ union
+    {
+      struct user_fpregs_struct*	u_fpstate;
+      __extension__ unsigned long long int	__u_fpstate_word;
+    };
+  __extension__ unsigned long long int	magic;
+  char				u_comm [32];
+  __extension__ unsigned long long int	u_debugreg [8];
+};
+
+#else
+/* These are the 32-bit x86 structures.  */
+struct user_fpregs_struct
+{
+  long int cwd;
+  long int swd;
+  long int twd;
+  long int fip;
+  long int fcs;
+  long int foo;
+  long int fos;
+  long int st_space [20];
+};
+
+struct user_fpxregs_struct
+{
+  unsigned short int cwd;
+  unsigned short int swd;
+  unsigned short int twd;
+  unsigned short int fop;
+  long int fip;
+  long int fcs;
+  long int foo;
+  long int fos;
+  long int mxcsr;
+  long int reserved;
+  long int st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
+  long int xmm_space[32];  /* 8*16 bytes for each XMM-reg = 128 bytes */
+  long int padding[56];
+};
+
+struct user_regs_struct
+{
+  long int ebx;
+  long int ecx;
+  long int edx;
+  long int esi;
+  long int edi;
+  long int ebp;
+  long int eax;
+  long int xds;
+  long int xes;
+  long int xfs;
+  long int xgs;
+  long int orig_eax;
+  long int eip;
+  long int xcs;
+  long int eflags;
+  long int esp;
+  long int xss;
+};
+
+struct user
+{
+  struct user_regs_struct	regs;
+  int				u_fpvalid;
+  struct user_fpregs_struct	i387;
+  unsigned long int		u_tsize;
+  unsigned long int		u_dsize;
+  unsigned long int		u_ssize;
+  unsigned long int		start_code;
+  unsigned long int		start_stack;
+  long int			signal;
+  int				reserved;
+  struct user_regs_struct*	u_ar0;
+  struct user_fpregs_struct*	u_fpstate;
+  unsigned long int		magic;
+  char				u_comm [32];
+  int				u_debugreg [8];
+};
+#endif  /* __x86_64__ */
+
+#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_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
+#endif	/* _SYS_USER_H */
diff --git a/sysdeps/unix/sysv/linux/x86/sys/vm86.h b/sysdeps/unix/sysv/linux/x86/sys/vm86.h
new file mode 100644
index 0000000..c41b55d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/sys/vm86.h
@@ -0,0 +1,38 @@
+/* Copyright (C) 1996-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_VM86_H
+
+#define _SYS_VM86_H	1
+#include <features.h>
+
+#ifdef __x86_64__
+# error This header is unsupported on x86-64.
+#else
+/* Get constants and data types from kernel header file.  */
+# include <asm/vm86.h>
+
+__BEGIN_DECLS
+
+/* Enter virtual 8086 mode.  */
+extern int vm86 (unsigned long int __subfunction,
+		 struct vm86plus_struct *__info) __THROW;
+
+__END_DECLS
+# endif
+
+#endif	/* _SYS_VM86_H */
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h b/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h
deleted file mode 100644
index 0e4a7c9..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __A_OUT_GNU_H__
-# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
-#endif
-
-#ifdef __x86_64__
-
-/* Signal to users of this header that this architecture really doesn't
-   support a.out binary format.  */
-#define __NO_A_OUT_SUPPORT 1
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/environments.h b/sysdeps/unix/sysv/linux/x86_64/bits/environments.h
deleted file mode 100644
index 793a04f..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/environments.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Copyright (C) 1999, 2001, 2004, 2009 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _UNISTD_H
-# error "Never include this file directly.  Use <unistd.h> instead"
-#endif
-
-#include <bits/wordsize.h>
-
-/* This header should define the following symbols under the described
-   situations.  A value `1' means that the model is always supported,
-   `-1' means it is never supported.  Undefined means it cannot be
-   statically decided.
-
-   _POSIX_V7_ILP32_OFF32   32bit int, long, pointers, and off_t type
-   _POSIX_V7_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
-
-   _POSIX_V7_LP64_OFF32	   64bit long and pointers and 32bit off_t type
-   _POSIX_V7_LPBIG_OFFBIG  64bit long and pointers and large off_t type
-
-   The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
-   _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
-   _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
-   used in previous versions of the Unix standard and are available
-   only for compatibility.
-*/
-
-#if __WORDSIZE == 64
-
-/* Environments with 32-bit wide pointers are optionally provided.
-   Therefore following macros aren't defined:
-   # undef _POSIX_V7_ILP32_OFF32
-   # undef _POSIX_V7_ILP32_OFFBIG
-   # undef _POSIX_V6_ILP32_OFF32
-   # undef _POSIX_V6_ILP32_OFFBIG
-   # undef _XBS5_ILP32_OFF32
-   # undef _XBS5_ILP32_OFFBIG
-   and users need to check at runtime.  */
-
-/* We also have no use (for now) for an environment with bigger pointers
-   and offsets.  */
-# define _POSIX_V7_LPBIG_OFFBIG	-1
-# define _POSIX_V6_LPBIG_OFFBIG	-1
-# define _XBS5_LPBIG_OFFBIG	-1
-
-/* By default we have 64-bit wide `long int', pointers and `off_t'.  */
-# define _POSIX_V7_LP64_OFF64	1
-# define _POSIX_V6_LP64_OFF64	1
-# define _XBS5_LP64_OFF64	1
-
-#else /* __WORDSIZE == 32 */
-
-/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
-   and all platforms support LFS.  */
-# define _POSIX_V7_ILP32_OFF32	1
-# define _POSIX_V7_ILP32_OFFBIG	1
-# define _POSIX_V6_ILP32_OFF32	1
-# define _POSIX_V6_ILP32_OFFBIG	1
-# define _XBS5_ILP32_OFF32	1
-# define _XBS5_ILP32_OFFBIG	1
-
-/* We optionally provide an environment with the above size but an 64-bit
-   side `off_t'.  Therefore we don't define _POSIX_V7_ILP32_OFFBIG.  */
-
-/* Environments with 64-bit wide pointers can be provided,
-   so these macros aren't defined:
-   # undef _POSIX_V7_LP64_OFF64
-   # undef _POSIX_V7_LPBIG_OFFBIG
-   # undef _POSIX_V6_LP64_OFF64
-   # undef _POSIX_V6_LPBIG_OFFBIG
-   # undef _XBS5_LP64_OFF64
-   # undef _XBS5_LPBIG_OFFBIG
-   and sysconf tests for it at runtime.  */
-
-#endif /* __WORDSIZE == 32 */
-
-#define __ILP32_OFF32_CFLAGS	"-m32"
-#define __ILP32_OFFBIG_CFLAGS	"-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-#define __ILP32_OFF32_LDFLAGS	"-m32"
-#define __ILP32_OFFBIG_LDFLAGS	"-m32"
-#define __LP64_OFF64_CFLAGS	"-m64"
-#define __LP64_OFF64_LDFLAGS	"-m64"
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h b/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h
deleted file mode 100644
index be1f5a6..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 2002-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef	_SYS_EPOLL_H
-# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
-#endif
-
-/* Flags to be passed to epoll_create1.  */
-enum
-  {
-    EPOLL_CLOEXEC = 02000000,
-#define EPOLL_CLOEXEC EPOLL_CLOEXEC
-    EPOLL_NONBLOCK = 00004000
-#define EPOLL_NONBLOCK EPOLL_NONBLOCK
-  };
-
-#define __EPOLL_PACKED __attribute__ ((__packed__))
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
deleted file mode 100644
index 9fa5ecb..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+++ /dev/null
@@ -1,337 +0,0 @@
-/* O_*, F_*, FD_* bit values for Linux/x86-64.
-   Copyright (C) 2001-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef	_FCNTL_H
-# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
-#endif
-
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
-   located on a few file systems.  */
-#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	       04010000
-#define O_FSYNC		 O_SYNC
-#define O_ASYNC		 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY	0200000	/* Must be a directory.	 */
-# define O_NOFOLLOW	0400000	/* Do not follow links.	 */
-# define O_CLOEXEC     02000000 /* Set close_on_exec.  */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT	 040000	/* Direct disk access.	*/
-# define O_NOATIME     01000000 /* Do not set atime.  */
-# define O_PATH	      010000000 /* Resolve pathname but do not open file.  */
-#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	010000	/* Synchronize data.  */
-# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# ifdef __x86_64__
-#  define O_LARGEFILE	0
-# else
-#  define O_LARGEFILE	0100000
-# endif
-#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.  */
-#ifdef __x86_64__
-# 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).	*/
-/* Not necessary, we always have 64-bit offsets.  */
-# define F_GETLK64	5	/* Get record locking info.  */
-# define F_SETLK64	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW64	7	/* Set record locking info (blocking).	*/
-#else
-# 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).	*/
-#endif
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN	8	/* Get owner (process receiving SIGIO).  */
-# define F_GETOWN	9	/* Set owner (process receiving 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.  */
-# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
-# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
-#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.	 */
-# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
-# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set.  */
-#endif
-
-/* For F_[GET|SET]FD.  */
-#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
-
-#ifdef __USE_GNU
-/* Owner types.  */
-enum __pid_type
-  {
-    F_OWNER_TID = 0,		/* Kernel thread.  */
-    F_OWNER_PID,		/* Process.  */
-    F_OWNER_PGRP,		/* Process group.  */
-    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
-  };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
-struct f_owner_ex
-  {
-    enum __pid_type type;	/* Owner type of ID.  */
-    __pid_t pid;		/* ID of owner.  */
-  };
-#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
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE.  */
-# define SYNC_FILE_RANGE_WAIT_BEFORE	1 /* Wait upon writeout of all pages
-					     in the range before performing the
-					     write.  */
-# define SYNC_FILE_RANGE_WRITE		2 /* Initiate writeout of all those
-					     dirty pages in the range which are
-					     not presently under writeback.  */
-# define SYNC_FILE_RANGE_WAIT_AFTER	4 /* Wait upon writeout of all pages in
-					     the range after performing the
-					     write.  */
-
-/* Flags for SPLICE and VMSPLICE.  */
-# define SPLICE_F_MOVE		1	/* Move pages instead of copying.  */
-# define SPLICE_F_NONBLOCK	2	/* Don't block on the pipe splicing
-					   (but we may still block on the fd
-					   we splice from/to).  */
-# define SPLICE_F_MORE		4	/* Expect more data.  */
-# define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
-
-
-/* File handle structure.  */
-struct file_handle
-{
-  unsigned int handle_bytes;
-  int handle_type;
-  /* File identifier.  */
-  unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now).  */
-# define MAX_HANDLE_SZ	128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead.  */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-    __THROW;
-
-
-/* Selective file content synch'ing.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
-			    unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
-			 size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
-		       __off64_t *__offout, size_t __len,
-		       unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
-		    unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-#  ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
-				   __off64_t __len),
-		       fallocate64);
-#  else
-#   define fallocate fallocate64
-#  endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
-			__off64_t __len);
-# endif
-
-
-/* Map file name to file handle.  */
-extern int name_to_handle_at (int __dfd, const char *__name,
-			      struct file_handle *__handle, int *__mnt_id,
-			      int __flags) __THROW;
-
-/* Open file using the file handle.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
-			      int __flags);
-
-#endif	/* use GNU */
-
-__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h b/sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h
deleted file mode 100644
index 7c242ad..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
-   Copyright (C) 2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_IPC_H
-# error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead."
-#endif
-
-#ifndef _BITS_IPCTYPES_H
-#define _BITS_IPCTYPES_H	1
-
-/* Used in `struct shmid_ds'.  */
-# ifdef __x86_64__
-typedef int __ipc_pid_t;
-# else
-typedef unsigned short int __ipc_pid_t;
-# endif
-
-#endif /* bits/ipctypes.h */
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
deleted file mode 100644
index 28b9160..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Definitions for POSIX memory map interface.  Linux/x86_64 version.
-   Copyright (C) 2001-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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
-# define MAP_32BIT	0x40		/* Only give out 32-bit addresses.  */
-#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.  */
-# define MAP_STACK	0x20000		/* Allocation is for a stack.  */
-# define MAP_HUGETLB	0x40000		/* Create huge page mapping.  */
-#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_REMOVE	  9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	  11	/* Do inherit across fork.  */
-# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
-# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
-# define MADV_HUGEPAGE	  14	/* Worth backing with hugepages.  */
-# define MADV_NOHUGEPAGE  15	/* Not worth backing with hugepages.  */
-# define MADV_DONTDUMP	  16    /* Explicity exclude from the core dump,
-                                   overrides the coredump filter bits.  */
-# define MADV_DODUMP	  17	/* Clear the MADV_DONTDUMP flag.  */
-# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
-#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/x86_64/bits/msq.h b/sysdeps/unix/sysv/linux/x86_64/bits/msq.h
deleted file mode 100644
index 7f23500..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/msq.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright (C) 1995-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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 __syscall_ulong_t msgqnum_t;
-typedef __syscall_ulong_t 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 */
-#ifndef __x86_64__
-  unsigned long int __unused1;
-#endif
-  __time_t msg_rtime;		/* time of last msgrcv command */
-#ifndef __x86_64__
-  unsigned long int __unused2;
-#endif
-  __time_t msg_ctime;		/* time of last change */
-#ifndef __x86_64__
-  unsigned long int __unused3;
-#endif
-  __syscall_ulong_t __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() */
-  __syscall_ulong_t __unused4;
-  __syscall_ulong_t __unused5;
-};
-
-#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/x86_64/bits/sem.h b/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
deleted file mode 100644
index 92bbcef..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 2002-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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 */
-  __syscall_ulong_t __unused1;
-  __time_t sem_ctime;			/* last time changed by semctl() */
-  __syscall_ulong_t __unused2;
-  __syscall_ulong_t sem_nsems;		/* number of semaphores in set */
-  __syscall_ulong_t __unused3;
-  __syscall_ulong_t __unused4;
-};
-
-/* 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/x86_64/bits/shm.h b/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
deleted file mode 100644
index cba25ed..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (C) 1995-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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 */
-#define SHM_EXEC	0100000		/* execution access */
-
-/* Commands for `shmctl'.  */
-#define SHM_LOCK	11		/* lock segment (root only) */
-#define SHM_UNLOCK	12		/* unlock segment (root only) */
-
-__BEGIN_DECLS
-
-/* Segment low boundary address multiple.  */
-#define SHMLBA		(__getpagesize ())
-extern int __getpagesize (void) __THROW __attribute__ ((__const__));
-
-
-/* Type to count number of attaches.  */
-typedef __syscall_ulong_t shmatt_t;
-
-/* Data structure describing a shared memory segment.  */
-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() */
-#ifndef __x86_64__
-    unsigned long int __unused1;
-#endif
-    __time_t shm_dtime;			/* time of last shmdt() */
-#ifndef __x86_64__
-    unsigned long int __unused2;
-#endif
-    __time_t shm_ctime;			/* time of last change by shmctl() */
-#ifndef __x86_64__
-    unsigned long int __unused3;
-#endif
-    __pid_t shm_cpid;			/* pid of creator */
-    __pid_t shm_lpid;			/* pid of last shmop */
-    shmatt_t shm_nattch;		/* number of current attaches */
-    __syscall_ulong_t __unused4;
-    __syscall_ulong_t __unused5;
-  };
-
-#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
-  {
-    __syscall_ulong_t shmmax;
-    __syscall_ulong_t shmmin;
-    __syscall_ulong_t shmmni;
-    __syscall_ulong_t shmseg;
-    __syscall_ulong_t shmall;
-    __syscall_ulong_t __unused1;
-    __syscall_ulong_t __unused2;
-    __syscall_ulong_t __unused3;
-    __syscall_ulong_t __unused4;
-  };
-
-struct shm_info
-  {
-    int used_ids;
-    __syscall_ulong_t shm_tot;	/* total allocated shm */
-    __syscall_ulong_t shm_rss;	/* total resident shm */
-    __syscall_ulong_t shm_swp;	/* total swapped shm */
-    __syscall_ulong_t swap_attempts;
-    __syscall_ulong_t swap_successes;
-  };
-
-#endif /* __USE_MISC */
-
-__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h b/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h
deleted file mode 100644
index d9ba716..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* Copyright (C) 2002-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _BITS_SIGCONTEXT_H
-#define _BITS_SIGCONTEXT_H  1
-
-#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
-# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
-#endif
-
-struct _fpreg
-{
-  unsigned short significand[4];
-  unsigned short exponent;
-};
-
-struct _fpxreg
-{
-  unsigned short significand[4];
-  unsigned short exponent;
-  unsigned short padding[3];
-};
-
-struct _xmmreg
-{
-  __uint32_t	element[4];
-};
-
-
-
-#ifndef __x86_64__
-
-struct _fpstate
-{
-  /* Regular FPU environment.  */
-  __uint32_t	cw;
-  __uint32_t		sw;
-  __uint32_t		tag;
-  __uint32_t		ipoff;
-  __uint32_t		cssel;
-  __uint32_t		dataoff;
-  __uint32_t		datasel;
-  struct _fpreg	_st[8];
-  unsigned short status;
-  unsigned short magic;
-
-  /* FXSR FPU environment.  */
-  __uint32_t		_fxsr_env[6];
-  __uint32_t		mxcsr;
-  __uint32_t		reserved;
-  struct _fpxreg	_fxsr_st[8];
-  struct _xmmreg	_xmm[8];
-  __uint32_t		padding[56];
-};
-
-#ifndef sigcontext_struct
-/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
-   we need sigcontext.  Some packages have come to rely on
-   sigcontext_struct being defined on 32-bit x86, so define this for
-   their benefit.  */
-# define sigcontext_struct sigcontext
-#endif
-
-struct sigcontext
-{
-  unsigned short gs, __gsh;
-  unsigned short fs, __fsh;
-  unsigned short es, __esh;
-  unsigned short ds, __dsh;
-  unsigned long edi;
-  unsigned long esi;
-  unsigned long ebp;
-  unsigned long esp;
-  unsigned long ebx;
-  unsigned long edx;
-  unsigned long ecx;
-  unsigned long eax;
-  unsigned long trapno;
-  unsigned long err;
-  unsigned long eip;
-  unsigned short cs, __csh;
-  unsigned long eflags;
-  unsigned long esp_at_signal;
-  unsigned short ss, __ssh;
-  struct _fpstate * fpstate;
-  unsigned long oldmask;
-  unsigned long cr2;
-};
-
-#else /* __x86_64__ */
-
-struct _fpstate
-{
-  /* FPU environment matching the 64-bit FXSAVE layout.  */
-  __uint16_t		cwd;
-  __uint16_t		swd;
-  __uint16_t		ftw;
-  __uint16_t		fop;
-  __uint64_t		rip;
-  __uint64_t		rdp;
-  __uint32_t		mxcsr;
-  __uint32_t		mxcr_mask;
-  struct _fpxreg	_st[8];
-  struct _xmmreg	_xmm[16];
-  __uint32_t		padding[24];
-};
-
-struct sigcontext
-{
-  __uint64_t r8;
-  __uint64_t r9;
-  __uint64_t r10;
-  __uint64_t r11;
-  __uint64_t r12;
-  __uint64_t r13;
-  __uint64_t r14;
-  __uint64_t r15;
-  __uint64_t rdi;
-  __uint64_t rsi;
-  __uint64_t rbp;
-  __uint64_t rbx;
-  __uint64_t rdx;
-  __uint64_t rax;
-  __uint64_t rcx;
-  __uint64_t rsp;
-  __uint64_t rip;
-  __uint64_t eflags;
-  unsigned short cs;
-  unsigned short gs;
-  unsigned short fs;
-  unsigned short __pad0;
-  __uint64_t err;
-  __uint64_t trapno;
-  __uint64_t oldmask;
-  __uint64_t cr2;
-  __extension__ union
-    {
-      struct _fpstate * fpstate;
-      __uint64_t __fpstate_word;
-    };
-  __uint64_t __reserved1 [8];
-};
-
-#endif /* __x86_64__ */
-
-#endif /* _BITS_SIGCONTEXT_H */
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h
deleted file mode 100644
index 2e05e65..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h
+++ /dev/null
@@ -1,330 +0,0 @@
-/* siginfo_t, sigevent and constants.  Linux x86-64 version.
-   Copyright (C) 2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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
-
-# if defined __x86_64__ && __WORDSIZE == 32
-/* si_utime and si_stime must be 4 byte aligned for x32 to match the
-   kernel.  We align siginfo_t to 8 bytes so that si_utime and si_stime
-   are actually aligned to 8 bytes since their offsets are multiple of
-   8 bytes.  */
-typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
-#  define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
-# else
-typedef __clock_t __sigchld_clock_t;
-#  define __SI_ALIGNMENT
-# endif
-
-typedef struct
-  {
-    int si_signo;		/* Signal number.  */
-    int si_errno;		/* If non-zero, an errno value associated with
-				   this signal, as defined in <errno.h>.  */
-    int si_code;		/* Signal code.  */
-
-    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;
-
-	/* POSIX.1b timers.  */
-	struct
-	  {
-	    int si_tid;		/* Timer ID.  */
-	    int si_overrun;	/* Overrun count.  */
-	    sigval_t si_sigval;	/* Signal value.  */
-	  } _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;
-
-	/* 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.  */
-	    __sigchld_clock_t si_utime;
-	    __sigchld_clock_t si_stime;
-	  } _sigchld;
-
-	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS.  */
-	struct
-	  {
-	    void *si_addr;	/* Faulting insn/memory ref.  */
-	  } _sigfault;
-
-	/* SIGPOLL.  */
-	struct
-	  {
-	    long int si_band;	/* Band event for SIGPOLL.  */
-	    int si_fd;
-	  } _sigpoll;
-      } _sifields;
-  } siginfo_t __SI_ALIGNMENT;
-
-
-/* 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_timerid	_sifields._timer.si_tid
-# define si_overrun	_sifields._timer.si_overrun
-# 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_ASYNCIO,			/* Sent by AIO completion.  */
-# define SI_ASYNCIO	SI_ASYNCIO
-  SI_MESGQ,			/* Sent by real time mesq state change.  */
-# define SI_MESGQ	SI_MESGQ
-  SI_TIMER,			/* Sent by timer expiration.  */
-# define SI_TIMER	SI_TIMER
-  SI_QUEUE,			/* Sent by sigqueue.  */
-# define SI_QUEUE	SI_QUEUE
-  SI_USER,			/* Sent by kill, sigsend.  */
-# 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
-# if __WORDSIZE == 64
-#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
-# else
-#  define __SIGEV_PAD_SIZE	((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
-# endif
-
-/* Forward declaration.  */
-# ifndef __have_pthread_attr_t
-typedef union pthread_attr_t pthread_attr_t;
-#  define __have_pthread_attr_t	1
-# endif
-
-typedef struct sigevent
-  {
-    sigval_t sigev_value;
-    int sigev_signo;
-    int sigev_notify;
-
-    union
-      {
-	int _pad[__SIGEV_PAD_SIZE];
-
-	/* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
-	   thread to receive the signal.  */
-	__pid_t _tid;
-
-	struct
-	  {
-	    void (*_function) (sigval_t);	/* Function to start.  */
-	    pthread_attr_t *_attribute;		/* Thread attributes.  */
-	  } _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/x86_64/bits/stat.h b/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
deleted file mode 100644
index 691c437..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/* Copyright (C) 1999-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#if !defined _SYS_STAT_H && !defined _FCNTL_H
-# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
-#endif
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H	1
-
-/* Versions of the `struct stat' data structure.  */
-#define _STAT_VER_KERNEL	0
-
-#ifndef __x86_64__
-# define _STAT_VER_SVR4		2
-# define _STAT_VER_LINUX	3
-
-/* i386 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.  */
-#else
-# define _STAT_VER_LINUX	1
-
-/* x86-64 versions of the `xmknod' interface.  */
-# define _MKNOD_VER_LINUX	0
-#endif
-
-#define _STAT_VER		_STAT_VER_LINUX
-
-struct stat
-  {
-    __dev_t st_dev;		/* Device.  */
-#ifndef __x86_64__
-    unsigned short int __pad1;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
-    __ino_t st_ino;		/* File serial number.	*/
-#else
-    __ino_t __st_ino;			/* 32bit file serial number.	*/
-#endif
-#ifndef __x86_64__
-    __mode_t st_mode;			/* File mode.  */
-    __nlink_t st_nlink;			/* Link count.  */
-#else
-    __nlink_t st_nlink;		/* Link count.  */
-    __mode_t st_mode;		/* File mode.  */
-#endif
-    __uid_t st_uid;		/* User ID of the file's owner.	*/
-    __gid_t st_gid;		/* Group ID of the file's group.*/
-#ifdef __x86_64__
-    int __pad0;
-#endif
-    __dev_t st_rdev;		/* Device number, if device.  */
-#ifndef __x86_64__
-    unsigned short int __pad2;
-#endif
-#if defined __x86_64__ || !defined __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.  */
-#if defined __x86_64__  || !defined __USE_FILE_OFFSET64
-    __blkcnt_t st_blocks;		/* Number 512-byte blocks allocated. */
-#else
-    __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */
-#endif
-#if defined __USE_MISC || defined __USE_XOPEN2K8
-    /* 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.  */
-    __syscall_ulong_t st_atimensec;	/* Nscecs of last access.  */
-    __time_t st_mtime;			/* Time of last modification.  */
-    __syscall_ulong_t st_mtimensec;	/* Nsecs of last modification.  */
-    __time_t st_ctime;			/* Time of last status change.  */
-    __syscall_ulong_t st_ctimensec;	/* Nsecs of last status change.  */
-#endif
-#ifdef __x86_64__
-    __syscall_slong_t __unused[3];
-#else
-# ifndef __USE_FILE_OFFSET64
-    unsigned long int __unused4;
-    unsigned long int __unused5;
-# else
-    __ino64_t st_ino;			/* File serial number.	*/
-# endif
-#endif
-  };
-
-#ifdef __USE_LARGEFILE64
-/* Note stat64 has the same shape as stat for x86-64.  */
-struct stat64
-  {
-    __dev_t st_dev;		/* Device.  */
-# ifdef __x86_64__
-    __ino64_t st_ino;		/* File serial number.  */
-    __nlink_t st_nlink;		/* Link count.  */
-    __mode_t st_mode;		/* File mode.  */
-# else
-    unsigned int __pad1;
-    __ino_t __st_ino;			/* 32bit file serial number.	*/
-    __mode_t st_mode;			/* File mode.  */
-    __nlink_t st_nlink;			/* Link count.  */
-# endif
-    __uid_t st_uid;		/* User ID of the file's owner.	*/
-    __gid_t st_gid;		/* Group ID of the file's group.*/
-# ifdef __x86_64__
-    int __pad0;
-    __dev_t st_rdev;		/* Device number, if device.  */
-    __off_t st_size;		/* Size of file, in bytes.  */
-# else
-    __dev_t st_rdev;			/* Device number, if device.  */
-    unsigned int __pad2;
-    __off64_t st_size;			/* Size of file, in bytes.  */
-# endif
-    __blksize_t st_blksize;	/* Optimal block size for I/O.  */
-    __blkcnt64_t st_blocks;	/* Nr. 512-byte blocks allocated.  */
-# if defined __USE_MISC || defined __USE_XOPEN2K8
-    /* 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.  */
-    __syscall_ulong_t st_atimensec;	/* Nscecs of last access.  */
-    __time_t st_mtime;			/* Time of last modification.  */
-    __syscall_ulong_t st_mtimensec;	/* Nsecs of last modification.  */
-    __time_t st_ctime;			/* Time of last status change.  */
-    __syscall_ulong_t st_ctimensec;	/* Nsecs of last status change.  */
-# endif
-# ifdef __x86_64__
-    __syscall_slong_t __unused[3];
-# else
-    __ino64_t st_ino;			/* File serial number.		*/
-# endif
-  };
-#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.  */
-
-#ifdef __USE_ATFILE
-# define UTIME_NOW	((1l << 30) - 1l)
-# define UTIME_OMIT	((1l << 30) - 2l)
-#endif
-
-#endif	/* bits/stat.h */
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h b/sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h
deleted file mode 100644
index 520ccb9..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#if defined __x86_64__ && defined __ILP32__
-# error "sysctl system call is unsupported in x32 kernel"
-#endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h b/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h
deleted file mode 100644
index a52a1d3..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* bits/typesizes.h -- underlying types for *_t.  Linux/x86-64 version.
-   Copyright (C) 2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _BITS_TYPES_H
-# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
-#endif
-
-#ifndef	_BITS_TYPESIZES_H
-#define	_BITS_TYPESIZES_H	1
-
-/* See <bits/types.h> for the meaning of these macros.  This file exists so
-   that <bits/types.h> need not vary across different GNU platforms.  */
-
-/* X32 kernel interface is 64-bit.  */
-#if defined __x86_64__ && defined __ILP32__
-# define __SYSCALL_SLONG_TYPE	__SQUAD_TYPE
-# define __SYSCALL_ULONG_TYPE	__UQUAD_TYPE
-#else
-# define __SYSCALL_SLONG_TYPE	__SLONGWORD_TYPE
-# define __SYSCALL_ULONG_TYPE	__ULONGWORD_TYPE
-#endif
-
-#define __DEV_T_TYPE		__UQUAD_TYPE
-#define __UID_T_TYPE		__U32_TYPE
-#define __GID_T_TYPE		__U32_TYPE
-#define __INO_T_TYPE		__SYSCALL_ULONG_TYPE
-#define __INO64_T_TYPE		__UQUAD_TYPE
-#define __MODE_T_TYPE		__U32_TYPE
-#ifdef __x86_64__
-# define __NLINK_T_TYPE		__SYSCALL_ULONG_TYPE
-#else
-# define __NLINK_T_TYPE		__UWORD_TYPE
-#endif
-#define __OFF_T_TYPE		__SYSCALL_SLONG_TYPE
-#define __OFF64_T_TYPE		__SQUAD_TYPE
-#define __PID_T_TYPE		__S32_TYPE
-#define __RLIM_T_TYPE		__SYSCALL_ULONG_TYPE
-#define __RLIM64_T_TYPE		__UQUAD_TYPE
-#define __BLKCNT_T_TYPE		__SYSCALL_SLONG_TYPE
-#define __BLKCNT64_T_TYPE	__SQUAD_TYPE
-#define __FSBLKCNT_T_TYPE	__SYSCALL_ULONG_TYPE
-#define __FSBLKCNT64_T_TYPE	__UQUAD_TYPE
-#define __FSFILCNT_T_TYPE	__SYSCALL_ULONG_TYPE
-#define __FSFILCNT64_T_TYPE	__UQUAD_TYPE
-#define __FSWORD_T_TYPE		__SYSCALL_SLONG_TYPE
-#define __ID_T_TYPE		__U32_TYPE
-#define __CLOCK_T_TYPE		__SYSCALL_SLONG_TYPE
-#define __TIME_T_TYPE		__SYSCALL_SLONG_TYPE
-#define __USECONDS_T_TYPE	__U32_TYPE
-#define __SUSECONDS_T_TYPE	__SYSCALL_SLONG_TYPE
-#define __DADDR_T_TYPE		__S32_TYPE
-#define __SWBLK_T_TYPE		__SYSCALL_SLONG_TYPE
-#define __KEY_T_TYPE		__S32_TYPE
-#define __CLOCKID_T_TYPE	__S32_TYPE
-#define __TIMER_T_TYPE		void *
-#define __BLKSIZE_T_TYPE	__SYSCALL_SLONG_TYPE
-#define __FSID_T_TYPE		struct { int __val[2]; }
-#define __SSIZE_T_TYPE		__SWORD_TYPE
-
-/* Number of descriptors that can fit in an `fd_set'.  */
-#define __FD_SETSIZE		1024
-
-
-#endif /* bits/typesizes.h */
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h b/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h
deleted file mode 100644
index 84a9017..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 2001-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_DEBUGREG_H
-#define _SYS_DEBUGREG_H	1
-
-/* Indicate the register numbers for a number of the specific
-   debug registers.  Registers 0-3 contain the addresses we wish to trap on */
-#define DR_FIRSTADDR 0        /* u_debugreg[DR_FIRSTADDR] */
-#define DR_LASTADDR 3         /* u_debugreg[DR_LASTADDR]  */
-
-#define DR_STATUS 6           /* u_debugreg[DR_STATUS]     */
-#define DR_CONTROL 7          /* u_debugreg[DR_CONTROL] */
-
-/* Define a few things for the status register.  We can use this to determine
-   which debugging register was responsible for the trap.  The other bits
-   are either reserved or not of interest to us. */
-
-#define DR_TRAP0	(0x1)		/* db0 */
-#define DR_TRAP1	(0x2)		/* db1 */
-#define DR_TRAP2	(0x4)		/* db2 */
-#define DR_TRAP3	(0x8)		/* db3 */
-
-#define DR_STEP		(0x4000)	/* single-step */
-#define DR_SWITCH	(0x8000)	/* task switch */
-
-/* Now define a bunch of things for manipulating the control register.
-   The top two bytes of the control register consist of 4 fields of 4
-   bits - each field corresponds to one of the four debug registers,
-   and indicates what types of access we trap on, and how large the data
-   field is that we are looking at */
-
-#define DR_CONTROL_SHIFT 16   /* Skip this many bits in ctl register */
-#define DR_CONTROL_SIZE  4    /* 4 control bits per register */
-
-#define DR_RW_EXECUTE	(0x0) /* Settings for the access types to trap on */
-#define DR_RW_WRITE	(0x1)
-#define DR_RW_READ	(0x3)
-
-#define DR_LEN_1 (0x0)	      /* Settings for data length to trap on */
-#define DR_LEN_2 (0x4)
-#define DR_LEN_4 (0xC)
-#define DR_LEN_8 (0x8)
-
-/* The low byte to the control register determine which registers are
-   enabled.  There are 4 fields of two bits.  One bit is "local", meaning
-   that the processor will reset the bit after a task switch and the other
-   is global meaning that we have to explicitly reset the bit.  With linux,
-   you can use either one, since we explicitly zero the register when we enter
-   kernel mode. */
-
-#define DR_LOCAL_ENABLE_SHIFT  0   /* Extra shift to the local enable bit */
-#define DR_GLOBAL_ENABLE_SHIFT 1   /* Extra shift to the global enable bit */
-#define DR_ENABLE_SIZE	       2   /* 2 enable bits per register */
-
-#define DR_LOCAL_ENABLE_MASK  (0x55) /* Set  local bits for all 4 regs */
-#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
-
-/* The second byte to the control register has a few special
-   things.  */
-
-
-
-#ifdef __x86_64__
-# define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00ULL) /* Reserved */
-#else
-# define DR_CONTROL_RESERVED (0x00FC00U) /* Reserved */
-#endif
-#define DR_LOCAL_SLOWDOWN   (0x100)  /* Local slow the pipeline */
-#define DR_GLOBAL_SLOWDOWN  (0x200)  /* Global slow the pipeline */
-
-#endif	/* sys/debugreg.h */
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/io.h b/sysdeps/unix/sysv/linux/x86_64/sys/io.h
deleted file mode 100644
index d8fc271..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/sys/io.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Copyright (C) 1996, 2000, 2002, 2009 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef	_SYS_IO_H
-#define	_SYS_IO_H	1
-
-#include <features.h>
-
-__BEGIN_DECLS
-
-/* If TURN_ON is TRUE, request for permission to do direct i/o on the
-   port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
-   permission off for that range.  This call requires root privileges.
-
-   Portability note: not all Linux platforms support this call.  Most
-   platforms based on the PC I/O architecture probably will, however.
-   E.g., Linux/Alpha for Alpha PCs supports this.  */
-extern int ioperm (unsigned long int __from, unsigned long int __num,
-                   int __turn_on) __THROW;
-
-/* Set the I/O privilege level to LEVEL.  If LEVEL>3, permission to
-   access any I/O port is granted.  This call requires root
-   privileges. */
-extern int iopl (int __level) __THROW;
-
-#if defined __GNUC__ && __GNUC__ >= 2
-
-static __inline unsigned char
-inb (unsigned short int __port)
-{
-  unsigned char _v;
-
-  __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned char
-inb_p (unsigned short int __port)
-{
-  unsigned char _v;
-
-  __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned short int
-inw (unsigned short int __port)
-{
-  unsigned short _v;
-
-  __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned short int
-inw_p (unsigned short int __port)
-{
-  unsigned short int _v;
-
-  __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned int
-inl (unsigned short int __port)
-{
-  unsigned int _v;
-
-  __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline unsigned int
-inl_p (unsigned short int __port)
-{
-  unsigned int _v;
-  __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
-  return _v;
-}
-
-static __inline void
-outb (unsigned char __value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
-}
-
-static __inline void
-outb_p (unsigned char __value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
-			"Nd" (__port));
-}
-
-static __inline void
-outw (unsigned short int __value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
-
-}
-
-static __inline void
-outw_p (unsigned short int __value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
-			"Nd" (__port));
-}
-
-static __inline void
-outl (unsigned int __value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
-}
-
-static __inline void
-outl_p (unsigned int __value, unsigned short int __port)
-{
-  __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
-			"Nd" (__port));
-}
-
-static __inline void
-insb (unsigned short int __port, void *addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; insb":"=D" (addr), "=c" (__count)
-			:"d" (__port), "0" (addr), "1" (__count));
-}
-
-static __inline void
-insw (unsigned short int __port, void *addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; insw":"=D" (addr), "=c" (__count)
-			:"d" (__port), "0" (addr), "1" (__count));
-}
-
-static __inline void
-insl (unsigned short int __port, void *addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; insl":"=D" (addr), "=c" (__count)
-			:"d" (__port), "0" (addr), "1" (__count));
-}
-
-static __inline void
-outsb (unsigned short int __port, const void *addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (addr), "=c" (__count)
-			:"d" (__port), "0" (addr), "1" (__count));
-}
-
-static __inline void
-outsw (unsigned short int __port, const void *addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (addr), "=c" (__count)
-  			:"d" (__port), "0" (addr), "1" (__count));
-}
-
-static __inline void
-outsl (unsigned short int __port, const void *addr, unsigned long int __count)
-{
-  __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (addr), "=c" (__count)
-			:"d" (__port), "0" (addr), "1" (__count));
-}
-
-#endif	/* GNU C */
-
-__END_DECLS
-#endif /* _SYS_IO_H */
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/perm.h b/sysdeps/unix/sysv/linux/x86_64/sys/perm.h
deleted file mode 100644
index cbfeaf8..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/sys/perm.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1996, 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_PERM_H
-
-#define _SYS_PERM_H	1
-#include <features.h>
-
-__BEGIN_DECLS
-
-/* Set port input/output permissions.  */
-extern int ioperm (unsigned long int __from, unsigned long int __num,
-		   int __turn_on) __THROW;
-
-
-/* Change I/O privilege level.  */
-extern int iopl (int __level) __THROW;
-
-__END_DECLS
-
-#endif	/* _SYS_PERM_H */
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h b/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
deleted file mode 100644
index d7a0c88..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Copyright (C) 2001-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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.  */
-#ifdef __x86_64__
-typedef unsigned long long elf_greg_t;
-#else
-typedef unsigned long elf_greg_t;
-#endif
-
-/* 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];
-
-#ifndef __x86_64__
-/* Register set for the floating-point registers.  */
-typedef struct user_fpregs_struct elf_fpregset_t;
-
-/* Register set for the extended floating-point registers.  Includes
-   the Pentium III SSE registers in addition to the classic
-   floating-point stuff.  */
-typedef struct user_fpxregs_struct elf_fpxregset_t;
-#else
-/* Register set for the extended floating-point registers.  Includes
-   the Pentium III SSE registers in addition to the classic
-   floating-point stuff.  */
-typedef struct user_fpregs_struct elf_fpregset_t;
-#endif
-
-/* 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.  */
-#if __WORDSIZE == 32
-    unsigned short int pr_uid;
-    unsigned short int pr_gid;
-#else
-    unsigned int pr_uid;
-    unsigned int pr_gid;
-#endif
-    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/x86_64/sys/reg.h b/sysdeps/unix/sysv/linux/x86_64/sys/reg.h
deleted file mode 100644
index 9a23ee0..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/sys/reg.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright (C) 2001-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_REG_H
-#define _SYS_REG_H	1
-
-
-#ifdef __x86_64__
-/* Index into an array of 8 byte longs returned from ptrace for
-   location of the users' stored general purpose registers.  */
-
-# define R15	0
-# define R14	1
-# define R13	2
-# define R12	3
-# define RBP	4
-# define RBX	5
-# define R11	6
-# define R10	7
-# define R9	8
-# define R8	9
-# define RAX	10
-# define RCX	11
-# define RDX	12
-# define RSI	13
-# define RDI	14
-# define ORIG_RAX 15
-# define RIP	16
-# define CS	17
-# define EFLAGS	18
-# define RSP	19
-# define SS	20
-# define FS_BASE 21
-# define GS_BASE 22
-# define DS	23
-# define ES	24
-# define FS	25
-# define GS	26
-#else
-
-/* Index into an array of 4 byte integers returned from ptrace for
- * location of the users' stored general purpose registers. */
-
-# define EBX 0
-# define ECX 1
-# define EDX 2
-# define ESI 3
-# define EDI 4
-# define EBP 5
-# define EAX 6
-# define DS 7
-# define ES 8
-# define FS 9
-# define GS 10
-# define ORIG_EAX 11
-# define EIP 12
-# define CS  13
-# define EFL 14
-# define UESP 15
-# define SS   16
-#endif
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h b/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
deleted file mode 100644
index 7a3938c..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/* Copyright (C) 2001-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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>
-
-#ifdef __x86_64__
-
-/* Type for general register.  */
-__extension__ typedef long long int greg_t;
-
-/* Number of general registers.  */
-#define NGREG	23
-
-/* Container for all general registers.  */
-typedef greg_t gregset_t[NGREG];
-
-#ifdef __USE_GNU
-/* Number of each register in the `gregset_t' array.  */
-enum
-{
-  REG_R8 = 0,
-# define REG_R8		REG_R8
-  REG_R9,
-# define REG_R9		REG_R9
-  REG_R10,
-# define REG_R10	REG_R10
-  REG_R11,
-# define REG_R11	REG_R11
-  REG_R12,
-# define REG_R12	REG_R12
-  REG_R13,
-# define REG_R13	REG_R13
-  REG_R14,
-# define REG_R14	REG_R14
-  REG_R15,
-# define REG_R15	REG_R15
-  REG_RDI,
-# define REG_RDI	REG_RDI
-  REG_RSI,
-# define REG_RSI	REG_RSI
-  REG_RBP,
-# define REG_RBP	REG_RBP
-  REG_RBX,
-# define REG_RBX	REG_RBX
-  REG_RDX,
-# define REG_RDX	REG_RDX
-  REG_RAX,
-# define REG_RAX	REG_RAX
-  REG_RCX,
-# define REG_RCX	REG_RCX
-  REG_RSP,
-# define REG_RSP	REG_RSP
-  REG_RIP,
-# define REG_RIP	REG_RIP
-  REG_EFL,
-# define REG_EFL	REG_EFL
-  REG_CSGSFS,		/* Actually short cs, gs, fs, __pad0.  */
-# define REG_CSGSFS	REG_CSGSFS
-  REG_ERR,
-# define REG_ERR	REG_ERR
-  REG_TRAPNO,
-# define REG_TRAPNO	REG_TRAPNO
-  REG_OLDMASK,
-# define REG_OLDMASK	REG_OLDMASK
-  REG_CR2
-# define REG_CR2	REG_CR2
-};
-#endif
-
-struct _libc_fpxreg
-{
-  unsigned short int significand[4];
-  unsigned short int exponent;
-  unsigned short int padding[3];
-};
-
-struct _libc_xmmreg
-{
-  __uint32_t	element[4];
-};
-
-struct _libc_fpstate
-{
-  /* 64-bit FXSAVE format.  */
-  __uint16_t		cwd;
-  __uint16_t		swd;
-  __uint16_t		ftw;
-  __uint16_t		fop;
-  __uint64_t		rip;
-  __uint64_t		rdp;
-  __uint32_t		mxcsr;
-  __uint32_t		mxcr_mask;
-  struct _libc_fpxreg	_st[8];
-  struct _libc_xmmreg	_xmm[16];
-  __uint32_t		padding[24];
-};
-
-/* Structure to describe FPU registers.  */
-typedef struct _libc_fpstate *fpregset_t;
-
-/* Context to describe whole processor state.  */
-typedef struct
-  {
-    gregset_t gregs;
-    /* Note that fpregs is a pointer.  */
-    fpregset_t fpregs;
-    __extension__ unsigned long long __reserved1 [8];
-} 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;
-    struct _libc_fpstate __fpregs_mem;
-  } ucontext_t;
-
-#else /* !__x86_64__ */
-
-/* Type for general register.  */
-typedef int greg_t;
-
-/* Number of general registers.  */
-#define NGREG	19
-
-/* Container for all general registers.  */
-typedef greg_t gregset_t[NGREG];
-
-#ifdef __USE_GNU
-/* Number of each register is the `gregset_t' array.  */
-enum
-{
-  REG_GS = 0,
-# define REG_GS		REG_GS
-  REG_FS,
-# define REG_FS		REG_FS
-  REG_ES,
-# define REG_ES		REG_ES
-  REG_DS,
-# define REG_DS		REG_DS
-  REG_EDI,
-# define REG_EDI	REG_EDI
-  REG_ESI,
-# define REG_ESI	REG_ESI
-  REG_EBP,
-# define REG_EBP	REG_EBP
-  REG_ESP,
-# define REG_ESP	REG_ESP
-  REG_EBX,
-# define REG_EBX	REG_EBX
-  REG_EDX,
-# define REG_EDX	REG_EDX
-  REG_ECX,
-# define REG_ECX	REG_ECX
-  REG_EAX,
-# define REG_EAX	REG_EAX
-  REG_TRAPNO,
-# define REG_TRAPNO	REG_TRAPNO
-  REG_ERR,
-# define REG_ERR	REG_ERR
-  REG_EIP,
-# define REG_EIP	REG_EIP
-  REG_CS,
-# define REG_CS		REG_CS
-  REG_EFL,
-# define REG_EFL	REG_EFL
-  REG_UESP,
-# define REG_UESP	REG_UESP
-  REG_SS
-# define REG_SS	REG_SS
-};
-#endif
-
-/* Definitions taken from the kernel headers.  */
-struct _libc_fpreg
-{
-  unsigned short int significand[4];
-  unsigned short int exponent;
-};
-
-struct _libc_fpstate
-{
-  unsigned long int cw;
-  unsigned long int sw;
-  unsigned long int tag;
-  unsigned long int ipoff;
-  unsigned long int cssel;
-  unsigned long int dataoff;
-  unsigned long int datasel;
-  struct _libc_fpreg _st[8];
-  unsigned long int status;
-};
-
-/* Structure to describe FPU registers.  */
-typedef struct _libc_fpstate *fpregset_t;
-
-/* Context to describe whole processor state.  */
-typedef struct
-  {
-    gregset_t gregs;
-    /* Due to Linux's history we have to use a pointer here.  The SysV/i386
-       ABI requires a struct with the values.  */
-    fpregset_t fpregs;
-    unsigned long int oldmask;
-    unsigned long int cr2;
-  } 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;
-    struct _libc_fpstate __fpregs_mem;
-  } ucontext_t;
-
-#endif /* !__x86_64__ */
-
-#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/user.h b/sysdeps/unix/sysv/linux/x86_64/sys/user.h
deleted file mode 100644
index 9db2937..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/sys/user.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Copyright (C) 2001-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_USER_H
-#define _SYS_USER_H	1
-
-/* 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.  */
-
-#ifdef __x86_64__
-
-struct user_fpregs_struct
-{
-  unsigned short int	cwd;
-  unsigned short int	swd;
-  unsigned short int	ftw;
-  unsigned short int	fop;
-  __extension__ unsigned long long int rip;
-  __extension__ unsigned long long int rdp;
-  unsigned int		mxcsr;
-  unsigned int		mxcr_mask;
-  unsigned int		st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
-  unsigned int		xmm_space[64];  /* 16*16 bytes for each XMM-reg = 256 bytes */
-  unsigned int		padding[24];
-};
-
-struct user_regs_struct
-{
-  __extension__ unsigned long long int r15;
-  __extension__ unsigned long long int r14;
-  __extension__ unsigned long long int r13;
-  __extension__ unsigned long long int r12;
-  __extension__ unsigned long long int rbp;
-  __extension__ unsigned long long int rbx;
-  __extension__ unsigned long long int r11;
-  __extension__ unsigned long long int r10;
-  __extension__ unsigned long long int r9;
-  __extension__ unsigned long long int r8;
-  __extension__ unsigned long long int rax;
-  __extension__ unsigned long long int rcx;
-  __extension__ unsigned long long int rdx;
-  __extension__ unsigned long long int rsi;
-  __extension__ unsigned long long int rdi;
-  __extension__ unsigned long long int orig_rax;
-  __extension__ unsigned long long int rip;
-  __extension__ unsigned long long int cs;
-  __extension__ unsigned long long int eflags;
-  __extension__ unsigned long long int rsp;
-  __extension__ unsigned long long int ss;
-  __extension__ unsigned long long int fs_base;
-  __extension__ unsigned long long int gs_base;
-  __extension__ unsigned long long int ds;
-  __extension__ unsigned long long int es;
-  __extension__ unsigned long long int fs;
-  __extension__ unsigned long long int gs;
-};
-
-struct user
-{
-  struct user_regs_struct	regs;
-  int				u_fpvalid;
-  struct user_fpregs_struct	i387;
-  __extension__ unsigned long long int	u_tsize;
-  __extension__ unsigned long long int	u_dsize;
-  __extension__ unsigned long long int	u_ssize;
-  __extension__ unsigned long long int	start_code;
-  __extension__ unsigned long long int	start_stack;
-  __extension__ long long int		signal;
-  int				reserved;
-  __extension__ union
-    {
-      struct user_regs_struct*	u_ar0;
-      __extension__ unsigned long long int	__u_ar0_word;
-    };
-  __extension__ union
-    {
-      struct user_fpregs_struct*	u_fpstate;
-      __extension__ unsigned long long int	__u_fpstate_word;
-    };
-  __extension__ unsigned long long int	magic;
-  char				u_comm [32];
-  __extension__ unsigned long long int	u_debugreg [8];
-};
-
-#else
-/* These are the 32-bit x86 structures.  */
-struct user_fpregs_struct
-{
-  long int cwd;
-  long int swd;
-  long int twd;
-  long int fip;
-  long int fcs;
-  long int foo;
-  long int fos;
-  long int st_space [20];
-};
-
-struct user_fpxregs_struct
-{
-  unsigned short int cwd;
-  unsigned short int swd;
-  unsigned short int twd;
-  unsigned short int fop;
-  long int fip;
-  long int fcs;
-  long int foo;
-  long int fos;
-  long int mxcsr;
-  long int reserved;
-  long int st_space[32];   /* 8*16 bytes for each FP-reg = 128 bytes */
-  long int xmm_space[32];  /* 8*16 bytes for each XMM-reg = 128 bytes */
-  long int padding[56];
-};
-
-struct user_regs_struct
-{
-  long int ebx;
-  long int ecx;
-  long int edx;
-  long int esi;
-  long int edi;
-  long int ebp;
-  long int eax;
-  long int xds;
-  long int xes;
-  long int xfs;
-  long int xgs;
-  long int orig_eax;
-  long int eip;
-  long int xcs;
-  long int eflags;
-  long int esp;
-  long int xss;
-};
-
-struct user
-{
-  struct user_regs_struct	regs;
-  int				u_fpvalid;
-  struct user_fpregs_struct	i387;
-  unsigned long int		u_tsize;
-  unsigned long int		u_dsize;
-  unsigned long int		u_ssize;
-  unsigned long int		start_code;
-  unsigned long int		start_stack;
-  long int			signal;
-  int				reserved;
-  struct user_regs_struct*	u_ar0;
-  struct user_fpregs_struct*	u_fpstate;
-  unsigned long int		magic;
-  char				u_comm [32];
-  int				u_debugreg [8];
-};
-#endif  /* __x86_64__ */
-
-#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_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
-
-#endif	/* _SYS_USER_H */
diff --git a/sysdeps/x86/bits/byteswap-16.h b/sysdeps/x86/bits/byteswap-16.h
new file mode 100644
index 0000000..584eb86
--- /dev/null
+++ b/sysdeps/x86/bits/byteswap-16.h
@@ -0,0 +1,49 @@
+/* Macros to swap the order of bytes in 16-bit integer values.
+   Copyright (C) 2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_BYTESWAP_H
+# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
+#endif
+
+#ifdef __GNUC__
+# if __GNUC__ >= 2
+#  define __bswap_16(x) \
+     (__extension__							      \
+      ({ register unsigned short int __v, __x = (unsigned short int) (x);     \
+	 if (__builtin_constant_p (__x))				      \
+	   __v = __bswap_constant_16 (__x);				      \
+	 else								      \
+	   __asm__ ("rorw $8, %w0"					      \
+		    : "=r" (__v)					      \
+		    : "0" (__x)						      \
+		    : "cc");						      \
+	 __v; }))
+# else
+/* This is better than nothing.  */
+#  define __bswap_16(x) \
+     (__extension__							      \
+      ({ register unsigned short int __x = (unsigned short int) (x);	      \
+	 __bswap_constant_16 (__x); }))
+# endif
+#else
+static __inline unsigned short int
+__bswap_16 (unsigned short int __bsx)
+{
+  return __bswap_constant_16 (__bsx);
+}
+#endif
diff --git a/sysdeps/x86/bits/byteswap.h b/sysdeps/x86/bits/byteswap.h
new file mode 100644
index 0000000..4178439
--- /dev/null
+++ b/sysdeps/x86/bits/byteswap.h
@@ -0,0 +1,154 @@
+/* Macros to swap the order of bytes in integer values.
+   Copyright (C) 1997-2012   Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
+
+#ifndef _BITS_BYTESWAP_H
+#define _BITS_BYTESWAP_H 1
+
+#include <features.h>
+#include <bits/wordsize.h>
+
+/* Swap bytes in 16 bit value.  */
+#define __bswap_constant_16(x) \
+     ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
+
+/* Get __bswap_16.  */
+#include <bits/byteswap-16.h>
+
+/* Swap bytes in 32 bit value.  */
+#define __bswap_constant_32(x) \
+     ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |		      \
+      (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
+
+#ifdef __GNUC__
+# if __GNUC_PREREQ (4, 2)
+static __inline unsigned int
+__bswap_32 (unsigned int __bsx)
+{
+  return __builtin_bswap32 (__bsx);
+}
+# elif __GNUC__ >= 2
+#  if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__	      \
+			   || defined __pentiumpro__ || defined __pentium4__  \
+			   || defined __k8__ || defined __athlon__	      \
+			   || defined __k6__ || defined __nocona__	      \
+			   || defined __core2__ || defined __geode__	      \
+			   || defined __amdfam10__)
+/* To swap the bytes in a word the i486 processors and up provide the
+   `bswap' opcode.  On i386 we have to use three instructions.  */
+#   define __bswap_32(x) \
+      (__extension__							      \
+       ({ register unsigned int __v, __x = (x);				      \
+	  if (__builtin_constant_p (__x))				      \
+	    __v = __bswap_constant_32 (__x);				      \
+	  else								      \
+	    __asm__ ("bswap %0" : "=r" (__v) : "0" (__x));		      \
+	  __v; }))
+#  else
+#   define __bswap_32(x)						      \
+      (__extension__							      \
+       ({ register unsigned int __v, __x = (x);				      \
+	  if (__builtin_constant_p (__x))				      \
+	    __v = __bswap_constant_32 (__x);				      \
+	  else								      \
+	    __asm__ ("rorw $8, %w0;"					      \
+		     "rorl $16, %0;"					      \
+		     "rorw $8, %w0"					      \
+		     : "=r" (__v)					      \
+		     : "0" (__x)					      \
+		     : "cc");						      \
+	  __v; }))
+#  endif
+# else
+#  define __bswap_32(x) \
+     (__extension__							      \
+      ({ register unsigned int __x = (x); __bswap_constant_32 (__x); }))
+# endif
+#else
+static __inline unsigned int
+__bswap_32 (unsigned int __bsx)
+{
+  return __bswap_constant_32 (__bsx);
+}
+#endif
+
+
+#if __GNUC_PREREQ (2, 0)
+/* Swap bytes in 64 bit value.  */
+# define __bswap_constant_64(x) \
+     (__extension__ ((((x) & 0xff00000000000000ull) >> 56)		      \
+		     | (((x) & 0x00ff000000000000ull) >> 40)		      \
+		     | (((x) & 0x0000ff0000000000ull) >> 24)		      \
+		     | (((x) & 0x000000ff00000000ull) >> 8)		      \
+		     | (((x) & 0x00000000ff000000ull) << 8)		      \
+		     | (((x) & 0x0000000000ff0000ull) << 24)		      \
+		     | (((x) & 0x000000000000ff00ull) << 40)		      \
+		     | (((x) & 0x00000000000000ffull) << 56)))
+
+# if __GNUC_PREREQ (4, 2)
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+  return __builtin_bswap64 (__bsx);
+}
+# elif __WORDSIZE == 64
+#  define __bswap_64(x) \
+     (__extension__							      \
+      ({ register unsigned long __v, __x = (x);				      \
+	 if (__builtin_constant_p (__x))				      \
+	   __v = __bswap_constant_64 (__x);				      \
+	 else								      \
+	   __asm__ ("bswap %q0" : "=r" (__v) : "0" (__x));		      \
+	 __v; }))
+# else
+#  define __bswap_64(x) \
+     (__extension__                                                           \
+      ({ union { __extension__ unsigned long long int __ll;                   \
+		 unsigned int __l[2]; } __w, __r;                             \
+	 if (__builtin_constant_p (x))                                        \
+	   __r.__ll = __bswap_constant_64 (x);                                \
+	 else                                                                 \
+	   {                                                                  \
+	     __w.__ll = (x);                                                  \
+	     __r.__l[0] = __bswap_32 (__w.__l[1]);                            \
+	     __r.__l[1] = __bswap_32 (__w.__l[0]);                            \
+	   }                                                                  \
+	 __r.__ll; }))
+# endif
+#elif __GLIBC_HAVE_LONG_LONG
+# define __bswap_constant_64(x) \
+     ((((x) & 0xff00000000000000ull) >> 56)				      \
+      | (((x) & 0x00ff000000000000ull) >> 40)				      \
+      | (((x) & 0x0000ff0000000000ull) >> 24)				      \
+      | (((x) & 0x000000ff00000000ull) >> 8)				      \
+      | (((x) & 0x00000000ff000000ull) << 8)				      \
+      | (((x) & 0x0000000000ff0000ull) << 24)				      \
+      | (((x) & 0x000000000000ff00ull) << 40)				      \
+      | (((x) & 0x00000000000000ffull) << 56))
+
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+  return __bswap_constant_64 (__bsx);
+}
+#endif
+
+#endif /* _BITS_BYTESWAP_H */
diff --git a/sysdeps/x86/bits/endian.h b/sysdeps/x86/bits/endian.h
new file mode 100644
index 0000000..2f59ead
--- /dev/null
+++ b/sysdeps/x86/bits/endian.h
@@ -0,0 +1,7 @@
+/* x86_64 is little-endian.  */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/x86/bits/huge_vall.h b/sysdeps/x86/bits/huge_vall.h
new file mode 100644
index 0000000..7e9c24d
--- /dev/null
+++ b/sysdeps/x86/bits/huge_vall.h
@@ -0,0 +1,42 @@
+/* `HUGE_VALL' constant for ix86 (where it is infinity).
+   Used by <stdlib.h> and <math.h> functions for overflow.
+   Copyright (C) 1992, 1995, 1996, 1997, 1999, 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
+#endif
+
+#if __GNUC_PREREQ(3,3)
+# define HUGE_VALL	(__builtin_huge_vall())
+#elif __GNUC_PREREQ(2,96)
+# define HUGE_VALL	(__extension__ 0x1.0p32767L)
+#else
+
+# define __HUGE_VALL_bytes	{ 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
+
+# define __huge_vall_t	union { unsigned char __c[12]; long double __ld; }
+# ifdef __GNUC__
+#  define HUGE_VALL	(__extension__ \
+			 ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
+# else	/* Not GCC.  */
+static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
+#  define HUGE_VALL	(__huge_vall.__ld)
+#  endif /* GCC.  */
+
+#endif /* GCC 2.95 */
diff --git a/sysdeps/x86/bits/link.h b/sysdeps/x86/bits/link.h
new file mode 100644
index 0000000..fa20910
--- /dev/null
+++ b/sysdeps/x86/bits/link.h
@@ -0,0 +1,147 @@
+/* Copyright (C) 2004, 2005, 2009, 2011 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef	_LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+
+#ifndef __x86_64__
+/* Registers for entry into PLT on IA-32.  */
+typedef struct La_i86_regs
+{
+  uint32_t lr_edx;
+  uint32_t lr_ecx;
+  uint32_t lr_eax;
+  uint32_t lr_ebp;
+  uint32_t lr_esp;
+} La_i86_regs;
+
+/* Return values for calls from PLT on IA-32.  */
+typedef struct La_i86_retval
+{
+  uint32_t lrv_eax;
+  uint32_t lrv_edx;
+  long double lrv_st0;
+  long double lrv_st1;
+} La_i86_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+				       uintptr_t *__refcook,
+				       uintptr_t *__defcook,
+				       La_i86_regs *__regs,
+				       unsigned int *__flags,
+				       const char *__symname,
+				       long int *__framesizep);
+extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+					uintptr_t *__refcook,
+					uintptr_t *__defcook,
+					const La_i86_regs *__inregs,
+					La_i86_retval *__outregs,
+					const char *symname);
+
+__END_DECLS
+
+#else
+
+/* Registers for entry into PLT on x86-64.  */
+# if __GNUC_PREREQ (4,0)
+typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16)));
+typedef float La_x86_64_ymm
+    __attribute__ ((__vector_size__ (32), __aligned__ (16)));
+# else
+typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__)));
+# endif
+
+typedef union
+{
+# if __GNUC_PREREQ (4,0)
+  La_x86_64_ymm ymm[2];
+# endif
+  La_x86_64_xmm xmm[4];
+} La_x86_64_vector __attribute__ ((__aligned__ (16)));
+
+typedef struct La_x86_64_regs
+{
+  uint64_t lr_rdx;
+  uint64_t lr_r8;
+  uint64_t lr_r9;
+  uint64_t lr_rcx;
+  uint64_t lr_rsi;
+  uint64_t lr_rdi;
+  uint64_t lr_rbp;
+  uint64_t lr_rsp;
+  La_x86_64_xmm lr_xmm[8];
+  La_x86_64_vector lr_vector[8];
+} La_x86_64_regs;
+
+/* Return values for calls from PLT on x86-64.  */
+typedef struct La_x86_64_retval
+{
+  uint64_t lrv_rax;
+  uint64_t lrv_rdx;
+  La_x86_64_xmm lrv_xmm0;
+  La_x86_64_xmm lrv_xmm1;
+  long double lrv_st0;
+  long double lrv_st1;
+  La_x86_64_vector lrv_vector0;
+  La_x86_64_vector lrv_vector1;
+} La_x86_64_retval;
+
+#define La_x32_regs La_x86_64_regs
+#define La_x32_retval La_x86_64_retval
+
+__BEGIN_DECLS
+
+extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym,
+					  unsigned int __ndx,
+					  uintptr_t *__refcook,
+					  uintptr_t *__defcook,
+					  La_x86_64_regs *__regs,
+					  unsigned int *__flags,
+					  const char *__symname,
+					  long int *__framesizep);
+extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym,
+					   unsigned int __ndx,
+					   uintptr_t *__refcook,
+					   uintptr_t *__defcook,
+					   const La_x86_64_regs *__inregs,
+					   La_x86_64_retval *__outregs,
+					   const char *__symname);
+
+extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym,
+				       unsigned int __ndx,
+				       uintptr_t *__refcook,
+				       uintptr_t *__defcook,
+				       La_x32_regs *__regs,
+				       unsigned int *__flags,
+				       const char *__symname,
+				       long int *__framesizep);
+extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym,
+					unsigned int __ndx,
+					uintptr_t *__refcook,
+					uintptr_t *__defcook,
+					const La_x32_regs *__inregs,
+					La_x32_retval *__outregs,
+					const char *__symname);
+
+__END_DECLS
+
+#endif
diff --git a/sysdeps/x86/bits/linkmap.h b/sysdeps/x86/bits/linkmap.h
new file mode 100644
index 0000000..dd0d140
--- /dev/null
+++ b/sysdeps/x86/bits/linkmap.h
@@ -0,0 +1,16 @@
+#if __WORDSIZE == 64
+struct link_map_machine
+  {
+    Elf64_Addr plt; /* Address of .plt + 0x16 */
+    Elf64_Addr gotplt; /* Address of .got + 0x18 */
+    void *tlsdesc_table; /* Address of TLS descriptor hash table.  */
+  };
+
+#else
+struct link_map_machine
+  {
+    Elf32_Addr plt; /* Address of .plt + 0x16 */
+    Elf32_Addr gotplt; /* Address of .got + 0x0c */
+    void *tlsdesc_table; /* Address of TLS descriptor hash table.  */
+  };
+#endif
diff --git a/sysdeps/x86/bits/mathdef.h b/sysdeps/x86/bits/mathdef.h
new file mode 100644
index 0000000..c202ad5
--- /dev/null
+++ b/sysdeps/x86/bits/mathdef.h
@@ -0,0 +1,59 @@
+/* Copyright (C) 2001-2012 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#if !defined _MATH_H && !defined _COMPLEX_H
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
+# define _MATH_H_MATHDEF	1
+
+# if defined __x86_64__ || (defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0)
+/* The x86-64 architecture computes values with the precission of the
+   used type.  Similarly for -m32 -mfpmath=sse.  */
+typedef float float_t;		/* `float' expressions are evaluated as `float'.  */
+typedef double double_t;	/* `double' expressions are evaluated
+				   as `double'.  */
+# else
+/* The ix87 FPUs evaluate all values in the 80 bit floating-point format
+   which is also available for the user as `long double'.  Therefore we
+   define:  */
+typedef long double float_t;	/* `float' expressions are evaluated as
+				   `long double'.  */
+typedef long double double_t;	/* `double' expressions are evaluated as
+				   `long double'.  */
+# endif
+
+/* The values returned by `ilogb' for 0 and NaN respectively.  */
+# define FP_ILOGB0	(-2147483647 - 1)
+# define FP_ILOGBNAN	(-2147483647 - 1)
+
+/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+   builtins are supported.  */
+# if __FP_FAST_FMA
+#  define FP_FAST_FMA 1
+# endif
+
+# if __FP_FAST_FMAF
+#  define FP_FAST_FMAF 1
+# endif
+
+# if __FP_FAST_FMAL
+#  define FP_FAST_FMAL 1
+# endif
+
+#endif	/* ISO C99 */
diff --git a/sysdeps/x86/bits/select.h b/sysdeps/x86/bits/select.h
new file mode 100644
index 0000000..439a914
--- /dev/null
+++ b/sysdeps/x86/bits/select.h
@@ -0,0 +1,63 @@
+/* Copyright (C) 1997-1999,2001,2008,2009,2011 Free Software 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_SELECT_H
+# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+
+#if defined __GNUC__ && __GNUC__ >= 2
+
+# if __WORDSIZE == 64
+#  define __FD_ZERO_STOS "stosq"
+# else
+#  define __FD_ZERO_STOS "stosl"
+# endif
+
+# define __FD_ZERO(fdsp) \
+  do {									      \
+    int __d0, __d1;							      \
+    __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS			      \
+			  : "=c" (__d0), "=D" (__d1)			      \
+			  : "a" (0), "0" (sizeof (fd_set)		      \
+					  / sizeof (__fd_mask)),	      \
+			    "1" (&__FDS_BITS (fdsp)[0])			      \
+			  : "memory");					      \
+  } while (0)
+
+#else	/* ! GNU CC */
+
+/* We don't use `memset' because this would require a prototype and
+   the array isn't too big.  */
+# define __FD_ZERO(set)  \
+  do {									      \
+    unsigned int __i;							      \
+    fd_set *__arr = (set);						      \
+    for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i)	      \
+      __FDS_BITS (__arr)[__i] = 0;					      \
+  } while (0)
+
+#endif	/* GNU CC */
+
+#define __FD_SET(d, set) \
+  ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)))
+#define __FD_CLR(d, set) \
+  ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)))
+#define __FD_ISSET(d, set) \
+  ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
diff --git a/sysdeps/x86/bits/setjmp.h b/sysdeps/x86/bits/setjmp.h
new file mode 100644
index 0000000..bb6920d
--- /dev/null
+++ b/sysdeps/x86/bits/setjmp.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Define the machine-dependent type `jmp_buf'.  x86-64 version.  */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H  1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+#ifndef _ASM
+
+# if __WORDSIZE == 64
+typedef long int __jmp_buf[8];
+# elif defined  __x86_64__
+typedef long long int __jmp_buf[8];
+# else
+typedef int __jmp_buf[6];
+# endif
+
+#endif
+
+#endif  /* bits/setjmp.h */
diff --git a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h
new file mode 100644
index 0000000..0ca5fe2
--- /dev/null
+++ b/sysdeps/x86/bits/string.h
@@ -0,0 +1,25 @@
+/* Optimized, inlined string functions.  AMD x86-64 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _STRING_H
+# error "Never use <bits/string.h> directly; include <string.h> instead."
+#endif
+
+/* Currently the only purpose of this file is to tell the generic inline
+   macros that unaligned memory access is possible for x86-64.  */
+#define _STRING_ARCH_unaligned	1
diff --git a/sysdeps/x86/bits/wordsize.h b/sysdeps/x86/bits/wordsize.h
new file mode 100644
index 0000000..e25af28
--- /dev/null
+++ b/sysdeps/x86/bits/wordsize.h
@@ -0,0 +1,13 @@
+/* Determine the wordsize from the preprocessor defines.  */
+
+#if defined __x86_64__ && !defined __ILP32__
+# define __WORDSIZE	64
+#else
+# define __WORDSIZE	32
+#endif
+
+#ifdef __x86_64__
+# define __WORDSIZE_TIME64_COMPAT32	1
+/* Both x86-64 and x32 use the 64-bit system call interface.  */
+# define __SYSCALL_WORDSIZE		64
+#endif
diff --git a/sysdeps/x86/bits/xtitypes.h b/sysdeps/x86/bits/xtitypes.h
new file mode 100644
index 0000000..853c090
--- /dev/null
+++ b/sysdeps/x86/bits/xtitypes.h
@@ -0,0 +1,33 @@
+/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>.  x86-64.
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _STROPTS_H
+# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
+#endif
+
+#ifndef _BITS_XTITYPES_H
+#define _BITS_XTITYPES_H	1
+
+#include <bits/types.h>
+
+/* This type is used by some structs in <bits/stropts.h>.  */
+typedef __SLONG32_TYPE __t_scalar_t;
+typedef __ULONG32_TYPE __t_uscalar_t;
+
+
+#endif /* bits/xtitypes.h */
diff --git a/sysdeps/x86_64/Implies b/sysdeps/x86_64/Implies
index c8d7d2d..811c19a 100644
--- a/sysdeps/x86_64/Implies
+++ b/sysdeps/x86_64/Implies
@@ -1,3 +1,4 @@
+x86
 ieee754/ldbl-96
 ieee754/dbl-64/wordsize-64
 ieee754/dbl-64
diff --git a/sysdeps/x86_64/bits/byteswap-16.h b/sysdeps/x86_64/bits/byteswap-16.h
deleted file mode 100644
index 584eb86..0000000
--- a/sysdeps/x86_64/bits/byteswap-16.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Macros to swap the order of bytes in 16-bit integer values.
-   Copyright (C) 2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _BITS_BYTESWAP_H
-# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
-#endif
-
-#ifdef __GNUC__
-# if __GNUC__ >= 2
-#  define __bswap_16(x) \
-     (__extension__							      \
-      ({ register unsigned short int __v, __x = (unsigned short int) (x);     \
-	 if (__builtin_constant_p (__x))				      \
-	   __v = __bswap_constant_16 (__x);				      \
-	 else								      \
-	   __asm__ ("rorw $8, %w0"					      \
-		    : "=r" (__v)					      \
-		    : "0" (__x)						      \
-		    : "cc");						      \
-	 __v; }))
-# else
-/* This is better than nothing.  */
-#  define __bswap_16(x) \
-     (__extension__							      \
-      ({ register unsigned short int __x = (unsigned short int) (x);	      \
-	 __bswap_constant_16 (__x); }))
-# endif
-#else
-static __inline unsigned short int
-__bswap_16 (unsigned short int __bsx)
-{
-  return __bswap_constant_16 (__bsx);
-}
-#endif
diff --git a/sysdeps/x86_64/bits/byteswap.h b/sysdeps/x86_64/bits/byteswap.h
deleted file mode 100644
index 4178439..0000000
--- a/sysdeps/x86_64/bits/byteswap.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Macros to swap the order of bytes in integer values.
-   Copyright (C) 1997-2012   Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
-# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
-#endif
-
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H 1
-
-#include <features.h>
-#include <bits/wordsize.h>
-
-/* Swap bytes in 16 bit value.  */
-#define __bswap_constant_16(x) \
-     ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
-
-/* Get __bswap_16.  */
-#include <bits/byteswap-16.h>
-
-/* Swap bytes in 32 bit value.  */
-#define __bswap_constant_32(x) \
-     ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |		      \
-      (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
-
-#ifdef __GNUC__
-# if __GNUC_PREREQ (4, 2)
-static __inline unsigned int
-__bswap_32 (unsigned int __bsx)
-{
-  return __builtin_bswap32 (__bsx);
-}
-# elif __GNUC__ >= 2
-#  if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__	      \
-			   || defined __pentiumpro__ || defined __pentium4__  \
-			   || defined __k8__ || defined __athlon__	      \
-			   || defined __k6__ || defined __nocona__	      \
-			   || defined __core2__ || defined __geode__	      \
-			   || defined __amdfam10__)
-/* To swap the bytes in a word the i486 processors and up provide the
-   `bswap' opcode.  On i386 we have to use three instructions.  */
-#   define __bswap_32(x) \
-      (__extension__							      \
-       ({ register unsigned int __v, __x = (x);				      \
-	  if (__builtin_constant_p (__x))				      \
-	    __v = __bswap_constant_32 (__x);				      \
-	  else								      \
-	    __asm__ ("bswap %0" : "=r" (__v) : "0" (__x));		      \
-	  __v; }))
-#  else
-#   define __bswap_32(x)						      \
-      (__extension__							      \
-       ({ register unsigned int __v, __x = (x);				      \
-	  if (__builtin_constant_p (__x))				      \
-	    __v = __bswap_constant_32 (__x);				      \
-	  else								      \
-	    __asm__ ("rorw $8, %w0;"					      \
-		     "rorl $16, %0;"					      \
-		     "rorw $8, %w0"					      \
-		     : "=r" (__v)					      \
-		     : "0" (__x)					      \
-		     : "cc");						      \
-	  __v; }))
-#  endif
-# else
-#  define __bswap_32(x) \
-     (__extension__							      \
-      ({ register unsigned int __x = (x); __bswap_constant_32 (__x); }))
-# endif
-#else
-static __inline unsigned int
-__bswap_32 (unsigned int __bsx)
-{
-  return __bswap_constant_32 (__bsx);
-}
-#endif
-
-
-#if __GNUC_PREREQ (2, 0)
-/* Swap bytes in 64 bit value.  */
-# define __bswap_constant_64(x) \
-     (__extension__ ((((x) & 0xff00000000000000ull) >> 56)		      \
-		     | (((x) & 0x00ff000000000000ull) >> 40)		      \
-		     | (((x) & 0x0000ff0000000000ull) >> 24)		      \
-		     | (((x) & 0x000000ff00000000ull) >> 8)		      \
-		     | (((x) & 0x00000000ff000000ull) << 8)		      \
-		     | (((x) & 0x0000000000ff0000ull) << 24)		      \
-		     | (((x) & 0x000000000000ff00ull) << 40)		      \
-		     | (((x) & 0x00000000000000ffull) << 56)))
-
-# if __GNUC_PREREQ (4, 2)
-static __inline unsigned long long int
-__bswap_64 (unsigned long long int __bsx)
-{
-  return __builtin_bswap64 (__bsx);
-}
-# elif __WORDSIZE == 64
-#  define __bswap_64(x) \
-     (__extension__							      \
-      ({ register unsigned long __v, __x = (x);				      \
-	 if (__builtin_constant_p (__x))				      \
-	   __v = __bswap_constant_64 (__x);				      \
-	 else								      \
-	   __asm__ ("bswap %q0" : "=r" (__v) : "0" (__x));		      \
-	 __v; }))
-# else
-#  define __bswap_64(x) \
-     (__extension__                                                           \
-      ({ union { __extension__ unsigned long long int __ll;                   \
-		 unsigned int __l[2]; } __w, __r;                             \
-	 if (__builtin_constant_p (x))                                        \
-	   __r.__ll = __bswap_constant_64 (x);                                \
-	 else                                                                 \
-	   {                                                                  \
-	     __w.__ll = (x);                                                  \
-	     __r.__l[0] = __bswap_32 (__w.__l[1]);                            \
-	     __r.__l[1] = __bswap_32 (__w.__l[0]);                            \
-	   }                                                                  \
-	 __r.__ll; }))
-# endif
-#elif __GLIBC_HAVE_LONG_LONG
-# define __bswap_constant_64(x) \
-     ((((x) & 0xff00000000000000ull) >> 56)				      \
-      | (((x) & 0x00ff000000000000ull) >> 40)				      \
-      | (((x) & 0x0000ff0000000000ull) >> 24)				      \
-      | (((x) & 0x000000ff00000000ull) >> 8)				      \
-      | (((x) & 0x00000000ff000000ull) << 8)				      \
-      | (((x) & 0x0000000000ff0000ull) << 24)				      \
-      | (((x) & 0x000000000000ff00ull) << 40)				      \
-      | (((x) & 0x00000000000000ffull) << 56))
-
-static __inline unsigned long long int
-__bswap_64 (unsigned long long int __bsx)
-{
-  return __bswap_constant_64 (__bsx);
-}
-#endif
-
-#endif /* _BITS_BYTESWAP_H */
diff --git a/sysdeps/x86_64/bits/endian.h b/sysdeps/x86_64/bits/endian.h
deleted file mode 100644
index 2f59ead..0000000
--- a/sysdeps/x86_64/bits/endian.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* x86_64 is little-endian.  */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/x86_64/bits/link.h b/sysdeps/x86_64/bits/link.h
deleted file mode 100644
index fa20910..0000000
--- a/sysdeps/x86_64/bits/link.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* Copyright (C) 2004, 2005, 2009, 2011 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef	_LINK_H
-# error "Never include <bits/link.h> directly; use <link.h> instead."
-#endif
-
-
-#ifndef __x86_64__
-/* Registers for entry into PLT on IA-32.  */
-typedef struct La_i86_regs
-{
-  uint32_t lr_edx;
-  uint32_t lr_ecx;
-  uint32_t lr_eax;
-  uint32_t lr_ebp;
-  uint32_t lr_esp;
-} La_i86_regs;
-
-/* Return values for calls from PLT on IA-32.  */
-typedef struct La_i86_retval
-{
-  uint32_t lrv_eax;
-  uint32_t lrv_edx;
-  long double lrv_st0;
-  long double lrv_st1;
-} La_i86_retval;
-
-
-__BEGIN_DECLS
-
-extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
-				       uintptr_t *__refcook,
-				       uintptr_t *__defcook,
-				       La_i86_regs *__regs,
-				       unsigned int *__flags,
-				       const char *__symname,
-				       long int *__framesizep);
-extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
-					uintptr_t *__refcook,
-					uintptr_t *__defcook,
-					const La_i86_regs *__inregs,
-					La_i86_retval *__outregs,
-					const char *symname);
-
-__END_DECLS
-
-#else
-
-/* Registers for entry into PLT on x86-64.  */
-# if __GNUC_PREREQ (4,0)
-typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16)));
-typedef float La_x86_64_ymm
-    __attribute__ ((__vector_size__ (32), __aligned__ (16)));
-# else
-typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__)));
-# endif
-
-typedef union
-{
-# if __GNUC_PREREQ (4,0)
-  La_x86_64_ymm ymm[2];
-# endif
-  La_x86_64_xmm xmm[4];
-} La_x86_64_vector __attribute__ ((__aligned__ (16)));
-
-typedef struct La_x86_64_regs
-{
-  uint64_t lr_rdx;
-  uint64_t lr_r8;
-  uint64_t lr_r9;
-  uint64_t lr_rcx;
-  uint64_t lr_rsi;
-  uint64_t lr_rdi;
-  uint64_t lr_rbp;
-  uint64_t lr_rsp;
-  La_x86_64_xmm lr_xmm[8];
-  La_x86_64_vector lr_vector[8];
-} La_x86_64_regs;
-
-/* Return values for calls from PLT on x86-64.  */
-typedef struct La_x86_64_retval
-{
-  uint64_t lrv_rax;
-  uint64_t lrv_rdx;
-  La_x86_64_xmm lrv_xmm0;
-  La_x86_64_xmm lrv_xmm1;
-  long double lrv_st0;
-  long double lrv_st1;
-  La_x86_64_vector lrv_vector0;
-  La_x86_64_vector lrv_vector1;
-} La_x86_64_retval;
-
-#define La_x32_regs La_x86_64_regs
-#define La_x32_retval La_x86_64_retval
-
-__BEGIN_DECLS
-
-extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym,
-					  unsigned int __ndx,
-					  uintptr_t *__refcook,
-					  uintptr_t *__defcook,
-					  La_x86_64_regs *__regs,
-					  unsigned int *__flags,
-					  const char *__symname,
-					  long int *__framesizep);
-extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym,
-					   unsigned int __ndx,
-					   uintptr_t *__refcook,
-					   uintptr_t *__defcook,
-					   const La_x86_64_regs *__inregs,
-					   La_x86_64_retval *__outregs,
-					   const char *__symname);
-
-extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym,
-				       unsigned int __ndx,
-				       uintptr_t *__refcook,
-				       uintptr_t *__defcook,
-				       La_x32_regs *__regs,
-				       unsigned int *__flags,
-				       const char *__symname,
-				       long int *__framesizep);
-extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym,
-					unsigned int __ndx,
-					uintptr_t *__refcook,
-					uintptr_t *__defcook,
-					const La_x32_regs *__inregs,
-					La_x32_retval *__outregs,
-					const char *__symname);
-
-__END_DECLS
-
-#endif
diff --git a/sysdeps/x86_64/bits/linkmap.h b/sysdeps/x86_64/bits/linkmap.h
deleted file mode 100644
index dd0d140..0000000
--- a/sysdeps/x86_64/bits/linkmap.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#if __WORDSIZE == 64
-struct link_map_machine
-  {
-    Elf64_Addr plt; /* Address of .plt + 0x16 */
-    Elf64_Addr gotplt; /* Address of .got + 0x18 */
-    void *tlsdesc_table; /* Address of TLS descriptor hash table.  */
-  };
-
-#else
-struct link_map_machine
-  {
-    Elf32_Addr plt; /* Address of .plt + 0x16 */
-    Elf32_Addr gotplt; /* Address of .got + 0x0c */
-    void *tlsdesc_table; /* Address of TLS descriptor hash table.  */
-  };
-#endif
diff --git a/sysdeps/x86_64/bits/mathdef.h b/sysdeps/x86_64/bits/mathdef.h
deleted file mode 100644
index c202ad5..0000000
--- a/sysdeps/x86_64/bits/mathdef.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 2001-2012 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#if !defined _MATH_H && !defined _COMPLEX_H
-# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
-#endif
-
-#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
-# define _MATH_H_MATHDEF	1
-
-# if defined __x86_64__ || (defined __FLT_EVAL_METHOD__ && __FLT_EVAL_METHOD__ == 0)
-/* The x86-64 architecture computes values with the precission of the
-   used type.  Similarly for -m32 -mfpmath=sse.  */
-typedef float float_t;		/* `float' expressions are evaluated as `float'.  */
-typedef double double_t;	/* `double' expressions are evaluated
-				   as `double'.  */
-# else
-/* The ix87 FPUs evaluate all values in the 80 bit floating-point format
-   which is also available for the user as `long double'.  Therefore we
-   define:  */
-typedef long double float_t;	/* `float' expressions are evaluated as
-				   `long double'.  */
-typedef long double double_t;	/* `double' expressions are evaluated as
-				   `long double'.  */
-# endif
-
-/* The values returned by `ilogb' for 0 and NaN respectively.  */
-# define FP_ILOGB0	(-2147483647 - 1)
-# define FP_ILOGBNAN	(-2147483647 - 1)
-
-/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
-   builtins are supported.  */
-# if __FP_FAST_FMA
-#  define FP_FAST_FMA 1
-# endif
-
-# if __FP_FAST_FMAF
-#  define FP_FAST_FMAF 1
-# endif
-
-# if __FP_FAST_FMAL
-#  define FP_FAST_FMAL 1
-# endif
-
-#endif	/* ISO C99 */
diff --git a/sysdeps/x86_64/bits/select.h b/sysdeps/x86_64/bits/select.h
deleted file mode 100644
index 439a914..0000000
--- a/sysdeps/x86_64/bits/select.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (C) 1997-1999,2001,2008,2009,2011 Free Software 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SYS_SELECT_H
-# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
-#endif
-
-#include <bits/wordsize.h>
-
-
-#if defined __GNUC__ && __GNUC__ >= 2
-
-# if __WORDSIZE == 64
-#  define __FD_ZERO_STOS "stosq"
-# else
-#  define __FD_ZERO_STOS "stosl"
-# endif
-
-# define __FD_ZERO(fdsp) \
-  do {									      \
-    int __d0, __d1;							      \
-    __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS			      \
-			  : "=c" (__d0), "=D" (__d1)			      \
-			  : "a" (0), "0" (sizeof (fd_set)		      \
-					  / sizeof (__fd_mask)),	      \
-			    "1" (&__FDS_BITS (fdsp)[0])			      \
-			  : "memory");					      \
-  } while (0)
-
-#else	/* ! GNU CC */
-
-/* We don't use `memset' because this would require a prototype and
-   the array isn't too big.  */
-# define __FD_ZERO(set)  \
-  do {									      \
-    unsigned int __i;							      \
-    fd_set *__arr = (set);						      \
-    for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i)	      \
-      __FDS_BITS (__arr)[__i] = 0;					      \
-  } while (0)
-
-#endif	/* GNU CC */
-
-#define __FD_SET(d, set) \
-  ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)))
-#define __FD_CLR(d, set) \
-  ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)))
-#define __FD_ISSET(d, set) \
-  ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
diff --git a/sysdeps/x86_64/bits/setjmp.h b/sysdeps/x86_64/bits/setjmp.h
deleted file mode 100644
index bb6920d..0000000
--- a/sysdeps/x86_64/bits/setjmp.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* Define the machine-dependent type `jmp_buf'.  x86-64 version.  */
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H  1
-
-#if !defined _SETJMP_H && !defined _PTHREAD_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-#include <bits/wordsize.h>
-
-#ifndef _ASM
-
-# if __WORDSIZE == 64
-typedef long int __jmp_buf[8];
-# elif defined  __x86_64__
-typedef long long int __jmp_buf[8];
-# else
-typedef int __jmp_buf[6];
-# endif
-
-#endif
-
-#endif  /* bits/setjmp.h */
diff --git a/sysdeps/x86_64/bits/string.h b/sysdeps/x86_64/bits/string.h
deleted file mode 100644
index 0ca5fe2..0000000
--- a/sysdeps/x86_64/bits/string.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Optimized, inlined string functions.  AMD x86-64 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _STRING_H
-# error "Never use <bits/string.h> directly; include <string.h> instead."
-#endif
-
-/* Currently the only purpose of this file is to tell the generic inline
-   macros that unaligned memory access is possible for x86-64.  */
-#define _STRING_ARCH_unaligned	1
diff --git a/sysdeps/x86_64/bits/wordsize.h b/sysdeps/x86_64/bits/wordsize.h
deleted file mode 100644
index e25af28..0000000
--- a/sysdeps/x86_64/bits/wordsize.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Determine the wordsize from the preprocessor defines.  */
-
-#if defined __x86_64__ && !defined __ILP32__
-# define __WORDSIZE	64
-#else
-# define __WORDSIZE	32
-#endif
-
-#ifdef __x86_64__
-# define __WORDSIZE_TIME64_COMPAT32	1
-/* Both x86-64 and x32 use the 64-bit system call interface.  */
-# define __SYSCALL_WORDSIZE		64
-#endif
diff --git a/sysdeps/x86_64/bits/xtitypes.h b/sysdeps/x86_64/bits/xtitypes.h
deleted file mode 100644
index 853c090..0000000
--- a/sysdeps/x86_64/bits/xtitypes.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>.  x86-64.
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _STROPTS_H
-# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
-#endif
-
-#ifndef _BITS_XTITYPES_H
-#define _BITS_XTITYPES_H	1
-
-#include <bits/types.h>
-
-/* This type is used by some structs in <bits/stropts.h>.  */
-typedef __SLONG32_TYPE __t_scalar_t;
-typedef __ULONG32_TYPE __t_uscalar_t;
-
-
-#endif /* bits/xtitypes.h */
-- 
1.7.6.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]