summaryrefslogtreecommitdiff
path: root/libc/sysdeps/unix
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-06-01 13:59:14 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-06-01 13:59:14 +0000
commitb7c6870709b68725080ae00a7accbc0463bce578 (patch)
tree9aa0ce26dbefc4af68aa3682ebab046a8fe8414b /libc/sysdeps/unix
parent69731ab373b0196a860cee9bed9790c2f9ac43c9 (diff)
Merge changes between r18863 and r18892 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@18893 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/unix')
-rw-r--r--libc/sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/bits/a.out.h3
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/bits/environments.h67
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h321
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/bits/mman.h112
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/bits/wchar.h15
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/sys/elf.h10
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/sys/procfs.h130
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/sys/ucontext.h128
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/sys/user.h102
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/sys/vm86.h8
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/a.out.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/environments.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/epoll.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/fcntl.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/mman.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/msq.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/msq.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/sem.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/sem.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/shm.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/siginfo.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/stat.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h)8
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/sysctl.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h)3
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/sys/procfs.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/sys/ucontext.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86/sys/user.h (renamed from libc/sysdeps/unix/sysv/linux/x86_64/sys/user.h)0
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/sys/io.h41
28 files changed, 52 insertions, 898 deletions
diff --git a/libc/sysdeps/unix/sysv/linux/Makefile b/libc/sysdeps/unix/sysv/linux/Makefile
index 21b560790..ddae6862b 100644
--- a/libc/sysdeps/unix/sysv/linux/Makefile
+++ b/libc/sysdeps/unix/sysv/linux/Makefile
@@ -36,7 +36,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/a.out.h sys/inotify.h sys/signalfd.h sys/eventfd.h \
sys/timerfd.h sys/fanotify.h bits/eventfd.h bits/inotify.h \
bits/signalfd.h bits/timerfd.h bits/epoll.h \
- bits/socket_type.h bits/syscall.h
+ bits/socket_type.h bits/syscall.h bits/sysctl.h
tests += tst-clone
diff --git a/libc/sysdeps/unix/sysv/linux/i386/bits/a.out.h b/libc/sysdeps/unix/sysv/linux/i386/bits/a.out.h
deleted file mode 100644
index 0fb52c381..000000000
--- a/libc/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/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h b/libc/sysdeps/unix/sysv/linux/i386/bits/environments.h
deleted file mode 100644
index d4afd1294..000000000
--- a/libc/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/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
deleted file mode 100644
index 5406b4cd0..000000000
--- a/libc/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/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h b/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h
deleted file mode 100644
index 2bc2ca9d3..000000000
--- a/libc/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/libc/sysdeps/unix/sysv/linux/i386/bits/wchar.h b/libc/sysdeps/unix/sysv/linux/i386/bits/wchar.h
index b94fc7a3f..ec0f34a47 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/bits/wchar.h
+++ b/libc/sysdeps/unix/sysv/linux/i386/bits/wchar.h
@@ -1,5 +1,5 @@
-/* wchar_t type related definitions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+/* wchar_t type related definitions. i386/x86-64 version.
+ 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
@@ -19,7 +19,14 @@
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H 1
-#define __WCHAR_MIN (-2147483647l - 1l)
-#define __WCHAR_MAX (2147483647l)
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 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/libc/sysdeps/unix/sysv/linux/i386/sys/elf.h b/libc/sysdeps/unix/sysv/linux/i386/sys/elf.h
index 9d64e9768..1f4524cba 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/sys/elf.h
+++ b/libc/sysdeps/unix/sysv/linux/i386/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* 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
@@ -18,8 +18,12 @@
#ifndef _SYS_ELF_H
#define _SYS_ELF_H 1
-#warning "This header is obsolete; use <sys/procfs.h> instead."
+#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>
+# include <sys/procfs.h>
+#endif
#endif /* _SYS_ELF_H */
diff --git a/libc/sysdeps/unix/sysv/linux/i386/sys/procfs.h b/libc/sysdeps/unix/sysv/linux/i386/sys/procfs.h
deleted file mode 100644
index 673baa1ec..000000000
--- a/libc/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/libc/sysdeps/unix/sysv/linux/i386/sys/ucontext.h b/libc/sysdeps/unix/sysv/linux/i386/sys/ucontext.h
deleted file mode 100644
index 6306623ab..000000000
--- a/libc/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/libc/sysdeps/unix/sysv/linux/i386/sys/user.h b/libc/sysdeps/unix/sysv/linux/i386/sys/user.h
deleted file mode 100644
index e426afed6..000000000
--- a/libc/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/libc/sysdeps/unix/sysv/linux/i386/sys/vm86.h b/libc/sysdeps/unix/sysv/linux/i386/sys/vm86.h
index cd2ac0716..c41b55d7b 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/sys/vm86.h
+++ b/libc/sysdeps/unix/sysv/linux/i386/sys/vm86.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc.
+/* 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
@@ -20,8 +20,11 @@
#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>
+# include <asm/vm86.h>
__BEGIN_DECLS
@@ -30,5 +33,6 @@ extern int vm86 (unsigned long int __subfunction,
struct vm86plus_struct *__info) __THROW;
__END_DECLS
+# endif
#endif /* _SYS_VM86_H */
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h b/libc/sysdeps/unix/sysv/linux/x86/bits/a.out.h
index 0e4a7c911..0e4a7c911 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/a.out.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h b/libc/sysdeps/unix/sysv/linux/x86/bits/environments.h
index 793a04fdb..793a04fdb 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/environments.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/environments.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h b/libc/sysdeps/unix/sysv/linux/x86/bits/epoll.h
index be1f5a636..be1f5a636 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/epoll.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/epoll.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/libc/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
index 9fa5ecb72..9fa5ecb72 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h b/libc/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h
index 7c242adfa..7c242adfa 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/ipctypes.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/ipctypes.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/libc/sysdeps/unix/sysv/linux/x86/bits/mman.h
index 28b91603c..28b91603c 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/mman.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/msq.h b/libc/sysdeps/unix/sysv/linux/x86/bits/msq.h
index 7f2350074..7f2350074 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/msq.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/msq.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/sem.h b/libc/sysdeps/unix/sysv/linux/x86/bits/sem.h
index 92bbceff9..92bbceff9 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/sem.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h b/libc/sysdeps/unix/sysv/linux/x86/bits/shm.h
index cba25ed25..cba25ed25 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/shm.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h b/libc/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
index 2e05e6528..2e05e6528 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/siginfo.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h b/libc/sysdeps/unix/sysv/linux/x86/bits/stat.h
index 691c4370e..e4c0b24ee 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/stat.h
@@ -23,9 +23,9 @@
#define _BITS_STAT_H 1
/* Versions of the `struct stat' data structure. */
-#define _STAT_VER_KERNEL 0
-
#ifndef __x86_64__
+# define _STAT_VER_LINUX_OLD 1
+# define _STAT_VER_KERNEL 1
# define _STAT_VER_SVR4 2
# define _STAT_VER_LINUX 3
@@ -34,6 +34,7 @@
# 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. */
@@ -151,9 +152,6 @@ struct stat64
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. */
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h b/libc/sysdeps/unix/sysv/linux/x86/bits/sysctl.h
index 520ccb97e..520ccb97e 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/sysctl.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/sysctl.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h b/libc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
index a52a1d3f6..be8985b4c 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
@@ -43,8 +43,10 @@
#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
@@ -57,7 +59,6 @@
#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
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h b/libc/sysdeps/unix/sysv/linux/x86/sys/procfs.h
index d7a0c88cd..d7a0c88cd 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/sys/procfs.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h b/libc/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
index 7a3938cbc..7a3938cbc 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sys/user.h b/libc/sysdeps/unix/sysv/linux/x86/sys/user.h
index 9db293713..9db293713 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sys/user.h
+++ b/libc/sysdeps/unix/sysv/linux/x86/sys/user.h
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sys/io.h b/libc/sysdeps/unix/sysv/linux/x86_64/sys/io.h
index d8fc27190..534b6d3a0 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sys/io.h
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/sys/io.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2000, 2002, 2009 Free Software Foundation, Inc.
+/* 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
@@ -133,45 +133,48 @@ outl_p (unsigned int __value, unsigned short int __port)
}
static __inline void
-insb (unsigned short int __port, void *addr, unsigned long int __count)
+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));
+ __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)
+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));
+ __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)
+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));
+ __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)
+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));
+ __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)
+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));
+ __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)
+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));
+ __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
+ :"d" (__port), "0" (__addr), "1" (__count));
}
#endif /* GNU C */