aboutsummaryrefslogtreecommitdiff
path: root/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits
diff options
context:
space:
mode:
Diffstat (limited to 'REORG.TODO/sysdeps/unix/sysv/linux/x86/bits')
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/a.out.h11
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/environments.h105
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/epoll.h29
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/fcntl.h61
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h33
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/mman.h45
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/msq.h82
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sem.h86
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/shm.h109
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h196
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h17
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/stat.h210
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sysctl.h20
-rw-r--r--REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/typesizes.h95
14 files changed, 1099 insertions, 0 deletions
diff --git a/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/a.out.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/a.out.h
new file mode 100644
index 0000000000..0e4a7c911f
--- /dev/null
+++ b/REORG.TODO/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/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/environments.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/environments.h
new file mode 100644
index 0000000000..2fc65cf9ec
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/environments.h
@@ -0,0 +1,105 @@
+/* Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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 */
+
+/* We have 32-bit wide `int', `long int' and pointers and all platforms
+ support LFS. -mx32 has 64-bit wide `off_t'. */
+# define _POSIX_V7_ILP32_OFFBIG 1
+# define _POSIX_V6_ILP32_OFFBIG 1
+# define _XBS5_ILP32_OFFBIG 1
+
+# ifndef __x86_64__
+/* -m32 has 32-bit wide `off_t'. */
+# define _POSIX_V7_ILP32_OFF32 1
+# define _POSIX_V6_ILP32_OFF32 1
+# define _XBS5_ILP32_OFF32 1
+# endif
+
+/* 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_OFF32_LDFLAGS "-m32"
+#if defined __x86_64__ && defined __ILP32__
+# define __ILP32_OFFBIG_CFLAGS "-mx32"
+# define __ILP32_OFFBIG_LDFLAGS "-mx32"
+#else
+# define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+# define __ILP32_OFFBIG_LDFLAGS "-m32"
+#endif
+#define __LP64_OFF64_CFLAGS "-m64"
+#define __LP64_OFF64_LDFLAGS "-m64"
diff --git a/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/epoll.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/epoll.h
new file mode 100644
index 0000000000..96c9403619
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/epoll.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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
+ };
+
+#define __EPOLL_PACKED __attribute__ ((__packed__))
diff --git a/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/fcntl.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
new file mode 100644
index 0000000000..2cf690c9a6
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
@@ -0,0 +1,61 @@
+/* O_*, F_*, FD_* bit values for Linux/x86.
+ Copyright (C) 2001-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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
+
+#ifdef __x86_64__
+# define __O_LARGEFILE 0
+#endif
+
+#ifdef __x86_64__
+/* 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). */
+#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
+
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h
new file mode 100644
index 0000000000..486b0148c1
--- /dev/null
+++ b/REORG.TODO/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-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/mman.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/mman.h
new file mode 100644
index 0000000000..017abf2f29
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/mman.h
@@ -0,0 +1,45 @@
+/* Definitions for POSIX memory map interface. Linux/x86_64 version.
+ Copyright (C) 2001-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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. */
+
+/* Other flags. */
+#ifdef __USE_MISC
+# 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
+
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
diff --git a/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/msq.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/msq.h
new file mode 100644
index 0000000000..78b575c740
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/msq.h
@@ -0,0 +1,82 @@
+/* Copyright (C) 1995-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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 */
+# define MSG_COPY 040000 /* copy (not remove) all queue messages */
+#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 __glibc_reserved1;
+#endif
+ __time_t msg_rtime; /* time of last msgrcv command */
+#ifndef __x86_64__
+ unsigned long int __glibc_reserved2;
+#endif
+ __time_t msg_ctime; /* time of last change */
+#ifndef __x86_64__
+ unsigned long int __glibc_reserved3;
+#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 __glibc_reserved4;
+ __syscall_ulong_t __glibc_reserved5;
+};
+
+#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/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sem.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sem.h
new file mode 100644
index 0000000000..b3e0047dd2
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sem.h
@@ -0,0 +1,86 @@
+/* Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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 __glibc_reserved1;
+ __time_t sem_ctime; /* last time changed by semctl() */
+ __syscall_ulong_t __glibc_reserved2;
+ __syscall_ulong_t sem_nsems; /* number of semaphores in set */
+ __syscall_ulong_t __glibc_reserved3;
+ __syscall_ulong_t __glibc_reserved4;
+};
+
+/* 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/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/shm.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/shm.h
new file mode 100644
index 0000000000..5f8e2e1575
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/shm.h
@@ -0,0 +1,109 @@
+/* Copyright (C) 1995-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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 __glibc_reserved1;
+#endif
+ __time_t shm_dtime; /* time of last shmdt() */
+#ifndef __x86_64__
+ unsigned long int __glibc_reserved2;
+#endif
+ __time_t shm_ctime; /* time of last change by shmctl() */
+#ifndef __x86_64__
+ unsigned long int __glibc_reserved3;
+#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 __glibc_reserved4;
+ __syscall_ulong_t __glibc_reserved5;
+ };
+
+#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 __glibc_reserved1;
+ __syscall_ulong_t __glibc_reserved2;
+ __syscall_ulong_t __glibc_reserved3;
+ __syscall_ulong_t __glibc_reserved4;
+ };
+
+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/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
new file mode 100644
index 0000000000..cff595b94a
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
@@ -0,0 +1,196 @@
+/* Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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
+
+#include <bits/types.h>
+
+#define FP_XSTATE_MAGIC1 0x46505853U
+#define FP_XSTATE_MAGIC2 0x46505845U
+#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2)
+
+struct _fpx_sw_bytes
+{
+ __uint32_t magic1;
+ __uint32_t extended_size;
+ __uint64_t xstate_bv;
+ __uint32_t xstate_size;
+ __uint32_t __glibc_reserved1[7];
+};
+
+struct _fpreg
+{
+ unsigned short significand[4];
+ unsigned short exponent;
+};
+
+struct _fpxreg
+{
+ unsigned short significand[4];
+ unsigned short exponent;
+ unsigned short __glibc_reserved1[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 __glibc_reserved1;
+ struct _fpxreg _fxsr_st[8];
+ struct _xmmreg _xmm[8];
+ __uint32_t __glibc_reserved2[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
+
+#define X86_FXSR_MAGIC 0x0000
+
+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 __glibc_reserved1[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__ */
+
+struct _xsave_hdr
+{
+ __uint64_t xstate_bv;
+ __uint64_t __glibc_reserved1[2];
+ __uint64_t __glibc_reserved2[5];
+};
+
+struct _ymmh_state
+{
+ __uint32_t ymmh_space[64];
+};
+
+struct _xstate
+{
+ struct _fpstate fpstate;
+ struct _xsave_hdr xstate_hdr;
+ struct _ymmh_state ymmh;
+};
+
+#endif /* _BITS_SIGCONTEXT_H */
diff --git a/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h
new file mode 100644
index 0000000000..7688a8d66d
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h
@@ -0,0 +1,17 @@
+/* Architecture-specific adjustments to siginfo_t. x86 version. */
+#ifndef _BITS_SIGINFO_ARCH_H
+#define _BITS_SIGINFO_ARCH_H 1
+
+#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. Note: with some compilers, the alignment
+ attribute would be ignored if it were put in __SI_CLOCK_T instead
+ of encapsulated in a typedef. */
+typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
+# define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
+# define __SI_CLOCK_T __sigchld_clock_t
+#endif
+
+#endif
diff --git a/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/stat.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/stat.h
new file mode 100644
index 0000000000..5a44b40c86
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/stat.h
@@ -0,0 +1,210 @@
+/* Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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. */
+#ifndef __x86_64__
+# define _STAT_VER_LINUX_OLD 1
+# define _STAT_VER_KERNEL 1
+# 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_KERNEL 0
+# 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
+#ifdef __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 __glibc_reserved[3];
+#else
+# ifndef __USE_FILE_OFFSET64
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+# 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. */
+# ifdef __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. */
+# 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 __glibc_reserved[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/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sysctl.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sysctl.h
new file mode 100644
index 0000000000..399261a2c9
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/sysctl.h
@@ -0,0 +1,20 @@
+/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/typesizes.h b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
new file mode 100644
index 0000000000..73962eb859
--- /dev/null
+++ b/REORG.TODO/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
@@ -0,0 +1,95 @@
+/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+ Copyright (C) 2012-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License 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
+# define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
+#else
+# define __NLINK_T_TYPE __UWORD_TYPE
+# define __FSWORD_T_TYPE __SWORD_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 __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 __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
+#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
+
+#ifdef __x86_64__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+
+/* Same for ino_t and ino64_t. */
+# define __INO_T_MATCHES_INO64_T 1
+
+/* And for __rlim_t and __rlim64_t. */
+# define __RLIM_T_MATCHES_RLIM64_T 1
+#else
+# define __RLIM_T_MATCHES_RLIM64_T 0
+#endif
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+
+#endif /* bits/typesizes.h */