summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/sysdeps/linux/common/bits/byteswap.h23
-rw-r--r--libc/sysdeps/linux/common/bits/confname.h91
-rw-r--r--libc/sysdeps/linux/common/bits/environments.h5
-rw-r--r--libc/sysdeps/linux/common/bits/in.h39
-rw-r--r--libc/sysdeps/linux/common/bits/ioctls.h3
-rw-r--r--libc/sysdeps/linux/common/bits/local_lim.h34
-rw-r--r--libc/sysdeps/linux/common/bits/msq.h1
-rw-r--r--libc/sysdeps/linux/common/bits/posix_opt.h76
-rw-r--r--libc/sysdeps/linux/common/bits/resource.h32
-rw-r--r--libc/sysdeps/linux/common/bits/sigthread.h28
-rw-r--r--libc/sysdeps/linux/common/bits/socket.h5
-rw-r--r--libc/sysdeps/linux/common/bits/statvfs.h18
-rw-r--r--libc/sysdeps/linux/common/bits/termios.h7
-rw-r--r--libc/sysdeps/linux/common/bits/types.h37
-rw-r--r--libc/sysdeps/linux/common/bits/waitflags.h10
15 files changed, 241 insertions, 168 deletions
diff --git a/libc/sysdeps/linux/common/bits/byteswap.h b/libc/sysdeps/linux/common/bits/byteswap.h
index 38d854013..949ed0bc9 100644
--- a/libc/sysdeps/linux/common/bits/byteswap.h
+++ b/libc/sysdeps/linux/common/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2001,2002,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,32 +25,35 @@
#define _BITS_BYTESWAP_H 1
/* Swap bytes in 16 bit value. */
+#define __bswap_constant_16(x) \
+ ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
+
#ifdef __GNUC__
# define __bswap_16(x) \
(__extension__ \
- ({ unsigned short int __bsx = (x); \
- ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }))
+ ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); }))
#else
static __inline unsigned short int
__bswap_16 (unsigned short int __bsx)
{
- return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8));
+ return __bswap_constant_16 (__bsx);
}
#endif
/* Swap bytes in 32 bit value. */
+#define __bswap_constant_32(x) \
+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \
+ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
+
#ifdef __GNUC__
# define __bswap_32(x) \
- (__extension__ \
- ({ unsigned int __bsx = (x); \
- ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \
- (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }))
+ (__extension__ \
+ ({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); }))
#else
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
{
- return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) |
- (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24));
+ return __bswap_constant_32 (__bsx);
}
#endif
diff --git a/libc/sysdeps/linux/common/bits/confname.h b/libc/sysdeps/linux/common/bits/confname.h
index ba8868af4..a66f85aac 100644
--- a/libc/sysdeps/linux/common/bits/confname.h
+++ b/libc/sysdeps/linux/common/bits/confname.h
@@ -1,5 +1,6 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
- Copyright (C) 1993, 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1993,1995-1998,2000,2001,2003,2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -471,96 +472,96 @@ enum
_CS_PATH, /* The default search path. */
#define _CS_PATH _CS_PATH
+ _CS_V6_WIDTH_RESTRICTED_ENVS,
+# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
+
# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \
|| defined __USE_LARGEFILE)
_CS_LFS_CFLAGS = 1000,
-# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
+#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
_CS_LFS_LDFLAGS,
-# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
+#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
_CS_LFS_LIBS,
-# define _CS_LFS_LIBS _CS_LFS_LIBS
+#define _CS_LFS_LIBS _CS_LFS_LIBS
_CS_LFS_LINTFLAGS,
-# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
+#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
_CS_LFS64_CFLAGS,
-# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
+#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
_CS_LFS64_LDFLAGS,
-# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
+#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
_CS_LFS64_LIBS,
-# define _CS_LFS64_LIBS _CS_LFS64_LIBS
+#define _CS_LFS64_LIBS _CS_LFS64_LIBS
_CS_LFS64_LINTFLAGS,
-# define _CS_LFS64_LINTFLAGS _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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
+#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
diff --git a/libc/sysdeps/linux/common/bits/environments.h b/libc/sysdeps/linux/common/bits/environments.h
index c3829927b..4617dc45f 100644
--- a/libc/sysdeps/linux/common/bits/environments.h
+++ b/libc/sysdeps/linux/common/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -72,4 +72,7 @@
# define _XBS5_LP64_OFF64 -1
# define _XBS5_LPBIG_OFFBIG -1
+/* CFLAGS. */
+#define __ILP32_OFFBIG_CFLAGS "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
#endif /* __WORDSIZE == 32 */
diff --git a/libc/sysdeps/linux/common/bits/in.h b/libc/sysdeps/linux/common/bits/in.h
index e6cf57574..14d3db858 100644
--- a/libc/sysdeps/linux/common/bits/in.h
+++ b/libc/sysdeps/linux/common/bits/in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,8 +30,8 @@
#define IP_HDRINCL 3 /* int; Header is included with data. */
#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */
#define IP_ROUTER_ALERT 5 /* bool */
-#define IP_RECVOPTS 6 /* bool */
-#define IP_RETOPTS 7 /* bool */
+#define IP_RECVOPTS 6 /* bool; Receive all IP options w/datagram. */
+#define IP_RETOPTS 7 /* bool; Set/get IP per-packet options. */
#define IP_PKTINFO 8 /* bool */
#define IP_PKTOPTIONS 9
#define IP_PMTUDISC 10 /* obsolete name? */
@@ -44,9 +44,24 @@
#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */
#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */
#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */
+#define IP_UNBLOCK_SOURCE 37 /* ip_mreq_source: unblock data from source */
+#define IP_BLOCK_SOURCE 38 /* ip_mreq_source: block data from source */
+#define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */
+#define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */
+#define IP_MSFILTER 41
+#define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */
+#define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */
+#define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
+#define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */
+#define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
+#define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
+#define MCAST_MSFILTER 48
+
+#define MCAST_EXCLUDE 0
+#define MCAST_INCLUDE 1
/* For BSD compatibility. */
-#define IP_RECVRETOPTS IP_RETOPTS
+#define IP_RECVRETOPTS IP_RETOPTS /* bool; Receive IP options for response. */
/* IP_MTU_DISCOVER arguments. */
#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */
@@ -60,9 +75,9 @@
#define IP_DEFAULT_MULTICAST_LOOP 1
#define IP_MAX_MEMBERSHIPS 20
-/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst'
- field is used for the first-hop gateway when using a source route
- (this gets put into the header proper). */
+/* 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. */
@@ -115,15 +130,19 @@ struct in_pktinfo
#define IPV6_MTU_DISCOVER 23
#define IPV6_MTU 24
#define IPV6_RECVERR 25
+#define IPV6_V6ONLY 26
+#define IPV6_JOIN_ANYCAST 27
+#define IPV6_LEAVE_ANYCAST 28
+#define IPV6_IPSEC_POLICY 34
+#define IPV6_XFRM_POLICY 35
#define SCM_SRCRT IPV6_RXSRCRT
/* Obsolete synonyms for the above. */
-#define IPV6_RXHOPOPTS IPV6_HOPOPTS
-#define IPV6_RXDSTOPTS IPV6_DSTOPTS
#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
-
+#define IPV6_RXHOPOPTS IPV6_HOPOPTS
+#define IPV6_RXDSTOPTS IPV6_DSTOPTS
/* IPV6_MTU_DISCOVER values. */
#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */
diff --git a/libc/sysdeps/linux/common/bits/ioctls.h b/libc/sysdeps/linux/common/bits/ioctls.h
index b49ca2076..11bb4c485 100644
--- a/libc/sysdeps/linux/common/bits/ioctls.h
+++ b/libc/sysdeps/linux/common/bits/ioctls.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -48,6 +48,7 @@
#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */
#define SIOCGIFMTU 0x8921 /* get MTU size */
#define SIOCSIFMTU 0x8922 /* set MTU size */
+#define SIOCSIFNAME 0x8923 /* set interface name */
#define SIOCSIFHWADDR 0x8924 /* set hardware address */
#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */
#define SIOCSIFENCAP 0x8926
diff --git a/libc/sysdeps/linux/common/bits/local_lim.h b/libc/sysdeps/linux/common/bits/local_lim.h
index 0a7c83706..d4671e4a8 100644
--- a/libc/sysdeps/linux/common/bits/local_lim.h
+++ b/libc/sysdeps/linux/common/bits/local_lim.h
@@ -1,21 +1,21 @@
/* Minimum guaranteed maximum values for system limits. Linux version.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1993-1998, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ 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
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ 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. */
/* The kernel header pollutes the namespace with the NR_OPEN symbol
and defines LINK_MAX although filesystems have different maxima. A
@@ -66,12 +66,24 @@
/* This is the value this implementation supports. */
#define PTHREAD_THREADS_MAX 1024
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 16384
+
/* Maximum amount by which a process can descrease its asynchronous I/O
priority level. */
#define AIO_PRIO_DELTA_MAX 20
-/* Minimum size for a thread. We are free to choose a reasonable value. */
-#define PTHREAD_STACK_MIN 16384
+/* Maximum tty name length. */
+#define TTY_NAME_MAX 32
+
+/* Maximum login name length. This is arbitrary. */
+#define LOGIN_NAME_MAX 256
+
+/* Maximum host name length. */
+#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
/* Maximum number of POSIX timers available. */
#define TIMER_MAX 256
diff --git a/libc/sysdeps/linux/common/bits/msq.h b/libc/sysdeps/linux/common/bits/msq.h
index cd4624301..32a49b592 100644
--- a/libc/sysdeps/linux/common/bits/msq.h
+++ b/libc/sysdeps/linux/common/bits/msq.h
@@ -32,6 +32,7 @@
typedef unsigned long int msgqnum_t;
typedef unsigned long int msglen_t;
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
diff --git a/libc/sysdeps/linux/common/bits/posix_opt.h b/libc/sysdeps/linux/common/bits/posix_opt.h
index 9329dfc15..330989128 100644
--- a/libc/sysdeps/linux/common/bits/posix_opt.h
+++ b/libc/sysdeps/linux/common/bits/posix_opt.h
@@ -1,24 +1,28 @@
/* Define POSIX options for Linux.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1999,2000,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ 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
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ 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 _POSIX_OPT_H
-#define _POSIX_OPT_H 1
+/*
+ * Never include this file directly; use <unistd.h> instead.
+ */
+
+#ifndef _BITS_POSIX_OPT_H
+#define _BITS_POSIX_OPT_H 1
/* Job control is supported. */
#define _POSIX_JOB_CONTROL 1
@@ -27,27 +31,27 @@
#define _POSIX_SAVED_IDS 1
/* Priority scheduling is supported. */
-#define _POSIX_PRIORITY_SCHEDULING 1
+#define _POSIX_PRIORITY_SCHEDULING 200112L
/* Synchronizing file data is supported. */
-#define _POSIX_SYNCHRONIZED_IO 1
+#define _POSIX_SYNCHRONIZED_IO 200112L
/* The fsync function is present. */
-#define _POSIX_FSYNC 1
+#define _POSIX_FSYNC 200112L
/* Mapping of files to memory is supported. */
-#define _POSIX_MAPPED_FILES 1
+#define _POSIX_MAPPED_FILES 200112L
/* Locking of all memory is supported. */
#ifdef __ARCH_HAS_MMU__
-# define _POSIX_MEMLOCK 1
+# define _POSIX_MEMLOCK 200112L
#else
# undef _POSIX_MEMLOCK
#endif
/* Locking of ranges of memory is supported. */
#ifdef __ARCH_HAS_MMU__
-# define _POSIX_MEMLOCK_RANGE 1
+# define _POSIX_MEMLOCK_RANGE 200112L
#else
# define _POSIX_MEMLOCK_RANGE
#endif
@@ -105,7 +109,7 @@
#endif
/* We provide priority scheduling for threads. */
-#define _POSIX_THREAD_PRIORITY_SCHEDULING 1
+#define _POSIX_THREAD_PRIORITY_SCHEDULING 1
/* We support user-defined stack sizes. */
#define _POSIX_THREAD_ATTR_STACKSIZE 1
@@ -121,7 +125,7 @@
#endif
/* Real-time signals are supported. */
-#define _POSIX_REALTIME_SIGNALS 1
+#define _POSIX_REALTIME_SIGNALS 200112L
/* We support asynchronous I/O. */
#define _POSIX_ASYNCHRONOUS_IO 1
@@ -147,46 +151,46 @@
# undef _LFS64_STDIO
#endif
-/* POSIX shared memory objects are implemented. */
-#define _POSIX_SHARED_MEMORY_OBJECTS 1
+/* POSIX timers are available. */
+#define _POSIX_TIMERS 200112L
-/* GNU libc provides regular expression handling. */
-#ifdef __UCLIBC_HAS_REGEX__
-# define _POSIX_REGEXP 1
-#else
-# undef _POSIX_REGEXP
-#endif
+/* POSIX shared memory objects are implemented. */
+#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
#if defined(__i386__)
/* CPU-time clocks supported. */
-#define _POSIX_CPUTIME 200912L
+# define _POSIX_CPUTIME 200912L
/* We support the clock also in threads. */
-#define _POSIX_THREAD_CPUTIME 200912L
+# define _POSIX_THREAD_CPUTIME 200912L
#endif
/* Reader/Writer locks are available. */
#define _POSIX_READER_WRITER_LOCKS 200912L
+/* GNU libc provides regular expression handling. */
+#ifdef __UCLIBC_HAS_REGEX__
+# define _POSIX_REGEXP 1
+#else
+# undef _POSIX_REGEXP
+#endif
+
/* We have a POSIX shell. */
#define _POSIX_SHELL 1
+/* The `spawn' function family is supported. */
+#define _POSIX_SPAWN 200912L
+
/* We support the Timeouts option. */
#define _POSIX_TIMEOUTS 200912L
/* We support spinlocks. */
#define _POSIX_SPIN_LOCKS 200912L
-/* The `spawn' function family is supported. */
-#define _POSIX_SPAWN 200912L
-
-/* We have POSIX timers. */
-#define _POSIX_TIMERS 1
-
/* The barrier functions are available. */
#define _POSIX_BARRIERS 200912L
/* POSIX message queues are not yet supported. */
#undef _POSIX_MESSAGE_PASSING
-#endif /* posix_opt.h */
+#endif /* bits/posix_opt.h */
diff --git a/libc/sysdeps/linux/common/bits/resource.h b/libc/sysdeps/linux/common/bits/resource.h
index 30825c2e0..1d438122e 100644
--- a/libc/sysdeps/linux/common/bits/resource.h
+++ b/libc/sysdeps/linux/common/bits/resource.h
@@ -1,5 +1,6 @@
/* Bit values & structures for resource limits. Linux version.
- Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -55,34 +56,35 @@ enum __rlimit_resource
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
- RLIMIT_RSS = 5,
-#define RLIMIT_RSS RLIMIT_RSS
+ __RLIMIT_RSS = 5,
+#define RLIMIT_RSS __RLIMIT_RSS
/* Number of open files. */
RLIMIT_NOFILE = 7,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+ __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
- /* Address space limit (?) */
+ /* Address space limit. */
RLIMIT_AS = 9,
#define RLIMIT_AS RLIMIT_AS
/* Number of processes. */
- RLIMIT_NPROC = 6,
-#define RLIMIT_NPROC RLIMIT_NPROC
+ __RLIMIT_NPROC = 6,
+#define RLIMIT_NPROC __RLIMIT_NPROC
/* Locked-in-memory address space. */
- RLIMIT_MEMLOCK = 8,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+ __RLIMIT_MEMLOCK = 8,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
/* Maximum number of file locks. */
- RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
+ __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
- RLIM_NLIMITS = 11
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
+ __RLIMIT_NLIMITS = 11,
+ __RLIM_NLIMITS = __RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+#define RLIM_NLIMITS __RLIM_NLIMITS
};
/* Value to indicate that there is no limit. */
diff --git a/libc/sysdeps/linux/common/bits/sigthread.h b/libc/sysdeps/linux/common/bits/sigthread.h
index 0a634ac68..9e6b62e4b 100644
--- a/libc/sysdeps/linux/common/bits/sigthread.h
+++ b/libc/sysdeps/linux/common/bits/sigthread.h
@@ -1,21 +1,21 @@
-/* Signal handling function for threaded programs.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* 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 Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ 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
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ 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
@@ -24,10 +24,10 @@
# error "Never include this file directly. Use <pthread.h> instead"
#endif
-/* Functions for handling signals. */
-
-/* Modify the signal mask for the calling thread. The arguments have
- the same meaning as for sigprocmask(2). */
+/* 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 *__restrict __newmask,
__sigset_t *__restrict __oldmask)__THROW;
diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h
index 61644073b..894cf0da2 100644
--- a/libc/sysdeps/linux/common/bits/socket.h
+++ b/libc/sysdeps/linux/common/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux version.
- Copyright (C) 1991,1992,1994-1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1991,1992,1994-2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -212,6 +212,9 @@ enum
/* Structure describing messages sent by
`sendmsg' and received by `recvmsg'. */
+/* Note: do not change these members to match glibc; these match the
+ SuSv3 spec already (e.g. msg_iovlen/msg_controllen).
+ http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */
struct msghdr
{
void *msg_name; /* Address to send to/receive from. */
diff --git a/libc/sysdeps/linux/common/bits/statvfs.h b/libc/sysdeps/linux/common/bits/statvfs.h
index 32e03f31e..cca0871ac 100644
--- a/libc/sysdeps/linux/common/bits/statvfs.h
+++ b/libc/sysdeps/linux/common/bits/statvfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,10 @@
#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */
+#if __WORDSIZE == 32
+#define _STATVFSBUF_F_UNUSED
+#endif
+
struct statvfs
{
unsigned long int f_bsize;
@@ -42,12 +46,13 @@ struct statvfs
__fsfilcnt64_t f_favail;
#endif
unsigned long int f_fsid;
+#ifdef _STATVFSBUF_F_UNUSED
int __f_unused;
+#endif
unsigned long int f_flag;
unsigned long int f_namemax;
int __f_spare[6];
};
-#define _STATVFSBUF_F_UNUSED
#ifdef __USE_LARGEFILE64
struct statvfs64
@@ -61,7 +66,9 @@ struct statvfs64
__fsfilcnt64_t f_ffree;
__fsfilcnt64_t f_favail;
unsigned long int f_fsid;
+#ifdef _STATVFSBUF_F_UNUSED
int __f_unused;
+#endif
unsigned long int f_flag;
unsigned long int f_namemax;
int __f_spare[6];
@@ -69,14 +76,15 @@ struct statvfs64
#endif
/* Definitions for the flag in `f_flag'. These definitions should be
- kept in sync which the definitions in <sys/mount.h>. */
+ kept in sync with the definitions in <sys/mount.h>. */
enum
{
ST_RDONLY = 1, /* Mount read-only. */
#define ST_RDONLY ST_RDONLY
- ST_NOSUID = 2, /* Ignore suid and sgid bits. */
+ ST_NOSUID = 2 /* Ignore suid and sgid bits. */
#define ST_NOSUID ST_NOSUID
#ifdef __USE_GNU
+ ,
ST_NODEV = 4, /* Disallow access to device special files. */
# define ST_NODEV ST_NODEV
ST_NOEXEC = 8, /* Disallow program execution. */
@@ -93,7 +101,7 @@ enum
# define ST_IMMUTABLE ST_IMMUTABLE
ST_NOATIME = 1024, /* Do not update access times. */
# define ST_NOATIME ST_NOATIME
- ST_NODIRATIME /* Do not update directory access times. */
+ ST_NODIRATIME = 2048 /* Do not update directory access times. */
# define ST_NODIRATIME ST_NODIRATIME
#endif /* Use GNU. */
};
diff --git a/libc/sysdeps/linux/common/bits/termios.h b/libc/sysdeps/linux/common/bits/termios.h
index 887b309ad..c71e4ad1f 100644
--- a/libc/sysdeps/linux/common/bits/termios.h
+++ b/libc/sysdeps/linux/common/bits/termios.h
@@ -1,5 +1,6 @@
/* termios type and macro definitions. Linux version.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,6 +37,8 @@ struct termios
cc_t c_cc[NCCS]; /* control characters */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
};
/* c_cc characters */
@@ -72,6 +75,7 @@ struct termios
#define IXANY 0004000
#define IXOFF 0010000
#define IMAXBEL 0020000
+#define IUTF8 0040000
/* c_oflag bits */
#define OPOST 0000001
@@ -168,6 +172,7 @@ struct termios
#define __MAX_BAUD B4000000
#ifdef __USE_MISC
# define CIBAUD 002003600000 /* input baud rate (not used) */
+# define CMSPAR 010000000000 /* mark or space (stick) parity */
# define CRTSCTS 020000000000 /* flow control */
#endif
diff --git a/libc/sysdeps/linux/common/bits/types.h b/libc/sysdeps/linux/common/bits/types.h
index a91c262ff..6068f6fd2 100644
--- a/libc/sysdeps/linux/common/bits/types.h
+++ b/libc/sysdeps/linux/common/bits/types.h
@@ -37,22 +37,7 @@ typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
-#if __WORDSIZE == 64
-typedef long int __quad_t;
-typedef unsigned long int __u_quad_t;
-#elif defined(__GNUC__)
-__extension__ typedef unsigned long long int __u_quad_t;
-__extension__ typedef long long int __quad_t;
-#else
-typedef struct
- {
- long int __val[2];
- } __quad_t;
-typedef struct
- {
- __u_long __val[2];
- } __u_quad_t;
-#endif
+/* Fixed-size types, underlying types depend on word size and compiler. */
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
@@ -66,7 +51,24 @@ typedef unsigned long int __uint64_t;
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
#endif
-typedef __quad_t *__qaddr_t;
+
+/* quad_t is also 64 bits. */
+#if __WORDSIZE == 64
+typedef long int __quad_t;
+typedef unsigned long int __u_quad_t;
+#elif defined(__GNUC__)
+__extension__ typedef long long int __quad_t;
+__extension__ typedef unsigned long long int __u_quad_t;
+#else
+typedef struct
+{
+ long __val[2];
+} __quad_t;
+typedef struct
+{
+ __u_long __val[2];
+} __u_quad_t;
+#endif
#if __WORDSIZE == 32
# define __SWORD_TYPE int
@@ -97,6 +99,7 @@ typedef struct
/* Everythin' else. */
typedef int __daddr_t; /* The type of a disk address. */
+typedef __quad_t *__rqaddr_t;
typedef char *__caddr_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
diff --git a/libc/sysdeps/linux/common/bits/waitflags.h b/libc/sysdeps/linux/common/bits/waitflags.h
index 1303c6c36..464cedb1f 100644
--- a/libc/sysdeps/linux/common/bits/waitflags.h
+++ b/libc/sysdeps/linux/common/bits/waitflags.h
@@ -1,5 +1,5 @@
/* Definitions of flag bits for `waitpid' et al.
- Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1992,1996,1997,2000,2004,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,5 +26,13 @@
#define WNOHANG 1 /* Don't block waiting. */
#define WUNTRACED 2 /* Report status of stopped children. */
+/* Bits in the fourth argument to `waitid'. */
+#define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */
+#define WEXITED 4 /* Report dead child. */
+#define WCONTINUED 8 /* Report continued child. */
+#define WNOWAIT 0x01000000 /* Don't reap, just poll status. */
+
+#define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads
+ in this group */
#define __WALL 0x40000000 /* Wait for any child. */
#define __WCLONE 0x80000000 /* Wait for cloned process. */