summaryrefslogtreecommitdiff
path: root/bits
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-12-27 14:48:14 +0000
committerJakub Jelinek <jakub@redhat.com>2005-12-27 14:48:14 +0000
commit64cd3e83c9993f3c1a3c24ea3030a22ccf35e12d (patch)
tree8808fad08bb8677b0e0d2158c65096eae5484767 /bits
parente3173d2c996d8e30dfe44e9bf530881da6df6aaa (diff)
Updated to fedora-glibc-20051227T1426
Diffstat (limited to 'bits')
-rw-r--r--bits/byteswap.h87
-rw-r--r--bits/confname.h601
-rw-r--r--bits/dlfcn.h65
-rw-r--r--bits/environments.h78
-rw-r--r--bits/link.h1
-rw-r--r--bits/linkmap.h4
-rw-r--r--bits/mman.h97
-rw-r--r--bits/types.h200
-rw-r--r--bits/waitstatus.h106
9 files changed, 1239 insertions, 0 deletions
diff --git a/bits/byteswap.h b/bits/byteswap.h
new file mode 100644
index 0000000000..949ed0bc9d
--- /dev/null
+++ b/bits/byteswap.h
@@ -0,0 +1,87 @@
+/* Macros to swap the order of bytes in integer values.
+ Copyright (C) 1997,1998,2000,2001,2002,2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_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) \
+ ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
+
+#ifdef __GNUC__
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); }))
+#else
+static __inline unsigned short int
+__bswap_16 (unsigned short int __bsx)
+{
+ return __bswap_constant_16 (__bsx);
+}
+#endif
+
+/* Swap bytes in 32 bit value. */
+#define __bswap_constant_32(x) \
+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \
+ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
+
+#ifdef __GNUC__
+# define __bswap_32(x) \
+ (__extension__ \
+ ({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); }))
+#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) \
+ ((((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 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
+
+#endif /* _BITS_BYTESWAP_H */
diff --git a/bits/confname.h b/bits/confname.h
new file mode 100644
index 0000000000..8947d48ed7
--- /dev/null
+++ b/bits/confname.h
@@ -0,0 +1,601 @@
+/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
+ Copyright (C) 1993,1995-1998,2000,2001,2003,2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _UNISTD_H
+# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
+#endif
+
+/* Values for the NAME argument to `pathconf' and `fpathconf'. */
+enum
+ {
+ _PC_LINK_MAX,
+#define _PC_LINK_MAX _PC_LINK_MAX
+ _PC_MAX_CANON,
+#define _PC_MAX_CANON _PC_MAX_CANON
+ _PC_MAX_INPUT,
+#define _PC_MAX_INPUT _PC_MAX_INPUT
+ _PC_NAME_MAX,
+#define _PC_NAME_MAX _PC_NAME_MAX
+ _PC_PATH_MAX,
+#define _PC_PATH_MAX _PC_PATH_MAX
+ _PC_PIPE_BUF,
+#define _PC_PIPE_BUF _PC_PIPE_BUF
+ _PC_CHOWN_RESTRICTED,
+#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED
+ _PC_NO_TRUNC,
+#define _PC_NO_TRUNC _PC_NO_TRUNC
+ _PC_VDISABLE,
+#define _PC_VDISABLE _PC_VDISABLE
+ _PC_SYNC_IO,
+#define _PC_SYNC_IO _PC_SYNC_IO
+ _PC_ASYNC_IO,
+#define _PC_ASYNC_IO _PC_ASYNC_IO
+ _PC_PRIO_IO,
+#define _PC_PRIO_IO _PC_PRIO_IO
+ _PC_SOCK_MAXBUF,
+#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
+ _PC_FILESIZEBITS,
+#define _PC_FILESIZEBITS _PC_FILESIZEBITS
+ _PC_REC_INCR_XFER_SIZE,
+#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
+ _PC_REC_MAX_XFER_SIZE,
+#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
+ _PC_REC_MIN_XFER_SIZE,
+#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
+ _PC_REC_XFER_ALIGN,
+#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
+ _PC_ALLOC_SIZE_MIN,
+#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN
+ _PC_SYMLINK_MAX,
+#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX
+ _PC_2_SYMLINKS
+#define _PC_2_SYMLINKS _PC_2_SYMLINKS
+ };
+
+/* Values for the argument to `sysconf'. */
+enum
+ {
+ _SC_ARG_MAX,
+#define _SC_ARG_MAX _SC_ARG_MAX
+ _SC_CHILD_MAX,
+#define _SC_CHILD_MAX _SC_CHILD_MAX
+ _SC_CLK_TCK,
+#define _SC_CLK_TCK _SC_CLK_TCK
+ _SC_NGROUPS_MAX,
+#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX
+ _SC_OPEN_MAX,
+#define _SC_OPEN_MAX _SC_OPEN_MAX
+ _SC_STREAM_MAX,
+#define _SC_STREAM_MAX _SC_STREAM_MAX
+ _SC_TZNAME_MAX,
+#define _SC_TZNAME_MAX _SC_TZNAME_MAX
+ _SC_JOB_CONTROL,
+#define _SC_JOB_CONTROL _SC_JOB_CONTROL
+ _SC_SAVED_IDS,
+#define _SC_SAVED_IDS _SC_SAVED_IDS
+ _SC_REALTIME_SIGNALS,
+#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
+ _SC_PRIORITY_SCHEDULING,
+#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
+ _SC_TIMERS,
+#define _SC_TIMERS _SC_TIMERS
+ _SC_ASYNCHRONOUS_IO,
+#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
+ _SC_PRIORITIZED_IO,
+#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO
+ _SC_SYNCHRONIZED_IO,
+#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
+ _SC_FSYNC,
+#define _SC_FSYNC _SC_FSYNC
+ _SC_MAPPED_FILES,
+#define _SC_MAPPED_FILES _SC_MAPPED_FILES
+ _SC_MEMLOCK,
+#define _SC_MEMLOCK _SC_MEMLOCK
+ _SC_MEMLOCK_RANGE,
+#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
+ _SC_MEMORY_PROTECTION,
+#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
+ _SC_MESSAGE_PASSING,
+#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING
+ _SC_SEMAPHORES,
+#define _SC_SEMAPHORES _SC_SEMAPHORES
+ _SC_SHARED_MEMORY_OBJECTS,
+#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
+ _SC_AIO_LISTIO_MAX,
+#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
+ _SC_AIO_MAX,
+#define _SC_AIO_MAX _SC_AIO_MAX
+ _SC_AIO_PRIO_DELTA_MAX,
+#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX
+ _SC_DELAYTIMER_MAX,
+#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX
+ _SC_MQ_OPEN_MAX,
+#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX
+ _SC_MQ_PRIO_MAX,
+#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX
+ _SC_VERSION,
+#define _SC_VERSION _SC_VERSION
+ _SC_PAGESIZE,
+#define _SC_PAGESIZE _SC_PAGESIZE
+#define _SC_PAGE_SIZE _SC_PAGESIZE
+ _SC_RTSIG_MAX,
+#define _SC_RTSIG_MAX _SC_RTSIG_MAX
+ _SC_SEM_NSEMS_MAX,
+#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX
+ _SC_SEM_VALUE_MAX,
+#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX
+ _SC_SIGQUEUE_MAX,
+#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX
+ _SC_TIMER_MAX,
+#define _SC_TIMER_MAX _SC_TIMER_MAX
+
+ /* Values for the argument to `sysconf'
+ corresponding to _POSIX2_* symbols. */
+ _SC_BC_BASE_MAX,
+#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX
+ _SC_BC_DIM_MAX,
+#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX
+ _SC_BC_SCALE_MAX,
+#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX
+ _SC_BC_STRING_MAX,
+#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX
+ _SC_COLL_WEIGHTS_MAX,
+#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX
+ _SC_EQUIV_CLASS_MAX,
+#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX
+ _SC_EXPR_NEST_MAX,
+#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX
+ _SC_LINE_MAX,
+#define _SC_LINE_MAX _SC_LINE_MAX
+ _SC_RE_DUP_MAX,
+#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX
+ _SC_CHARCLASS_NAME_MAX,
+#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX
+
+ _SC_2_VERSION,
+#define _SC_2_VERSION _SC_2_VERSION
+ _SC_2_C_BIND,
+#define _SC_2_C_BIND _SC_2_C_BIND
+ _SC_2_C_DEV,
+#define _SC_2_C_DEV _SC_2_C_DEV
+ _SC_2_FORT_DEV,
+#define _SC_2_FORT_DEV _SC_2_FORT_DEV
+ _SC_2_FORT_RUN,
+#define _SC_2_FORT_RUN _SC_2_FORT_RUN
+ _SC_2_SW_DEV,
+#define _SC_2_SW_DEV _SC_2_SW_DEV
+ _SC_2_LOCALEDEF,
+#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF
+
+ _SC_PII,
+#define _SC_PII _SC_PII
+ _SC_PII_XTI,
+#define _SC_PII_XTI _SC_PII_XTI
+ _SC_PII_SOCKET,
+#define _SC_PII_SOCKET _SC_PII_SOCKET
+ _SC_PII_INTERNET,
+#define _SC_PII_INTERNET _SC_PII_INTERNET
+ _SC_PII_OSI,
+#define _SC_PII_OSI _SC_PII_OSI
+ _SC_POLL,
+#define _SC_POLL _SC_POLL
+ _SC_SELECT,
+#define _SC_SELECT _SC_SELECT
+ _SC_UIO_MAXIOV,
+#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV
+ _SC_IOV_MAX = _SC_UIO_MAXIOV,
+#define _SC_IOV_MAX _SC_IOV_MAX
+ _SC_PII_INTERNET_STREAM,
+#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM
+ _SC_PII_INTERNET_DGRAM,
+#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM
+ _SC_PII_OSI_COTS,
+#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS
+ _SC_PII_OSI_CLTS,
+#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS
+ _SC_PII_OSI_M,
+#define _SC_PII_OSI_M _SC_PII_OSI_M
+ _SC_T_IOV_MAX,
+#define _SC_T_IOV_MAX _SC_T_IOV_MAX
+
+ /* Values according to POSIX 1003.1c (POSIX threads). */
+ _SC_THREADS,
+#define _SC_THREADS _SC_THREADS
+ _SC_THREAD_SAFE_FUNCTIONS,
+#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
+ _SC_GETGR_R_SIZE_MAX,
+#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
+ _SC_GETPW_R_SIZE_MAX,
+#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
+ _SC_LOGIN_NAME_MAX,
+#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX
+ _SC_TTY_NAME_MAX,
+#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
+ _SC_THREAD_DESTRUCTOR_ITERATIONS,
+#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS
+ _SC_THREAD_KEYS_MAX,
+#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX
+ _SC_THREAD_STACK_MIN,
+#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN
+ _SC_THREAD_THREADS_MAX,
+#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX
+ _SC_THREAD_ATTR_STACKADDR,
+#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
+ _SC_THREAD_ATTR_STACKSIZE,
+#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
+ _SC_THREAD_PRIORITY_SCHEDULING,
+#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
+ _SC_THREAD_PRIO_INHERIT,
+#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
+ _SC_THREAD_PRIO_PROTECT,
+#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
+ _SC_THREAD_PROCESS_SHARED,
+#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED
+
+ _SC_NPROCESSORS_CONF,
+#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
+ _SC_NPROCESSORS_ONLN,
+#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
+ _SC_PHYS_PAGES,
+#define _SC_PHYS_PAGES _SC_PHYS_PAGES
+ _SC_AVPHYS_PAGES,
+#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES
+ _SC_ATEXIT_MAX,
+#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX
+ _SC_PASS_MAX,
+#define _SC_PASS_MAX _SC_PASS_MAX
+
+ _SC_XOPEN_VERSION,
+#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION
+ _SC_XOPEN_XCU_VERSION,
+#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
+ _SC_XOPEN_UNIX,
+#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX
+ _SC_XOPEN_CRYPT,
+#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT
+ _SC_XOPEN_ENH_I18N,
+#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
+ _SC_XOPEN_SHM,
+#define _SC_XOPEN_SHM _SC_XOPEN_SHM
+
+ _SC_2_CHAR_TERM,
+#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM
+ _SC_2_C_VERSION,
+#define _SC_2_C_VERSION _SC_2_C_VERSION
+ _SC_2_UPE,
+#define _SC_2_UPE _SC_2_UPE
+
+ _SC_XOPEN_XPG2,
+#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2
+ _SC_XOPEN_XPG3,
+#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3
+ _SC_XOPEN_XPG4,
+#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4
+
+ _SC_CHAR_BIT,
+#define _SC_CHAR_BIT _SC_CHAR_BIT
+ _SC_CHAR_MAX,
+#define _SC_CHAR_MAX _SC_CHAR_MAX
+ _SC_CHAR_MIN,
+#define _SC_CHAR_MIN _SC_CHAR_MIN
+ _SC_INT_MAX,
+#define _SC_INT_MAX _SC_INT_MAX
+ _SC_INT_MIN,
+#define _SC_INT_MIN _SC_INT_MIN
+ _SC_LONG_BIT,
+#define _SC_LONG_BIT _SC_LONG_BIT
+ _SC_WORD_BIT,
+#define _SC_WORD_BIT _SC_WORD_BIT
+ _SC_MB_LEN_MAX,
+#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX
+ _SC_NZERO,
+#define _SC_NZERO _SC_NZERO
+ _SC_SSIZE_MAX,
+#define _SC_SSIZE_MAX _SC_SSIZE_MAX
+ _SC_SCHAR_MAX,
+#define _SC_SCHAR_MAX _SC_SCHAR_MAX
+ _SC_SCHAR_MIN,
+#define _SC_SCHAR_MIN _SC_SCHAR_MIN
+ _SC_SHRT_MAX,
+#define _SC_SHRT_MAX _SC_SHRT_MAX
+ _SC_SHRT_MIN,
+#define _SC_SHRT_MIN _SC_SHRT_MIN
+ _SC_UCHAR_MAX,
+#define _SC_UCHAR_MAX _SC_UCHAR_MAX
+ _SC_UINT_MAX,
+#define _SC_UINT_MAX _SC_UINT_MAX
+ _SC_ULONG_MAX,
+#define _SC_ULONG_MAX _SC_ULONG_MAX
+ _SC_USHRT_MAX,
+#define _SC_USHRT_MAX _SC_USHRT_MAX
+
+ _SC_NL_ARGMAX,
+#define _SC_NL_ARGMAX _SC_NL_ARGMAX
+ _SC_NL_LANGMAX,
+#define _SC_NL_LANGMAX _SC_NL_LANGMAX
+ _SC_NL_MSGMAX,
+#define _SC_NL_MSGMAX _SC_NL_MSGMAX
+ _SC_NL_NMAX,
+#define _SC_NL_NMAX _SC_NL_NMAX
+ _SC_NL_SETMAX,
+#define _SC_NL_SETMAX _SC_NL_SETMAX
+ _SC_NL_TEXTMAX,
+#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX
+
+ _SC_XBS5_ILP32_OFF32,
+#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
+ _SC_XBS5_ILP32_OFFBIG,
+#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
+ _SC_XBS5_LP64_OFF64,
+#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64
+ _SC_XBS5_LPBIG_OFFBIG,
+#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG
+
+ _SC_XOPEN_LEGACY,
+#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
+ _SC_XOPEN_REALTIME,
+#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
+ _SC_XOPEN_REALTIME_THREADS,
+#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
+
+ _SC_ADVISORY_INFO,
+#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
+ _SC_BARRIERS,
+#define _SC_BARRIERS _SC_BARRIERS
+ _SC_BASE,
+#define _SC_BASE _SC_BASE
+ _SC_C_LANG_SUPPORT,
+#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
+ _SC_C_LANG_SUPPORT_R,
+#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
+ _SC_CLOCK_SELECTION,
+#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
+ _SC_CPUTIME,
+#define _SC_CPUTIME _SC_CPUTIME
+ _SC_THREAD_CPUTIME,
+#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
+ _SC_DEVICE_IO,
+#define _SC_DEVICE_IO _SC_DEVICE_IO
+ _SC_DEVICE_SPECIFIC,
+#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
+ _SC_DEVICE_SPECIFIC_R,
+#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
+ _SC_FD_MGMT,
+#define _SC_FD_MGMT _SC_FD_MGMT
+ _SC_FIFO,
+#define _SC_FIFO _SC_FIFO
+ _SC_PIPE,
+#define _SC_PIPE _SC_PIPE
+ _SC_FILE_ATTRIBUTES,
+#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
+ _SC_FILE_LOCKING,
+#define _SC_FILE_LOCKING _SC_FILE_LOCKING
+ _SC_FILE_SYSTEM,
+#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM
+ _SC_MONOTONIC_CLOCK,
+#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
+ _SC_MULTI_PROCESS,
+#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS
+ _SC_SINGLE_PROCESS,
+#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
+ _SC_NETWORKING,
+#define _SC_NETWORKING _SC_NETWORKING
+ _SC_READER_WRITER_LOCKS,
+#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
+ _SC_SPIN_LOCKS,
+#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
+ _SC_REGEXP,
+#define _SC_REGEXP _SC_REGEXP
+ _SC_REGEX_VERSION,
+#define _SC_REGEX_VERSION _SC_REGEX_VERSION
+ _SC_SHELL,
+#define _SC_SHELL _SC_SHELL
+ _SC_SIGNALS,
+#define _SC_SIGNALS _SC_SIGNALS
+ _SC_SPAWN,
+#define _SC_SPAWN _SC_SPAWN
+ _SC_SPORADIC_SERVER,
+#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
+ _SC_THREAD_SPORADIC_SERVER,
+#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
+ _SC_SYSTEM_DATABASE,
+#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
+ _SC_SYSTEM_DATABASE_R,
+#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
+ _SC_TIMEOUTS,
+#define _SC_TIMEOUTS _SC_TIMEOUTS
+ _SC_TYPED_MEMORY_OBJECTS,
+#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
+ _SC_USER_GROUPS,
+#define _SC_USER_GROUPS _SC_USER_GROUPS
+ _SC_USER_GROUPS_R,
+#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
+ _SC_2_PBS,
+#define _SC_2_PBS _SC_2_PBS
+ _SC_2_PBS_ACCOUNTING,
+#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
+ _SC_2_PBS_LOCATE,
+#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE
+ _SC_2_PBS_MESSAGE,
+#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE
+ _SC_2_PBS_TRACK,
+#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK
+ _SC_SYMLOOP_MAX,
+#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
+ _SC_STREAMS,
+#define _SC_STREAMS _SC_STREAMS
+ _SC_2_PBS_CHECKPOINT,
+#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT
+
+ _SC_V6_ILP32_OFF32,
+#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
+ _SC_V6_ILP32_OFFBIG,
+#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
+ _SC_V6_LP64_OFF64,
+#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64
+ _SC_V6_LPBIG_OFFBIG,
+#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG
+
+ _SC_HOST_NAME_MAX,
+#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
+ _SC_TRACE,
+#define _SC_TRACE _SC_TRACE
+ _SC_TRACE_EVENT_FILTER,
+#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
+ _SC_TRACE_INHERIT,
+#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT
+ _SC_TRACE_LOG,
+#define _SC_TRACE_LOG _SC_TRACE_LOG
+
+ _SC_LEVEL1_ICACHE_SIZE,
+#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE
+ _SC_LEVEL1_ICACHE_ASSOC,
+#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC
+ _SC_LEVEL1_ICACHE_LINESIZE,
+#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE
+ _SC_LEVEL1_DCACHE_SIZE,
+#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE
+ _SC_LEVEL1_DCACHE_ASSOC,
+#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC
+ _SC_LEVEL1_DCACHE_LINESIZE,
+#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE
+ _SC_LEVEL2_CACHE_SIZE,
+#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE
+ _SC_LEVEL2_CACHE_ASSOC,
+#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC
+ _SC_LEVEL2_CACHE_LINESIZE,
+#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE
+ _SC_LEVEL3_CACHE_SIZE,
+#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE
+ _SC_LEVEL3_CACHE_ASSOC,
+#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC
+ _SC_LEVEL3_CACHE_LINESIZE,
+#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE
+ _SC_LEVEL4_CACHE_SIZE,
+#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
+ _SC_LEVEL4_CACHE_ASSOC,
+#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
+ _SC_LEVEL4_CACHE_LINESIZE,
+#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE
+ /* Leave room here, maybe we need a few more cache levels some day. */
+
+ _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
+#define _SC_IPV6 _SC_IPV6
+ _SC_RAW_SOCKETS
+#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS
+ };
+
+/* Values for the NAME argument to `confstr'. */
+enum
+ {
+ _CS_PATH, /* The default search path. */
+#define _CS_PATH _CS_PATH
+
+ _CS_V6_WIDTH_RESTRICTED_ENVS,
+# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
+
+ _CS_GNU_LIBC_VERSION,
+#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
+ _CS_GNU_LIBPTHREAD_VERSION,
+#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
+
+ _CS_LFS_CFLAGS = 1000,
+#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
+ _CS_LFS_LDFLAGS,
+#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
+ _CS_LFS_LIBS,
+#define _CS_LFS_LIBS _CS_LFS_LIBS
+ _CS_LFS_LINTFLAGS,
+#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
+ _CS_LFS64_CFLAGS,
+#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
+ _CS_LFS64_LDFLAGS,
+#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
+ _CS_LFS64_LIBS,
+#define _CS_LFS64_LIBS _CS_LFS64_LIBS
+ _CS_LFS64_LINTFLAGS,
+#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
+
+ _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
+#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
+ _CS_XBS5_ILP32_OFF32_LDFLAGS,
+#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
+ _CS_XBS5_ILP32_OFF32_LIBS,
+#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
+ _CS_XBS5_ILP32_OFF32_LINTFLAGS,
+#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
+ _CS_XBS5_ILP32_OFFBIG_CFLAGS,
+#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
+ _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
+#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
+ _CS_XBS5_ILP32_OFFBIG_LIBS,
+#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
+ _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
+#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
+ _CS_XBS5_LP64_OFF64_CFLAGS,
+#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
+ _CS_XBS5_LP64_OFF64_LDFLAGS,
+#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
+ _CS_XBS5_LP64_OFF64_LIBS,
+#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
+ _CS_XBS5_LP64_OFF64_LINTFLAGS,
+#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
+ _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
+#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
+ _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
+#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
+ _CS_XBS5_LPBIG_OFFBIG_LIBS,
+#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
+ _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
+#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
+
+ _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
+#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS
+ _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
+#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
+ _CS_POSIX_V6_ILP32_OFF32_LIBS,
+#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS
+ _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
+#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
+ _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
+#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
+ _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
+#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
+ _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
+#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS
+ _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
+#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
+ _CS_POSIX_V6_LP64_OFF64_CFLAGS,
+#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS
+ _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
+#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS
+ _CS_POSIX_V6_LP64_OFF64_LIBS,
+#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS
+ _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
+#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
+ _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
+#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
+ _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
+#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
+ _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
+#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
+ _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
+#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
+ };
diff --git a/bits/dlfcn.h b/bits/dlfcn.h
new file mode 100644
index 0000000000..67fd96a22a
--- /dev/null
+++ b/bits/dlfcn.h
@@ -0,0 +1,65 @@
+/* System dependent definitions for run-time dynamic loading.
+ Copyright (C) 1996-2001, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
+
+/* The MODE argument to `dlopen' contains one of the following: */
+#define RTLD_LAZY 0x00001 /* Lazy function call binding. */
+#define RTLD_NOW 0x00002 /* Immediate function call binding. */
+#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
+#define RTLD_NOLOAD 0x00004 /* Do not load the object. */
+#define RTLD_DEEPBIND 0x00008 /* Use deep binding. */
+
+/* If the following bit is set in the MODE argument to `dlopen',
+ the symbols of the loaded object and its dependencies are made
+ visible as if the object were linked directly into the program. */
+#define RTLD_GLOBAL 0x00100
+
+/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
+ The implementation does this by default and so we can define the
+ value to zero. */
+#define RTLD_LOCAL 0
+
+/* Do not delete object when closed. */
+#define RTLD_NODELETE 0x01000
+
+#ifdef __USE_GNU
+/* To support profiling of shared objects it is a good idea to call
+ the function found using `dlsym' using the following macro since
+ these calls do not use the PLT. But this would mean the dynamic
+ loader has no chance to find out when the function is called. The
+ macro applies the necessary magic so that profiling is possible.
+ Rewrite
+ foo = (*fctp) (arg1, arg2);
+ into
+ foo = DL_CALL_FCT (fctp, (arg1, arg2));
+*/
+# define DL_CALL_FCT(fctp, args) \
+ (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
+
+__BEGIN_DECLS
+
+/* This function calls the profiling functions. */
+extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
+
+__END_DECLS
+
+#endif
diff --git a/bits/environments.h b/bits/environments.h
new file mode 100644
index 0000000000..4617dc45f2
--- /dev/null
+++ b/bits/environments.h
@@ -0,0 +1,78 @@
+/* Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _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_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type
+ _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type
+
+ _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type
+ _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type
+
+ The macros _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
+
+/* We can never provide environments with 32-bit wide pointers. */
+# define _POSIX_V6_ILP32_OFF32 -1
+# define _POSIX_V6_ILP32_OFFBIG -1
+# define _XBS5_ILP32_OFF32 -1
+# define _XBS5_ILP32_OFFBIG -1
+/* We also have no use (for now) for an environment with bigger pointers
+ and offsets. */
+# 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_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_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 _XBS5_ILP32_OFFBIG. */
+
+/* We can never provide environments with 64-bit wide pointers. */
+# define _POSIX_V6_LP64_OFF64 -1
+# define _POSIX_V6_LPBIG_OFFBIG -1
+# define _XBS5_LP64_OFF64 -1
+# define _XBS5_LPBIG_OFFBIG -1
+
+/* CFLAGS. */
+#define __ILP32_OFFBIG_CFLAGS "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+#endif /* __WORDSIZE == 32 */
diff --git a/bits/link.h b/bits/link.h
new file mode 100644
index 0000000000..6b4f811c25
--- /dev/null
+++ b/bits/link.h
@@ -0,0 +1 @@
+#error "Architecture-specific definition needed."
diff --git a/bits/linkmap.h b/bits/linkmap.h
new file mode 100644
index 0000000000..470b4d3e5f
--- /dev/null
+++ b/bits/linkmap.h
@@ -0,0 +1,4 @@
+struct link_map_machine
+ {
+ /* empty by default */
+ };
diff --git a/bits/mman.h b/bits/mman.h
new file mode 100644
index 0000000000..0c15902706
--- /dev/null
+++ b/bits/mman.h
@@ -0,0 +1,97 @@
+/* Definitions for BSD-style memory management.
+ Copyright (C) 1994-1998,2000,01,02,05 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* These are the bits used by 4.4 BSD and its derivatives. On systems
+ (such as GNU) where these facilities are not system services but can be
+ emulated in the C library, these are the definitions we emulate. */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* 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_NONE 0x00 /* No access. */
+#define PROT_READ 0x04 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x01 /* Pages can be executed. */
+
+/* Flags contain mapping type, sharing type and options. */
+
+/* Mapping type (must choose one and only one of these). */
+#ifdef __USE_BSD
+# define MAP_FILE 0x0001 /* Mapped from a file or device. */
+# define MAP_ANON 0x0002 /* Allocated from anonymous virtual memory. */
+# define MAP_TYPE 0x000f /* Mask for type field. */
+# ifdef __USE_MISC
+# define MAP_ANONYMOUS MAP_ANON /* Linux name. */
+# endif
+#endif
+
+/* Sharing types (must choose one and only one of these). */
+#ifdef __USE_BSD
+# define MAP_COPY 0x0020 /* Virtual copy of region at mapping time. */
+#endif
+#define MAP_SHARED 0x0010 /* Share changes. */
+#define MAP_PRIVATE 0x0000 /* Changes private; copy pages on write. */
+
+/* Other flags. */
+#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
+#ifdef __USE_BSD
+# define MAP_NOEXTEND 0x0200 /* For MAP_FILE, don't change file size. */
+# define MAP_HASSEMPHORE 0x0400 /* Region may contain semaphores. */
+# define MAP_INHERIT 0x0800 /* Region is retained after exec. */
+#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. */
+#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
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 0 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1 /* Mapping address may change. */
+# define MREMAP_FIXED 2 /* Fifth argument sets new address. */
+#endif
+
+/* Flags for `mlockall' (can be OR'd together). */
+#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 2 /* Lock all additions to address
+ space. */
diff --git a/bits/types.h b/bits/types.h
new file mode 100644
index 0000000000..65c8a9fe90
--- /dev/null
+++ b/bits/types.h
@@ -0,0 +1,200 @@
+/* bits/types.h -- definitions of __*_t types underlying *_t types.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/*
+ * Never include this file directly; use <sys/types.h> instead.
+ */
+
+#ifndef _BITS_TYPES_H
+#define _BITS_TYPES_H 1
+
+#include <features.h>
+#include <bits/wordsize.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short int __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long int __u_long;
+
+/* Fixed-size types, underlying types depend on word size and compiler. */
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+#if __WORDSIZE == 64
+typedef signed long int __int64_t;
+typedef unsigned long int __uint64_t;
+#elif defined __GLIBC_HAVE_LONG_LONG
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
+#endif
+
+/* quad_t is also 64 bits. */
+#if __WORDSIZE == 64
+typedef long int __quad_t;
+typedef unsigned long int __u_quad_t;
+#elif defined __GLIBC_HAVE_LONG_LONG
+__extension__ typedef long long int __quad_t;
+__extension__ typedef unsigned long long int __u_quad_t;
+#else
+typedef struct
+{
+ long __val[2];
+} __quad_t;
+typedef struct
+{
+ __u_long __val[2];
+} __u_quad_t;
+#endif
+
+
+/* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+ macros for each of the OS types we define below. The definitions
+ of those macros must use the following macros for underlying types.
+ We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+ variants of each of the following integer types on this machine.
+
+ 16 -- "natural" 16-bit type (always short)
+ 32 -- "natural" 32-bit type (always int)
+ 64 -- "natural" 64-bit type (long or long long)
+ LONG32 -- 32-bit type, traditionally long
+ QUAD -- 64-bit type, always long long
+ WORD -- natural type of __WORDSIZE bits (int or long)
+ LONGWORD -- type of __WORDSIZE bits, traditionally long
+
+ We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+ conventional uses of `long' or `long long' type modifiers match the
+ types we define, even when a less-adorned type would be the same size.
+ This matters for (somewhat) portably writing printf/scanf formats for
+ these types, where using the appropriate l or ll format modifiers can
+ make the typedefs and the formats match up across all GNU platforms. If
+ we used `long' when it's 64 bits where `long long' is expected, then the
+ compiler would warn about the formats not matching the argument types,
+ and the programmer changing them to shut up the compiler would break the
+ program's portability.
+
+ Here we assume what is presently the case in all the GCC configurations
+ we support: long long is always 64 bits, long is always word/address size,
+ and int is always 32 bits. */
+
+#define __S16_TYPE short int
+#define __U16_TYPE unsigned short int
+#define __S32_TYPE int
+#define __U32_TYPE unsigned int
+#define __SLONGWORD_TYPE long int
+#define __ULONGWORD_TYPE unsigned long int
+#if __WORDSIZE == 32
+# define __SQUAD_TYPE __quad_t
+# define __UQUAD_TYPE __u_quad_t
+# define __SWORD_TYPE int
+# define __UWORD_TYPE unsigned int
+# define __SLONG32_TYPE long int
+# define __ULONG32_TYPE unsigned long int
+# define __S64_TYPE __quad_t
+# define __U64_TYPE __u_quad_t
+/* We want __extension__ before typedef's that use nonstandard base types
+ such as `long long' in C89 mode. */
+# define __STD_TYPE __extension__ typedef
+#elif __WORDSIZE == 64
+# define __SQUAD_TYPE long int
+# define __UQUAD_TYPE unsigned long int
+# define __SWORD_TYPE long int
+# define __UWORD_TYPE unsigned long int
+# define __SLONG32_TYPE int
+# define __ULONG32_TYPE unsigned int
+# define __S64_TYPE long int
+# define __U64_TYPE unsigned long int
+/* No need to mark the typedef with __extension__. */
+# define __STD_TYPE typedef
+#else
+# error
+#endif
+#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
+
+
+__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
+__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
+__STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */
+__STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
+__STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/
+__STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
+__STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
+__STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
+__STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
+__STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */
+__STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
+__STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
+__STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
+__STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
+__STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
+__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
+__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
+__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
+
+__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
+__STD_TYPE __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
+__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
+
+/* Clock ID used in clock and timer functions. */
+__STD_TYPE __CLOCKID_T_TYPE __clockid_t;
+
+/* Timer ID returned by `timer_create'. */
+__STD_TYPE __TIMER_T_TYPE __timer_t;
+
+/* Type to represent block size. */
+__STD_TYPE __BLKSIZE_T_TYPE __blksize_t;
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number of disk blocks. */
+__STD_TYPE __BLKCNT_T_TYPE __blkcnt_t;
+__STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t;
+
+/* Type to count file system blocks. */
+__STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t;
+__STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
+
+/* Type to count file system nodes. */
+__STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t;
+__STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t;
+
+__STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */
+
+/* These few don't really vary by system, they always correspond
+ to one of the other defined types. */
+typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
+typedef __quad_t *__qaddr_t;
+typedef char *__caddr_t;
+
+/* Duplicates info from stdint.h but this is used in unistd.h. */
+__STD_TYPE __SWORD_TYPE __intptr_t;
+
+/* Duplicate info from sys/socket.h. */
+__STD_TYPE __U32_TYPE __socklen_t;
+
+
+#undef __STD_TYPE
+
+#endif /* bits/types.h */
diff --git a/bits/waitstatus.h b/bits/waitstatus.h
new file mode 100644
index 0000000000..699c224989
--- /dev/null
+++ b/bits/waitstatus.h
@@ -0,0 +1,106 @@
+/* Definitions of status bits for `wait' et al.
+ Copyright (C) 1992,1994,1996,1997,2000,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _SYS_WAIT_H && !defined _STDLIB_H
+# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
+#endif
+
+
+/* Everything extant so far uses these same bits. */
+
+
+/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */
+#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
+
+/* If WIFSIGNALED(STATUS), the terminating signal. */
+#define __WTERMSIG(status) ((status) & 0x7f)
+
+/* If WIFSTOPPED(STATUS), the signal that stopped the child. */
+#define __WSTOPSIG(status) __WEXITSTATUS(status)
+
+/* Nonzero if STATUS indicates normal termination. */
+#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
+
+/* Nonzero if STATUS indicates termination by a signal. */
+#define __WIFSIGNALED(status) \
+ (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
+
+/* Nonzero if STATUS indicates the child is stopped. */
+#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
+
+/* Nonzero if STATUS indicates the child continued after a stop. We only
+ define this if <bits/waitflags.h> provides the WCONTINUED flag bit. */
+#ifdef WCONTINUED
+# define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
+#endif
+
+/* Nonzero if STATUS indicates the child dumped core. */
+#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
+
+/* Macros for constructing status values. */
+#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
+#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#define __W_CONTINUED 0xffff
+#define __WCOREFLAG 0x80
+
+
+#ifdef __USE_BSD
+
+# include <endian.h>
+
+union wait
+ {
+ int w_status;
+ struct
+ {
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int __w_termsig:7; /* Terminating signal. */
+ unsigned int __w_coredump:1; /* Set if dumped core. */
+ unsigned int __w_retcode:8; /* Return code if exited normally. */
+ unsigned int:16;
+# endif /* Little endian. */
+# if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int:16;
+ unsigned int __w_retcode:8;
+ unsigned int __w_coredump:1;
+ unsigned int __w_termsig:7;
+# endif /* Big endian. */
+ } __wait_terminated;
+ struct
+ {
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int __w_stopval:8; /* W_STOPPED if stopped. */
+ unsigned int __w_stopsig:8; /* Stopping signal. */
+ unsigned int:16;
+# endif /* Little endian. */
+# if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int:16;
+ unsigned int __w_stopsig:8; /* Stopping signal. */
+ unsigned int __w_stopval:8; /* W_STOPPED if stopped. */
+# endif /* Big endian. */
+ } __wait_stopped;
+ };
+
+# define w_termsig __wait_terminated.__w_termsig
+# define w_coredump __wait_terminated.__w_coredump
+# define w_retcode __wait_terminated.__w_retcode
+# define w_stopsig __wait_stopped.__w_stopsig
+# define w_stopval __wait_stopped.__w_stopval
+
+#endif /* Use BSD. */