From e47308fc84d8eb2e6e15bb12fafc0792d878a58d Mon Sep 17 00:00:00 2001 From: jilles Date: Sun, 11 May 2014 13:48:21 +0000 Subject: include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE or __POSIX_VISIBLE. Whenever sets __BSD_VISIBLE to non-zero, it also sets __POSIX_VISIBLE and __XSI_VISIBLE to the newest version supported. No functional change is intended. --- include/dirent.h | 2 +- include/grp.h | 6 +++--- include/setjmp.h | 4 ++-- include/signal.h | 2 +- include/stdio.h | 8 ++++---- include/string.h | 6 +++--- include/termios.h | 2 +- include/unistd.h | 6 +++--- include/wchar.h | 2 +- sys/sys/stat.h | 4 ++-- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/dirent.h b/include/dirent.h index f43210c..c77d844 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -40,7 +40,7 @@ #include #include -#if __BSD_VISIBLE || __XSI_VISIBLE +#if __XSI_VISIBLE /* * XXX this is probably illegal in the __XSI_VISIBLE case, but brings us closer * to the specification. diff --git a/include/grp.h b/include/grp.h index e7f65ec..b10fd0f 100644 --- a/include/grp.h +++ b/include/grp.h @@ -61,7 +61,7 @@ struct group { }; __BEGIN_DECLS -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE void endgrent(void); struct group *getgrent(void); #endif @@ -74,11 +74,11 @@ int pwcache_groupdb(int (*)(int), void (*)(void), struct group * (*)(const char *), struct group * (*)(gid_t)); #endif -#if __BSD_VISIBLE || __XSI_VISIBLE +#if __XSI_VISIBLE /* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ int setgrent(void); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); int getgrnam_r(const char *, struct group *, char *, size_t, diff --git a/include/setjmp.h b/include/setjmp.h index bf03f6f..598e07a 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -44,7 +44,7 @@ #include __BEGIN_DECLS -#if __BSD_VISIBLE || __XSI_VISIBLE >= 600 +#if __XSI_VISIBLE >= 600 void _longjmp(jmp_buf, int) __dead2; int _setjmp(jmp_buf) __returns_twice; #endif @@ -53,7 +53,7 @@ void longjmp(jmp_buf, int) __dead2; void longjmperror(void); #endif int setjmp(jmp_buf) __returns_twice; -#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE +#if __POSIX_VISIBLE || __XSI_VISIBLE void siglongjmp(sigjmp_buf, int) __dead2; int sigsetjmp(sigjmp_buf, int) __returns_twice; #endif diff --git a/include/signal.h b/include/signal.h index e7447df..dca19aa 100644 --- a/include/signal.h +++ b/include/signal.h @@ -108,7 +108,7 @@ int xsi_sigpause(int); int siginterrupt(int, int); #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 void psignal(unsigned int, const char *); #endif diff --git a/include/stdio.h b/include/stdio.h index 19b1e20..cebc124 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -47,7 +47,7 @@ typedef __size_t size_t; #define _SIZE_T_DECLARED #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 #ifndef _OFF_T_DECLARED #define _OFF_T_DECLARED typedef __off_t off_t; @@ -58,7 +58,7 @@ typedef __ssize_t ssize_t; #endif #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE #ifndef _VA_LIST_DECLARED typedef __va_list va_list; #define _VA_LIST_DECLARED @@ -342,7 +342,7 @@ int putw(int, FILE *); char *tempnam(const char *, const char *); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 FILE *fmemopen(void * __restrict, size_t, const char * __restrict); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); @@ -387,7 +387,7 @@ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); int (dprintf)(int, const char * __restrict, ...); #endif -#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ +#endif /* __POSIX_VISIBLE >= 200809 */ /* * Routines that are purely local. diff --git a/include/string.h b/include/string.h index ceffcf6..af8b0d4 100644 --- a/include/string.h +++ b/include/string.h @@ -65,7 +65,7 @@ void *memmem(const void *, size_t, const void *, size_t) __pure; #endif void *memmove(void *, const void *, size_t); void *memset(void *, int, size_t); -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 char *stpcpy(char * __restrict, const char * __restrict); char *stpncpy(char * __restrict, const char * __restrict, size_t); #endif @@ -99,7 +99,7 @@ void strmode(int, char *); char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 char *strndup(const char *, size_t) __malloc_like; size_t strnlen(const char *, size_t) __pure; #endif @@ -111,7 +111,7 @@ char *strrchr(const char *, int) __pure; #if __BSD_VISIBLE char *strsep(char **, const char *); #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 char *strsignal(int); #endif size_t strspn(const char *, const char *) __pure; diff --git a/include/termios.h b/include/termios.h index e41da9f..ed8e328 100644 --- a/include/termios.h +++ b/include/termios.h @@ -81,7 +81,7 @@ int tcflow(int, int); int tcflush(int, int); int tcsendbreak(int, int); -#if __POSIX_VISIBLE >= 200112 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200112 pid_t tcgetsid(int); #endif #if __BSD_VISIBLE diff --git a/include/unistd.h b/include/unistd.h index 5868ba2..f1913b6 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -426,7 +426,7 @@ int truncate(const char *, off_t); #endif #endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 int faccessat(int, const char *, int, int); int fchownat(int, const char *, uid_t, gid_t, int); int fexecve(int, char *const [], char *const []); @@ -434,14 +434,14 @@ int linkat(int, const char *, int, const char *, int); ssize_t readlinkat(int, const char * __restrict, char * __restrict, size_t); int symlinkat(const char *, int, const char *); int unlinkat(int, const char *, int); -#endif /* __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE */ +#endif /* __POSIX_VISIBLE >= 200809 */ /* * symlink() was originally in POSIX.1a, which was withdrawn after * being overtaken by events (1003.1-2001). It was in XPG4.2, and of * course has been in BSD since 4.2. */ -#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 int symlink(const char * __restrict, const char * __restrict); #endif diff --git a/include/wchar.h b/include/wchar.h index 8233bdf..84a4a97 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -204,7 +204,7 @@ int wcwidth(wchar_t); #define wcwidth(_c) __wcwidth(_c) #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict); FILE *open_wmemstream(wchar_t **, size_t *); diff --git a/sys/sys/stat.h b/sys/sys/stat.h index 0f3284f..13dea2d 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -339,12 +339,12 @@ int mknod(const char *, mode_t, dev_t); #endif int stat(const char * __restrict, struct stat * __restrict); mode_t umask(mode_t); -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 int fstatat(int, const char *, struct stat *, int); int mkdirat(int, const char *, mode_t); int mkfifoat(int, const char *, mode_t); #endif -#if __BSD_VISIBLE || __XSI_VISIBLE >= 700 +#if __XSI_VISIBLE >= 700 int mknodat(int, const char *, mode_t, dev_t); #endif __END_DECLS -- cgit v1.1