summaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/shm.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/in.h26
-rw-r--r--sysdeps/unix/sysv/linux/bits/shm.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h68
-rw-r--r--sysdeps/unix/sysv/linux/cmsg_nxthdr.c3
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/shm.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/shm.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/shm.h2
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/shm.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/shm.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/signalfd.h4
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/shm.h2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/stat.h4
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sys/epoll.h4
14 files changed, 91 insertions, 34 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index 35226c16ce..cb214e6412 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -46,7 +46,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
/* 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 */
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/shm.h b/sysdeps/unix/sysv/linux/bits/shm.h
index 318d601aed..3f63152304 100644
--- a/sysdeps/unix/sysv/linux/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/bits/shm.h
@@ -45,7 +45,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
/* 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 */
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/cmsg_nxthdr.c b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
index b7de285e34..466af0585a 100644
--- a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
+++ b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
@@ -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>
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/sysdeps/unix/sysv/linux/ia64/bits/shm.h
index 7f38f2dd7b..2dc58a679d 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/shm.h
@@ -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 */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
index 62560c0caf..6a35ff1d7c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
@@ -46,7 +46,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
/* 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 */
diff --git a/sysdeps/unix/sysv/linux/s390/bits/shm.h b/sysdeps/unix/sysv/linux/s390/bits/shm.h
index d88ed36efa..a6df6d779d 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/shm.h
@@ -46,7 +46,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
/* 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 */
diff --git a/sysdeps/unix/sysv/linux/sh/bits/shm.h b/sysdeps/unix/sysv/linux/sh/bits/shm.h
index 189179394b..709aa3f976 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/shm.h
@@ -43,7 +43,7 @@ __BEGIN_DECLS
/* 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 */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/shm.h b/sysdeps/unix/sysv/linux/sparc/bits/shm.h
index 03decb110c..273b67edb5 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/shm.h
@@ -47,7 +47,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
/* 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 */
diff --git a/sysdeps/unix/sysv/linux/sys/signalfd.h b/sysdeps/unix/sysv/linux/sys/signalfd.h
index 6649bc1d9c..7a7f53ba32 100644
--- a/sysdeps/unix/sysv/linux/sys/signalfd.h
+++ b/sysdeps/unix/sysv/linux/sys/signalfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 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
@@ -38,7 +38,7 @@ struct signalfd_siginfo
uint32_t ssi_trapno;
int32_t ssi_status;
int32_t ssi_int;
- uintptr_t ssi_ptr;
+ uint64_t ssi_ptr;
uint64_t ssi_utime;
uint64_t ssi_stime;
uint64_t ssi_addr;
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/shm.h b/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
index 3d8c05d212..def200c193 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
@@ -46,7 +46,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
/* 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 */
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
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
index 26f23da403..dfb65fe5fa 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2005,2006,2007,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
@@ -53,6 +53,8 @@ enum EPOLL_EVENTS
#define EPOLLERR EPOLLERR
EPOLLHUP = 0x010,
#define EPOLLHUP EPOLLHUP
+ EPOLLRDHUP = 0x2000,
+#define EPOLLRDHUP EPOLLRDHUP
EPOLLONESHOT = (1 << 30),
#define EPOLLONESHOT EPOLLONESHOT
EPOLLET = (1 << 31)