some feature test fixes for unistd.h

This commit is contained in:
Rich Felker 2012-05-22 22:28:17 -04:00
parent 030b452b8d
commit af3330d764
1 changed files with 17 additions and 17 deletions

View File

@ -13,12 +13,6 @@ extern "C" {
#define SEEK_CUR 1 #define SEEK_CUR 1
#define SEEK_END 2 #define SEEK_END 2
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define L_SET 0
#define L_INCR 1
#define L_XTND 2
#endif
#undef NULL #undef NULL
#ifdef __cplusplus #ifdef __cplusplus
#define NULL 0 #define NULL 0
@ -136,29 +130,41 @@ size_t confstr(int, char *, size_t);
#define F_TLOCK 2 #define F_TLOCK 2
#define F_TEST 3 #define F_TEST 3
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
int lockf(int, int, off_t); int lockf(int, int, off_t);
pid_t setpgrp(void);
char *crypt(const char *, const char *);
void encrypt(char *, int);
void swab(const void *, void *, ssize_t);
long gethostid(void); long gethostid(void);
int nice(int); int nice(int);
void sync(void); void sync(void);
#endif #endif
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
pid_t setpgrp(void);
char *crypt(const char *, const char *);
void encrypt(char *, int);
void swab(const void *, void *, ssize_t);
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define L_SET 0
#define L_INCR 1
#define L_XTND 2
int brk(void *); int brk(void *);
void *sbrk(intptr_t); void *sbrk(intptr_t);
pid_t vfork(void); pid_t vfork(void);
int vhangup(void); int vhangup(void);
int chroot(const char *); int chroot(const char *);
int getpagesize(void); int getpagesize(void);
int getdtablesize(void);
int sethostname(const char *, size_t); int sethostname(const char *, size_t);
int getdomainname(char *, size_t);
int usleep(unsigned); int usleep(unsigned);
unsigned ualarm(unsigned, unsigned); unsigned ualarm(unsigned, unsigned);
int setgroups(size_t, const gid_t []); int setgroups(size_t, const gid_t []);
char *getpass(const char *); char *getpass(const char *);
int daemon(int, int);
void setusershell(void);
void endusershell(void);
char *getusershell(void);
#endif #endif
#ifdef _GNU_SOURCE #ifdef _GNU_SOURCE
@ -168,12 +174,6 @@ int setresgid(gid_t, gid_t, gid_t);
int getresuid(uid_t *, uid_t *, uid_t *); int getresuid(uid_t *, uid_t *, uid_t *);
int getresgid(gid_t *, gid_t *, gid_t *); int getresgid(gid_t *, gid_t *, gid_t *);
char *get_current_dir_name(void); char *get_current_dir_name(void);
int daemon(int, int);
int getdomainname(char *, size_t);
int getdtablesize(void);
void setusershell(void);
void endusershell(void);
char *getusershell(void);
#endif #endif
#ifdef _LARGEFILE64_SOURCE #ifdef _LARGEFILE64_SOURCE