+2014-02-13 Joseph Myers <joseph@codesourcery.com>
+
+ * 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.
+
2014-02-13 Andreas Schwab <schwab@suse.de>
[BZ #16574]
# define MAP_FILE 0x0001 /* Mapped from a file or device. */
# define MAP_ANON 0x0002 /* Allocated from anonymous virtual memory. */
# define MAP_TYPE 0x000f /* Mask for type field. */
-# ifdef __USE_MISC
-# define MAP_ANONYMOUS MAP_ANON /* Linux name. */
-# endif
+# define MAP_ANONYMOUS MAP_ANON /* Linux name. */
#endif
/* Sharing types (must choose one and only one of these). */
extern int isctype (int __c, int __mask) __THROW;
#endif
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN
+#if defined __USE_MISC || defined __USE_XOPEN
/* Return nonzero iff C is in the ASCII set
(i.e., is no more than 7 bits wide). */
# define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c))
# endif /* Optimizing gcc */
-# if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN
+# if defined __USE_MISC || defined __USE_XOPEN
# define isascii(c) __isascii (c)
# define toascii(c) __toascii (c)
# define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))
-# if defined __USE_MISC || defined __USE_MISC
+# ifdef __USE_MISC
# define __isascii_l(c,l) ((l), __isascii (c))
# define __toascii_l(c,l) ((l), __toascii (c))
# endif
# define isblank_l(c,l) __isblank_l ((c), (l))
-# if defined __USE_MISC || defined __USE_MISC
+# ifdef __USE_MISC
# define isascii_l(c,l) __isascii_l ((c), (l))
# define toascii_l(c,l) __toascii_l ((c), (l))
# endif
#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
/* 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. */
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));
# 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>
#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
#endif
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Rewind the group-file stream.
This function is a possible cancellation point and therefore not
extern void setgrent (void);
#endif
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
|| defined __USE_XOPEN2K8
/* Close the group-file stream.
# 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
#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
# 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
#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
/* 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
/* 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));
}
# 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))
{
#endif /* Use POSIX or MISC. */
-#if defined __USE_MISC || defined __USE_MISC \
+#if defined __USE_MISC \
|| (defined __USE_XOPEN && !defined __USE_XOPEN2K)
/* Get a word (int) from STREAM. */
extern int getw (FILE *__stream);
#endif
-#if (defined __USE_POSIX2 || defined __USE_MISC || defined __USE_MISC || \
- defined __USE_MISC)
+#if defined __USE_POSIX2 || defined __USE_MISC
/* Create a new stream connected to a pipe running the given command.
This function is a possible cancellation point and therefore not
If PGID is zero, the process ID of the process is used. */
extern int setpgid (__pid_t __pid, __pid_t __pgid) __THROW;
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Both System V and BSD have `setpgrp' functions, but with different
calling conventions. The BSD function is the same as POSIX.1 `setpgid'
(above). The System V function takes no arguments and puts the calling
#endif
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Rewind the password-file stream.
This function is a possible cancellation point and therefore not
other reentrant functions so the chances are good this is what the
POSIX people would choose. */
-# if defined __USE_MISC || defined __USE_MISC
+# ifdef __USE_MISC
/* This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
#endif /* Use SVID || extended X/Open. */
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_MISC
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
# include <sys/types.h> /* we need int32_t... */
/* These are the functions that actually do things. The `random', `srandom',
extern void cfree (void *__ptr) __THROW;
#endif /* Use misc. */
-#if defined __USE_GNU || defined __USE_MISC || defined __USE_MISC
+#if defined __USE_GNU || defined __USE_MISC
# include <alloca.h>
#endif /* Use GNU, BSD, or misc. */
__retval; })) \
: __strdup (s)))
-# if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
# define strdup(s) __strdup (s)
# endif
# endif
/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
Return the position in DEST one byte past where C was copied,
or NULL if C was not found in the first N bytes of SRC. */
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN
+#if defined __USE_MISC || defined __USE_XOPEN
extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
int __c, size_t __n)
__THROW __nonnull ((1, 2));
__locale_t __l) __THROW __nonnull ((2, 4));
#endif
-#if defined __USE_MISC || defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
|| defined __USE_XOPEN2K8
/* Duplicate S, returning an identical malloc'd string. */
extern char *strdup (const char *__s)
/* Returned by `time'. */
typedef __time_t time_t;
__END_NAMESPACE_STD
-#if defined __USE_POSIX || defined __USE_MISC || defined __USE_MISC
+#if defined __USE_POSIX || defined __USE_MISC
__USING_NAMESPACE_STD(time_t)
#endif