summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-02-13 22:07:25 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-02-13 22:07:53 +0000
commited9a38e21b8c7b4f413d7f8e3fc183297df3c2be (patch)
treee530a67485edf3070f12552c45f8d07462e0f264 /io
parentd668061994a7486a3ba9c7d5e7882d85a2883707 (diff)
downloadglibc-ed9a38e21b8c7b4f413d7f8e3fc183297df3c2be.tar.gz
Clean up trivially redundant __USE_MISC conditionals.
This patch cleans up cases of __USE_MISC that are trivially redundant after the recent substitution of __USE_MISC for __USE_BSD and __USE_SVID: either in constructs such as "defined __USE_MISC || defined __USE_MISC", or else (in the bits/mman.h case) a conditional on __USE_MISC nested inside another __USE_MISC conditional. (The cleanups remaining after this patch are still quite large, but it seems a reasonable piece to separate out.) Tested x86_64. * bits/mman.h [__USE_MISC]: Remove redundant conditionals. * ctype/ctype.h [__USE_MISC]: Likewise. * dirent/dirent.h [__USE_MISC]: Likewise. * grp/grp.h [__USE_MISC]: Likewise. * io/fcntl.h [__USE_MISC]: Likewise. * io/sys/stat.h [__USE_MISC]: Likewise. * libio/stdio.h [__USE_MISC]: Likewise. * posix/unistd.h [__USE_MISC]: Likewise. * pwd/pwd.h [__USE_MISC]: Likewise. * stdlib.h [__USE_MISC]: Likewise. * string/bits/string2.h [__USE_MISC]: Likewise. * string/string.h [__USE_MISC]: Likewise. * time/time.h [__USE_MISC]: Likewise.
Diffstat (limited to 'io')
-rw-r--r--io/fcntl.h2
-rw-r--r--io/sys/stat.h12
2 files changed, 7 insertions, 7 deletions
diff --git a/io/fcntl.h b/io/fcntl.h
index 3848df9e5c..cf512dd27f 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -87,7 +87,7 @@ typedef __pid_t pid_t;
# define S_ISUID __S_ISUID /* Set user ID on execution. */
# define S_ISGID __S_ISGID /* Set group ID on execution. */
-# if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN
+# if defined __USE_MISC || defined __USE_XOPEN
/* Save swapped text after use (sticky bit). This is pretty well obsolete. */
# define S_ISVTX __S_ISVTX
# endif
diff --git a/io/sys/stat.h b/io/sys/stat.h
index 0dbcc86341..9b02703b65 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -104,7 +104,7 @@ __BEGIN_DECLS
#include <bits/stat.h>
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN
+#if 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_MISC || defined __USE_MISC || defined __USE_UNIX98) \
+# if (defined __USE_MISC || defined __USE_UNIX98) \
&& defined __S_IFSOCK
# define S_IFSOCK __S_IFSOCK
# endif
@@ -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_MISC || defined __USE_MISC || defined __USE_XOPEN
+#if 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_MISC
+#ifdef __USE_MISC
# define S_IREAD S_IRUSR
# define S_IWRITE S_IWUSR
# define S_IEXEC S_IXUSR
@@ -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_MISC || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
__THROW __nonnull ((1));
@@ -478,7 +478,7 @@ __NTH (fstatat (int __fd, const char *__filename, struct stat *__statbuf,
}
# endif
-# if defined __USE_MISC || defined __USE_MISC
+# ifdef __USE_MISC
__extern_inline int
__NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev))
{