diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-10-25 09:11:53 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-10-25 09:11:53 +0000 |
commit | 4a582094c28099144dac9528174ce7c0be72c0fd (patch) | |
tree | 647f7c06d86df0e42887c2db744578bf71a991fc /sysdeps | |
parent | 88455219c104124f82cc11d038b17cb249c4b6bd (diff) | |
download | glibc-4a582094c28099144dac9528174ce7c0be72c0fd.tar.gz glibc-4a582094c28099144dac9528174ce7c0be72c0fd.tar.xz glibc-4a582094c28099144dac9528174ce7c0be72c0fd.zip |
Update.
1998-10-25 Ulrich Drepper <drepper@cygnus.com> * include/features.h: Define __USE_POSIS199506 is _POSIX_C_SOURCE is greater or equal than 199506L. * sysdeps/generic/bits/types.h (__fd_set): Define element as fds_bits only is __USE_XOPEN. Otherwise use __fds_bits. * sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/bits/types.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/types.h: Likewise. 1998-10-24 H.J. Lu <hjl@gnu.org> * locale/programs/charmap.c (parse_charmap): Accept tok_string for <code_set_name>. 1998-10-25 H.J. Lu <hjl@gnu.org> * locale/programs/ld-ctype.c (ctype_finish): Also check <space>. 1998-10-25 Ulrich Drepper <drepper@cygnus.com> * signal/signal.h: Include bits/sigthread.h only if __USE_POSIX199506. * sysdeps/unix/sysv/linux/bits/types.h: Include pthreadtypes.h only if __USE_POSIX199506 or __USE_UNIX98. 1998-10-24 22:34 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu> * string/bits/string2.h: Inline strdup+friends only if __USE_MISC || __USE_GNU (prevents namespace pollution). 1998-10-24 H.J. Lu <hjl@gnu.org> * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD. * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Likewise. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Likewise. * sysdeps/unix/sysv/linux/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Likewise. 1998-10-24 H.J. Lu <hjl@gnu.org> * libio/ioseekoff.c (_IO_seekoff): Check the valid dir value. * libio/rewind.c (rewind): Clear the error. 1998-10-24 H.J. Lu <hjl@gnu.org> * grp/grp.h (getgrent_r, getgrgid_r, getgrnam_r): Add "__" to "buffer". 1998-10-24 H.J. Lu <hjl@gnu.org> * sysdeps/unix/sysv/linux/alpha/bits/time.h (timeval): Protect with __need_timeval. * sysdeps/unix/sysv/linux/mips/bits/time.h (timeval): Likewise. * sysdeps/unix/sysv/linux/bits/time.h (timeval): Likewise. 1998-10-24 H.J. Lu <hjl@gnu.org> * signal/signal.h (timespec, siginfo_t, sigwaitinfo, sigtimedwait, sigqueue): Protect with __USE_POSIX199309. 1998-10-24 H.J. Lu <hjl@gnu.org> * time/time.h (timespec): Protect with __USE_POSIX199309 instead of __USE_POSIX. 1998-10-24 H.J. Lu <hjl@gnu.org> * libio/fileops.c (_IO_new_file_seekoff): Always resync with the kernel file offset. * libio/oldfileops.c (_IO_old_file_seekoff): Likewise.
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; |