include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE

or __POSIX_VISIBLE.

Whenever <sys/cdefs.h> sets __BSD_VISIBLE to non-zero, it also sets
__POSIX_VISIBLE and __XSI_VISIBLE to the newest version supported.

No functional change is intended.
This commit is contained in:
jilles 2014-05-11 13:48:21 +00:00
parent 9ef9db3969
commit e47308fc84
10 changed files with 21 additions and 21 deletions

View File

@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#include <sys/dirent.h>
#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.

View File

@ -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,

View File

@ -44,7 +44,7 @@
#include <machine/setjmp.h>
__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

View File

@ -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

View File

@ -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.

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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 *);

View File

@ -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