From 498afc54dfee41d33ba519f496e96480badace8e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 12 Feb 2014 23:41:01 +0000 Subject: 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 , 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]. --- sysdeps/unix/sysv/linux/alpha/bits/mman.h | 2 +- sysdeps/unix/sysv/linux/alpha/bits/termios.h | 2 +- sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 6 +++--- sysdeps/unix/sysv/linux/bits/mman-linux.h | 2 +- sysdeps/unix/sysv/linux/bits/sys_errlist.h | 2 +- sysdeps/unix/sysv/linux/bits/termios.h | 2 +- sysdeps/unix/sysv/linux/mips/bits/termios.h | 2 +- sysdeps/unix/sysv/linux/netinet/if_ether.h | 4 ++-- sysdeps/unix/sysv/linux/netinet/if_fddi.h | 2 +- sysdeps/unix/sysv/linux/netinet/if_tr.h | 2 +- sysdeps/unix/sysv/linux/powerpc/bits/termios.h | 2 +- sysdeps/unix/sysv/linux/sparc/bits/termios.h | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 650e5e3..6cab851 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 4310585..1780a56 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 cd4722b..0be9595 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 5473986..45f76f5 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 47ba9ce..4f4b986 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 db283c8..12333d2 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 51059f5..fac0f82 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 51f7f67..81037ce 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 -#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 67bdf02..795c6e7 100644 --- a/sysdeps/unix/sysv/linux/netinet/if_fddi.h +++ b/sysdeps/unix/sysv/linux/netinet/if_fddi.h @@ -24,7 +24,7 @@ #include -#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 068d725..d3d1352 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 d5dbdaa..de57249 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 0109cdd..94524b3 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 -- cgit v1.1