Merge from mainline.

This commit is contained in:
Andreas Jaeger 2001-11-26 12:44:35 +00:00
parent df0a1a7fab
commit 9f2a264a97
74 changed files with 299 additions and 4652 deletions

View File

@ -1,22 +1,3 @@
2001-11-15 Andreas Jaeger <aj@suse.de>
* include/features.h (__GLIBC_HAVE_LONG_LONG): Define for
compilers that support it.
* posix/sys/types.h: Use __GLIBC_HAVE_LONG_LONG.
* sysdeps/unix/sysv/linux/bits/types.h: Likewise.
* stdlib/stdlib.h: Likewise.
2001-11-17 Ulrich Drepper <drepper@redhat.com>
* posix/regex.c (byte_re_match_2_internal): For gcc replace switch
statement with gotos.
Based on a patch by Paolo Bonzini <bonzini@pc-amo3.elet.polimi.it>.
2001-11-16 Stephen L Moshier <moshier@mediaone.net>
* sysdeps/ieee754/ldbl-96/s_erfl.c (__erfcl): Fix K&R header.
2001-11-15 Ulrich Drepper <drepper@redhat.com>
* sysdeps/generic/unwind-dw2-fde.c: Don't use recursive mutexes.

View File

@ -1,79 +0,0 @@
/* Macros to swap the order of bytes in integer values.
Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
/* Swap bytes in 16 bit value. */
#ifdef __GNUC__
# define __bswap_16(x) \
(__extension__ \
({ unsigned short int __bsx = (x); \
((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }))
#else
static __inline unsigned short int
__bswap_16 (unsigned short int __bsx)
{
return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8));
}
#endif
/* Swap bytes in 32 bit value. */
#ifdef __GNUC__
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __bsx = (x); \
((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \
(((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }))
#else
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
{
return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) |
(((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24));
}
#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

View File

@ -1,566 +0,0 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
Copyright (C) 1993, 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _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
};
/* 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
};
#if (defined __USE_POSIX2 || defined __USE_UNIX98 \
|| defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \
|| defined __USE_LARGEFILE)
/* Values for the NAME argument to `confstr'. */
enum
{
_CS_PATH, /* The default search path. */
#define _CS_PATH _CS_PATH
# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \
|| defined __USE_LARGEFILE)
_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
# endif
# ifdef __USE_UNIX98
_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
# endif
# ifdef __USE_XOPEN2K
_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
# endif
_CS_V6_WIDTH_RESTRICTED_ENVS
# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
};
#endif

View File

@ -1,37 +0,0 @@
/* Directory entry structure `struct dirent'. Stub version.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _DIRENT_H
# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
#endif
struct dirent
{
char d_name[1]; /* Variable length. */
int d_fileno;
};
#ifdef __USE_LARGEFILE64
struct dirent64
{
char d_name[1]; /* Variable length. */
int d_fileno;
};
#endif

View File

@ -1,64 +0,0 @@
/* System dependent definitions for run-time dynamic loading.
Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _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. */
/* 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

View File

@ -1,14 +0,0 @@
/* This file specifies the native word size of the machine, which indicates
the ELF file class used for executables and shared objects on this
machine. */
#ifndef _LINK_H
# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
#endif
#include <bits/wordsize.h>
#define __ELF_NATIVE_CLASS __WORDSIZE
/* The entries in the .hash table always have a size of 32 bits. */
typedef uint32_t Elf_Symndx;

View File

@ -1,13 +0,0 @@
/* This file should define __BYTE_ORDER as appropriate for the machine
in question. See string/endian.h for how to define it.
If only the stub bits/endian.h applies to a particular configuration,
bytesex.h is generated by running a program on the host machine.
So if cross-compiling to a machine with a different byte order,
the bits/endian.h file for that machine must exist. */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
#error Machine byte order unknown.

View File

@ -1,75 +0,0 @@
/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#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
#endif /* __WORDSIZE == 32 */

View File

@ -1,37 +0,0 @@
/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* This file defines the `errno' constants. */
#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
#undef __need_Emath
#define __Emath_defined 1
# define EDOM XXX <--- fill in what is actually needed
# define EILSEQ XXX <--- fill in what is actually needed
# define ERANGE XXX <--- fill in what is actually needed
#endif
#ifdef _ERRNO_H
# error "Define here all the missing error messages for the port. These"
# error "must match the numbers of the kernel."
# define Exxxx XXX
...
#endif
#define __set_errno(val) errno = (val)

View File

@ -1,95 +0,0 @@
/* O_*, F_*, FD_* bit values for stub configuration.
Copyright (C) 1991, 1992, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* These values should be changed as appropriate for your system. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
/* File access modes for `open' and `fcntl'. */
#define O_RDONLY 0 /* Open read-only. */
#define O_WRONLY 1 /* Open write-only. */
#define O_RDWR 2 /* Open read/write. */
/* Bits OR'd into the second argument to open. */
#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
#define O_EXCL 0x0800 /* Fail if file already exists. */
#define O_TRUNC 0x0400 /* Truncate file to zero length. */
#define O_NOCTTY 0x0100 /* Don't assign a controlling terminal. */
/* File status flags for `open' and `fcntl'. */
#define O_APPEND 0x0008 /* Writes append to the file. */
#define O_NONBLOCK 0x0004 /* Non-blocking I/O. */
#ifdef __USE_BSD
# define O_NDELAY O_NONBLOCK
#endif
/* Mask for file access modes. This is system-dependent in case
some system ever wants to define some other flavor of access. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
/* 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. */
#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
# define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
#define F_GETLK 7 /* Get record locking info. */
#define F_SETLK 8 /* Set record locking info. */
#define F_SETLKW 9 /* Set record locking info, wait. */
/* File descriptor flags used with F_GETFD and F_SETFD. */
#define FD_CLOEXEC 1 /* Close on exec. */
#include <bits/types.h>
/* The structure describing an advisory lock. This is the type of the third
argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
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'). */
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
__pid_t l_pid; /* Process holding the lock. */
};
/* Values for the `l_type' field of a `struct flock'. */
#define F_RDLCK 1 /* Read lock. */
#define F_WRLCK 2 /* Write lock. */
#define F_UNLCK 3 /* Remove lock. */
/* 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

View File

@ -1,56 +0,0 @@
/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _FENV_H
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
/* Here should be the exception be defined:
FE_INVALID
FE_DIVBYZERO
FE_OVERFLOW
FE_UNDERFLOW
FE_INEXACT
We define no macro which signals no exception is supported. */
#define FE_ALL_EXCEPT 0
/* Here should the rounding modes be defined:
FE_TONEAREST
FE_DOWNWARD
FE_UPWARD
FE_TOWARDZERO
We define no macro which signals no rounding mode is selectable. */
/* Type representing exception flags. */
typedef unsigned int fexcept_t;
/* Type representing floating-point environment. */
typedef struct
{
fexcept_t __excepts;
/* XXX I don't know what else we should save. */
}
fenv_t;
/* If the default argument is used we use this value. */
#define FE_DFL_ENV ((__const fenv_t *) -1l)

View File

@ -1,8 +0,0 @@
/* This file provides inline versions of floating-pint environment
handling functions. If there were any. */
#ifndef __NO_MATH_INLINES
/* Here is where the code would go. */
#endif

View File

@ -1,26 +0,0 @@
/* Stub `HUGE_VAL' constant.
Used by <stdlib.h> and <math.h> functions for overflow.
Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _MATH_H
# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
#endif
#define HUGE_VAL 1e37

View File

@ -1,93 +0,0 @@
/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* Generic version. */
#ifndef _NETINET_IN_H
# error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
#endif
/* Link numbers. */
#define IMPLINK_IP 155
#define IMPLINK_LOWEXPER 156
#define IMPLINK_HIGHEXPER 158
/* Options for use with `getsockopt' and `setsockopt' at the IP level.
The first word in the comment at the right is the data type used;
"bool" means a boolean value stored in an `int'. */
#define IP_OPTIONS 1 /* ip_opts; IP per-packet options. */
#define IP_HDRINCL 2 /* int; Header is included with data. */
#define IP_TOS 3 /* int; IP type of service and precedence. */
#define IP_TTL 4 /* int; IP time to live. */
#define IP_RECVOPTS 5 /* bool; Receive all IP options w/datagram. */
#define IP_RECVRETOPTS 6 /* bool; Receive IP options for response. */
#define IP_RECVDSTADDR 7 /* bool; Receive IP dst addr w/datagram. */
#define IP_RETOPTS 8 /* ip_opts; Set/get IP per-packet options. */
#define IP_MULTICAST_IF 9 /* in_addr; set/get IP multicast i/f */
#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */
#define IP_MULTICAST_LOOP 11 /* i_char; set/get IP multicast loopback */
#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */
#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */
/* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
The `ip_dst' field is used for the first-hop gateway when using a
source route (this gets put into the header proper). */
struct ip_opts
{
struct in_addr ip_dst; /* First hop; zero without source route. */
char ip_opts[40]; /* Actually variable in size. */
};
/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */
struct ip_mreq
{
struct in_addr imr_multiaddr; /* IP multicast address of group */
struct in_addr imr_interface; /* local IP address of interface */
};
/* IPV6 socket options. */
#define IPV6_ADDRFORM 1
#define IPV6_RXINFO 2
#define IPV6_RXHOPOPTS 3
#define IPV6_RXDSTOPTS 4
#define IPV6_RTHDR 5
#define IPV6_PKTOPTIONS 6
#define IPV6_CHECKSUM 7
#define IPV6_HOPLIMIT 8
#define IPV6_TXINFO IPV6_RXINFO
#define SCM_SRCINFO IPV6_TXINFO
#define SCM_SRCRT IPV6_RXSRCRT
#define IPV6_UNICAST_HOPS 16
#define IPV6_MULTICAST_IF 17
#define IPV6_MULTICAST_HOPS 18
#define IPV6_MULTICAST_LOOP 19
#define IPV6_JOIN_GROUP 20
#define IPV6_LEAVE_GROUP 21
/* Obsolete synonyms for the above. */
#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
/* Routing header options for IPv6. */
#define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */
#define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */
#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */

View File

@ -1,114 +0,0 @@
/* Structure types for pre-termios terminal ioctls. Generic Unix version.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_IOCTL_H
# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
#endif
#if defined TIOCGETC || defined TIOCSETC
/* Type of ARG for TIOCGETC and TIOCSETC requests. */
struct tchars
{
char t_intrc; /* Interrupt character. */
char t_quitc; /* Quit character. */
char t_startc; /* Start-output character. */
char t_stopc; /* Stop-output character. */
char t_eofc; /* End-of-file character. */
char t_brkc; /* Input delimiter character. */
};
#define _IOT_tchars /* Hurd ioctl type field. */ \
_IOT (_IOTS (char), 6, 0, 0, 0, 0)
#endif
#if defined TIOCGLTC || defined TIOCSLTC
/* Type of ARG for TIOCGLTC and TIOCSLTC requests. */
struct ltchars
{
char t_suspc; /* Suspend character. */
char t_dsuspc; /* Delayed suspend character. */
char t_rprntc; /* Reprint-line character. */
char t_flushc; /* Flush-output character. */
char t_werasc; /* Word-erase character. */
char t_lnextc; /* Literal-next character. */
};
#define _IOT_ltchars /* Hurd ioctl type field. */ \
_IOT (_IOTS (char), 6, 0, 0, 0, 0)
#endif
/* Type of ARG for TIOCGETP and TIOCSETP requests (and gtty and stty). */
struct sgttyb
{
char sg_ispeed; /* Input speed. */
char sg_ospeed; /* Output speed. */
char sg_erase; /* Erase character. */
char sg_kill; /* Kill character. */
short int sg_flags; /* Mode flags. */
};
#define _IOT_sgttyb /* Hurd ioctl type field. */ \
_IOT (_IOTS (char), 6, _IOTS (short int), 1, 0, 0)
#if defined TIOCGWINSZ || defined TIOCSWINSZ
/* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests. */
struct winsize
{
unsigned short int ws_row; /* Rows, in characters. */
unsigned short int ws_col; /* Columns, in characters. */
/* These are not actually used. */
unsigned short int ws_xpixel; /* Horizontal pixels. */
unsigned short int ws_ypixel; /* Vertical pixels. */
};
#define _IOT_winsize /* Hurd ioctl type field. */ \
_IOT (_IOTS (unsigned short int), 4, 0, 0, 0, 0)
#endif
#if defined TIOCGSIZE || defined TIOCSSIZE
/* The BSD-style ioctl constructor macros use `sizeof', which can't be used
in a preprocessor conditional. Since the commands are always unique
regardless of the size bits, we can safely define away `sizeof' for the
purpose of the conditional. */
# define sizeof(type) 0
# if defined TIOCGWINSZ && TIOCGSIZE == TIOCGWINSZ
/* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
compatibility with Sun; they define `struct ttysize' to have identical
layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
(likewise TIOCSSIZE and TIOCSWINSZ). */
struct ttysize
{
unsigned short int ts_lines;
unsigned short int ts_cols;
unsigned short int ts_xxx;
unsigned short int ts_yyy;
};
#define _IOT_ttysize _IOT_winsize
# else
/* Suns use a different layout for `struct ttysize', and TIOCGSIZE and
TIOCGWINSZ are separate commands that do the same thing with different
structures (likewise TIOCSSIZE and TIOCSWINSZ). */
struct ttysize
{
int ts_lines, ts_cols; /* Lines and columns, in characters. */
};
# endif
# undef sizeof /* See above. */
#endif

View File

@ -1,5 +0,0 @@
#ifndef _SYS_IOCTL_H
# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
#endif
/* This space intentionally left blank. */

View File

@ -1,47 +0,0 @@
/* Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_IPC_H
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
#endif
#include <bits/types.h>
/* Mode bits for `msgget', `semget', and `shmget'. */
#define IPC_CREAT 01000 /* create key if key does not exist */
#define IPC_EXCL 02000 /* fail if key exists */
#define IPC_NOWAIT 04000 /* return error on wait */
/* Control commands for `msgctl', `semctl', and `shmctl'. */
#define IPC_RMID 0 /* remove identifier */
#define IPC_SET 1 /* set `ipc_perm' options */
#define IPC_STAT 2 /* get `ipc_perm' options */
/* Special key values. */
#define IPC_PRIVATE ((key_t) 0) /* private key */
/* Data structure used to pass permission information to IPC operations. */
struct ipc_perm
{
__uid_t uid; /* owner's user ID */
__gid_t gid; /* owner's group ID */
__uid_t cuid; /* creator's user ID */
__gid_t cgid; /* creator's group ID */
__mode_t mode; /* read/write permission */
};

View File

@ -1,131 +0,0 @@
/* libc-internal interface for mutex locks. Stub version.
Copyright (C) 1996,97,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _BITS_LIBC_LOCK_H
#define _BITS_LIBC_LOCK_H 1
/* Define a lock variable NAME with storage class CLASS. The lock must be
initialized with __libc_lock_init before it can be used (or define it
with __libc_lock_define_initialized, below). Use `extern' for CLASS to
declare a lock defined in another module. In public structure
definitions you must use a pointer to the lock structure (i.e., NAME
begins with a `*'), because its storage size will not be known outside
of libc. */
#define __libc_lock_define(CLASS,NAME)
#define __libc_lock_define_recursive(CLASS,NAME)
#define __libc_rwlock_define(CLASS,NAME)
/* Define an initialized lock variable NAME with storage class CLASS. */
#define __libc_lock_define_initialized(CLASS,NAME)
#define __libc_rwlock_define_initialized(CLASS,NAME)
/* Define an initialized recursive lock variable NAME with storage
class CLASS. */
#define __libc_lock_define_initialized_recursive(CLASS,NAME)
/* Initialize the named lock variable, leaving it in a consistent, unlocked
state. */
#define __libc_lock_init(NAME)
#define __libc_rwlock_init(NAME)
/* Same as last but this time we initialize a recursive mutex. */
#define __libc_lock_init_recursive(NAME)
/* Finalize the named lock variable, which must be locked. It cannot be
used again until __libc_lock_init is called again on it. This must be
called on a lock variable before the containing storage is reused. */
#define __libc_lock_fini(NAME)
#define __libc_rwlock_fini(NAME)
/* Finalize recursive named lock. */
#define __libc_lock_fini_recursive(NAME)
/* Lock the named lock variable. */
#define __libc_lock_lock(NAME)
#define __libc_rwlock_rdlock(NAME)
#define __libc_rwlock_wrlock(NAME)
/* Lock the recursive named lock variable. */
#define __libc_lock_lock_recursive(NAME)
/* Try to lock the named lock variable. */
#define __libc_lock_trylock(NAME) 0
#define __libc_rwlock_tryrdlock(NAME) 0
#define __libc_rwlock_trywrlock(NAME) 0
/* Try to lock the recursive named lock variable. */
#define __libc_lock_trylock_recursive(NAME) 0
/* Unlock the named lock variable. */
#define __libc_lock_unlock(NAME)
#define __libc_rwlock_unlock(NAME)
/* Unlock the recursive named lock variable. */
#define __libc_lock_unlock_recursive(NAME)
/* Define once control variable. */
#define __libc_once_define(CLASS, NAME) CLASS int NAME = 0
/* Call handler iff the first call. */
#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
do { \
if ((ONCE_CONTROL) == 0) { \
INIT_FUNCTION (); \
(ONCE_CONTROL) = 1; \
} \
} while (0)
/* Start a critical region with a cleanup function */
#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
{ \
typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0; \
typeof (ARG) __save_ARG = ARG; \
/* close brace is in __libc_cleanup_region_end below. */
/* End a critical region started with __libc_cleanup_region_start. */
#define __libc_cleanup_region_end(DOIT) \
if ((DOIT) && __save_FCT != 0) \
(*__save_FCT)(__save_ARG); \
}
/* Sometimes we have to exit the block in the middle. */
#define __libc_cleanup_end(DOIT) \
if ((DOIT) && __save_FCT != 0) \
(*__save_FCT)(__save_ARG); \
/* We need portable names for some of the functions. */
#define __libc_mutex_unlock
/* Type for key of thread specific data. */
typedef int __libc_key_t;
/* Create key for thread specific data. */
#define __libc_key_create(KEY,DEST) -1
/* Set thread-specific data associated with KEY to VAL. */
#define __libc_setspecific(KEY,VAL) -1
/* Get thread-specific data associated with KEY. */
#define __libc_getspecific(KEY) 0
#endif /* bits/libc-lock.h */

View File

@ -1,52 +0,0 @@
/* libc-internal interface for thread-specific data. Stub version.
Copyright (C) 1998, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _BITS_LIBC_TSD_H
#define _BITS_LIBC_TSD_H 1
/* This file defines the following macros for accessing a small fixed
set of thread-specific `void *' data used only internally by libc.
__libc_tsd_define(CLASS, KEY) -- Define or declare a `void *' datum
for KEY. CLASS can be `static' for
keys used in only one source file,
empty for global definitions, or
`extern' for global declarations.
__libc_tsd_get(KEY) -- Return the `void *' datum for KEY.
__libc_tsd_set(KEY, VALUE) -- Set the datum for KEY to VALUE.
The set of available KEY's will usually be provided as an enum,
and contains (at least):
_LIBC_TSD_KEY_MALLOC
_LIBC_TSD_KEY_DL_ERROR
_LIBC_TSD_KEY_RPC_VARS
All uses must be the literal _LIBC_TSD_* name in the __libc_tsd_* macros.
Some implementations may not provide any enum at all and instead
using string pasting in the macros. */
/* This is the generic/stub implementation for wholly single-threaded
systems. We don't define an enum for the possible key values, because
the KEYs translate directly into variables by macro magic. */
#define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data;
#define __libc_tsd_get(KEY) (__libc_tsd_##KEY##_data)
#define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY##_data = (VALUE))
#endif /* bits/libc-tsd.h */

View File

@ -1,4 +0,0 @@
struct link_map_machine
{
/* empty by default */
};

View File

@ -1,3 +0,0 @@
/* This file should define the implementation-specific limits described
in posix[12]_lim.h. If there are no useful values to give a limit,
don't define it. */

View File

@ -1,47 +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, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
/* Normally, there is no long double type and the `float' and `double'
expressions are evaluated as `double'. */
typedef double float_t; /* `float' expressions are evaluated as
`double'. */
typedef double double_t; /* `double' expressions are evaluated as
`double'. */
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
/* The values returned by `ilogb' for 0 and NaN respectively. */
# define FP_ILOGB0 (-2147483647)
# define FP_ILOGBNAN 2147483647
#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
declaration of all the `long double' function variants. */
# define __NO_LONG_DOUBLE_MATH 1
#endif

View File

@ -1,12 +0,0 @@
/* This file should provide inline versions of math functions.
Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
This file should define __MATH_INLINES if functions are actually defined as
inlines. */
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
/* Here goes the real code. */
#endif

View File

@ -1,87 +0,0 @@
/* Definitions for BSD-style memory management.
Copyright (C) 1994-1998,2000,01 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 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. */

View File

@ -1,45 +0,0 @@
/* Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_MSG_H
#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
#include <bits/types.h>
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
/* Types used in the structure definition. */
typedef unsigned short int msgqnum_t;
typedef unsigned short int msglen_t;
/* Structure of record for one message inside the kernel.
The type `struct __msg' is opaque. */
struct msqid_ds
{
struct ipc_perm msg_perm; /* structure describing operation permission */
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgrcv command */
__time_t msg_ctime; /* time of last change */
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() */
};

View File

@ -1,5 +0,0 @@
#ifndef _MATH_H
#error "Never use <bits/nan.h> directly; include <math.h> instead."
#endif
/* This file should define `NAN' on machines that have such things. */

View File

@ -1,33 +0,0 @@
/* Copyright (C) 1996, 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, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _NETDB_H
# error "Never include <bits/netdb.h> directly; use <netdb.h> instead."
#endif
/* Description of data base entry for a single network. NOTE: here a
poor assumption is made. The network number is expected to fit
into an unsigned long int variable. */
struct netent
{
char *n_name; /* Official name of network. */
char **n_aliases; /* Alias list. */
int n_addrtype; /* Net address type. */
uint32_t n_net; /* Network number. */
};

View File

@ -1,43 +0,0 @@
/* Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_POLL_H
# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
#endif
/* Event types that can be polled for. These bits may be set in `events'
to indicate the interesting event types; they will appear in `revents'
to indicate the status of the file descriptor. */
#define POLLIN 01 /* There is data to read. */
#define POLLPRI 02 /* There is urgent data to read. */
#define POLLOUT 04 /* Writing now will not block. */
#ifdef __USE_XOPEN
/* These values are defined in XPG4.2. */
# define POLLRDNORM POLLIN /* Normal data may be read. */
# define POLLRDBAND POLLPRI /* Priority data may be read. */
# define POLLWRNORM POLLOUT /* Writing now will not block. */
# define POLLWRBAND POLLOUT /* Priority data may be written. */
#endif
/* Event types always implicitly polled for. These bits need not be set in
`events', but they will appear in `revents' to indicate the status of
the file descriptor. */
#define POLLERR 010 /* Error condition. */
#define POLLHUP 020 /* Hung up. */
#define POLLNVAL 040 /* Invalid polling request. */

View File

@ -1,2 +0,0 @@
/* This file should define the POSIX options described in <unistd.h>,
or leave them undefined, as appropriate. */

View File

@ -1,182 +0,0 @@
/* Bit values & structures for resource limits. 4.4 BSD/generic GNU version.
Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_RESOURCE_H
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
#endif
#include <bits/types.h>
/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
subset of these kinds of resource limit. In systems where `getrlimit'
and `setrlimit' are not system calls, these are the values used by the C
library to emulate them. */
/* Kinds of resource limit. */
enum __rlimit_resource
{
/* Per-process CPU limit, in seconds. */
RLIMIT_CPU,
#define RLIMIT_CPU RLIMIT_CPU
/* Largest file that can be created, in bytes. */
RLIMIT_FSIZE,
#define RLIMIT_FSIZE RLIMIT_FSIZE
/* Maximum size of data segment, in bytes. */
RLIMIT_DATA,
#define RLIMIT_DATA RLIMIT_DATA
/* Maximum size of stack segment, in bytes. */
RLIMIT_STACK,
#define RLIMIT_STACK RLIMIT_STACK
/* Largest core file that can be created, in bytes. */
RLIMIT_CORE,
#define RLIMIT_CORE RLIMIT_CORE
/* Largest resident set size, in bytes.
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
RLIMIT_RSS,
#define RLIMIT_RSS RLIMIT_RSS
/* Locked-in-memory address space. */
RLIMIT_MEMLOCK,
#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
/* Number of processes. */
RLIMIT_NPROC,
#define RLIMIT_NPROC RLIMIT_NPROC
/* Number of open files. */
RLIMIT_OFILE,
RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */
#define RLIMIT_OFILE RLIMIT_OFILE
#define RLIMIT_NOFILE RLIMIT_NOFILE
RLIMIT_NLIMITS, /* Number of limit flavors. */
RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
};
/* Value to indicate that there is no limit. */
#ifndef __USE_FILE_OFFSET64
# define RLIM_INFINITY 0x7fffffff
#else
# define RLIM_INFINITY 0x7fffffffffffffffLL
#endif
#ifdef __USE_LARGEFILE64
# define RLIM64_INFINITY 0x7fffffffffffffffLL
#endif
/* Type for resource quantity measurement. */
#ifndef __USE_FILE_OFFSET64
typedef __rlim_t rlim_t;
#else
typedef __rlim64_t rlim_t;
#endif
#ifdef __USE_LARGEFILE64
typedef __rlim64_t rlim64_t;
#endif
struct rlimit
{
/* The current (soft) limit. */
rlim_t rlim_cur;
/* The hard limit. */
rlim_t rlim_max;
};
#ifdef __USE_LARGEFILE64
struct rlimit64
{
/* The current (soft) limit. */
rlim64_t rlim_cur;
/* The hard limit. */
rlim64_t rlim_max;
};
#endif
/* Whose usage statistics do you want? */
enum __rusage_who
/* The macro definitions are necessary because some programs want
to test for operating system features with #ifdef RUSAGE_SELF.
In ISO C the reflexive definition is a no-op. */
{
/* The calling process. */
RUSAGE_SELF = 0,
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
RUSAGE_CHILDREN = -1
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
};
#define __need_timeval
#include <bits/time.h> /* For `struct timeval'. */
/* Structure which says how much of each resource has been used. */
struct rusage
{
/* Total amount of user time used. */
struct timeval ru_utime;
/* Total amount of system time used. */
struct timeval ru_stime;
/* Maximum resident set size (in kilobytes). */
long int ru_maxrss;
/* Amount of sharing of text segment memory
with other processes (kilobyte-seconds). */
long int ru_ixrss;
/* Amount of data segment memory used (kilobyte-seconds). */
long int ru_idrss;
/* Amount of stack memory used (kilobyte-seconds). */
long int ru_isrss;
/* Number of soft page faults (i.e. those serviced by reclaiming
a page from the list of pages awaiting reallocation. */
long int ru_minflt;
/* Number of hard page faults (i.e. those that required I/O). */
long int ru_majflt;
/* Number of times a process was swapped out of physical memory. */
long int ru_nswap;
/* Number of input operations via the file system. Note: This
and `ru_oublock' do not include operations with the cache. */
long int ru_inblock;
/* Number of output operations via the file system. */
long int ru_oublock;
/* Number of IPC messages sent. */
long int ru_msgsnd;
/* Number of IPC messages received. */
long int ru_msgrcv;
/* Number of signals delivered. */
long int ru_nsignals;
/* Number of voluntary context switches, i.e. because the process
gave up the process before it had to (usually to wait for some
resource to be available). */
long int ru_nvcsw;
/* Number of involuntary context switches, i.e. a higher priority process
became runnable or the current process used up its time slice. */
long int ru_nivcsw;
};
/* Priority limits. */
#define PRIO_MIN -20 /* Minimum priority a process can have. */
#define PRIO_MAX 20 /* Maximum priority a process can have. */
/* The type of the WHICH argument to `getpriority' and `setpriority',
indicating what flavor of entity the WHO argument specifies. */
enum __priority_which
{
PRIO_PROCESS = 0, /* WHO is a process ID. */
PRIO_PGRP = 1, /* WHO is a process group ID. */
PRIO_USER = 2 /* WHO is a user ID. */
};

View File

@ -1,35 +0,0 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SCHED_H
# error "Never include <bits/sched.h> directly; use <sched.h> instead."
#endif
/* Scheduling algorithms. */
#define SCHED_OTHER 0
#define SCHED_FIFO 1
#define SCHED_RR 2
/* Data structure to describe a process' schedulability. */
struct sched_param
{
int __sched_priority;
};

View File

@ -1,35 +0,0 @@
/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_SELECT_H
# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
#endif
/* We don't use `memset' because this would require a prototype and
the array isn't too big. */
#define __FD_ZERO(s) \
do { \
unsigned int __i; \
fd_set *__arr = (s); \
for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
__FDS_BITS (__arr)[__i] = 0; \
} while (0)
#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d))
#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d))
#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0)

View File

@ -1,62 +0,0 @@
/* Copyright (C) 1995, 1996, 1997, 1998
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_SEM_H
# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
#endif
#include <sys/types.h>
/* Flags for `semop'. */
#define SEM_UNDO 0x1000 /* undo the operation on exit */
/* Commands for `semctl'. */
#define GETPID 11 /* get sempid */
#define GETVAL 12 /* get semval */
#define GETALL 13 /* get all semval's */
#define GETNCNT 14 /* get semncnt */
#define GETZCNT 15 /* get semzcnt */
#define SETVAL 16 /* set semval */
#define SETALL 17 /* set all semval's */
/* Data structure describing a set of semaphores. */
struct semid_ds
{
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
unsigned short int sem_nsems; /* number of semaphores in set */
};
/* 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

View File

@ -1,7 +0,0 @@
/* Define the machine-dependent type `jmp_buf'. Stub version. */
#ifndef _SETJMP_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
typedef int __jmp_buf[1];

View File

@ -1,49 +0,0 @@
/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_SHM_H
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
#include <bits/types.h>
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
#define SHM_UNLOCK 12 /* unlock segment (root only) */
/* Type to count number of attaches. */
typedef unsigned short int shmatt_t;
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
struct ipc_perm shm_perm; /* operation permission struct */
int shm_segsz; /* size of segment in bytes */
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
};

View File

@ -1,78 +0,0 @@
/* Copyright (C) 1991,92,96,97,98,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
/* These definitions match those used by the 4.4 BSD kernel.
If the operating system has a `sigaction' system call that correctly
implements the POSIX.1 behavior, there should be a system-dependent
version of this file that defines `struct sigaction' and the `SA_*'
constants appropriately. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
/* Signal handler. */
#ifdef __USE_POSIX199309
union
{
/* Used if SA_SIGINFO is not set. */
__sighandler_t sa_handler;
/* Used if SA_SIGINFO is set. */
void (*sa_sigaction) (int, siginfo_t *, void *);
}
__sigaction_handler;
# define sa_handler __sigaction_handler.sa_handler
# define sa_sigaction __sigaction_handler.sa_sigaction
#else
__sighandler_t sa_handler;
#endif
/* Additional set of signals to be blocked. */
__sigset_t sa_mask;
/* Special flags. */
int sa_flags;
};
/* Bits in `sa_flags'. */
#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x0001 /* Take signal on signal stack. */
# define SA_RESTART 0x0002 /* Restart syscall on signal return. */
# define SA_NODEFER 0x0010 /* Don't automatically block the signal when
its handler is being executed. */
# define SA_RESETHAND 0x0004 /* Reset to SIG_DFL on entry to handler. */
#endif
#define SA_NOCLDSTOP 0x0008 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
# define SA_INTERRUPT 0 /* Historical no-op ("not SA_RESTART"). */
/* Some aliases for the SA_ constants. */
# define SA_NOMASK SA_NODEFER
# define SA_ONESHOT SA_RESETHAND
# define SA_STACK SA_ONSTACK
#endif
/* Values for the HOW argument to `sigprocmask'. */
#define SIG_BLOCK 1 /* Block signals. */
#define SIG_UNBLOCK 2 /* Unblock signals. */
#define SIG_SETMASK 3 /* Set the set of blocked signals. */

View File

@ -1,33 +0,0 @@
/* Structure describing state saved while handling a signal. Stub version.
Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
/* State of this thread when the signal was taken. */
struct sigcontext
{
int sc_onstack;
__sigset_t sc_mask;
/* Registers and such. */
};
/* Signal subcodes should be defined here. */

View File

@ -1,211 +0,0 @@
/* siginfo_t, sigevent and constants. Stub version.
Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if !defined _SIGNAL_H && !defined __need_siginfo_t \
&& !defined __need_sigevent_t
# error "Never include this file directly. Use <signal.h> instead"
#endif
#if (!defined __have_sigval_t \
&& (defined _SIGNAL_H || defined __need_siginfo_t \
|| defined __need_sigevent_t))
# define __have_sigval_t 1
/* Type for data associated with a signal. */
typedef union sigval
{
int sival_int;
void *sival_ptr;
} sigval_t;
#endif
#if (!defined __have_siginfo_t \
&& (defined _SIGNAL_H || defined __need_siginfo_t))
# define __have_siginfo_t 1
typedef struct siginfo
{
int si_signo; /* Signal number. */
int si_errno; /* If non-zero, an errno value associated with
this signal, as defined in <errno.h>. */
int si_code; /* Signal code. */
__pid_t si_pid; /* Sending process ID. */
__uid_t si_uid; /* Real user ID of sending process. */
void *si_addr; /* Address of faulting instruction. */
int si_status; /* Exit value or signal. */
long int si_band; /* Band event for SIGPOLL. */
union sigval si_value; /* Signal value. */
} siginfo_t;
/* Values for `si_code'. Positive values are reserved for kernel-generated
signals. */
enum
{
SI_ASYNCIO = -4, /* Sent by AIO completion. */
# define SI_ASYNCIO SI_ASYNCIO
SI_MESGQ, /* Sent by real time mesq state change. */
# define SI_MESGQ SI_MESGQ
SI_TIMER, /* Sent by timer expiration. */
# define SI_TIMER SI_TIMER
SI_QUEUE, /* Sent by sigqueue. */
# define SI_QUEUE SI_QUEUE
SI_USER /* Sent by kill, sigsend, raise. */
# define SI_USER SI_USER
};
/* `si_code' values for SIGILL signal. */
enum
{
ILL_ILLOPC = 1, /* Illegal opcode. */
# define ILL_ILLOPC ILL_ILLOPC
ILL_ILL_OPN, /* Illegal operand. */
# define ILL_ILLOPN ILL_ILLOPN
ILL_ILLADR, /* Illegal addressing mode. */
# define ILL_ILLADR ILL_ILLADR
ILL_ILLTRP, /* Illegal trap. */
# define ILL_ILLTRP ILL_ILLTRP
ILL_PRVOPC, /* Privileged opcode. */
# define ILL_PRVOPC ILL_PRVOPC
ILL_PRVREG, /* Privileged register. */
# define ILL_PRVREG ILL_PRVREG
ILL_COPROC, /* Coprocessor error. */
# define ILL_COPROC ILL_COPROC
ILL_BADSTK /* Internal stack error. */
# define ILL_BADSTK ILL_BADSTK
};
/* `si_code' values for SIGFPE signal. */
enum
{
FPE_INTDIV = 1, /* Integer divide by zero. */
# define FPE_INTDIV FPE_INTDIV
FPE_INTOVF, /* Integer overflow. */
# define FPE_INTOVF FPE_INTOVF
FPE_FLTDIV, /* Floating point divide by zero. */
# define FPE_FLTDIV FPE_FLTDIV
FPE_FLTOVF, /* Floating point overflow. */
# define FPE_FLTOVF FPE_FLTOVF
FPE_FLTUND, /* Floating point underflow. */
# define FPE_FLTUND FPE_FLTUND
FPE_FLTRES, /* Floating point inexact result. */
# define FPE_FLTRES FPE_FLTRES
FPE_FLTINV, /* Floating point invalid operation. */
# define FPE_FLTINV FPE_FLTINV
FPE_FLTSUB /* Subscript out of range. */
# define FPE_FLTSUB FPE_FLTSUB
};
/* `si_code' values for SIGSEGV signal. */
enum
{
SEGV_MAPERR = 1, /* Address not mapped to object. */
# define SEGV_MAPERR SEGV_MAPERR
SEGV_ACCERR /* Invalid permissions for mapped object. */
# define SEGV_ACCERR SEGV_ACCERR
};
/* `si_code' values for SIGBUS signal. */
enum
{
BUS_ADRALN = 1, /* Invalid address alignment. */
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
BUS_OBJERR /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
};
/* `si_code' values for SIGTRAP signal. */
enum
{
TRAP_BRKPT = 1, /* Process breakpoint. */
# define TRAP_BRKPT TRAP_BRKPT
TRAP_TRACE /* Process trace trap. */
# define TRAP_TRACE TRAP_TRACE
};
/* `si_code' values for SIGCHLD signal. */
enum
{
CLD_EXITED = 1, /* Child has exited. */
# define CLD_EXITED CLD_EXITED
CLD_KILLED, /* Child was killed. */
# define CLD_KILLED CLD_KILLED
CLD_DUMPED, /* Child terminated abnormally. */
# define CLD_DUMPED CLD_DUMPED
CLD_TRAPPED, /* Traced child has trapped. */
# define CLD_TRAPPED CLD_TRAPPED
CLD_STOPPED, /* Child has stopped. */
# define CLD_STOPPED CLD_STOPPED
CLD_CONTINUED /* Stopped child has continued. */
# define CLD_CONTINUED CLD_CONTINUED
};
/* `si_code' values for SIGPOLL signal. */
enum
{
POLL_IN = 1, /* Data input available. */
# define POLL_IN POLL_IN
POLL_OUT, /* Output buffers available. */
# define POLL_OUT POLL_OUT
POLL_MSG, /* Input message available. */
# define POLL_MSG POLL_MSG
POLL_ERR, /* I/O error. */
# define POLL_ERR POLL_ERR
POLL_PRI, /* High priority input available. */
# define POLL_PRI POLL_PRI
POLL_HUP /* Device disconnected. */
# define POLL_HUP POLL_HUP
};
# undef __need_siginfo_t
#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
#if (defined _SIGNAL_H || defined __need_sigevent_t) \
&& !defined __have_sigevent_t
# define __have_sigevent_t 1
/* Structure to transport application-defined values with signals. */
# define SIGEV_MAX_SIZE 64
# define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE / sizeof (int)) - 3)
typedef struct sigevent
{
sigval_t sigev_value;
int sigev_signo;
int sigev_notify;
void (*sigev_notify_function) (sigval_t); /* Function to start. */
void *sigev_notify_attributes; /* Really pthread_attr_t.*/
} sigevent_t;
/* `sigev_notify' values. */
enum
{
SIGEV_SIGNAL = 0, /* Notify via signal. */
# define SIGEV_SIGNAL SIGEV_SIGNAL
SIGEV_NONE, /* Other notification: meaningless. */
# define SIGEV_NONE SIGEV_NONE
SIGEV_THREAD /* Deliver via thread creation. */
# define SIGEV_THREAD SIGEV_THREAD
};
#endif /* have _SIGNAL_H. */

View File

@ -1,64 +0,0 @@
/* Copyright (C) 1991, 1993, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifdef _SIGNAL_H
/* Fake signal functions. */
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
#ifdef __USE_UNIX98
# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
#endif
/* Signals in the 1-15 range are defined with their historical numbers.
Signals in the 20-25 range are relatively new and have no ingrained
numbers. */
/* ANSI signals. */
#define SIGINT 2 /* Interactive attention signal. */
#define SIGILL 4 /* Illegal instruction. */
#define SIGABRT 6 /* Abnormal termination. */
#define SIGFPE 8 /* Erroneous arithmetic operation. */
#define SIGSEGV 11 /* Invalid access to storage. */
#define SIGTERM 15 /* Termination request. */
/* Historical signals specified by POSIX. */
#define SIGHUP 1 /* Hangup. */
#define SIGQUIT 3 /* Quit. */
#define SIGKILL 9 /* Kill (cannot be blocked, caught, or ignored). */
#define SIGPIPE 13 /* Broken pipe. */
#define SIGALRM 14 /* Alarm clock. */
/* New(er) POSIX signals. */
#define SIGSTOP 20 /* Stop (cannot be blocked, caught, or ignored). */
#define SIGCONT 21 /* Continue. */
#define SIGTSTP 22 /* Keyboard stop. */
#define SIGTTIN 23 /* Background read from control terminal. */
#define SIGTTOU 24 /* Background write to control terminal. */
#define SIGCHLD 25 /* Child terminated or stopped. */
#define _NSIG 26
/* Archaic names for compatibility. */
#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP11 */
#define SIGCLD SIGCHLD /* Old System V name */
#endif /* <signal.h> included. */

View File

@ -1,83 +0,0 @@
/* __sig_atomic_t, __sigset_t, and related definitions. Generic/BSD version.
Copyright (C) 1991, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SIGSET_H_types
#define _SIGSET_H_types 1
typedef int __sig_atomic_t;
/* A `sigset_t' has a bit for each signal. */
typedef unsigned long int __sigset_t;
#endif
/* We only want to define these functions if <signal.h> was actually
included; otherwise we were included just to define the types. Since we
are namespace-clean, it wouldn't hurt to define extra macros. But
trouble can be caused by functions being defined (e.g., any global
register vars declared later will cause compilation errors). */
#if !defined _SIGSET_H_fns && defined _SIGNAL_H
#define _SIGSET_H_fns 1
#ifndef _EXTERN_INLINE
# define _EXTERN_INLINE extern __inline
#endif
/* Return a mask that includes SIG only. The cast to `sigset_t' avoids
overflow if `sigset_t' is wider than `int'. */
#define __sigmask(sig) (((__sigset_t) 1) << ((sig) - 1))
#define __sigemptyset(set) ((*(set) = (__sigset_t) 0), 0)
#define __sigfillset(set) ((*(set) = ~(__sigset_t) 0), 0)
#ifdef _GNU_SOURCE
# define __sigisemptyset(set) (*(set) == (__sigset_t) 0)
# define __sigandset(dest, left, right) \
((*(dest) = (*(left) & *(right))), 0)
# define __sigorset(dest, left, right) \
((*(dest) = (*(left) | *(right))), 0)
#endif
/* These functions needn't check for a bogus signal number -- error
checking is done in the non __ versions. */
extern int __sigismember (__const __sigset_t *, int);
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
#ifdef __USE_EXTERN_INLINES
# define __SIGSETFN(NAME, BODY, CONST) \
_EXTERN_INLINE int \
NAME (CONST __sigset_t *__set, int __sig) \
{ \
__sigset_t __mask = __sigmask (__sig); \
return BODY; \
}
__SIGSETFN (__sigismember, (*__set & __mask) ? 1 : 0, __const)
__SIGSETFN (__sigaddset, ((*__set |= __mask), 0), )
__SIGSETFN (__sigdelset, ((*__set &= ~__mask), 0), )
# undef __SIGSETFN
#endif
#endif /* ! _SIGSET_H_fns. */

View File

@ -1,55 +0,0 @@
/* sigstack, sigaltstack definitions.
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include this file directly. Use <signal.h> instead"
#endif
/* Structure describing a signal stack (obsolete). */
struct sigstack
{
__ptr_t ss_sp; /* Signal stack pointer. */
int ss_onstack; /* Nonzero if executing on this stack. */
};
/* Alternate, preferred interface. */
typedef struct sigaltstack
{
__ptr_t ss_sp;
size_t ss_size;
int ss_flags;
} stack_t;
/* Possible values for `ss_flags.'. */
enum
{
SS_ONSTACK = 0x0001,
#define SS_ONSTACK SS_ONSTACK
SS_DISABLE = 0x0004
#define SS_DISABLE SS_DISABLE
};
/* Minumum stack size for a signal handler. */
#define MINSIGSTKSZ 8192
/* System default stack size. */
#define SIGSTKSZ (MINSIGSTKSZ + 32768)

View File

@ -1,35 +0,0 @@
/* Signal handling function for threaded programs. Generic version.
Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _BITS_SIGTHREAD_H
#define _BITS_SIGTHREAD_H 1
#if !defined _SIGNAL_H && !defined _PTHREAD_H
# error "Never include this file directly. Use <pthread.h> instead"
#endif
/* Modify the signal mask for the calling thread. The arguments have the
same meaning as for sigprocmask; in fact, this and sigprocmask might be
the same function. We declare this the same on all platforms, since it
doesn't use any thread-related types. */
extern int pthread_sigmask (int __how, __const __sigset_t *__newmask,
__sigset_t *__oldmask) __THROW;
#endif /* bits/sigthread.h */

View File

@ -1,40 +0,0 @@
/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version.
Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/*
* Never include this file directly; use <sys/socket.h> instead.
*/
#ifndef _BITS_SOCKADDR_H
#define _BITS_SOCKADDR_H 1
/* POSIX.1g specifies this type name for the `sa_family' member. */
typedef unsigned short int sa_family_t;
/* This macro is used to declare the initial common members
of the data types used for socket addresses, `struct sockaddr',
`struct sockaddr_in', `struct sockaddr_un', etc. */
#define __SOCKADDR_COMMON(sa_prefix) \
sa_family_t sa_prefix##family
#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int))
#endif /* bits/sockaddr.h */

View File

@ -1,251 +0,0 @@
/* System-specific socket constants and types. Generic/4.3 BSD version.
Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef __BITS_SOCKET_H
#define __BITS_SOCKET_H 1
#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
#endif
#include <limits.h>
#include <bits/types.h>
#define __need_size_t
#include <stddef.h>
/* Type for length arguments in socket calls. */
#ifndef __socklen_t_defined
typedef __socklen_t socklen_t;
# define __socklen_t_defined
#endif
/* Types of sockets. */
enum __socket_type
{
SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
byte streams. */
#define SOCK_STREAM SOCK_STREAM
SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
of fixed maximum length. */
#define SOCK_DGRAM SOCK_DGRAM
SOCK_RAW = 3, /* Raw protocol interface. */
#define SOCK_RAW SOCK_RAW
SOCK_RDM = 4, /* Reliably-delivered messages. */
#define SOCK_RDM SOCK_RDM
SOCK_SEQPACKET = 5 /* Sequenced, reliable, connection-based,
datagrams of fixed maximum length. */
#define SOCK_SEQPACKET SOCK_SEQPACKET
};
/* Protocol families. */
#define PF_UNSPEC 0 /* Unspecified. */
#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */
#define PF_INET 2 /* IP protocol family. */
#define PF_IMPLINK 3 /* ARPAnet IMP protocol. */
#define PF_PUP 4 /* PUP protocols. */
#define PF_CHAOS 5 /* MIT Chaos protocols. */
#define PF_NS 6 /* Xerox NS protocols. */
#define PF_ISO 7 /* ISO protocols. */
#define PF_OSI PF_ISO
#define PF_ECMA 8 /* ECMA protocols. */
#define PF_DATAKIT 9 /* AT&T Datakit protocols. */
#define PF_CCITT 10 /* CCITT protocols (X.25 et al). */
#define PF_SNA 11 /* IBM SNA protocol. */
#define PF_DECnet 12 /* DECnet protocols. */
#define PF_DLI 13 /* Direct data link interface. */
#define PF_LAT 14 /* DEC Local Area Transport protocol. */
#define PF_HYLINK 15 /* NSC Hyperchannel protocol. */
#define PF_APPLETALK 16 /* Don't use this. */
#define PF_ROUTE 17 /* Internal Routing Protocol. */
#define PF_LINK 18 /* Link layer interface. */
#define PF_XTP 19 /* eXpress Transfer Protocol (no AF). */
#define PF_COIP 20 /* Connection-oriented IP, aka ST II. */
#define PF_CNT 21 /* Computer Network Technology. */
#define PF_RTIP 22 /* Help Identify RTIP packets. **/
#define PF_IPX 23 /* Novell Internet Protocol. */
#define PF_SIP 24 /* Simple Internet Protocol. */
#define PF_PIP 25 /* Help Identify PIP packets. */
#define PF_INET6 26 /* IP version 6. */
#define PF_MAX 27
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
#define AF_LOCAL PF_LOCAL
#define AF_UNIX PF_UNIX
#define AF_FILE PF_FILE
#define AF_INET PF_INET
#define AF_IMPLINK PF_IMPLINK
#define AF_PUP PF_PUP
#define AF_CHAOS PF_CHAOS
#define AF_NS PF_NS
#define AF_ISO PF_ISO
#define AF_OSI PF_OSI
#define AF_ECMA PF_ECMA
#define AF_DATAKIT PF_DATAKIT
#define AF_CCITT PF_CCITT
#define AF_SNA PF_SNA
#define AF_DECnet PF_DECnet
#define AF_DLI PF_DLI
#define AF_LAT PF_LAT
#define AF_HYLINK PF_HYLINK
#define AF_APPLETALK PF_APPLETALK
#define AF_ROUTE PF_ROUTE
#define AF_LINK PF_LINK
#define pseudo_AF_XTP PF_XTP
#define AF_COIP PF_COIP
#define AF_CNT PF_CNT
#define pseudo_AF_RTIP PF_RTIP
#define AF_IPX PF_IPX
#define AF_SIP PF_SIP
#define pseudo_AF_PIP PF_PIP
#define AF_INET6 PF_INET6
#define AF_MAX PF_MAX
/* Get the definition of the macro to define the common sockaddr members. */
#include <bits/sockaddr.h>
/* Structure describing a generic socket address. */
struct sockaddr
{
__SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
char sa_data[14]; /* Address data. */
};
/* Structure large enough to hold any socket address (with the historical
exception of AF_UNIX). We reserve 128 bytes. */
#if ULONG_MAX > 0xffffffff
# define __ss_aligntype __uint64_t
#else
# define __ss_aligntype __uint32_t
#endif
#define _SS_SIZE 128
#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
struct sockaddr_storage
{
__SOCKADDR_COMMON (ss_); /* Address family, etc. */
__ss_aligntype __ss_align; /* Force desired alignment. */
char __ss_padding[_SS_PADSIZE];
};
/* Bits in the FLAGS argument to `send', `recv', et al. */
enum
{
MSG_OOB = 0x01, /* Process out-of-band data. */
#define MSG_OOB MSG_OOB
MSG_PEEK = 0x02, /* Peek at incoming messages. */
#define MSG_PEEK MSG_PEEK
MSG_DONTROUTE = 0x04, /* Don't use local routing. */
#define MSG_DONTROUTE MSG_DONTROUTE
MSG_EOR = 0x08, /* Data completes record. */
#define MSG_EOR MSG_EOR
MSG_TRUNC = 0x10, /* Data discarded before delivery. */
#define MSG_TRUNC MSG_TRUNC
MSG_CTRUNC = 0x20, /* Control data lost before delivery. */
#define MSG_CTRUNC MSG_CTRUNC
MSG_WAITALL = 0x40, /* Wait for full request or error. */
#define MSG_WAITALL MSG_WAITALL
MSG_DONTWAIT = 0x80 /* This message should be nonblocking. */
#define MSG_DONTWAIT MSG_DONTWAIT
};
/* Structure describing messages sent by
`sendmsg' and received by `recvmsg'. */
struct msghdr
{
__ptr_t msg_name; /* Address to send to/receive from. */
socklen_t msg_namelen; /* Length of address data. */
struct iovec *msg_iov; /* Vector of data to send/receive into. */
int msg_iovlen; /* Number of elements in the vector. */
__ptr_t msg_accrights; /* Access rights information. */
socklen_t msg_accrightslen; /* Length of access rights information. */
int msg_flags; /* Flags in received message. */
};
/* Protocol number used to manipulate socket-level options
with `getsockopt' and `setsockopt'. */
#define SOL_SOCKET 0xffff
/* Socket-level options for `getsockopt' and `setsockopt'. */
enum
{
SO_DEBUG = 0x0001, /* Record debugging information. */
#define SO_DEBUG SO_DEBUG
SO_ACCEPTCONN = 0x0002, /* Accept connections on socket. */
#define SO_ACCEPTCONN SO_ACCEPTCONN
SO_REUSEADDR = 0x0004, /* Allow reuse of local addresses. */
#define SO_REUSEADDR SO_REUSEADDR
SO_KEEPALIVE = 0x0008, /* Keep connections alive and send
SIGPIPE when they die. */
#define SO_KEEPALIVE SO_KEEPALIVE
SO_DONTROUTE = 0x0010, /* Don't do local routing. */
#define SO_DONTROUTE SO_DONTROUTE
SO_BROADCAST = 0x0020, /* Allow transmission of
broadcast messages. */
#define SO_BROADCAST SO_BROADCAST
SO_USELOOPBACK = 0x0040, /* Use the software loopback to avoid
hardware use when possible. */
#define SO_USELOOPBACK SO_USELOOPBACK
SO_LINGER = 0x0080, /* Block on close of a reliable
socket to transmit pending data. */
#define SO_LINGER SO_LINGER
SO_OOBINLINE = 0x0100, /* Receive out-of-band data in-band. */
#define SO_OOBINLINE SO_OOBINLINE
SO_REUSEPORT = 0x0200, /* Allow local address and port reuse. */
#define SO_REUSEPORT SO_REUSEPORT
SO_SNDBUF = 0x1001, /* Send buffer size. */
#define SO_SNDBUF SO_SNDBUF
SO_RCVBUF = 0x1002, /* Receive buffer. */
#define SO_RCVBUF SO_RCVBUF
SO_SNDLOWAT = 0x1003, /* Send low-water mark. */
#define SO_SNDLOWAT SO_SNDLOWAT
SO_RCVLOWAT = 0x1004, /* Receive low-water mark. */
#define SO_RCVLOWAT SO_RCVLOWAT
SO_SNDTIMEO = 0x1005, /* Send timeout. */
#define SO_SNDTIMEO SO_SNDTIMEO
SO_RCVTIMEO = 0x1006, /* Receive timeout. */
#define SO_RCVTIMEO SO_RCVTIMEO
SO_ERROR = 0x1007, /* Get and clear error status. */
#define SO_ERROR SO_ERROR
SO_STYLE = 0x1008, /* Get socket connection style. */
#define SO_STYLE SO_STYLE
SO_TYPE = SO_STYLE /* Compatible name for SO_STYLE. */
#define SO_TYPE SO_TYPE
};
/* Structure used to manipulate the SO_LINGER option. */
struct linger
{
int l_onoff; /* Nonzero to linger on close. */
int l_linger; /* Time to linger. */
};
#endif /* bits/socket.h */

View File

@ -1,99 +0,0 @@
/* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
#endif
/* This structure needs to be defined in accordance with the
implementation of __stat, __fstat, and __lstat. */
#include <bits/types.h>
/* Structure describing file characteristics. */
struct stat
{
/* These are the members that POSIX.1 requires. */
__mode_t st_mode; /* File mode. */
#ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
#else
__ino64_t st_ino; /* File serial number. */
#endif
__dev_t st_dev; /* Device containing the file. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group. */
#ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
#else
__off64_t st_size; /* Size of file, in bytes. */
#endif
__time_t st_atime; /* Time of last access. */
__time_t st_mtime; /* Time of last modification. */
__time_t st_ctime; /* Time of last status change. */
/* This should be defined if there is a `st_blksize' member. */
#undef _STATBUF_ST_BLKSIZE
};
/* Encoding of the file mode. These are the standard Unix values,
but POSIX.1 does not specify what values should be used. */
#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. */
/* POSIX.1b objects. */
#define __S_TYPEISMQ(buf) 0
#define __S_TYPEISSEM(buf) 0
#define __S_TYPEISSHM(buf) 0
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
#define __S_ISGID 02000 /* Set group ID on execution. */
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
#ifdef __USE_LARGEFILE64
struct stat64
{
__mode_t st_mode; /* File mode. */
__ino64_t st_ino; /* File serial number. */
__dev_t st_dev; /* Device. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__off64_t st_size; /* Size of file, in bytes. */
__time_t st_atime; /* Time of last access. */
__time_t st_mtime; /* Time of last modification. */
__time_t st_ctime; /* Time of last status change. */
};
#endif

View File

@ -1,70 +0,0 @@
/* Definition of `struct statfs', information about a filesystem.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_STATFS_H
# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
#endif
#include <bits/types.h>
/* GNU Hurd NOTE: The size of this structure (16 ints) is known in
<hurd/hurd_types.defs>, since it is used in the `file_statfs' RPC. MiG
does not cope at all well with the passed C structure not being of the
expected size. There are some filler words at the end to allow for
future expansion. To increase the size of the structure used in the RPC
and retain binary compatibility, we would need to assign a new message
number. */
struct statfs
{
unsigned int f_type;
unsigned int f_bsize;
#ifndef __USE_FILE_OFFSET64
__fsblkcnt_t f_blocks;
__fsblkcnt_t f_bfree;
__fsblkcnt_t f_bavail;
__fsblkcnt_t f_files;
__fsblkcnt_t f_ffree;
#else
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsblkcnt64_t f_files;
__fsblkcnt64_t f_ffree;
#endif
__fsid_t f_fsid;
unsigned int f_namelen;
unsigned int f_spare[6];
};
#ifdef __USE_LARGEFILE64
struct statfs64
{
unsigned int f_type;
unsigned int f_bsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsblkcnt64_t f_files;
__fsblkcnt64_t f_ffree;
__fsid_t f_fsid;
unsigned int f_namelen;
unsigned int f_spare[6];
};
#endif

View File

@ -1,84 +0,0 @@
/* Definition of `struct statvfs', information about a filesystem.
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_STATVFS_H
# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
#endif
#include <bits/types.h>
/* GNU Hurd NOTE: The size of this structure (16 ints) is known in
<hurd/hurd_types.defs>, since it is used in the `file_statfs' RPC. MiG
does not cope at all well with the passed C structure not being of the
expected size. There are some filler words at the end to allow for
future expansion. To increase the size of the structure used in the RPC
and retain binary compatibility, we would need to assign a new message
number. */
struct statvfs
{
unsigned long int f_bsize;
unsigned long int f_frsize;
#ifndef __USE_FILE_OFFSET64
__fsblkcnt_t f_blocks;
__fsblkcnt_t f_bfree;
__fsblkcnt_t f_bavail;
__fsfilcnt_t f_files;
__fsfilcnt_t f_ffree;
__fsfilcnt_t f_favail;
#else
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsfilcnt64_t f_files;
__fsfilcnt64_t f_ffree;
__fsfilcnt64_t f_favail;
#endif
__fsid_t f_fsid;
unsigned long int f_flag;
unsigned long int f_namemax;
unsigned int f_spare[6];
};
#ifdef __USE_LARGEFILE64
struct statvfs64
{
unsigned long int f_bsize;
unsigned long int f_frsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsfilcnt64_t f_files;
__fsfilcnt64_t f_ffree;
__fsfilcnt64_t f_favail;
__fsid_t f_fsid;
unsigned long int f_flag;
unsigned long int f_namemax;
unsigned int f_spare[6];
};
#endif
/* Definitions for the flag in `f_flag'. */
enum
{
ST_RDONLY = 1,
#define ST_RDONLY ST_RDONLY
ST_NOSUID = 2
#define ST_NOSUID ST_NOSUID
};

View File

@ -1,48 +0,0 @@
/* Thread package specific definitions of stream lock type. Generic version.
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _BITS_STDIO_LOCK_H
#define _BITS_STDIO_LOCK_H 1
#include <bits/libc-lock.h>
__libc_lock_define_recursive (typedef, _IO_lock_t)
/* We need recursive (counting) mutexes. */
#ifdef _LIBC_LOCK_RECURSIVE_INITIALIZER
# define _IO_lock_initializer _LIBC_LOCK_RECURSIVE_INITIALIZER
#elif _IO_MTSAFE_IO
#error libio needs recursive mutexes for _IO_MTSAFE_IO
#endif
#define _IO_lock_init(_name) __libc_lock_init_recursive (_name)
#define _IO_lock_fini(_name) __libc_lock_fini_recursive (_name)
#define _IO_lock_lock(_name) __libc_lock_lock_recursive (_name)
#define _IO_lock_unlock(_name) __libc_lock_unlock_recursive (_name)
#define _IO_cleanup_region_start(_fct, _fp) \
__libc_cleanup_region_start (((_fp)->_flags & _IO_USER_LOCK) == 0, _fct, _fp)
#define _IO_cleanup_region_start_noarg(_fct) \
__libc_cleanup_region_start (1, _fct, NULL)
#define _IO_cleanup_region_end(_doit) \
__libc_cleanup_region_end (_doit)
#endif /* bits/stdio-lock.h */

View File

@ -1,12 +0,0 @@
/* This file should provide inline versions of string functions.
Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
This file should define __STRING_INLINES if functions are actually defined
as inlines. */
#ifndef _BITS_STRING_H
#define _BITS_STRING_H 1
#endif /* bits/string.h */

View File

@ -1,227 +0,0 @@
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _BITS_STROPTS_H
#define _BITS_STROPTS_H 1
#include <bits/types.h>
/* Macros used as `request' argument to `ioctl'. */
#define __SID ('S' << 8)
#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data
block in the first message. */
#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current
STREAM, just below the STREAM head. */
#define I_POP (__SID | 3) /* Remove STREAMS module from just below the
STREAM head. */
#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below
the STREAM head and place it in a character
string. */
#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */
#define I_SRDOPT (__SID | 6) /* Sets the read mode. */
#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */
#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl'
message and send that message downstream. */
#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process
wants the SIGPOLL signal issued. */
#define I_GETSIG (__SID |10) /* Return the events for which the calling
process is currently registered to be sent
a SIGPOLL signal. */
#define I_FIND (__SID |11) /* Compares the names of all modules currently
present in the STREAM to the name pointed to
by `arg'. */
#define I_LINK (__SID |12) /* Connect two STREAMs. */
#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */
#define I_PEEK (__SID |15) /* Allows a process to retrieve the information
in the first message on the STREAM head read
queue without taking the message off the
queue. */
#define I_FDINSERT (__SID |16) /* Create a message from the specified
buffer(s), adds information about another
STREAM, and send the message downstream. */
#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes'
to send a message, containing a file
pointer, to the STREAM head at the other end
of a STREAMS pipe. */
#define I_RECVFD (__SID |14) /* Non-EFT definition. */
#define I_SWROPT (__SID |19) /* Set the write mode. */
#define I_GWROPT (__SID |20) /* Return the current write mode setting. */
#define I_LIST (__SID |21) /* List all the module names on the STREAM, up
to and including the topmost driver name. */
#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent
link. */
#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were
connected with a persistent link. */
#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */
#define I_CKBAND (__SID |29) /* Check if the message of a given priority
band exists on the STREAM head read
queue. */
#define I_GETBAND (__SID |30) /* Return the priority band of the first
message on the STREAM head read queue. */
#define I_ATMARK (__SID |31) /* See if the current message on the STREAM
head read queue is "marked" by some module
downstream. */
#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when
a STREAM is closing and there is data on
the write queues. */
#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */
#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */
/* Used in `I_LOOK' request. */
#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */
/* Flush options. */
#define FLUSHR 0x01 /* Flush read queues. */
#define FLUSHW 0x02 /* Flush write queues. */
#define FLUSHRW 0x03 /* Flush read and write queues. */
#ifdef __USE_GNU
# define FLUSHBAND 0x04 /* Flush only specified band. */
#endif
/* Possible arguments for `I_SETSIG'. */
#define S_INPUT 0x0001 /* A message, other than a high-priority
message, has arrived. */
#define S_HIPRI 0x0002 /* A high-priority message is present. */
#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer
full. */
#define S_MSG 0x0008 /* A STREAMS signal message that contains the
SIGPOLL signal reaches the front of the
STREAM head read queue. */
#define S_ERROR 0x0010 /* Notification of an error condition. */
#define S_HANGUP 0x0020 /* Notification of a hangup. */
#define S_RDNORM 0x0040 /* A normal message has arrived. */
#define S_WRNORM S_OUTPUT
#define S_RDBAND 0x0080 /* A message with a non-zero priority has
arrived. */
#define S_WRBAND 0x0100 /* The write queue for a non-zero priority
band is no longer full. */
#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND,
SIGURG is generated instead of SIGPOLL when
a priority message reaches the front of the
STREAM head read queue. */
/* Option for `I_PEEK'. */
#define RS_HIPRI 0x01 /* Only look for high-priority messages. */
/* Options for `I_SRDOPT'. */
#define RNORM 0x0000 /* Byte-STREAM mode, the default. */
#define RMSGD 0x0001 /* Message-discard mode. */
#define RMSGN 0x0002 /* Message-nondiscard mode. */
#define RPROTDAT 0x0004 /* Deliver the control part of a message as
data. */
#define RPROTDIS 0x0008 /* Discard the control part of a message,
delivering any data part. */
#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message
containing a control part is at the front
of the STREAM head read queue. */
#ifdef __USE_GNU
# define RPROTMASK 0x001C /* The RPROT bits */
#endif
/* Possible mode for `I_SWROPT'. */
#define SNDZERO 0x001 /* Send a zero-length message downstream when a
`write' of 0 bytes occurs. */
#ifdef __USE_GNU
# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if
sd_werror is set. */
#endif
/* Arguments for `I_ATMARK'. */
#define ANYMARK 0x01 /* Check if the message is marked. */
#define LASTMARK 0x02 /* Check if the message is the last one marked
on the queue. */
/* Argument for `I_UNLINK'. */
#ifdef __USE_GNU
# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM
associated with `fildes'. */
#endif
/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */
#define MSG_HIPRI 0x01 /* Send/receive high priority message. */
#define MSG_ANY 0x02 /* Receive any message. */
#define MSG_BAND 0x04 /* Receive message from specified band. */
/* Values returned by getmsg and getpmsg */
#define MORECTL 1 /* More control information is left in
message. */
#define MOREDATA 2 /* More data is left in message. */
/* Structure used for the I_FLUSHBAND ioctl on streams. */
struct bandinfo
{
unsigned char bi_pri;
int bi_flag;
};
struct strbuf
{
int maxlen; /* Maximum buffer length. */
int len; /* Length of data. */
char *buf; /* Pointer to buffer. */
};
struct strpeek
{
struct strbuf ctlbuf;
struct strbuf databuf;
t_uscalar_t flags; /* UnixWare/Solaris compatibility. */
};
struct strfdinsert
{
struct strbuf ctlbuf;
struct strbuf databuf;
t_uscalar_t flags; /* UnixWare/Solaris compatibility. */
int fildes;
int offset;
};
struct strioctl
{
int ic_cmd;
int ic_timout;
int ic_len;
char *ic_dp;
};
struct strrecvfd
{
int fd;
uid_t uid;
gid_t gid;
char __fill[8]; /* UnixWare/Solaris compatibility */
};
struct str_mlist
{
char l_name[FMNAMESZ + 1];
};
struct str_list
{
int sl_nmods;
struct str_mlist *sl_modlist;
};
#endif /* bits/stropts.h */

View File

@ -1,256 +0,0 @@
/* termios type and macro definitions. 4.4 BSD/generic GNU version.
Copyright (C) 1993,94,96,97,99,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _TERMIOS_H
# error "Never include <bits/termios.h> directly; use <termios.h> instead."
#endif
/* These macros are also defined in some <bits/ioctls.h> files (with
numerically identical values), but this serves to shut up cpp's
complaining. */
#ifdef __USE_BSD
# ifdef MDMBUF
# undef MDMBUF
# endif
# ifdef FLUSHO
# undef FLUSHO
# endif
# ifdef PENDIN
# undef PENDIN
# endif
#endif /* __USE_BSD */
#ifdef ECHO
# undef ECHO
#endif
#ifdef TOSTOP
# undef TOSTOP
#endif
#ifdef NOFLSH
# undef NOFLSH
#endif
/* These definitions match those used by the 4.4 BSD kernel.
If the operating system has termios system calls or ioctls that
correctly implement the POSIX.1 behavior, there should be a
system-dependent version of this file that defines `struct termios',
`tcflag_t', `cc_t', `speed_t' and the `TC*' constants appropriately. */
/* Type of terminal control flag masks. */
typedef unsigned long int tcflag_t;
/* Type of control characters. */
typedef unsigned char cc_t;
/* Type of baud rate specifiers. */
typedef long int speed_t;
/* Terminal control structure. */
struct termios
{
/* Input modes. */
tcflag_t c_iflag;
#define IGNBRK (1 << 0) /* Ignore break condition. */
#define BRKINT (1 << 1) /* Signal interrupt on break. */
#define IGNPAR (1 << 2) /* Ignore characters with parity errors. */
#define PARMRK (1 << 3) /* Mark parity and framing errors. */
#define INPCK (1 << 4) /* Enable input parity check. */
#define ISTRIP (1 << 5) /* Strip 8th bit off characters. */
#define INLCR (1 << 6) /* Map NL to CR on input. */
#define IGNCR (1 << 7) /* Ignore CR. */
#define ICRNL (1 << 8) /* Map CR to NL on input. */
#define IXON (1 << 9) /* Enable start/stop output control. */
#define IXOFF (1 << 10) /* Enable start/stop input control. */
#ifdef __USE_BSD
# define IXANY (1 << 11) /* Any character will restart after stop. */
# define IMAXBEL (1 << 13) /* Ring bell when input queue is full. */
#endif
#ifdef __USE_GNU
# define IUCLC (1 << 14) /* Translate upper case input to lower case. */
#endif
/* Output modes. */
tcflag_t c_oflag;
#define OPOST (1 << 0) /* Perform output processing. */
#ifdef __USE_BSD
# define ONLCR (1 << 1) /* Map NL to CR-NL on output. */
# define OXTABS (1 << 2) /* Expand tabs to spaces. */
# define ONOEOT (1 << 3) /* Discard EOT (^D) on output. */
#endif
#ifdef __USE_GNU
# define OLCUC (1 << 9) /* Translate lower case output to upper case */
#endif
/* Control modes. */
tcflag_t c_cflag;
#ifdef __USE_BSD
# define CIGNORE (1 << 0) /* Ignore these control flags. */
#endif
#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */
#define CS5 0 /* 5 bits per byte. */
#define CS6 (1 << 8) /* 6 bits per byte. */
#define CS7 (1 << 9) /* 7 bits per byte. */
#define CS8 (CS6|CS7) /* 8 bits per byte. */
#define CSTOPB (1 << 10) /* Two stop bits instead of one. */
#define CREAD (1 << 11) /* Enable receiver. */
#define PARENB (1 << 12) /* Parity enable. */
#define PARODD (1 << 13) /* Odd parity instead of even. */
#define HUPCL (1 << 14) /* Hang up on last close. */
#define CLOCAL (1 << 15) /* Ignore modem status lines. */
#ifdef __USE_BSD
# define CCTS_OFLOW (1 << 16) /* CTS flow control of output. */
# define CRTS_IFLOW (1 << 17) /* RTS flow control of input. */
# define CRTSCTS (CCTS_OFLOW|CRTS_IFLOW) /* CTS/RTS flow control. */
# define MDMBUF (1 << 20) /* Carrier flow control of output. */
#endif
/* Local modes. */
tcflag_t c_lflag;
#ifdef __USE_BSD
# define ECHOKE (1 << 0) /* Visual erase for KILL. */
#endif
#define _ECHOE (1 << 1) /* Visual erase for ERASE. */
#define ECHOE _ECHOE
#define _ECHOK (1 << 2) /* Echo NL after KILL. */
#define ECHOK _ECHOK
#define _ECHO (1 << 3) /* Enable echo. */
#define ECHO _ECHO
#define _ECHONL (1 << 4) /* Echo NL even if ECHO is off. */
#define ECHONL _ECHONL
#ifdef __USE_BSD
# define ECHOPRT (1 << 5) /* Hardcopy visual erase. */
# define ECHOCTL (1 << 6) /* Echo control characters as ^X. */
#endif
#define _ISIG (1 << 7) /* Enable signals. */
#define ISIG _ISIG
#define _ICANON (1 << 8) /* Do erase and kill processing. */
#define ICANON _ICANON
#ifdef __USE_BSD
# define ALTWERASE (1 << 9) /* Alternate WERASE algorithm. */
#endif
#define _IEXTEN (1 << 10) /* Enable DISCARD and LNEXT. */
#define IEXTEN _IEXTEN
#define EXTPROC (1 << 11) /* External processing. */
#define _TOSTOP (1 << 22) /* Send SIGTTOU for background output. */
#define TOSTOP _TOSTOP
#ifdef __USE_BSD
# define FLUSHO (1 << 23) /* Output being flushed (state). */
# define NOKERNINFO (1 << 25) /* Disable VSTATUS. */
# define PENDIN (1 << 29) /* Retype pending input (state). */
#endif
#define _NOFLSH (1 << 31) /* Disable flush after interrupt. */
#define NOFLSH _NOFLSH
/* Control characters. */
#define VEOF 0 /* End-of-file character [ICANON]. */
#define VEOL 1 /* End-of-line character [ICANON]. */
#ifdef __USE_BSD
# define VEOL2 2 /* Second EOL character [ICANON]. */
#endif
#define VERASE 3 /* Erase character [ICANON]. */
#ifdef __USE_BSD
# define VWERASE 4 /* Word-erase character [ICANON]. */
#endif
#define VKILL 5 /* Kill-line character [ICANON]. */
#ifdef __USE_BSD
# define VREPRINT 6 /* Reprint-line character [ICANON]. */
#endif
#define VINTR 8 /* Interrupt character [ISIG]. */
#define VQUIT 9 /* Quit character [ISIG]. */
#define VSUSP 10 /* Suspend character [ISIG]. */
#ifdef __USE_BSD
# define VDSUSP 11 /* Delayed suspend character [ISIG]. */
#endif
#define VSTART 12 /* Start (X-ON) character [IXON, IXOFF]. */
#define VSTOP 13 /* Stop (X-OFF) character [IXON, IXOFF]. */
#ifdef __USE_BSD
# define VLNEXT 14 /* Literal-next character [IEXTEN]. */
# define VDISCARD 15 /* Discard character [IEXTEN]. */
#endif
#define VMIN 16 /* Minimum number of bytes read at once [!ICANON]. */
#define VTIME 17 /* Time-out value (tenths of a second) [!ICANON]. */
#ifdef __USE_BSD
# define VSTATUS 18 /* Status character [ICANON]. */
#endif
#define NCCS 20 /* Value duplicated in <hurd/tioctl.defs>. */
cc_t c_cc[NCCS];
/* Input and output baud rates. */
speed_t __ispeed, __ospeed;
#define B0 0 /* Hang up. */
#define B50 50 /* 50 baud. */
#define B75 75 /* 75 baud. */
#define B110 110 /* 110 baud. */
#define B134 134 /* 134.5 baud. */
#define B150 150 /* 150 baud. */
#define B200 200 /* 200 baud. */
#define B300 300 /* 300 baud. */
#define B600 600 /* 600 baud. */
#define B1200 1200 /* 1200 baud. */
#define B1800 1800 /* 1800 baud. */
#define B2400 2400 /* 2400 baud. */
#define B4800 4800 /* 4800 baud. */
#define B9600 9600 /* 9600 baud. */
#define B19200 19200 /* 19200 baud. */
#define B38400 38400 /* 38400 baud. */
#ifdef __USE_MISC
# define EXTA 19200
# define EXTB 38400
#endif
#define B57600 57600
#define B115200 115200
#define B230400 230400
#define B460800 460800
#define B500000 500000
#define B576000 576000
#define B921600 921600
#define B1000000 1000000
#define B1152000 1152000
#define B1500000 1500000
#define B2000000 2000000
#define B2500000 2500000
#define B3000000 3000000
#define B3500000 3500000
#define B4000000 4000000
};
#define _IOT_termios /* Hurd ioctl type field. */ \
_IOT (_IOTS (tcflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
#define TCSANOW 0 /* Change immediately. */
#define TCSADRAIN 1 /* Change when pending output is written. */
#define TCSAFLUSH 2 /* Flush pending input before changing. */
#ifdef __USE_BSD
# define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */
#endif
/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
#define TCIFLUSH 1 /* Discard data received but not yet read. */
#define TCOFLUSH 2 /* Discard data written but not yet sent. */
#define TCIOFLUSH 3 /* Discard all pending data. */
/* Values for the ACTION argument to `tcflow'. */
#define TCOOFF 1 /* Suspend output. */
#define TCOON 2 /* Restart suspended output. */
#define TCIOFF 3 /* Send a STOP character. */
#define TCION 4 /* Send a START character. */

View File

@ -1,54 +0,0 @@
/* System-dependent timing definitions. Stub version.
Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/*
* Never include this file directly; use <time.h> instead.
*/
#ifndef __need_timeval
# ifndef _BITS_TIME_H
# define _BITS_TIME_H 1
# define CLOCKS_PER_SEC 60
# ifdef __USE_POSIX199309
/* Identifier for system-wide realtime clock. */
# define CLOCK_REALTIME 0
/* Flag to indicate time is absolute. */
# define TIMER_ABSTIME 1
# endif
# endif /* bits/time.h */
#endif
#ifdef __need_timeval
# undef __need_timeval
# ifndef _STRUCT_TIMEVAL
# define _STRUCT_TIMEVAL 1
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
struct timeval
{
__time_t tv_sec; /* Seconds. */
__suseconds_t tv_usec; /* Microseconds. */
};
# endif /* struct timeval */
#endif /* need timeval */

View File

@ -1,131 +0,0 @@
/* Copyright (C) 1991,1992,94-1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/*
* Never include this file directly; use <sys/types.h> instead.
*/
#ifndef _BITS_TYPES_H
#define _BITS_TYPES_H 1
#include <features.h>
#define __need_size_t
#include <stddef.h>
/* Convenience types. */
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
#ifdef __GNUC__
typedef unsigned long long int __u_quad_t;
typedef long long int __quad_t;
#else
typedef struct
{
long __val[2];
} __quad_t;
typedef struct
{
__u_long __val[2];
} __u_quad_t;
#endif
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;
#ifdef __GNUC__
typedef signed long long int __int64_t;
typedef unsigned long long int __uint64_t;
#endif
typedef __quad_t *__qaddr_t;
typedef int __dev_t; /* Type of device numbers. */
typedef unsigned int __uid_t; /* Type of user identifications. */
typedef unsigned int __gid_t; /* Type of group identifications. */
typedef unsigned int __ino_t; /* Type of file serial numbers. */
typedef __quad_t __ino64_t; /* Type of file serial numbers (LFS). */
typedef unsigned int __mode_t; /* Type of file attribute bitmasks. */
typedef unsigned short int __nlink_t; /* Type of file link counts. */
typedef long int __off_t; /* Type of file sizes and offsets. */
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
typedef __loff_t __off64_t; /* Type of file sizes and offsets (LFS). */
typedef int __pid_t; /* Type of process identifications. */
typedef int __ssize_t; /* Type of a byte count, or error. */
typedef __u_quad_t __fsid_t; /* Type of file system IDs. */
typedef long int __clock_t; /* Type of CPU usage counts. */
typedef long int __rlim_t; /* Type for resource measurement. */
typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */
typedef unsigned int __id_t; /* General type for IDs. */
/* Everythin' else. */
typedef long int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __key_t; /* Type of an IPC key */
/* Clock ID used in clock and timer functions. */
typedef int __clockid_t;
/* Timer ID returned by `timer_create'. */
typedef int __timer_t;
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 256
/* XXX Used in `struct shmid_ds'. */
typedef unsigned short int __ipc_pid_t;
/* Type to represent block size. */
typedef unsigned int __blksize_t;
/* Types from the Large File Support interface. */
/* Type to count number os disk blocks. */
typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;
/* Type to count file system blocks. */
typedef unsigned int __fsblkcnt_t;
typedef __u_quad_t __fsblkcnt64_t;
/* Type to count file system inodes. */
typedef unsigned long int __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;
/* Used in XTI. */
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
typedef long int __intptr_t;
/* Duplicate info from sys/socket.h. */
typedef unsigned int __socklen_t;
#endif /* bits/types.h */

View File

@ -1,32 +0,0 @@
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_UIO_H
# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
#endif
/* `struct iovec' -- Structure describing a section of memory. */
struct iovec
{
/* Starting address. */
__ptr_t iov_base;
/* Length in bytes. */
size_t iov_len;
};

View File

@ -1,30 +0,0 @@
/* Generic declaration of ustat structure.
Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
__BEGIN_DECLS
struct ustat
{
__daddr_t f_tfree; /* total free */
__ino_t f_tinode; /* total inodes free */
char f_fname[6]; /* filesystem name */
char f_fpack[6]; /* filesystem pack name */
};
__END_DECLS

View File

@ -1,50 +0,0 @@
/* The `struct utmp' type, describing entries in the utmp file. Generic/BSDish
Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _UTMP_H
# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
#endif
#include <paths.h>
#include <time.h>
#define UT_NAMESIZE 8
#define UT_LINESIZE 8
#define UT_HOSTSIZE 16
struct lastlog
{
time_t ll_time;
char ll_line[UT_LINESIZE];
char ll_host[UT_HOSTSIZE];
};
struct utmp
{
char ut_line[UT_LINESIZE];
char ut_user[UT_NAMESIZE];
#define ut_name ut_user
char ut_host[UT_HOSTSIZE];
long int ut_time;
};
#define _HAVE_UT_HOST 1 /* We have the ut_host field. */

View File

@ -1,25 +0,0 @@
/* Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_UTSNAME_H
# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
#endif
/* The size of the character arrays used to hold the information
in a `struct utsname'. Enlarge this as necessary. */
#define _UTSNAME_LENGTH 1024

View File

@ -1,27 +0,0 @@
/* Definitions of flag bits for `waitpid' et al.
Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if !defined _SYS_WAIT_H && !defined _STDLIB_H
# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
#endif
/* Bits in the third argument to `waitpid'. */
#define WNOHANG 1 /* Don't block waiting. */
#define WUNTRACED 2 /* Report status of stopped children. */

View File

@ -1,104 +0,0 @@
/* Definitions of status bits for `wait' et al.
Copyright (C) 1992, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#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. */
#ifdef __GNUC__
# define __WIFSIGNALED(status) \
(__extension__ ({ int __status = (status); \
!__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
#else /* Not GCC. */
# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status))
#endif /* GCC. */
/* Nonzero if STATUS indicates the child is stopped. */
#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
/* 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 __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. */

View File

@ -1,26 +0,0 @@
/* wchar_t type related definitions.
Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H 1
#define __WCHAR_MIN (-2147483647 - 1)
#define __WCHAR_MAX (2147483647)
#endif /* bits/wchar.h */

View File

@ -1 +0,0 @@
#error "This file must be written based on the data type sizes of the target"

View File

@ -277,14 +277,6 @@
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
/* Decide whether a compiler supports the long long datatypes. */
#if defined __GNUC__ \
|| (defined __PGI && defined __i386__ ) \
|| (defined __INTEL_COMPILER && (defined __i386__ || defined __ia64__)) \
|| (defined __STDC_VERSION && __STDC_VERSION >= 199901L)
# define __GLIBC_HAVE_LONG_LONG 1
#endif
/* This is here only because every header file already includes this one. */
#ifndef __ASSEMBLER__
# ifndef _SYS_CDEFS_H

View File

@ -5814,88 +5814,6 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
unsigned num_regs_pushed = 0;
#endif
/* Definitions for state transitions. More efficiently for gcc. */
#ifdef __GNUC__
# if defined HAVE_SUBTRACT_LOCAL_LABELS && defined SHARED
# define NEXT \
do \
{ \
int offset; \
const void *__unbounded ptr; \
offset = (p == pend \
? 0 : jmptable[SWITCH_ENUM_CAST ((re_opcode_t) *p++)]); \
ptr = &&end_of_pattern + offset; \
goto *ptr; \
} \
while (0)
# define REF(x) \
&&label_##x - &&end_of_pattern
# define JUMP_TABLE_TYPE const int
# else
# define NEXT \
do \
{ \
const void *__unbounded ptr; \
ptr = (p == pend ? &&end_of_pattern \
: jmptable[SWITCH_ENUM_CAST ((re_opcode_t) *p++)]); \
goto *ptr; \
} \
while (0)
# define REF(x) \
&&label_##x
# define JUMP_TABLE_TYPE const void *const
# endif
# define CASE(x) label_##x
static JUMP_TABLE_TYPE jmptable[] =
{
REF (no_op),
REF (succeed),
REF (exactn),
# ifdef MBS_SUPPORT
REF (exactn_bin),
# endif
REF (anychar),
REF (charset),
REF (charset_not),
REF (start_memory),
REF (stop_memory),
REF (duplicate),
REF (begline),
REF (endline),
REF (begbuf),
REF (endbuf),
REF (jump),
REF (jump_past_alt),
REF (on_failure_jump),
REF (on_failure_keep_string_jump),
REF (pop_failure_jump),
REF (maybe_pop_jump),
REF (dummy_failure_jump),
REF (push_dummy_failure),
REF (succeed_n),
REF (jump_n),
REF (set_number_at),
REF (wordchar),
REF (notwordchar),
REF (wordbeg),
REF (wordend),
REF (wordbound),
REF (notwordbound)
# ifdef emacs
,REF (before_dot),
REF (at_dot),
REF (after_dot),
REF (syntaxspec),
REF (notsyntaxspec)
# endif
};
#else
# define NEXT \
break
# define CASE(x) \
case x
#endif
DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
INIT_FAIL_STACK ();
@ -6118,21 +6036,13 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
DEBUG_PRINT2 ("\n0x%x: ", p);
#endif
#ifdef __GNUC__
NEXT;
#else
if (p == pend)
#endif
{
#ifdef __GNUC__
end_of_pattern:
#endif
/* End of pattern means we might have succeeded. */
DEBUG_PRINT1 ("end of pattern ... ");
{ /* End of pattern means we might have succeeded. */
DEBUG_PRINT1 ("end of pattern ... ");
/* If we haven't matched the entire string, and we want the
longest match, try backtracking. */
if (d != end_match_2)
longest match, try backtracking. */
if (d != end_match_2)
{
/* 1 if this match ends in the same string (string1 or string2)
as the best previous match. */
@ -6148,185 +6058,184 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
else
best_match_p = !MATCHING_IN_FIRST_STRING;
DEBUG_PRINT1 ("backtracking.\n");
DEBUG_PRINT1 ("backtracking.\n");
if (!FAIL_STACK_EMPTY ())
{ /* More failure points to try. */
if (!FAIL_STACK_EMPTY ())
{ /* More failure points to try. */
/* If exceeds best match so far, save it. */
if (!best_regs_set || best_match_p)
{
best_regs_set = true;
match_end = d;
/* If exceeds best match so far, save it. */
if (!best_regs_set || best_match_p)
{
best_regs_set = true;
match_end = d;
DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
{
best_regstart[mcnt] = regstart[mcnt];
best_regend[mcnt] = regend[mcnt];
}
}
goto fail;
}
for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
{
best_regstart[mcnt] = regstart[mcnt];
best_regend[mcnt] = regend[mcnt];
}
}
goto fail;
}
/* If no failure points, don't restore garbage. And if
last match is real best match, don't restore second
best one. */
else if (best_regs_set && !best_match_p)
{
restore_best_regs:
/* Restore best match. It may happen that `dend ==
end_match_1' while the restored d is in string2.
For example, the pattern `x.*y.*z' against the
strings `x-' and `y-z-', if the two strings are
not consecutive in memory. */
DEBUG_PRINT1 ("Restoring best registers.\n");
/* If no failure points, don't restore garbage. And if
last match is real best match, don't restore second
best one. */
else if (best_regs_set && !best_match_p)
{
restore_best_regs:
/* Restore best match. It may happen that `dend ==
end_match_1' while the restored d is in string2.
For example, the pattern `x.*y.*z' against the
strings `x-' and `y-z-', if the two strings are
not consecutive in memory. */
DEBUG_PRINT1 ("Restoring best registers.\n");
d = match_end;
dend = ((d >= string1 && d <= end1)
? end_match_1 : end_match_2);
d = match_end;
dend = ((d >= string1 && d <= end1)
? end_match_1 : end_match_2);
for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
{
regstart[mcnt] = best_regstart[mcnt];
regend[mcnt] = best_regend[mcnt];
}
}
} /* d != end_match_2 */
}
} /* d != end_match_2 */
succeed_label:
DEBUG_PRINT1 ("Accepting match.\n");
/* If caller wants register contents data back, do it. */
if (regs && !bufp->no_sub)
DEBUG_PRINT1 ("Accepting match.\n");
/* If caller wants register contents data back, do it. */
if (regs && !bufp->no_sub)
{
/* Have the register data arrays been allocated? */
if (bufp->regs_allocated == REGS_UNALLOCATED)
{ /* No. So allocate them with malloc. We need one
extra element beyond `num_regs' for the `-1' marker
GNU code uses. */
regs->num_regs = MAX (RE_NREGS, num_regs + 1);
regs->start = TALLOC (regs->num_regs, regoff_t);
regs->end = TALLOC (regs->num_regs, regoff_t);
if (regs->start == NULL || regs->end == NULL)
if (bufp->regs_allocated == REGS_UNALLOCATED)
{ /* No. So allocate them with malloc. We need one
extra element beyond `num_regs' for the `-1' marker
GNU code uses. */
regs->num_regs = MAX (RE_NREGS, num_regs + 1);
regs->start = TALLOC (regs->num_regs, regoff_t);
regs->end = TALLOC (regs->num_regs, regoff_t);
if (regs->start == NULL || regs->end == NULL)
{
FREE_VARIABLES ();
return -2;
}
bufp->regs_allocated = REGS_REALLOCATE;
}
else if (bufp->regs_allocated == REGS_REALLOCATE)
{ /* Yes. If we need more elements than were already
allocated, reallocate them. If we need fewer, just
leave it alone. */
if (regs->num_regs < num_regs + 1)
{
regs->num_regs = num_regs + 1;
RETALLOC (regs->start, regs->num_regs, regoff_t);
RETALLOC (regs->end, regs->num_regs, regoff_t);
if (regs->start == NULL || regs->end == NULL)
bufp->regs_allocated = REGS_REALLOCATE;
}
else if (bufp->regs_allocated == REGS_REALLOCATE)
{ /* Yes. If we need more elements than were already
allocated, reallocate them. If we need fewer, just
leave it alone. */
if (regs->num_regs < num_regs + 1)
{
regs->num_regs = num_regs + 1;
RETALLOC (regs->start, regs->num_regs, regoff_t);
RETALLOC (regs->end, regs->num_regs, regoff_t);
if (regs->start == NULL || regs->end == NULL)
{
FREE_VARIABLES ();
return -2;
}
}
}
else
}
}
else
{
/* These braces fend off a "empty body in an else-statement"
warning under GCC when assert expands to nothing. */
assert (bufp->regs_allocated == REGS_FIXED);
}
/* Convert the pointer data in `regstart' and `regend' to
indices. Register zero has to be set differently,
since we haven't kept track of any info for it. */
if (regs->num_regs > 0)
{
regs->start[0] = pos;
/* Convert the pointer data in `regstart' and `regend' to
indices. Register zero has to be set differently,
since we haven't kept track of any info for it. */
if (regs->num_regs > 0)
{
regs->start[0] = pos;
#ifdef WCHAR
if (MATCHING_IN_FIRST_STRING)
regs->end[0] = (mbs_offset1 != NULL ?
mbs_offset1[d-string1] : 0);
regs->end[0] = mbs_offset1 != NULL ?
mbs_offset1[d-string1] : 0;
else
regs->end[0] = csize1 + (mbs_offset2 != NULL
? mbs_offset2[d-string2] : 0);
regs->end[0] = csize1 + (mbs_offset2 != NULL ?
mbs_offset2[d-string2] : 0);
#else
regs->end[0] = (MATCHING_IN_FIRST_STRING
regs->end[0] = (MATCHING_IN_FIRST_STRING
? ((regoff_t) (d - string1))
: ((regoff_t) (d - string2 + size1)));
: ((regoff_t) (d - string2 + size1)));
#endif /* WCHAR */
}
}
/* Go through the first `min (num_regs, regs->num_regs)'
registers, since that is all we initialized. */
/* Go through the first `min (num_regs, regs->num_regs)'
registers, since that is all we initialized. */
for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
mcnt++)
{
if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
regs->start[mcnt] = regs->end[mcnt] = -1;
else
{
if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
regs->start[mcnt] = regs->end[mcnt] = -1;
else
{
regs->start[mcnt]
= (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
regs->end[mcnt]
regs->end[mcnt]
= (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
}
}
}
/* If the regs structure we return has more elements than
were in the pattern, set the extra elements to -1. If
we (re)allocated the registers, this is the case,
because we always allocate enough to have at least one
-1 at the end. */
for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
regs->start[mcnt] = regs->end[mcnt] = -1;
/* If the regs structure we return has more elements than
were in the pattern, set the extra elements to -1. If
we (re)allocated the registers, this is the case,
because we always allocate enough to have at least one
-1 at the end. */
for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
regs->start[mcnt] = regs->end[mcnt] = -1;
} /* regs && !bufp->no_sub */
DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
nfailure_points_pushed, nfailure_points_popped,
nfailure_points_pushed - nfailure_points_popped);
DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
nfailure_points_pushed, nfailure_points_popped,
nfailure_points_pushed - nfailure_points_popped);
DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
#ifdef WCHAR
if (MATCHING_IN_FIRST_STRING)
mcnt = mbs_offset1 != NULL ? mbs_offset1[d-string1] : 0;
else
mcnt = (mbs_offset2 != NULL ? mbs_offset2[d-string2] : 0) +
csize1;
mcnt -= pos;
csize1;
mcnt -= pos;
#else
mcnt = d - pos - (MATCHING_IN_FIRST_STRING
? string1 : string2 - size1);
mcnt = d - pos - (MATCHING_IN_FIRST_STRING
? string1
: string2 - size1);
#endif /* WCHAR */
DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
FREE_VARIABLES ();
return mcnt;
}
FREE_VARIABLES ();
return mcnt;
}
#ifndef __GNUC__
/* Otherwise match next pattern command. */
switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
{
#endif
/* Ignore these. Used to ignore the n of succeed_n's which
currently have n == 0. */
CASE (no_op):
case no_op:
DEBUG_PRINT1 ("EXECUTING no_op.\n");
NEXT;
break;
CASE (succeed):
case succeed:
DEBUG_PRINT1 ("EXECUTING succeed.\n");
goto succeed_label;
/* Match the next n pattern characters exactly. The following
byte in the pattern defines n, and the n bytes after that
are the characters to match. */
CASE (exactn):
case exactn:
#ifdef MBS_SUPPORT
CASE (exactn_bin):
case exactn_bin:
#endif
mcnt = *p++;
DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
@ -6368,11 +6277,11 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
while (--mcnt);
}
SET_REGS_MATCHED ();
NEXT;
break;
/* Match any character except possibly a newline or a null. */
CASE (anychar):
case anychar:
DEBUG_PRINT1 ("EXECUTING anychar.\n");
PREFETCH ();
@ -6384,11 +6293,11 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
SET_REGS_MATCHED ();
DEBUG_PRINT2 (" Matched `%ld'.\n", (long int) *d);
d++;
NEXT;
break;
CASE (charset):
CASE (charset_not):
case charset:
case charset_not:
{
register UCHAR_T c;
#ifdef WCHAR
@ -6788,7 +6697,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
#endif /* WCHAR */
SET_REGS_MATCHED ();
d++;
NEXT;
break;
}
@ -6797,7 +6706,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
number of groups inner to this one in the next. The text
matched within the group is recorded (in the internal
registers data structure) under the register number. */
CASE (start_memory):
case start_memory:
DEBUG_PRINT3 ("EXECUTING start_memory %ld (%ld):\n",
(long int) *p, (long int) p[1]);
@ -6840,13 +6749,13 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
p += 2;
just_past_start_mem = p;
NEXT;
break;
/* The stop_memory opcode represents the end of a group. Its
arguments are the same as start_memory's: the register
number, and the number of inner groups. */
CASE (stop_memory):
case stop_memory:
DEBUG_PRINT3 ("EXECUTING stop_memory %ld (%ld):\n",
(long int) *p, (long int) p[1]);
@ -6979,12 +6888,12 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
/* Move past the register number and the inner group count. */
p += 2;
NEXT;
break;
/* \<digit> has been turned into a `duplicate' command which is
followed by the numeric value of <digit> as the register number. */
CASE (duplicate):
case duplicate:
{
register const CHAR_T *d2, *dend2;
int regno = *p++; /* Get which register to match against. */
@ -7044,68 +6953,58 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
SET_REGS_MATCHED ();
}
}
NEXT;
break;
/* begline matches the empty string at the beginning of the string
(unless `not_bol' is set in `bufp'), and, if
`newline_anchor' is set, after newlines. */
CASE (begline):
case begline:
DEBUG_PRINT1 ("EXECUTING begline.\n");
if (AT_STRINGS_BEG (d))
{
if (!bufp->not_bol)
{
NEXT;
}
if (!bufp->not_bol) break;
}
else if (d[-1] == '\n' && bufp->newline_anchor)
{
NEXT;
break;
}
/* In all other cases, we fail. */
goto fail;
/* endline is the dual of begline. */
CASE (endline):
case endline:
DEBUG_PRINT1 ("EXECUTING endline.\n");
if (AT_STRINGS_END (d))
{
if (!bufp->not_eol)
{
NEXT;
}
if (!bufp->not_eol) break;
}
/* We have to ``prefetch'' the next character. */
else if ((d == end1 ? *string2 : *d) == '\n'
&& bufp->newline_anchor)
{
NEXT;
break;
}
goto fail;
/* Match at the very beginning of the data. */
CASE (begbuf):
case begbuf:
DEBUG_PRINT1 ("EXECUTING begbuf.\n");
if (AT_STRINGS_BEG (d))
{
NEXT;
}
break;
goto fail;
/* Match at the very end of the data. */
CASE (endbuf):
case endbuf:
DEBUG_PRINT1 ("EXECUTING endbuf.\n");
if (AT_STRINGS_END (d))
{
NEXT;
}
break;
goto fail;
@ -7125,7 +7024,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
stack at all is that otherwise we would have to change
`anychar's code to do something besides goto fail in this
case; that seems worse than this. */
CASE (on_failure_keep_string_jump):
case on_failure_keep_string_jump:
DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
EXTRACT_NUMBER_AND_INCR (mcnt, p);
@ -7136,7 +7035,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
#endif
PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
NEXT;
break;
/* Uses of on_failure_jump:
@ -7151,7 +7050,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
Repeats start with an on_failure_jump that points past both
the repetition text and either the following jump or
pop_failure_jump back to this on_failure_jump. */
CASE (on_failure_jump):
case on_failure_jump:
on_failure:
DEBUG_PRINT1 ("EXECUTING on_failure_jump");
@ -7193,12 +7092,12 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
DEBUG_PRINT1 (":\n");
PUSH_FAILURE_POINT (p + mcnt, d, -2);
NEXT;
break;
/* A smart repeat ends with `maybe_pop_jump'.
We change it to either `pop_failure_jump' or `jump'. */
CASE (maybe_pop_jump):
case maybe_pop_jump:
EXTRACT_NUMBER_AND_INCR (mcnt, p);
DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
{
@ -7366,7 +7265,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
points put on by this pop_failure_jump's matching
on_failure_jump; we got through the pattern to here from the
matching on_failure_jump, so didn't fail. */
CASE (pop_failure_jump):
case pop_failure_jump:
{
/* We need to pass separate storage for the lowest and
highest registers, even though we don't care about the
@ -7393,7 +7292,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
/* Note fall through. */
/* Unconditionally jump (without popping any failure points). */
CASE (jump):
case jump:
EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
p += mcnt; /* Do the jump. */
@ -7402,12 +7301,12 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
#else
DEBUG_PRINT2 ("(to 0x%x).\n", p);
#endif
NEXT;
break;
/* We need this opcode so we can detect where alternatives end
in `group_match_null_string_p' et al. */
CASE (jump_past_alt):
case jump_past_alt:
DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
goto unconditional_jump;
@ -7417,7 +7316,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
pop_failure_jump, also, and with a pattern of, say, `a+', we
are skipping over the on_failure_jump, so we have to push
something meaningless for pop_failure_jump to pop. */
CASE (dummy_failure_jump):
case dummy_failure_jump:
DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
/* It doesn't matter what we push for the string here. What
the code at `fail' tests is the value for the pattern. */
@ -7430,16 +7329,16 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
we don't want the failure point for the alternative to be
popped. For example, matching `(a|ab)*' against `aab'
requires that we match the `ab' alternative. */
CASE (push_dummy_failure):
case push_dummy_failure:
DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
/* See comments just above at `dummy_failure_jump' about the
two zeroes. */
PUSH_FAILURE_POINT (NULL, NULL, -2);
NEXT;
break;
/* Have to succeed matching what follows at least n times.
After that, handle like `on_failure_jump'. */
CASE (succeed_n):
case succeed_n:
EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
@ -7476,9 +7375,9 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
#endif /* WCHAR */
goto on_failure;
}
NEXT;
break;
CASE (jump_n):
case jump_n:
EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
@ -7500,9 +7399,9 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
/* If don't have to jump any more, skip over the rest of command. */
else
p += 2 * OFFSET_ADDRESS_SIZE;
NEXT;
break;
CASE (set_number_at):
case set_number_at:
{
DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
@ -7515,7 +7414,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
#endif
STORE_NUMBER (p1, mcnt);
NEXT;
break;
}
#if 0
@ -7524,40 +7423,34 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
AT_WORD_BOUNDARY, so this code is disabled. Expanding the
macro and introducing temporary variables works around the bug. */
CASE (wordbound):
case wordbound:
DEBUG_PRINT1 ("EXECUTING wordbound.\n");
if (AT_WORD_BOUNDARY (d))
{
NEXT;
}
break;
goto fail;
CASE (notwordbound):
case notwordbound:
DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
if (AT_WORD_BOUNDARY (d))
goto fail;
NEXT;
break;
#else
CASE (wordbound):
case wordbound:
{
boolean prevchar, thischar;
DEBUG_PRINT1 ("EXECUTING wordbound.\n");
if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
{
NEXT;
}
break;
prevchar = WORDCHAR_P (d - 1);
thischar = WORDCHAR_P (d);
if (prevchar != thischar)
{
NEXT;
}
break;
goto fail;
}
CASE (notwordbound):
case notwordbound:
{
boolean prevchar, thischar;
@ -7569,53 +7462,49 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
thischar = WORDCHAR_P (d);
if (prevchar != thischar)
goto fail;
NEXT;
break;
}
#endif
CASE (wordbeg):
case wordbeg:
DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
if (!AT_STRINGS_END (d) && WORDCHAR_P (d)
&& (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
{
NEXT;
}
break;
goto fail;
CASE (wordend):
case wordend:
DEBUG_PRINT1 ("EXECUTING wordend.\n");
if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
&& (AT_STRINGS_END (d) || !WORDCHAR_P (d)))
{
NEXT;
}
break;
goto fail;
#ifdef emacs
CASE (before_dot):
case before_dot:
DEBUG_PRINT1 ("EXECUTING before_dot.\n");
if (PTR_CHAR_POS ((unsigned char *) d) >= point)
goto fail;
NEXT;
break;
CASE (at_dot):
case at_dot:
DEBUG_PRINT1 ("EXECUTING at_dot.\n");
if (PTR_CHAR_POS ((unsigned char *) d) != point)
goto fail;
NEXT;
break;
CASE (after_dot):
case after_dot:
DEBUG_PRINT1 ("EXECUTING after_dot.\n");
if (PTR_CHAR_POS ((unsigned char *) d) <= point)
goto fail;
NEXT;
break;
CASE (syntaxspec):
case syntaxspec:
DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
mcnt = *p++;
goto matchsyntax;
CASE (wordchar):
case wordchar:
DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
mcnt = (int) Sword;
matchsyntax:
@ -7625,14 +7514,14 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
goto fail;
SET_REGS_MATCHED ();
NEXT;
break;
CASE (notsyntaxspec):
case notsyntaxspec:
DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
mcnt = *p++;
goto matchnotsyntax;
CASE (notwordchar):
case notwordchar:
DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
mcnt = (int) Sword;
matchnotsyntax:
@ -7642,34 +7531,32 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
goto fail;
SET_REGS_MATCHED ();
NEXT;
break;
#else /* not emacs */
CASE (wordchar):
case wordchar:
DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
PREFETCH ();
if (!WORDCHAR_P (d))
goto fail;
SET_REGS_MATCHED ();
d++;
NEXT;
break;
CASE (notwordchar):
case notwordchar:
DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
PREFETCH ();
if (WORDCHAR_P (d))
goto fail;
SET_REGS_MATCHED ();
d++;
NEXT;
break;
#endif /* not emacs */
#ifndef __GNUC__
default:
abort ();
}
continue; /* Successfully executed one pattern command; keep going. */
#endif
/* We goto here if a matching operation fails. */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
/* Copyright (C) 1991,92,94,95,96,97,98,99,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
@ -162,7 +162,7 @@ typedef unsigned int uint;
typedef char int8_t;
typedef short int int16_t;
typedef int int32_t;
# if __GLIBC_HAVE_LONG_LONG
# ifdef __GNUC__
__extension__ typedef long long int int64_t;
# endif
# endif
@ -171,7 +171,7 @@ __extension__ typedef long long int int64_t;
typedef unsigned char u_int8_t;
typedef unsigned short int u_int16_t;
typedef unsigned int u_int32_t;
# if __GLIBC_HAVE_LONG_LONG
# ifdef __GNUC__
__extension__ typedef unsigned long long int u_int64_t;
# endif

View File

@ -140,7 +140,7 @@ extern int atoi (__const char *__nptr) __THROW __attribute_pure__;
/* Convert a string to a long integer. */
extern long int atol (__const char *__nptr) __THROW __attribute_pure__;
#if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
#if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_MISC)
/* Convert a string to a long long integer. */
__extension__ extern long long int atoll (__const char *__nptr)
__THROW __attribute_pure__;
@ -167,7 +167,7 @@ extern unsigned long int strtoul (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
__THROW;
#if defined __GLIBC_HAVE_LONG_LONG && defined __USE_BSD
#if defined __GNUC__ && defined __USE_BSD
/* Convert a string to a quadword integer. */
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
@ -179,7 +179,7 @@ extern unsigned long long int strtouq (__const char *__restrict __nptr,
__THROW;
#endif /* GCC and use BSD. */
#if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
#if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_MISC)
/* These functions will part of the standard C library in ISO C99. */
/* Convert a string to a quadword integer. */

View File

@ -55,7 +55,6 @@ __ieee754_coshl (x)
{
long double t, w;
int32_t ex;
u_int32_t mx, lx;
ieee854_long_double_shape_type u;
u.value = x;
@ -73,7 +72,7 @@ __ieee754_coshl (x)
{
t = __expm1l (u.value);
w = one + t;
if (ex < 0x3fc60000) /* |x| < 2^-57 */
if (ex < 0x3fb80000) /* |x| < 2^-116 */
return w; /* cosh(tiny) = 1 */
return one + (t * t) / (w + w);

View File

@ -625,7 +625,7 @@ static const long double Q2_2r3D[NQ2_2r3D + 1] = {
/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
static long double
neval (long double x, long double *p, int n)
neval (long double x, const long double *p, int n)
{
long double y;
@ -643,7 +643,7 @@ neval (long double x, long double *p, int n)
/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */
static long double
deval (long double x, long double *p, int n)
deval (long double x, const long double *p, int n)
{
long double y;

View File

@ -81,11 +81,8 @@
/* Copyright 2001 by Stephen L. Moshier (moshier@na-net.onrl.gov). */
extern long double fabsl (long double);
extern long double cosl (long double);
extern long double sinl (long double);
extern long double sqrtl (long double);
extern long double logl (long double);
#include "math.h"
#include "math_private.h"
/* 1 / sqrt(pi) */
static const long double ONEOSQPI = 5.6418958354775628694807945156077258584405E-1L;
@ -634,7 +631,7 @@ static const long double Q2_2r3D[NQ2_2r3D + 1] = {
/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
static long double
neval (long double x, long double *p, int n)
neval (long double x, const long double *p, int n)
{
long double y;
@ -652,7 +649,7 @@ neval (long double x, long double *p, int n)
/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */
static long double
deval (long double x, long double *p, int n)
deval (long double x, const long double *p, int n)
{
long double y;

View File

@ -707,7 +707,7 @@ static const long double RDr9[NRDr9 + 1] =
/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
static long double
neval (long double x, long double *p, int n)
neval (long double x, const long double *p, int n)
{
long double y;
@ -725,7 +725,7 @@ neval (long double x, long double *p, int n)
/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */
static long double
deval (long double x, long double *p, int n)
deval (long double x, const long double *p, int n)
{
long double y;

View File

@ -117,7 +117,7 @@ static const long double S[6] =
static const long double
/* log10(2) */
L102A = 0.3125L,
L102B -1.14700043360188047862611052755069732318101185E-2L,
L102B = -1.14700043360188047862611052755069732318101185E-2L,
/* log10(e) */
L10EA = 0.5L,
L10EB = -6.570551809674817234887108108339491770560299E-2L,

View File

@ -84,7 +84,7 @@
/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */
static long double
neval (long double x, long double *p, int n)
neval (long double x, const long double *p, int n)
{
long double y;
@ -102,7 +102,7 @@ neval (long double x, long double *p, int n)
/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */
static long double
deval (long double x, long double *p, int n)
deval (long double x, const long double *p, int n)
{
long double y;
@ -746,7 +746,7 @@ __erfl (x)
#endif
{
long double a, y, z;
int32_t i, ix, sign, flag;
int32_t i, ix, sign;
ieee854_long_double_shape_type u;
u.value = x;
@ -804,8 +804,8 @@ weak_alias (__erf, erfl)
x;
#endif
{
long double P, Q, s, y, z, p, r;
int32_t i, ix, sign, flag;
long double y, z, p, r;
int32_t i, ix, sign;
ieee854_long_double_shape_type u;
u.value = x;

View File

@ -17,7 +17,7 @@
* x
* 2 |\
* erf(x) = --------- | exp(-t*t)dt
* sqrt(pi) \|
* sqrt(pi) \|
* 0
*
* erfc(x) = 1-erf(x)
@ -37,12 +37,12 @@
* is close to one. The interval is chosen because the fix
* point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is
* near 0.6174), and by some experiment, 0.84375 is chosen to
* guarantee the error is less than one ulp for erf.
* guarantee the error is less than one ulp for erf.
*
* 2. For |x| in [0.84375,1.25], let s = |x| - 1, and
* c = 0.84506291151 rounded to single (24 bits)
* erf(x) = sign(x) * (c + P1(s)/Q1(s))
* erfc(x) = (1-c) - P1(s)/Q1(s) if x > 0
* erf(x) = sign(x) * (c + P1(s)/Q1(s))
* erfc(x) = (1-c) - P1(s)/Q1(s) if x > 0
* 1+(c+P1(s)/Q1(s)) if x < 0
* Remark: here we use the taylor series expansion at x=1.
* erf(1+s) = erf(1) + s*Poly(s)
@ -50,18 +50,18 @@
* Note that |P1/Q1|< 0.078 for x in [0.84375,1.25]
*
* 3. For x in [1.25,1/0.35(~2.857143)],
* erfc(x) = (1/x)*exp(-x*x-0.5625+R1(z)/S1(z))
* erfc(x) = (1/x)*exp(-x*x-0.5625+R1(z)/S1(z))
* z=1/x^2
* erf(x) = 1 - erfc(x)
* erf(x) = 1 - erfc(x)
*
* 4. For x in [1/0.35,107]
* erfc(x) = (1/x)*exp(-x*x-0.5625+R2/S2) if x > 0
* erfc(x) = (1/x)*exp(-x*x-0.5625+R2/S2) if x > 0
* = 2.0 - (1/x)*exp(-x*x-0.5625+R2(z)/S2(z))
* if -6.666<x<0
* = 2.0 - tiny (if x <= -6.666)
* z=1/x^2
* erf(x) = sign(x)*(1.0 - erfc(x)) if x < 6.666, else
* erf(x) = sign(x)*(1.0 - tiny)
* erf(x) = sign(x)*(1.0 - erfc(x)) if x < 6.666, else
* erf(x) = sign(x)*(1.0 - tiny)
* Note1:
* To compute exp(-x*x-0.5625+R/S), let s be a single
* precision number and s := x; then
@ -75,14 +75,14 @@
* x*sqrt(pi)
*
* 5. For inf > x >= 107
* erf(x) = sign(x) *(1 - tiny) (raise inexact)
* erfc(x) = tiny*tiny (raise underflow) if x > 0
* erf(x) = sign(x) *(1 - tiny) (raise inexact)
* erfc(x) = tiny*tiny (raise underflow) if x > 0
* = 2 - tiny if x<0
*
* 7. Special case:
* erf(0) = 0, erf(inf) = 1, erf(-inf) = -1,
* erfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2,
* erfc/erf(NaN) is NaN
* erf(0) = 0, erf(inf) = 1, erf(-inf) = -1,
* erfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2,
* erfc/erf(NaN) is NaN
*/
@ -333,7 +333,7 @@ weak_alias (__erf, erfl)
#else
long double
__erfcl (x)
long double
double
x;
#endif
{
@ -394,7 +394,7 @@ weak_alias (__erf, erfl)
x = fabsl (x);
s = one / (x * x);
if (ix < 0x4000b6db) /* 2.85711669921875 */
{ /* |x| < 1/.35 ~ 2.857143 */
{ /* |x| < 1/.35 ~ 2.857143 */
R = ra[0] + s * (ra[1] + s * (ra[2] + s * (ra[3] + s * (ra[4] +
s * (ra[5] + s * (ra[6] + s * (ra[7] + s * ra[8])))))));
S = sa[0] + s * (sa[1] + s * (sa[2] + s * (sa[3] + s * (sa[4] +

View File

@ -33,7 +33,7 @@ typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
#ifdef __GLIBC_HAVE_LONG_LONG
#ifdef __GNUC__
__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
#else
@ -52,7 +52,7 @@ typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
#ifdef __GLIBC_HAVE_LONG_LONG
#ifdef __GNUC__
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
#endif
@ -63,7 +63,7 @@ typedef __u_int __uid_t; /* Type of user identifications. */
typedef __u_int __gid_t; /* Type of group identifications. */
typedef __u_long __ino_t; /* Type of file serial numbers. */
typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
typedef __u_int __nlink_t; /* Type of file link counts. */
typedef __u_int __nlink_t; /* Type of file link counts. */
typedef long int __off_t; /* Type of file sizes and offsets. */
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
typedef int __pid_t; /* Type of process identifications. */

View File

@ -0,0 +1,80 @@
/* Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_DEBUGREG_H
#define _SYS_DEBUGREG_H 1
/* Indicate the register numbers for a number of the specific
debug registers. Registers 0-3 contain the addresses we wish to trap on */
#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */
#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */
#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */
#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */
/* Define a few things for the status register. We can use this to determine
which debugging register was responsible for the trap. The other bits
are either reserved or not of interest to us. */
#define DR_TRAP0 (0x1) /* db0 */
#define DR_TRAP1 (0x2) /* db1 */
#define DR_TRAP2 (0x4) /* db2 */
#define DR_TRAP3 (0x8) /* db3 */
#define DR_STEP (0x4000) /* single-step */
#define DR_SWITCH (0x8000) /* task switch */
/* Now define a bunch of things for manipulating the control register.
The top two bytes of the control register consist of 4 fields of 4
bits - each field corresponds to one of the four debug registers,
and indicates what types of access we trap on, and how large the data
field is that we are looking at */
#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
#define DR_CONTROL_SIZE 4 /* 4 control bits per register */
#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */
#define DR_RW_WRITE (0x1)
#define DR_RW_READ (0x3)
#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
#define DR_LEN_2 (0x4)
#define DR_LEN_4 (0xC)
#define DR_LEN_8 (0x8)
/* The low byte to the control register determine which registers are
enabled. There are 4 fields of two bits. One bit is "local", meaning
that the processor will reset the bit after a task switch and the other
is global meaning that we have to explicitly reset the bit. With linux,
you can use either one, since we explicitly zero the register when we enter
kernel mode. */
#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */
#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */
#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */
#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */
#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
/* The second byte to the control register has a few special
things. */
#define DR_CONTROL_RESERVED (0xFC00) /* Reserved */
#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */
#endif /* sys/debugreg.h */