about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-01-16 10:11:18 +0000
committerUlrich Drepper <drepper@redhat.com>2008-01-16 10:11:18 +0000
commita53d3f8295368bd67c9a8e75e88c566043752604 (patch)
tree268a7e9f280cbf8eadd80d15c4c3a3b4b1507a1e /sysdeps
parentfbe90cd5c7f3ec0d57bfe01cd805db12f53ee946 (diff)
downloadglibc-a53d3f8295368bd67c9a8e75e88c566043752604.tar.gz
glibc-a53d3f8295368bd67c9a8e75e88c566043752604.tar.xz
glibc-a53d3f8295368bd67c9a8e75e88c566043752604.zip
[BZ #5607]
2008-01-16  Ulrich Drepper  <drepper@redhat.com>
	[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.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/bits/in.h26
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h68
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/stat.h4
3 files changed, 76 insertions, 22 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h
index 6880a2e636..433c033c70 100644
--- a/sysdeps/unix/sysv/linux/bits/in.h
+++ b/sysdeps/unix/sysv/linux/bits/in.h
@@ -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
-
-#define MCAST_EXCLUDE   0
-#define MCAST_INCLUDE   1
+#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
+#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_pktinfo
     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;
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 11bb607d0d..ceb60133e3 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -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 @@ struct sockaddr
 
 /* 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 @@ struct cmsghdr
 #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 @@ enum
 #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
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/stat.h b/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
index add2c8eca3..286c1a2a02 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
@@ -61,7 +61,7 @@ struct stat
     __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 @@ struct stat64
     __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