diff options
author | Joseph Myers <joseph@codesourcery.com> | 2014-02-12 23:41:01 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2014-02-12 23:41:01 +0000 |
commit | 498afc54dfee41d33ba519f496e96480badace8e (patch) | |
tree | 8f45f9dedd46e1d9aa5558db399d0d9ebd87d8ce /sysdeps | |
parent | dd7b064ccaa3afc96499c7be2776baade60bcb56 (diff) | |
download | glibc-498afc54dfee41d33ba519f496e96480badace8e.tar.gz |
Combine __USE_BSD and __USE_SVID into __USE_MISC.
This patch cleans up following the obsoletion of _BSD_SOURCE and
_SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC.
The only non-mechanical part of this patch is the changes to
features.h; everything else is simple substitution of __USE_MISC for
the old macros. Thus, this patch leaves obviously redundant
conditionals such as "defined __USE_MISC || defined __USE_MISC", and
does not update #endif comments where they referred to BSD or SVID in
words instead of the literal macro name. This is intended to
facilitate patch review by separating the less mechanical changes from
these purely mechanical changes into a separate patch. (I do intend
to integrate all the changes from
<https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I
believe includes all the trailing comment updates, in subsequent
patches.)
Tested x86_64.
* include/features.h (__USE_BSD): Remove macro definitions.
(__USE_SVID): Likewise.
(_BSD_SOURCE): Likewise.
(_SVID_SOURCE): Likewise.
[!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition
from definition of _DEFAULT_SOURCE.
[_BSD_SOURCE || _SVID_SOURCE]: Change condition to
[_DEFAULT_SOURCE].
* bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC].
* bits/mman.h [__USE_BSD]: Likewise.
* bits/termios.h [__USE_BSD]: Likewise.
* bits/waitstatus.h [__USE_BSD]: Likewise.
* ctype/ctype.h [__USE_SVID]: Likewise.
* dirent/dirent.h [__USE_BSD]: Likewise.
* grp/grp.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* inet/netinet/igmp.h [__USE_BSD]: Likewise.
* io/fcntl.h [__USE_BSD]: Likewise.
* io/ftw.h [__USE_BSD]: Likewise.
* io/sys/stat.h [__USE_BSD]: Likewise.
* libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise.
* libio/bits/stdio2.h [__USE_BSD]: Likewise.
* libio/stdio.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* math/math.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise.
* misc/bits/syslog.h [__USE_BSD]: Likewise.
* misc/search.h [__USE_SVID]: Likewise.
* misc/sys/mman.h [__USE_BSD]: Likewise.
* misc/sys/syslog.h [__USE_BSD]: Likewise.
* misc/sys/uio.h [__USE_BSD]: Likewise.
* posix/bits/unistd.h [__USE_BSD]: Likewise.
* posix/glob.h [__USE_BSD]: Likewise.
* posix/regex.h [__USE_BSD]: Likewise.
* posix/sys/types.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* posix/sys/utsname.h [__USE_SVID]: Likewise.
* posix/sys/wait.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* posix/unistd.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* pwd/pwd.h [__USE_SVID]: Likewise.
* resolv/netdb.h [__USE_BSD]: Likewise.
* setjmp/setjmp.h [__USE_BSD]: Likewise.
* signal/signal.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* socket/sys/socket.h [__USE_BSD]: Likewise.
* stdlib/fmtmsg.h [__USE_SVID]: Likewise.
* stdlib/stdlib.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* string/bits/string2.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* string/bits/string3.h [__USE_BSD]: Likewise.
* string/endian.h [__USE_BSD]: Likewise.
* string/string.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* string/strings.h [__USE_BSD]: Likewise.
* sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise.
* sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise.
* sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise.
* sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/x86/bits/string.h [__USE_BSD]: Likewise.
* sysvipc/sys/ipc.h [__USE_SVID]: Likewise.
* termios/termios.h [__USE_BSD]: Likewise.
* time/sys/time.h [__USE_BSD]: Likewise.
* time/time.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change
condition to [__USE_MISC].
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/netinet/ip.h | 4 | ||||
-rw-r--r-- | sysdeps/gnu/netinet/ip_icmp.h | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/bits/fcntl.h | 6 | ||||
-rw-r--r-- | sysdeps/mach/hurd/bits/stat.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/mman.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/termios.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/mman-linux.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/sys_errlist.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/termios.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/bits/termios.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/netinet/if_ether.h | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/netinet/if_fddi.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/netinet/if_tr.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/bits/termios.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/bits/termios.h | 2 | ||||
-rw-r--r-- | sysdeps/x86/bits/string.h | 6 |
17 files changed, 26 insertions, 26 deletions
diff --git a/sysdeps/generic/netinet/ip.h b/sysdeps/generic/netinet/ip.h index ecf340e07f..7f90382c3d 100644 --- a/sysdeps/generic/netinet/ip.h +++ b/sysdeps/generic/netinet/ip.h @@ -64,7 +64,7 @@ struct iphdr /*The options start here. */ }; -#ifdef __USE_BSD +#ifdef __USE_MISC /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -146,7 +146,7 @@ struct ip_timestamp #endif u_int32_t data[9]; }; -#endif /* __USE_BSD */ +#endif /* __USE_MISC */ #define IPVERSION 4 /* IP version number */ #define IP_MAXPACKET 65535 /* maximum packet size */ diff --git a/sysdeps/gnu/netinet/ip_icmp.h b/sysdeps/gnu/netinet/ip_icmp.h index e7a351e966..02c5b5e8eb 100644 --- a/sysdeps/gnu/netinet/ip_icmp.h +++ b/sysdeps/gnu/netinet/ip_icmp.h @@ -90,7 +90,7 @@ struct icmphdr #define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ -#ifdef __USE_BSD +#ifdef __USE_MISC /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -275,7 +275,7 @@ struct icmp (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) -#endif /* __USE_BSD */ +#endif /* __USE_MISC */ __END_DECLS diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h index 135aba3bc9..109cc07201 100644 --- a/sysdeps/mach/hurd/bits/fcntl.h +++ b/sysdeps/mach/hurd/bits/fcntl.h @@ -103,7 +103,7 @@ fail with EAGAIN. */ #define O_NONBLOCK 0x0008 /* Non-blocking open or non-blocking I/O. */ -#ifdef __USE_BSD +#ifdef __USE_MISC # define O_NDELAY O_NONBLOCK /* Deprecated. */ #endif @@ -134,7 +134,7 @@ #define O_NOCTTY 0 /* Don't assign a controlling terminal. */ -#ifdef __USE_BSD +#ifdef __USE_MISC /* Bits in the file status flags returned by F_GETFL. */ # define FREAD O_RDONLY # define FWRITE O_WRONLY @@ -159,7 +159,7 @@ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ -#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 +#if defined __USE_MISC || defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ # define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ #endif diff --git a/sysdeps/mach/hurd/bits/stat.h b/sysdeps/mach/hurd/bits/stat.h index e6bec34660..6f7a781119 100644 --- a/sysdeps/mach/hurd/bits/stat.h +++ b/sysdeps/mach/hurd/bits/stat.h @@ -223,7 +223,7 @@ struct stat64 #endif /* Default file creation mask (umask). */ -#ifdef __USE_BSD +#ifdef __USE_MISC # define CMASK 0022 #endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 650e5e370b..6cab851de5 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -55,7 +55,7 @@ #undef MS_INVALIDATE #define MS_INVALIDATE 4 -#ifdef __USE_BSD +#ifdef __USE_MISC # undef MADV_DONTNEED # define MADV_DONTNEED 6 #endif diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index 4310585563..1780a5687d 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -70,7 +70,7 @@ struct termios #define ICRNL 0000400 #define IXON 0001000 #define IXOFF 0002000 -#ifdef __USE_BSD +#ifdef __USE_MISC /* POSIX.1 doesn't want these... */ # define IXANY 0004000 # define IUCLC 0010000 diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h index cd4722b836..0be95955fc 100644 --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h @@ -158,7 +158,7 @@ # define __F_GETOWN 9 #endif -#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 +#if defined __USE_MISC || defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_SETOWN __F_SETOWN /* Get owner (process receiving SIGIO). */ # define F_GETOWN __F_GETOWN /* Set owner (process receiving SIGIO). */ #endif @@ -208,7 +208,7 @@ # define F_SHLCK 8 /* or 4 */ #endif -#ifdef __USE_BSD +#ifdef __USE_MISC /* Operations for BSD flock, also used by the kernel implementation. */ # define LOCK_SH 1 /* Shared lock. */ # define LOCK_EX 2 /* Exclusive lock. */ @@ -256,7 +256,7 @@ struct f_owner_ex /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD +#ifdef __USE_MISC # define FAPPEND O_APPEND # define FFSYNC O_FSYNC # define FASYNC O_ASYNC diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h index 5473986015..45f76f568c 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-linux.h +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h @@ -72,7 +72,7 @@ #endif /* Advice to `madvise'. */ -#ifdef __USE_BSD +#ifdef __USE_MISC # define MADV_NORMAL 0 /* No further special treatment. */ # define MADV_RANDOM 1 /* Expect random page references. */ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ diff --git a/sysdeps/unix/sysv/linux/bits/sys_errlist.h b/sysdeps/unix/sysv/linux/bits/sys_errlist.h index 47ba9ceba9..4f4b9862f7 100644 --- a/sysdeps/unix/sysv/linux/bits/sys_errlist.h +++ b/sysdeps/unix/sysv/linux/bits/sys_errlist.h @@ -22,7 +22,7 @@ /* sys_errlist and sys_nerr are deprecated. Use strerror instead. */ -#ifdef __USE_BSD +#ifdef __USE_MISC extern int sys_nerr; extern const char *const sys_errlist[]; #endif diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h index db283c8b25..12333d224f 100644 --- a/sysdeps/unix/sysv/linux/bits/termios.h +++ b/sysdeps/unix/sysv/linux/bits/termios.h @@ -194,7 +194,7 @@ struct termios # define PENDIN 0040000 #endif #define IEXTEN 0100000 -#ifdef __USE_BSD +#ifdef __USE_MISC # define EXTPROC 0200000 #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index 51059f5336..fac0f82738 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -193,7 +193,7 @@ struct termios #endif #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ #define ITOSTOP TOSTOP -#ifdef __USE_BSD +#ifdef __USE_MISC # define EXTPROC 0200000 #endif diff --git a/sysdeps/unix/sysv/linux/netinet/if_ether.h b/sysdeps/unix/sysv/linux/netinet/if_ether.h index 51f7f67b85..81037ce1ca 100644 --- a/sysdeps/unix/sysv/linux/netinet/if_ether.h +++ b/sysdeps/unix/sysv/linux/netinet/if_ether.h @@ -24,7 +24,7 @@ /* Get definitions from kernel header file. */ #include <linux/if_ether.h> -#ifdef __USE_BSD +#ifdef __USE_MISC /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -99,6 +99,6 @@ struct ether_arp { } __END_DECLS -#endif /* __USE_BSD */ +#endif /* __USE_MISC */ #endif /* netinet/if_ether.h */ diff --git a/sysdeps/unix/sysv/linux/netinet/if_fddi.h b/sysdeps/unix/sysv/linux/netinet/if_fddi.h index 67bdf02748..795c6e7d87 100644 --- a/sysdeps/unix/sysv/linux/netinet/if_fddi.h +++ b/sysdeps/unix/sysv/linux/netinet/if_fddi.h @@ -24,7 +24,7 @@ #include <linux/if_fddi.h> -#ifdef __USE_BSD +#ifdef __USE_MISC struct fddi_header { u_int8_t fddi_fc; /* Frame Control (FC) value */ diff --git a/sysdeps/unix/sysv/linux/netinet/if_tr.h b/sysdeps/unix/sysv/linux/netinet/if_tr.h index 068d725472..d3d1352dc9 100644 --- a/sysdeps/unix/sysv/linux/netinet/if_tr.h +++ b/sysdeps/unix/sysv/linux/netinet/if_tr.h @@ -93,7 +93,7 @@ struct tr_statistics #define TR_RCF_BROADCAST_MASK 0xC000 #define TR_MAXRIFLEN 18 -#ifdef __USE_BSD +#ifdef __USE_MISC struct trn_hdr { diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h index d5dbdaa579..de57249ec4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h @@ -202,7 +202,7 @@ struct termios { # define PENDIN 0x20000000 #endif #define IEXTEN 0x00000400 -#ifdef __USE_BSD +#ifdef __USE_MISC # define EXTPROC 0x10000000 #endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h index 0109cdd10d..94524b32b8 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h @@ -196,7 +196,7 @@ struct termios # define PENDIN 0x00004000 #endif #define IEXTEN 0x00008000 -#ifdef __USE_BSD +#ifdef __USE_MISC # define EXTPROC 0x00010000 #endif diff --git a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h index a401a0d215..30c88d6315 100644 --- a/sysdeps/x86/bits/string.h +++ b/sysdeps/x86/bits/string.h @@ -1373,7 +1373,7 @@ __strchrnul_g (const char *__s, int __c) # endif -# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED /* Find the first occurrence of C in S. This is the BSD name. */ # define _HAVE_STRING_ARCH_index 1 # define index(s, c) \ @@ -1487,7 +1487,7 @@ __strrchr_g (const char *__s, int __c) # endif -# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED /* Find the last occurrence of C in S. This is the BSD name. */ # define _HAVE_STRING_ARCH_rindex 1 # define rindex(s, c) \ @@ -1957,7 +1957,7 @@ __strstr_g (const char *__haystack, const char *__needle) /* Bit find functions. We define only the i686 version since for the other processors gcc generates good code. */ -# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED # ifdef __i686__ # define _HAVE_STRING_ARCH_ffs 1 # define ffs(word) (__builtin_constant_p (word) \ |