diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/bits/types.h | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/time.h | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/types.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/fcntl.h | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/time.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/types.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/bits/fcntl.h | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/bits/fcntl.h | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/bits/time.h | 9 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/bits/types.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/bits/fcntl.h | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 7 |
14 files changed, 102 insertions, 46 deletions
diff --git a/sysdeps/generic/bits/types.h b/sysdeps/generic/bits/types.h index d79851c22a..2b3edab5e4 100644 --- a/sysdeps/generic/bits/types.h +++ b/sysdeps/generic/bits/types.h @@ -98,8 +98,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +#else + __fd_mask __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +#endif } __fd_set; diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 70ebbeba61..9f90ddf57c 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -89,12 +89,14 @@ #define F_EXLCK 16 /* or 3 */ #define F_SHLCK 32 /* or 4 */ -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent +/* Operations for bsd flock(), also used by the kernel implementation */ +#ifdef __USE_BSD +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif /* We don't need to support __USE_FILE_OFFSET64. */ struct flock diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index acb2b41f97..f44b5dcabc 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -42,10 +42,11 @@ # endif /* bits/time.h */ #endif /* !__need_timeval */ - -#ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include <bits/types.h> +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +# include <bits/types.h> /* A time value that is accurate to the nearest microsecond but also has a range of years. */ @@ -54,4 +55,5 @@ struct timeval __time_t tv_sec; /* Seconds. */ __time_t tv_usec; /* Microseconds. */ }; -#endif /* struct timeval */ +# endif /* struct timeval */ +#endif /* need timeval */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index d4f2217f05..aee9d046ec 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -102,8 +102,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#endif } __fd_set; /* Used in XTI. */ @@ -115,6 +120,8 @@ typedef long int __intptr_t; /* Now add the thread types. */ -#include <bits/pthreadtypes.h> +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include <bits/pthreadtypes.h> +#endif #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/bits/fcntl.h b/sysdeps/unix/sysv/linux/bits/fcntl.h index a2bbf29e03..0c94c6b9a5 100644 --- a/sysdeps/unix/sysv/linux/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/bits/fcntl.h @@ -96,12 +96,14 @@ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif struct flock { diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h index 3c1b27a1bb..274d616777 100644 --- a/sysdeps/unix/sysv/linux/bits/time.h +++ b/sysdeps/unix/sysv/linux/bits/time.h @@ -42,9 +42,11 @@ # endif /* bits/time.h */ #endif -#ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include <bits/types.h> +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +# include <bits/types.h> /* A time value that is accurate to the nearest microsecond but also has a range of years. */ @@ -53,4 +55,5 @@ struct timeval __time_t tv_sec; /* Seconds. */ __time_t tv_usec; /* Microseconds. */ }; -#endif /* struct timeval */ +# endif /* struct timeval */ +#endif /* need timeval */ diff --git a/sysdeps/unix/sysv/linux/bits/types.h b/sysdeps/unix/sysv/linux/bits/types.h index 06206f3b55..1543ff7c34 100644 --- a/sysdeps/unix/sysv/linux/bits/types.h +++ b/sysdeps/unix/sysv/linux/bits/types.h @@ -99,8 +99,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the global namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#endif } __fd_set; @@ -139,6 +144,8 @@ typedef int __intptr_t; /* Now add the thread types. */ -#include <bits/pthreadtypes.h> +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include <bits/pthreadtypes.h> +#endif #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h index d4ef8e1096..d47a661917 100644 --- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h @@ -96,12 +96,14 @@ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ +#ifdef __USE_BSD /* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif struct flock { diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h index 027347053b..0a21a59e0a 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h @@ -86,12 +86,14 @@ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif typedef struct flock { diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h index 91dc65c910..15c7cb3852 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/time.h +++ b/sysdeps/unix/sysv/linux/mips/bits/time.h @@ -42,8 +42,10 @@ # endif /* bits/time.h */ #endif -#ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval @@ -51,4 +53,5 @@ struct timeval long int tv_sec; /* Seconds. */ long int tv_usec; /* Microseconds. */ }; -#endif /* struct timeval */ +# endif /* struct timeval */ +#endif /* need timeval */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index c716d5735d..e32dadf57f 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -99,8 +99,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#endif } __fd_set; @@ -139,6 +144,8 @@ typedef int __intptr_t; /* Now add the thread types. */ -#include <bits/pthreadtypes.h> +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include <bits/pthreadtypes.h> +#endif #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h index b86c65d993..e42dfefef6 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h @@ -79,12 +79,14 @@ #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ -#define LOCK_UN 8 /* remove lock */ +# define LOCK_UN 8 /* remove lock */ +#endif struct flock { diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h index c147dbe6e5..6093eba084 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h @@ -93,8 +93,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#endif } __fd_set; @@ -127,6 +132,8 @@ typedef long int __intptr_t; /* Now add the thread types. */ -#include <bits/pthreadtypes.h> +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include <bits/pthreadtypes.h> +#endif #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index e25dec98fb..aa73ebcb19 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -90,8 +90,13 @@ typedef int __key_t; /* Type of an IPC key */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +#else + unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +#endif } __fd_set; typedef unsigned long int __fd_mask; |