diff options
author | Joseph Myers <joseph@codesourcery.com> | 2014-02-13 22:07:25 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2014-02-13 22:07:53 +0000 |
commit | ed9a38e21b8c7b4f413d7f8e3fc183297df3c2be (patch) | |
tree | e530a67485edf3070f12552c45f8d07462e0f264 /string | |
parent | d668061994a7486a3ba9c7d5e7882d85a2883707 (diff) | |
download | glibc-ed9a38e21b8c7b4f413d7f8e3fc183297df3c2be.zip glibc-ed9a38e21b8c7b4f413d7f8e3fc183297df3c2be.tar.gz glibc-ed9a38e21b8c7b4f413d7f8e3fc183297df3c2be.tar.bz2 |
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 'string')
-rw-r--r-- | string/bits/string2.h | 2 | ||||
-rw-r--r-- | string/string.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/string/bits/string2.h b/string/bits/string2.h index fb83579..ad7316b 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -1287,7 +1287,7 @@ extern char *__strdup (const char *__string) __THROW __attribute_malloc__; __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 diff --git a/string/string.h b/string/string.h index 9fabf2b..22ee34b 100644 --- a/string/string.h +++ b/string/string.h @@ -54,7 +54,7 @@ __END_NAMESPACE_STD /* 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)); @@ -170,7 +170,7 @@ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, __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) |