about summary refs log tree commit diff
path: root/dirent
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 /dirent
parentd668061994a7486a3ba9c7d5e7882d85a2883707 (diff)
downloadglibc-ed9a38e21b8c7b4f413d7f8e3fc183297df3c2be.tar.gz
glibc-ed9a38e21b8c7b4f413d7f8e3fc183297df3c2be.tar.xz
glibc-ed9a38e21b8c7b4f413d7f8e3fc183297df3c2be.zip
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 'dirent')
-rw-r--r--dirent/dirent.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/dirent/dirent.h b/dirent/dirent.h
index 24710f056d..bf37a7f58c 100644
--- a/dirent/dirent.h
+++ b/dirent/dirent.h
@@ -60,7 +60,7 @@ typedef __ino64_t ino64_t;
 
 #include <bits/dirent.h>
 
-#if (defined __USE_MISC || defined __USE_MISC) && !defined d_fileno
+#if defined __USE_MISC && !defined d_fileno
 # define d_ino	d_fileno		 /* Backward compatibility.  */
 #endif
 
@@ -207,7 +207,7 @@ extern int readdir64_r (DIR *__restrict __dirp,
 /* Rewind DIRP to the beginning of the directory.  */
 extern void rewinddir (DIR *__dirp) __THROW __nonnull ((1));
 
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN
+#if defined __USE_MISC || defined __USE_XOPEN
 # include <bits/types.h>
 
 /* Seek to position POS on DIRP.  */
@@ -217,7 +217,7 @@ extern void seekdir (DIR *__dirp, long int __pos) __THROW __nonnull ((1));
 extern long int telldir (DIR *__dirp) __THROW __nonnull ((1));
 #endif
 
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN2K8
+#if defined __USE_MISC || defined __USE_XOPEN2K8
 
 /* Return the file descriptor used by DIRP.  */
 extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
@@ -226,7 +226,7 @@ extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
 #  define dirfd(dirp)	_DIR_dirfd (dirp)
 # endif
 
-# if defined __USE_MISC || defined __USE_MISC
+# ifdef __USE_MISC
 #  ifndef MAXNAMLEN
 /* Get the definitions of the POSIX.1 limits.  */
 #  include <bits/posix1_lim.h>
@@ -343,7 +343,7 @@ extern int alphasort64 (const struct dirent64 **__e1,
 #endif /* Use BSD or misc or XPG7.  */
 
 
-#if defined __USE_MISC || defined __USE_MISC
+#ifdef __USE_MISC
 /* Read directory entries from FD into BUF, reading at most NBYTES.
    Reading starts at offset *BASEP, and *BASEP is updated with the new
    position after reading.  Returns the number of bytes read; zero when at