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 /io/sys | |
parent | dd7b064ccaa3afc96499c7be2776baade60bcb56 (diff) | |
download | glibc-498afc54dfee41d33ba519f496e96480badace8e.tar glibc-498afc54dfee41d33ba519f496e96480badace8e.tar.gz glibc-498afc54dfee41d33ba519f496e96480badace8e.tar.bz2 glibc-498afc54dfee41d33ba519f496e96480badace8e.zip |
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 'io/sys')
-rw-r--r-- | io/sys/stat.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/io/sys/stat.h b/io/sys/stat.h index 63e64dd777..0dbcc86341 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -104,7 +104,7 @@ __BEGIN_DECLS #include <bits/stat.h> -#if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN +#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN # define S_IFMT __S_IFMT # define S_IFDIR __S_IFDIR # define S_IFCHR __S_IFCHR @@ -116,7 +116,7 @@ __BEGIN_DECLS # ifdef __S_IFLNK # define S_IFLNK __S_IFLNK # endif -# if (defined __USE_BSD || defined __USE_MISC || defined __USE_UNIX98) \ +# if (defined __USE_MISC || defined __USE_MISC || defined __USE_UNIX98) \ && defined __S_IFSOCK # define S_IFSOCK __S_IFSOCK # endif @@ -137,11 +137,11 @@ __BEGIN_DECLS # define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK) #endif -#if defined __USE_BSD && !defined __S_IFLNK +#if defined __USE_MISC && !defined __S_IFLNK # define S_ISLNK(mode) 0 #endif -#if (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K) \ +#if (defined __USE_MISC || defined __USE_UNIX98 || defined __USE_XOPEN2K) \ && defined __S_IFSOCK # define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK) #elif defined __USE_XOPEN2K @@ -164,7 +164,7 @@ __BEGIN_DECLS #define S_ISUID __S_ISUID /* Set user ID on execution. */ #define S_ISGID __S_ISGID /* Set group ID on execution. */ -#if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN +#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN /* Save swapped text after use (sticky bit). This is pretty well obsolete. */ # define S_ISVTX __S_ISVTX #endif @@ -175,7 +175,7 @@ __BEGIN_DECLS /* Read, write, and execute by owner. */ #define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC) -#if defined __USE_MISC && defined __USE_BSD +#if defined __USE_MISC && defined __USE_MISC # define S_IREAD S_IRUSR # define S_IWRITE S_IWUSR # define S_IEXEC S_IXUSR @@ -194,7 +194,7 @@ __BEGIN_DECLS #define S_IRWXO (S_IRWXG >> 3) -#ifdef __USE_BSD +#ifdef __USE_MISC /* Macros for common mode bit masks. */ # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ @@ -256,7 +256,7 @@ extern int fstatat64 (int __fd, const char *__restrict __file, # endif #endif -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K +#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K # ifndef __USE_FILE_OFFSET64 /* Get file attributes about FILE and put them in BUF. If FILE is a symbolic link, do not follow it. */ @@ -284,7 +284,7 @@ extern int lstat64 (const char *__restrict __file, extern int chmod (const char *__file, __mode_t __mode) __THROW __nonnull ((1)); -#ifdef __USE_BSD +#ifdef __USE_MISC /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects the link itself rather than its target. */ @@ -293,7 +293,7 @@ extern int lchmod (const char *__file, __mode_t __mode) #endif /* Set file access permissions of the file FD is open on to MODE. */ -#if defined __USE_BSD || defined __USE_POSIX +#if defined __USE_MISC || defined __USE_POSIX extern int fchmod (int __fd, __mode_t __mode) __THROW; #endif @@ -332,7 +332,7 @@ extern int mkdirat (int __fd, const char *__path, __mode_t __mode) /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor device numbers with the `makedev' macro above). */ -#if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN_EXTENDED extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((1)); @@ -455,7 +455,7 @@ __NTH (stat (const char *__path, struct stat *__statbuf)) return __xstat (_STAT_VER, __path, __statbuf); } -# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED __extern_inline int __NTH (lstat (const char *__path, struct stat *__statbuf)) { @@ -478,7 +478,7 @@ __NTH (fstatat (int __fd, const char *__filename, struct stat *__statbuf, } # endif -# if defined __USE_MISC || defined __USE_BSD +# if defined __USE_MISC || defined __USE_MISC __extern_inline int __NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev)) { @@ -504,7 +504,7 @@ __NTH (stat64 (const char *__path, struct stat64 *__statbuf)) return __xstat64 (_STAT_VER, __path, __statbuf); } -# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED __extern_inline int __NTH (lstat64 (const char *__path, struct stat64 *__statbuf)) { |