[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r4915 - in /fsf/trunk/libc: ./ bits/ conform/data/ conform/data/netinet/ inet/netinet/ posix/ resolv/ sysdeps/gnu/bits/ sysd...



Author: eglibc
Date: Thu Jan 17 00:23:42 2008
New Revision: 4915

Log:
Import glibc-mainline for 2008-01-17

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/bits/shm.h
    fsf/trunk/libc/conform/data/fcntl.h-data
    fsf/trunk/libc/conform/data/limits.h-data
    fsf/trunk/libc/conform/data/mqueue.h-data
    fsf/trunk/libc/conform/data/netdb.h-data
    fsf/trunk/libc/conform/data/netinet/in.h-data
    fsf/trunk/libc/conform/data/pthread.h-data
    fsf/trunk/libc/conform/data/semaphore.h-data
    fsf/trunk/libc/conform/data/signal.h-data
    fsf/trunk/libc/conform/data/stdio.h-data
    fsf/trunk/libc/conform/data/stdlib.h-data
    fsf/trunk/libc/conform/data/string.h-data
    fsf/trunk/libc/conform/data/time.h-data
    fsf/trunk/libc/conform/data/unistd.h-data
    fsf/trunk/libc/inet/netinet/in.h
    fsf/trunk/libc/posix/regex.h
    fsf/trunk/libc/resolv/netdb.h
    fsf/trunk/libc/sysdeps/gnu/bits/shm.h
    fsf/trunk/libc/sysdeps/posix/getaddrinfo.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/alpha/bits/shm.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/in.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/shm.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/shm.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/shm.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Jan 17 00:23:42 2008
@@ -1,3 +1,50 @@
+2008-01-16  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	[BZ #5628]
+	* bits/shm.h: Fix comment describing shmid_ds.
+	* sysdeps/gnu/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/sh/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/shm.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Likewise.
+	Patch by Hareesh Nagarajan <hareesh.nagarajan@xxxxxxxxx>.
+
+	[BZ #5607]
+	* conform/data/fcntl.h-data: Fix posix_fadvise and posix_fallocate
+	prototypes.
+	* conform/data/limits.h-data: Adjust limits changed in v6 and add
+	additional suffixes.
+	* conform/data/mqueue.h-data: Fix typo in mq_curmsgs entry.
+	Add optional functions mq_timedreceive and mq_timedsend.
+	* conform/data/netdb.h-data: Add more AI_* and EAI_* constants.
+	* conform/data/pthread.h-data: Fix prototype of
+	pthread_condattr_setclock.  pthread_sigmask is not required in v6.
+	* conform/data/semaphore.h-data: Allow time.h definitions.
+	* conform/data/signal.h-data: Likewise.
+	* conform/data/stdio.h-data: getw and putw are not required in v6.
+	* conform/data/stdlib.h-data: Change setstate prototype.
+	* conform/data/string.h-data: Fix strerror_r prototype.
+	* conform/data/time.h-data: Fix typo in TIMER_ABSTIME definition.
+	* conform/data/unistd.h-data: pthread_atfork not required in v6.
+	Fix readlink prototype.
+	* conform/data/netinet/in.h-data: Add const to in6addr_any and
+	in6addr_loopback.
+	* inet/netinet/in.h: Cleanup namespace.
+	* posix/regex.h: Likewise.
+	* resolv/netdb.h: Likewise.
+	* sysdeps/unix/sysv/linux/bits/in.h: Likewise.
+	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
+	* sysdeps/posix/getaddrinfo.c (default_labels): Adjust for change
+	of names of in in6_addr.
+	(default_precedence): Likewise.
+	* sysdeps/unix/sysv/linux/cmsg_nxthdr.c: Include <stddef.h> for
+	NULL definition.
+
 2008-01-15  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* conform/data/fmtmsg.h-data: Add missing allows.

Modified: fsf/trunk/libc/bits/shm.h
==============================================================================
--- fsf/trunk/libc/bits/shm.h (original)
+++ fsf/trunk/libc/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -42,7 +42,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned short int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/conform/data/fcntl.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/fcntl.h-data (original)
+++ fsf/trunk/libc/conform/data/fcntl.h-data Thu Jan 17 00:23:42 2008
@@ -87,8 +87,8 @@
 function int fcntl (int, int, ...)
 function int open (const char*, int, ...)
 #ifdef XOPEN2K
-function int posix_fadvise (int, off_t, size_t, int)
-function int posix_fallocate (int, off_t, size_t)
+function int posix_fadvise (int, off_t, off_t, int)
+function int posix_fallocate (int, off_t, off_t)
 #endif
 
 allow-header sys/stat.h

Modified: fsf/trunk/libc/conform/data/limits.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/limits.h-data (original)
+++ fsf/trunk/libc/conform/data/limits.h-data Thu Jan 17 00:23:42 2008
@@ -57,7 +57,11 @@
 optional-constant _POSIX_AIO_LISTIO_MAX	2
 optional-constant _POSIX_AIO_MAX 1
 optional-constant _POSIX_ARG_MAX 4096
+#ifdef XOPEN2K
+optional-constant _POSIX_CHILD_MAX 25
+#else
 optional-constant _POSIX_CHILD_MAX 6
+#endif
 optional-constant _POSIX_DELAYTIMER_MAX 32
 optional-constant _POSIX_LINK_MAX 8
 optional-constant _POSIX_LOGIN_NAME_MAX 9
@@ -66,8 +70,16 @@
 optional-constant _POSIX_MQ_OPEN_MAX 8
 optional-constant _POSIX_MQ_PRIO_MAX 32
 optional-constant _POSIX_NAME_MAX 14
+#ifdef XOPEN2K
+optional-constant _POSIX_NGROUPS_MAX 8
+#else
 optional-constant _POSIX_NGROUPS_MAX 0
+#endif
+#ifdef XOPEN2K
+optional-constant _POSIX_OPEN_MAX 20
+#else
 optional-constant _POSIX_OPEN_MAX 16
+#endif
 optional-constant _POSIX_PATH_MAX 256
 optional-constant _POSIX_PIPE_BUF 512
 optional-constant _POSIX2_RE_DUP_MAX 255
@@ -126,3 +138,6 @@
 optional-constant NL_TEXTMAX
 optional-constant NZERO >= 20
 optional-constant TMP_MAX >= 10000
+
+allow *_MAX
+allow *_MIN

Modified: fsf/trunk/libc/conform/data/mqueue.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/mqueue.h-data (original)
+++ fsf/trunk/libc/conform/data/mqueue.h-data Thu Jan 17 00:23:42 2008
@@ -8,7 +8,7 @@
 element {struct mq_attr} long mq_flags
 element {struct mq_attr} long mq_maxmsg
 element {struct mq_attr} long mq_msgsize
-element {struct mq_attr} long mq_curmsg
+element {struct mq_attr} long mq_curmsgs
 
 function int mq_close (mqd_t)
 function int mq_getattr (mqd_t, struct mq_attr*)
@@ -18,6 +18,10 @@
 function int mq_send (mqd_t, const char*, size_t, unsigned int)
 function int mq_setattr (mqd_t, const struct mq_attr*, struct mq_attr*)
 function int mq_unlink (const char*)
+#ifdef XOPEN2K
+optional-function ssize_t mq_timedreceive (mqd_t, char*, size_t, unsigned int*, const struct timespec*)
+optional-function int mq_timedsend (mqd_t, const char*, size_t, unsigned int, const struct timespec*)
+#endif
 
 allow-header fcntl.h
 allow-header signal.h

Modified: fsf/trunk/libc/conform/data/netdb.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/netdb.h-data (original)
+++ fsf/trunk/libc/conform/data/netdb.h-data Thu Jan 17 00:23:42 2008
@@ -55,6 +55,10 @@
 macro AI_PASSIVE
 macro AI_CANONNAME
 macro AI_NUMERICHOST
+macro AI_V4MAPPED
+macro AI_ALL
+macro AI_ADDRCONFIG
+macro AI_NUMERICSERV
 
 macro NI_NOFQDN
 macro NI_NUMERICHOST
@@ -71,6 +75,7 @@
 macro EAI_SERVICE
 macro EAI_SOCKTYPE
 macro EAI_SYSTEM
+macro EAI_OVERFLOW
 
 function void endhostent (void)
 function void endnetent (void)

Modified: fsf/trunk/libc/conform/data/netinet/in.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/netinet/in.h-data (original)
+++ fsf/trunk/libc/conform/data/netinet/in.h-data Thu Jan 17 00:23:42 2008
@@ -27,12 +27,12 @@
 element {struct sockaddr_in6} {struct in6_addr} sin6_addr
 element {struct sockaddr_in6} uint32_t sin6_scope_id
 
-variable {struct in6_addr} in6addr_any
+variable {const struct in6_addr} in6addr_any
 
 // constant IN6ADDR_ANY_INIT
 macro IN6ADDR_ANY_INIT
 
-variable {struct in6_addr} in6addr_loopback
+variable {const struct in6_addr} in6addr_loopback
 
 // constant IN6ADDR_LOOPBACK_INIT
 macro IN6ADDR_LOOPBACK_INIT

Modified: fsf/trunk/libc/conform/data/pthread.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/pthread.h-data (original)
+++ fsf/trunk/libc/conform/data/pthread.h-data Thu Jan 17 00:23:42 2008
@@ -84,7 +84,7 @@
 optional-function int pthread_condattr_getclock (const pthread_condattr_t*, clockid_t*)
 function int pthread_condattr_getpshared (const pthread_condattr_t*, int*)
 function int pthread_condattr_init (pthread_condattr_t*)
-optional-function int pthread_condattr_setclock (const pthread_condattr_t*, clockid_t*)
+optional-function int pthread_condattr_setclock (pthread_condattr_t*, clockid_t)
 function int pthread_condattr_setpshared (pthread_condattr_t*, int)
 function int pthread_create (pthread_t*, const pthread_attr_t*, void *(*) (void*), void*)
 function int pthread_detach (pthread_t)
@@ -140,7 +140,9 @@
 # endif
 function int pthread_setschedparam (pthread_t, int, const struct sched_param*)
 function int pthread_setspecific (pthread_key_t, const void*)
+#ifndef XOPEN2K
 function int pthread_sigmask (int, const sigset_t*, sigset_t*)
+#endif
 function int pthread_spin_destroy (pthread_spinlock_t*)
 function int pthread_spin_init (pthread_spinlock_t*, int)
 function int pthread_spin_lock (pthread_spinlock_t*)

Modified: fsf/trunk/libc/conform/data/semaphore.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/semaphore.h-data (original)
+++ fsf/trunk/libc/conform/data/semaphore.h-data Thu Jan 17 00:23:42 2008
@@ -18,6 +18,7 @@
 allow-header fcntl.h
 allow-header sys/types.h
 # endif
+allow-header time.h
 
 allow sem_*
 allow SEM_*

Modified: fsf/trunk/libc/conform/data/signal.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/signal.h-data (original)
+++ fsf/trunk/libc/conform/data/signal.h-data Thu Jan 17 00:23:42 2008
@@ -203,3 +203,5 @@
 allow SV_*
 allow TRAP_*
 allow *_t
+
+allow-header time.h

Modified: fsf/trunk/libc/conform/data/stdio.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/stdio.h-data (original)
+++ fsf/trunk/libc/conform/data/stdio.h-data Thu Jan 17 00:23:42 2008
@@ -67,7 +67,9 @@
 function int getopt (int, char *const[], const char *)
 #endif
 function {char*} gets (char*)
+#ifndef XOPEN2K
 function int getw (FILE*)
+#endif
 function int pclose (FILE*)
 function void perror (const char*)
 function {FILE*} popen (const char*, const char*)
@@ -77,7 +79,9 @@
 function int putc_unlocked (int, FILE*)
 function int putchar_unlocked (int)
 function int puts (const char*)
+#ifndef XOPEN2K
 function int putw (int, FILE*)
+#endif
 function int remove (const char*)
 function int rename (const char*, const char*)
 function void rewind (FILE*)

Modified: fsf/trunk/libc/conform/data/stdlib.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/stdlib.h-data (original)
+++ fsf/trunk/libc/conform/data/stdlib.h-data Thu Jan 17 00:23:42 2008
@@ -86,7 +86,7 @@
 function {unsigned short int*} seed48 (unsigned short int[3])
 function int setenv (const char*, const char*, int)
 function void setkey (const char*)
-function {char*} setstate (const char*)
+function {char*} setstate (char*)
 function void srand (unsigned int)
 function void srand48 (long int)
 function void srandom (unsigned)

Modified: fsf/trunk/libc/conform/data/string.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/string.h-data (original)
+++ fsf/trunk/libc/conform/data/string.h-data Thu Jan 17 00:23:42 2008
@@ -17,7 +17,7 @@
 function {char*} strdup (const char*)
 function {char*} strerror (int)
 #ifdef XOPEN2K
-function {char*} strerror_r (int, char*, size_t)
+function int strerror_r (int, char*, size_t)
 #endif
 function size_t strlen (const char*)
 function {char*} strncat (char*, const char*, size_t)

Modified: fsf/trunk/libc/conform/data/time.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/time.h-data (original)
+++ fsf/trunk/libc/conform/data/time.h-data Thu Jan 17 00:23:42 2008
@@ -29,7 +29,7 @@
 element {struct itimerspec} {struct timespec} it_value
 
 constant CLOCK_REALTIME
-constant TIME_ABSTIME
+constant TIMER_ABSTIME
 constant CLOCK_MONOTONIC
 
 type clock_t

Modified: fsf/trunk/libc/conform/data/unistd.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/unistd.h-data (original)
+++ fsf/trunk/libc/conform/data/unistd.h-data Thu Jan 17 00:23:42 2008
@@ -337,10 +337,12 @@
 function int pause (void)
 function int pipe (int[2])
 function ssize_t pread (int, void*, size_t, off_t)
+#ifndef XOPEN2K
 function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void))
+#endif
 function ssize_t pwrite (int, const void*, size_t, off_t)
 function ssize_t read (int, void*, size_t)
-function int readlink (const char*, char*, size_t)
+function ssize_t readlink (const char*, char*, size_t)
 function int rmdir (const char*)
 function {void*} sbrk (intptr_t)
 function int setegid (gid_t)

Modified: fsf/trunk/libc/inet/netinet/in.h
==============================================================================
--- fsf/trunk/libc/inet/netinet/in.h (original)
+++ fsf/trunk/libc/inet/netinet/in.h Thu Jan 17 00:23:42 2008
@@ -195,13 +195,17 @@
   {
     union
       {
-	uint8_t	u6_addr8[16];
-	uint16_t u6_addr16[8];
-	uint32_t u6_addr32[4];
-      } in6_u;
-#define s6_addr			in6_u.u6_addr8
-#define s6_addr16		in6_u.u6_addr16
-#define s6_addr32		in6_u.u6_addr32
+	uint8_t	__u6_addr8[16];
+#if defined __USE_MISC || defined __USE_GNU
+	uint16_t __u6_addr16[8];
+	uint32_t __u6_addr32[4];
+#endif
+      } __in6_u;
+#define s6_addr			__in6_u.__u6_addr8
+#if defined __USE_MISC || defined __USE_GNU
+# define s6_addr16		__in6_u.__u6_addr16
+# define s6_addr32		__in6_u.__u6_addr32
+#endif
   };
 
 extern const struct in6_addr in6addr_any;        /* :: */
@@ -238,6 +242,7 @@
   };
 
 
+#if defined __USE_MISC || defined __USE_GNU
 /* IPv4 multicast request.  */
 struct ip_mreq
   {
@@ -259,6 +264,8 @@
     /* IP address of interface.  */
     struct in_addr imr_sourceaddr;
   };
+#endif
+
 
 /* Likewise, for IPv6.  */
 struct ipv6_mreq
@@ -271,6 +278,7 @@
   };
 
 
+#if defined __USE_MISC || defined __USE_GNU
 /* Multicast group request.  */
 struct group_req
   {
@@ -337,6 +345,7 @@
 				   - sizeof (struct sockaddr_storage)	      \
 				   + ((numsrc)				      \
 				      * sizeof (struct sockaddr_storage)))
+#endif
 
 
 /* Get system-specific definitions.  */
@@ -422,12 +431,14 @@
 	 && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2])  \
 	 && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3]))
 
+#if defined __USE_MISC || defined __USE_GNU
 /* Bind socket to a privileged IP port.  */
 extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __THROW;
 
 /* The IPv6 version of this function.  */
 extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
      __THROW;
+#endif
 
 
 #define IN6_IS_ADDR_MC_NODELOCAL(a) \
@@ -450,6 +461,8 @@
 	(IN6_IS_ADDR_MULTICAST(a)					      \
 	 && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe))
 
+
+#ifdef __USE_GNU
 /* IPv6 packet information.  */
 struct in6_pktinfo
   {
@@ -465,7 +478,6 @@
   };
 
 
-#ifdef __USE_GNU
 /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292).  */
 extern int inet6_option_space (int __nbytes)
      __THROW __attribute_deprecated__;

Modified: fsf/trunk/libc/posix/regex.h
==============================================================================
--- fsf/trunk/libc/posix/regex.h (original)
+++ fsf/trunk/libc/posix/regex.h Thu Jan 17 00:23:42 2008
@@ -1,6 +1,6 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006
+   Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -43,20 +43,21 @@
    add or remove a bit, only one other definition need change.  */
 typedef unsigned long int reg_syntax_t;
 
+#ifdef __USE_GNU
 /* If this bit is not set, then \ inside a bracket expression is literal.
    If set, then such a \ quotes the following character.  */
-#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
 
 /* If this bit is not set, then + and ? are operators, and \+ and \? are
      literals.
    If set, then \+ and \? are operators and + and ? are literals.  */
-#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
 
 /* If this bit is set, then character classes are supported.  They are:
      [:alpha:], [:upper:], [:lower:],  [:digit:], [:alnum:], [:xdigit:],
      [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
    If not set, then character classes are not supported.  */
-#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
 
 /* If this bit is set, then ^ and $ are always anchors (outside bracket
      expressions, of course).
@@ -70,7 +71,7 @@
    POSIX draft 11.2 says that * etc. in leading positions is undefined.
    We already implemented a previous draft which made those constructs
    invalid, though, so we haven't changed the code back.  */
-#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
 
 /* If this bit is set, then special characters are always special
      regardless of where they are in the pattern.
@@ -78,71 +79,71 @@
      some contexts; otherwise they are ordinary.  Specifically,
      * + ? and intervals are only special when not after the beginning,
      open-group, or alternation operator.  */
-#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
 
 /* If this bit is set, then *, +, ?, and { cannot be first in an re or
      immediately after an alternation or begin-group operator.  */
-#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
 
 /* If this bit is set, then . matches newline.
    If not set, then it doesn't.  */
-#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
 
 /* If this bit is set, then . doesn't match NUL.
    If not set, then it does.  */
-#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
 
 /* If this bit is set, nonmatching lists [^...] do not match newline.
    If not set, they do.  */
-#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
 
 /* If this bit is set, either \{...\} or {...} defines an
      interval, depending on RE_NO_BK_BRACES.
    If not set, \{, \}, {, and } are literals.  */
-#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
 
 /* If this bit is set, +, ? and | aren't recognized as operators.
    If not set, they are.  */
-#define RE_LIMITED_OPS (RE_INTERVALS << 1)
+# define RE_LIMITED_OPS (RE_INTERVALS << 1)
 
 /* If this bit is set, newline is an alternation operator.
    If not set, newline is literal.  */
-#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
 
 /* If this bit is set, then `{...}' defines an interval, and \{ and \}
      are literals.
   If not set, then `\{...\}' defines an interval.  */
-#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
 
 /* If this bit is set, (...) defines a group, and \( and \) are literals.
    If not set, \(...\) defines a group, and ( and ) are literals.  */
-#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
 
 /* If this bit is set, then \<digit> matches <digit>.
    If not set, then \<digit> is a back-reference.  */
-#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
 
 /* If this bit is set, then | is an alternation operator, and \| is literal.
    If not set, then \| is an alternation operator, and | is literal.  */
-#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
 
 /* If this bit is set, then an ending range point collating higher
      than the starting range point, as in [z-a], is invalid.
    If not set, then when ending range point collates higher than the
      starting range point, the range is ignored.  */
-#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
 
 /* If this bit is set, then an unmatched ) is ordinary.
    If not set, then an unmatched ) is invalid.  */
-#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
 
 /* If this bit is set, succeed as soon as we match the whole pattern,
    without further backtracking.  */
-#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
 
 /* If this bit is set, do not process the GNU regex operators.
    If not set, then the GNU regex operators are recognized. */
-#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
 
 /* If this bit is set, turn on internal regex debugging.
    If not set, and debugging was on, turn it off.
@@ -150,29 +151,30 @@
    We define this bit always, so that all that's needed to turn on
    debugging is to recompile regex.c; the calling code can always have
    this bit set, and it won't affect anything in the normal case. */
-#define RE_DEBUG (RE_NO_GNU_OPS << 1)
+# define RE_DEBUG (RE_NO_GNU_OPS << 1)
 
 /* If this bit is set, a syntactically invalid interval is treated as
    a string of ordinary characters.  For example, the ERE 'a{1' is
    treated as 'a\{1'.  */
-#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
 
 /* If this bit is set, then ignore case when matching.
    If not set, then case is significant.  */
-#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
+# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
 
 /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
    for ^, because it is difficult to scan the regex backwards to find
    whether ^ should be special.  */
-#define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
+# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
 
 /* If this bit is set, then \{ cannot be first in an bre or
    immediately after an alternation or begin-group operator.  */
-#define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
+# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
 
 /* If this bit is set, then no_sub will be set to 1 during
    re_compile_pattern.  */
-#define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
+# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
+#endif
 
 /* This global variable defines the particular regexp syntax to use (for
    some interfaces).  When a regexp is compiled, the syntax used is
@@ -180,6 +182,7 @@
    already-compiled regexps.  */
 extern reg_syntax_t re_syntax_options;
 
+#ifdef __USE_GNU
 /* Define combinations of the above bits for the standard possibilities.
    (The [[[ comments delimit what gets put into the Texinfo file, so
    don't delete them!)  */
@@ -254,11 +257,12 @@
 /* Maximum number of duplicates an interval can allow.  Some systems
    (erroneously) define this in other header files, but we want our
    value, so remove any previous define.  */
-#ifdef RE_DUP_MAX
-# undef RE_DUP_MAX
-#endif
+# ifdef RE_DUP_MAX
+#  undef RE_DUP_MAX
+# endif
 /* If sizeof(int) == 2, then ((1 << 15) - 1) overflows.  */
-#define RE_DUP_MAX (0x7fff)
+# define RE_DUP_MAX (0x7fff)
+#endif
 
 
 /* POSIX `cflags' bits (i.e., information for `regcomp').  */
@@ -337,7 +341,16 @@
    private to the regex routines.  */
 
 #ifndef RE_TRANSLATE_TYPE
-# define RE_TRANSLATE_TYPE unsigned char *
+# define __RE_TRANSLATE_TYPE unsigned char *
+# ifdef __USE_GNU
+#  define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
+# endif
+#endif
+
+#ifdef __USE_GNU
+# define __REPB_PREFIX(name) name
+#else
+# define __REPB_PREFIX(name) __##name
 #endif
 
 struct re_pattern_buffer
@@ -345,27 +358,27 @@
   /* Space that holds the compiled pattern.  It is declared as
      `unsigned char *' because its elements are sometimes used as
      array indexes.  */
-  unsigned char *buffer;
+  unsigned char *__REPB_PREFIX(buffer);
 
   /* Number of bytes to which `buffer' points.  */
-  unsigned long int allocated;
+  unsigned long int __REPB_PREFIX(allocated);
 
   /* Number of bytes actually used in `buffer'.  */
-  unsigned long int used;
+  unsigned long int __REPB_PREFIX(used);
 
   /* Syntax setting with which the pattern was compiled.  */
-  reg_syntax_t syntax;
+  reg_syntax_t __REPB_PREFIX(syntax);
 
   /* Pointer to a fastmap, if any, otherwise zero.  re_search uses the
      fastmap, if there is one, to skip over impossible starting points
      for matches.  */
-  char *fastmap;
+  char *__REPB_PREFIX(fastmap);
 
   /* Either a translate table to apply to all characters before
      comparing them, or zero for no translation.  The translation is
      applied to a pattern when it is compiled and to a string when it
      is matched.  */
-  RE_TRANSLATE_TYPE translate;
+  __RE_TRANSLATE_TYPE __REPB_PREFIX(translate);
 
   /* Number of subexpressions found by the compiler.  */
   size_t re_nsub;
@@ -374,34 +387,36 @@
      Well, in truth it's used only in `re_search_2', to see whether or
      not we should use the fastmap, so we don't set this absolutely
      perfectly; see `re_compile_fastmap' (the `duplicate' case).  */
-  unsigned can_be_null : 1;
+  unsigned __REPB_PREFIX(can_be_null) : 1;
 
   /* If REGS_UNALLOCATED, allocate space in the `regs' structure
      for `max (RE_NREGS, re_nsub + 1)' groups.
      If REGS_REALLOCATE, reallocate space if necessary.
      If REGS_FIXED, use what's there.  */
-#define REGS_UNALLOCATED 0
-#define REGS_REALLOCATE 1
-#define REGS_FIXED 2
-  unsigned regs_allocated : 2;
+#ifdef __USE_GNU
+# define REGS_UNALLOCATED 0
+# define REGS_REALLOCATE 1
+# define REGS_FIXED 2
+#endif
+  unsigned __REPB_PREFIX(regs_allocated) : 2;
 
   /* Set to zero when `regex_compile' compiles a pattern; set to one
      by `re_compile_fastmap' if it updates the fastmap.  */
-  unsigned fastmap_accurate : 1;
+  unsigned __REPB_PREFIX(fastmap_accurate) : 1;
 
   /* If set, `re_match_2' does not return information about
      subexpressions.  */
-  unsigned no_sub : 1;
+  unsigned __REPB_PREFIX(no_sub) : 1;
 
   /* If set, a beginning-of-line anchor doesn't match at the beginning
      of the string.  */
-  unsigned not_bol : 1;
+  unsigned __REPB_PREFIX(not_bol) : 1;
 
   /* Similarly for an end-of-line anchor.  */
-  unsigned not_eol : 1;
+  unsigned __REPB_PREFIX(not_eol) : 1;
 
   /* If true, an anchor at a newline matches.  */
-  unsigned newline_anchor : 1;
+  unsigned __REPB_PREFIX(newline_anchor) : 1;
 };
 
 typedef struct re_pattern_buffer regex_t;
@@ -410,6 +425,7 @@
 typedef int regoff_t;
 
 
+#ifdef __USE_GNU
 /* This is the structure we store register match data in.  See
    regex.texinfo for a full description of what registers match.  */
 struct re_registers
@@ -423,8 +439,9 @@
 /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
    `re_match_2' returns information about at least this many registers
    the first time a `regs' structure is passed.  */
-#ifndef RE_NREGS
-# define RE_NREGS 30
+# ifndef RE_NREGS
+#  define RE_NREGS 30
+# endif
 #endif
 
 
@@ -439,6 +456,7 @@
 
 /* Declarations for routines.  */
 
+#ifdef __USE_GNU
 /* Sets the current default syntax to SYNTAX, and return the old syntax.
    You can also simply assign to the `re_syntax_options' variable.  */
 extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
@@ -503,8 +521,9 @@
 			      struct re_registers *__regs,
 			      unsigned int __num_regs,
 			      regoff_t *__starts, regoff_t *__ends);
-
-#if defined _REGEX_RE_COMP || defined _LIBC
+#endif	/* Use GNU */
+
+#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD)
 # ifndef _CRAY
 /* 4.2 bsd compatibility.  */
 extern char *re_comp (const char *);

Modified: fsf/trunk/libc/resolv/netdb.h
==============================================================================
--- fsf/trunk/libc/resolv/netdb.h (original)
+++ fsf/trunk/libc/resolv/netdb.h Thu Jan 17 00:23:42 2008
@@ -62,8 +62,6 @@
 
 
 /* Possible values left in `h_errno'.  */
-#define	NETDB_INTERNAL	-1	/* See errno.  */
-#define	NETDB_SUCCESS	0	/* No problem.  */
 #define	HOST_NOT_FOUND	1	/* Authoritative Answer Host not found.  */
 #define	TRY_AGAIN	2	/* Non-Authoritative Host not found,
 				   or SERVERFAIL.  */
@@ -71,7 +69,11 @@
 				   NOTIMP.  */
 #define	NO_DATA		4	/* Valid name, no data record of requested
 				   type.  */
-#define	NO_ADDRESS	NO_DATA	/* No address, look for MX record.  */
+#if defined __USE_MISC || defined __USE_GNU
+# define NETDB_INTERNAL	-1	/* See errno.  */
+# define NETDB_SUCCESS	0	/* No problem.  */
+# define NO_ADDRESS	NO_DATA	/* No address, look for MX record.  */
+#endif
 
 #ifdef __USE_XOPEN2K
 /* Highest reserved Internet port number.  */
@@ -83,13 +85,14 @@
 # define SCOPE_DELIMITER	'%'
 #endif
 
+#if defined __USE_MISC || defined __USE_GNU
 /* Print error indicated by `h_errno' variable on standard error.  STR
    if non-null is printed before the error string.  */
 extern void herror (__const char *__str) __THROW;
 
 /* Return string associated with error ERR_NUM.  */
 extern __const char *hstrerror (int __err_num) __THROW;
-
+#endif
 
 
 /* Description of data base entry for a single host.  */
@@ -100,7 +103,9 @@
   int h_addrtype;		/* Host address type.  */
   int h_length;			/* Length of address.  */
   char **h_addr_list;		/* List of addresses from name server.  */
-#define	h_addr	h_addr_list[0]	/* Address, for backward compatibility.  */
+#if defined __USE_MISC || defined __USE_GNU
+# define	h_addr	h_addr_list[0] /* Address, for backward compatibility.*/
+#endif
 };
 
 /* Open host data base files and mark them as staying open even after
@@ -590,15 +595,15 @@
 # define EAI_NONAME	  -2	/* NAME or SERVICE is unknown.  */
 # define EAI_AGAIN	  -3	/* Temporary failure in name resolution.  */
 # define EAI_FAIL	  -4	/* Non-recoverable failure in name res.  */
-# define EAI_NODATA	  -5	/* No address associated with NAME.  */
 # define EAI_FAMILY	  -6	/* `ai_family' not supported.  */
 # define EAI_SOCKTYPE	  -7	/* `ai_socktype' not supported.  */
 # define EAI_SERVICE	  -8	/* SERVICE not supported for `ai_socktype'.  */
-# define EAI_ADDRFAMILY	  -9	/* Address family for NAME not supported.  */
 # define EAI_MEMORY	  -10	/* Memory allocation failure.  */
 # define EAI_SYSTEM	  -11	/* System error returned in `errno'.  */
 # define EAI_OVERFLOW	  -12	/* Argument buffer overflow.  */
 # ifdef __USE_GNU
+#  define EAI_NODATA	  -5	/* No address associated with NAME.  */
+#  define EAI_ADDRFAMILY  -9	/* Address family for NAME not supported.  */
 #  define EAI_INPROGRESS  -100	/* Processing request in progress.  */
 #  define EAI_CANCELED	  -101	/* Request canceled.  */
 #  define EAI_NOTCANCELED -102	/* Request not canceled.  */
@@ -607,8 +612,10 @@
 #  define EAI_IDN_ENCODE  -105	/* IDN encoding failed.  */
 # endif
 
-# define NI_MAXHOST      1025
-# define NI_MAXSERV      32
+# ifdef __USE_GNU
+#  define NI_MAXHOST      1025
+#  define NI_MAXSERV      32
+# endif
 
 # define NI_NUMERICHOST	1	/* Don't try to look up hostname.  */
 # define NI_NUMERICSERV 2	/* Don't convert port number to name.  */

Modified: fsf/trunk/libc/sysdeps/gnu/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/gnu/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/gnu/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -47,7 +47,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned short int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/getaddrinfo.c (original)
+++ fsf/trunk/libc/sysdeps/posix/getaddrinfo.c Thu Jan 17 00:23:42 2008
@@ -1105,22 +1105,22 @@
 static const struct prefixentry default_labels[] =
   {
     /* See RFC 3484 for the details.  */
-    { { .in6_u
-	= { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } },
-      128, 0 },
-    { { .in6_u
-	= { .u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      16, 2 },
-    { { .in6_u
-	= { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      96, 3 },
-    { { .in6_u
-	= { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } } },
-      96, 4 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } }
+      }, 128, 0 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 16, 2 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 96, 3 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } }
+      }, 96, 4 },
     /* The next two entries differ from RFC 3484.  We need to treat
        IPv6 site-local addresses special because they are never NATed,
        unlike site-locale IPv4 addresses.  If this would not happen, on
@@ -1128,23 +1128,23 @@
        sorting would prefer the IPv6 site-local addresses, causing
        unnecessary delays when trying to connect to a global IPv6 address
        through a site-local IPv6 address.  */
-    { { .in6_u
-	= { .u6_addr8 = { 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      10, 5 },
-    { { .in6_u
-	= { .u6_addr8 = { 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      7, 6 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 10, 5 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 7, 6 },
     /* Additional rule for Teredo tunnels.  */
-    { { .in6_u
-	= { .u6_addr8 = { 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      32, 7 },
-    { { .in6_u
-	= { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      0, 1 }
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 32, 7 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 0, 1 }
   };
 
 
@@ -1155,26 +1155,26 @@
 static const struct prefixentry default_precedence[] =
   {
     /* See RFC 3484 for the details.  */
-    { { .in6_u
-	= { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } },
-      128, 50 },
-    { { .in6_u
-	= { .u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      16, 30 },
-    { { .in6_u
-	= { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      96, 20 },
-    { { .in6_u
-	= { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } } },
-      96, 10 },
-    { { .in6_u
-	= { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } },
-      0, 40 }
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } }
+      }, 128, 50 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 16, 30 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 96, 20 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } }
+      }, 96, 10 },
+    { { .__in6_u
+	= { .__u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+      }, 0, 40 }
   };
 
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/alpha/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/alpha/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/alpha/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -46,7 +46,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/in.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/in.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/in.h Thu Jan 17 00:23:42 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000, 2004, 2008 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
@@ -43,16 +43,18 @@
 #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
+#if defined __USE_MISC || defined __USE_GNU
+# 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
+# define MCAST_EXCLUDE   0
+# define MCAST_INCLUDE   1
+#endif
 
 #define IP_ROUTER_ALERT    5	/* bool */
 #define IP_PKTINFO         8	/* bool */
@@ -76,6 +78,7 @@
 #define IP_DEFAULT_MULTICAST_LOOP       1
 #define IP_MAX_MEMBERSHIPS              20
 
+#if defined __USE_MISC || defined __USE_GNU
 /* 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).  */
@@ -100,6 +103,7 @@
     struct in_addr ipi_spec_dst;	/* Routing destination address  */
     struct in_addr ipi_addr;		/* Header destination address  */
   };
+#endif
 
 /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
    The first word in the comment at the right is the data type used;

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -45,7 +45,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h Thu Jan 17 00:23:42 2008
@@ -26,10 +26,8 @@
 #endif
 
 #define	__need_size_t
-#define __need_NULL
 #include <stddef.h>
 
-#include <limits.h>
 #include <sys/types.h>
 
 /* Type for length arguments in socket calls.  */
@@ -156,11 +154,7 @@
 
 /* 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_aligntype	unsigned long int
 #define _SS_SIZE	128
 #define _SS_PADSIZE	(_SS_SIZE - (2 * sizeof (__ss_aligntype)))
 
@@ -263,7 +257,7 @@
 #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
 #define CMSG_FIRSTHDR(mhdr) \
   ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
-   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
 #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
 			 & (size_t) ~(sizeof (size_t) - 1))
 #define CMSG_SPACE(len) (CMSG_ALIGN (len) \
@@ -307,18 +301,74 @@
 #endif
   };
 
+#ifdef __USE_GNU
 /* User visible structure for SCM_CREDENTIALS message */
-
 struct ucred
 {
   pid_t pid;			/* PID of sending process.  */
   uid_t uid;			/* UID of sending process.  */
   gid_t gid;			/* GID of sending process.  */
 };
+#endif
+
+/* Ugly workaround for unclean kernel headers.  */
+#if !defined __USE_MISC && !defined __USE_GNU
+# ifndef FIOGETOWN
+#  define __SYS_SOCKET_H_undef_FIOGETOWN
+# endif
+# ifndef FIOSETOWN
+#  define __SYS_SOCKET_H_undef_FIOSETOWN
+# endif
+# ifndef SIOCATMARK
+#  define __SYS_SOCKET_H_undef_SIOCATMARK
+# endif
+# ifndef SIOCGPGRP
+#  define __SYS_SOCKET_H_undef_SIOCGPGRP
+# endif
+# ifndef SIOCGSTAMP
+#  define __SYS_SOCKET_H_undef_SIOCGSTAMP
+# endif
+# ifndef SIOCGSTAMPNS
+#  define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+# endif
+# ifndef SIOCSPGRP
+#  define __SYS_SOCKET_H_undef_SIOCSPGRP
+# endif
+#endif
 
 /* Get socket manipulation related informations from kernel headers.  */
 #include <asm/socket.h>
 
+#if !defined __USE_MISC && !defined __USE_GNU
+# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
+#  undef __SYS_SOCKET_H_undef_FIOGETOWN
+#  undef FIOGETOWN
+# endif
+# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
+#  undef __SYS_SOCKET_H_undef_FIOSETOWN
+#  undef FIOSETOWN
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
+#  undef __SYS_SOCKET_H_undef_SIOCATMARK
+#  undef SIOCATMARK
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
+#  undef __SYS_SOCKET_H_undef_SIOCGPGRP
+#  undef SIOCGPGRP
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
+#  undef __SYS_SOCKET_H_undef_SIOCGSTAMP
+#  undef SIOCGSTAMP
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+#  undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+#  undef SIOCGSTAMPNS
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
+#  undef __SYS_SOCKET_H_undef_SIOCSPGRP
+#  undef SIOCSPGRP
+# endif
+#endif
 
 /* Structure used to manipulate the SO_LINGER option.  */
 struct linger

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/cmsg_nxthdr.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/cmsg_nxthdr.c Thu Jan 17 00:23:42 2008
@@ -1,5 +1,5 @@
 /* Return point to next ancillary data entry in message header.
-   Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2001, 2008 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
@@ -17,6 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <stddef.h>
 #include <sys/socket.h>
 
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -41,7 +41,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -46,7 +46,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;          /* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -46,7 +46,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -43,7 +43,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -47,7 +47,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h Thu Jan 17 00:23:42 2008
@@ -46,7 +46,7 @@
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;		/* operation permission struct */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h Thu Jan 17 00:23:42 2008
@@ -61,7 +61,7 @@
     __uid_t st_uid;		/* User ID of the file's owner.	*/
     __gid_t st_gid;		/* Group ID of the file's group.*/
 #if __WORDSIZE == 64
-    int pad0;
+    int __pad0;
 #endif
     __dev_t st_rdev;		/* Device number, if device.  */
 #if __WORDSIZE == 32
@@ -129,7 +129,7 @@
     __uid_t st_uid;		/* User ID of the file's owner.	*/
     __gid_t st_gid;		/* Group ID of the file's group.*/
 #if __WORDSIZE == 64
-    int pad0;
+    int __pad0;
     __dev_t st_rdev;		/* Device number, if device.  */
     __off_t st_size;		/* Size of file, in bytes.  */
 #else