diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/arpa/inet.h | 2 | ||||
-rw-r--r-- | include/ctype.h | 2 | ||||
-rw-r--r-- | include/db.h | 68 | ||||
-rw-r--r-- | include/dlfcn.h | 1 | ||||
-rw-r--r-- | include/grp.h | 4 | ||||
-rw-r--r-- | include/mpool.h | 38 | ||||
-rw-r--r-- | include/ndbm.h | 4 | ||||
-rw-r--r-- | include/netdb.h | 54 | ||||
-rw-r--r-- | include/pthread.h | 6 | ||||
-rw-r--r-- | include/pwd.h | 5 | ||||
-rw-r--r-- | include/setjmp.h | 2 | ||||
-rw-r--r-- | include/signal.h | 15 | ||||
-rw-r--r-- | include/stdio.h | 6 | ||||
-rw-r--r-- | include/stdlib.h | 4 | ||||
-rw-r--r-- | include/string.h | 4 | ||||
-rw-r--r-- | include/unistd.h | 9 |
16 files changed, 132 insertions, 92 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h index b670836..0848106 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -148,7 +148,6 @@ uint16_t ntohs(uint16_t); in_addr_t inet_addr(const char *); /*const*/ char *inet_ntoa(struct in_addr); -char *inet_ntoa_r(struct in_addr, char *buf, socklen_t size); const char *inet_ntop(int, const void * __restrict, char * __restrict, socklen_t); int inet_pton(int, const char * __restrict, void * __restrict); @@ -162,6 +161,7 @@ in_addr_t inet_netof(struct in_addr); in_addr_t inet_network(const char *); char *inet_net_ntop(int, const void *, int, char *, size_t); int inet_net_pton(int, const char *, void *, size_t); +char *inet_ntoa_r(struct in_addr, char *buf, socklen_t size); char *inet_cidr_ntop(int, const void *, int, char *, size_t); int inet_cidr_pton(int, const char *, void *, int *); unsigned inet_nsap_addr(const char *, unsigned char *, int); diff --git a/include/ctype.h b/include/ctype.h index dfc89cc..103619c 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -65,8 +65,6 @@ int tolower(int); int toupper(int); #if __XSI_VISIBLE -int _tolower(int); -int _toupper(int); int isascii(int); int toascii(int); #endif diff --git a/include/db.h b/include/db.h index c192a88..e845fa8 100644 --- a/include/db.h +++ b/include/db.h @@ -47,11 +47,11 @@ #define RET_SPECIAL 1 #define MAX_PAGE_NUMBER 0xffffffff /* >= # of pages in a file */ -typedef u_int32_t pgno_t; +typedef uint32_t pgno_t; #define MAX_PAGE_OFFSET 65535 /* >= # of bytes in a page */ -typedef u_int16_t indx_t; +typedef uint16_t indx_t; #define MAX_REC_NUMBER 0xffffffff /* >= # of records in a tree */ -typedef u_int32_t recno_t; +typedef uint32_t recno_t; /* Key/data structure -- a Data-Base Thang. */ typedef struct { @@ -101,11 +101,11 @@ typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; typedef struct __db { DBTYPE type; /* Underlying db type. */ int (*close)(struct __db *); - int (*del)(const struct __db *, const DBT *, u_int); - int (*get)(const struct __db *, const DBT *, DBT *, u_int); - int (*put)(const struct __db *, DBT *, const DBT *, u_int); - int (*seq)(const struct __db *, DBT *, DBT *, u_int); - int (*sync)(const struct __db *, u_int); + int (*del)(const struct __db *, const DBT *, unsigned int); + int (*get)(const struct __db *, const DBT *, DBT *, unsigned int); + int (*put)(const struct __db *, DBT *, const DBT *, unsigned int); + int (*seq)(const struct __db *, DBT *, DBT *, unsigned int); + int (*sync)(const struct __db *, unsigned int); void *internal; /* Access method private. */ int (*fd)(const struct __db *); } DB; @@ -116,16 +116,16 @@ typedef struct __db { /* Structure used to pass parameters to the btree routines. */ typedef struct { #define R_DUP 0x01 /* duplicate keys */ - u_long flags; - u_int cachesize; /* bytes to cache */ - int maxkeypage; /* maximum keys per page */ - int minkeypage; /* minimum keys per page */ - u_int psize; /* page size */ - int (*compare) /* comparison function */ - (const DBT *, const DBT *); - size_t (*prefix) /* prefix function */ - (const DBT *, const DBT *); - int lorder; /* byte order */ + unsigned long flags; + unsigned int cachesize; /* bytes to cache */ + int maxkeypage; /* maximum keys per page */ + int minkeypage; /* minimum keys per page */ + unsigned int psize; /* page size */ + int (*compare) /* comparison function */ + (const DBT *, const DBT *); + size_t (*prefix) /* prefix function */ + (const DBT *, const DBT *); + int lorder; /* byte order */ } BTREEINFO; #define HASHMAGIC 0x061561 @@ -133,11 +133,11 @@ typedef struct { /* Structure used to pass parameters to the hashing routines. */ typedef struct { - u_int bsize; /* bucket size */ - u_int ffactor; /* fill factor */ - u_int nelem; /* number of elements */ - u_int cachesize; /* bytes to cache */ - u_int32_t /* hash function */ + unsigned int bsize; /* bucket size */ + unsigned int ffactor; /* fill factor */ + unsigned int nelem; /* number of elements */ + unsigned int cachesize; /* bytes to cache */ + uint32_t /* hash function */ (*hash)(const void *, size_t); int lorder; /* byte order */ } HASHINFO; @@ -147,12 +147,12 @@ typedef struct { #define R_FIXEDLEN 0x01 /* fixed-length records */ #define R_NOKEY 0x02 /* key not required */ #define R_SNAPSHOT 0x04 /* snapshot the input */ - u_long flags; - u_int cachesize; /* bytes to cache */ - u_int psize; /* page size */ - int lorder; /* byte order */ - size_t reclen; /* record length (fixed-length records) */ - u_char bval; /* delimiting byte (variable-length records */ + unsigned long flags; + unsigned int cachesize; /* bytes to cache */ + unsigned int psize; /* page size */ + int lorder; /* byte order */ + size_t reclen; /* record length (fixed-length records) */ + unsigned char bval; /* delimiting byte (variable-length records */ char *bfname; /* btree file name */ } RECNOINFO; @@ -164,14 +164,14 @@ typedef struct { * P_32_COPY swap from one location to another */ #define M_32_SWAP(a) { \ - u_int32_t _tmp = a; \ + uint32_t _tmp = a; \ ((char *)&a)[0] = ((char *)&_tmp)[3]; \ ((char *)&a)[1] = ((char *)&_tmp)[2]; \ ((char *)&a)[2] = ((char *)&_tmp)[1]; \ ((char *)&a)[3] = ((char *)&_tmp)[0]; \ } #define P_32_SWAP(a) { \ - u_int32_t _tmp = *(u_int32_t *)a; \ + uint32_t _tmp = *(uint32_t *)a; \ ((char *)a)[0] = ((char *)&_tmp)[3]; \ ((char *)a)[1] = ((char *)&_tmp)[2]; \ ((char *)a)[2] = ((char *)&_tmp)[1]; \ @@ -191,12 +191,12 @@ typedef struct { * P_16_COPY swap from one location to another */ #define M_16_SWAP(a) { \ - u_int16_t _tmp = a; \ + uint16_t _tmp = a; \ ((char *)&a)[0] = ((char *)&_tmp)[1]; \ ((char *)&a)[1] = ((char *)&_tmp)[0]; \ } #define P_16_SWAP(a) { \ - u_int16_t _tmp = *(u_int16_t *)a; \ + uint16_t _tmp = *(uint16_t *)a; \ ((char *)a)[0] = ((char *)&_tmp)[1]; \ ((char *)a)[1] = ((char *)&_tmp)[0]; \ } @@ -207,7 +207,9 @@ typedef struct { #endif __BEGIN_DECLS +#if __BSD_VISIBLE DB *dbopen(const char *, int, int, DBTYPE, const void *); +#endif #ifdef __DBINTERFACE_PRIVATE DB *__bt_open(const char *, int, int, const BTREEINFO *, int); diff --git a/include/dlfcn.h b/include/dlfcn.h index 38f21b2..9fac620 100644 --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -47,6 +47,7 @@ #define RTLD_GLOBAL 0x100 /* Make symbols globally available. */ #define RTLD_LOCAL 0 /* Opposite of RTLD_GLOBAL, and the default. */ #define RTLD_TRACE 0x200 /* Trace loaded objects and exit. */ +#define RTLD_NODELETE 0x01000 /* Do not remove members. */ /* * Request arguments for dlinfo(). diff --git a/include/grp.h b/include/grp.h index 70b4a8a24..96584de 100644 --- a/include/grp.h +++ b/include/grp.h @@ -74,9 +74,11 @@ struct group *getgrnam(const char *); #if __BSD_VISIBLE const char *group_from_gid(gid_t, int); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __BSD_VISIBLE || __XSI_VISIBLE /* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ int setgrent(void); +#endif +#if __BSD_VISIBLE || __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/mpool.h b/include/mpool.h index b5be330..c74764d 100644 --- a/include/mpool.h +++ b/include/mpool.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)mpool.h 8.2 (Berkeley) 7/14/94 + * @(#)mpool.h 8.4 (Berkeley) 11/2/95 * $FreeBSD$ */ @@ -47,7 +47,7 @@ * pool is handed an opaque MPOOL cookie which stores all of this information. */ #define HASHSIZE 128 -#define HASHKEY(pgno) ((pgno - 1) % HASHSIZE) +#define HASHKEY(pgno) ((pgno - 1 + HASHSIZE) % HASHSIZE) /* The BKT structures are the elements of the queues. */ typedef struct _bkt { @@ -58,6 +58,7 @@ typedef struct _bkt { #define MPOOL_DIRTY 0x01 /* page needs to be written */ #define MPOOL_PINNED 0x02 /* page is pinned into memory */ +#define MPOOL_INUSE 0x04 /* page address is valid */ u_int8_t flags; /* flags */ } BKT; @@ -68,7 +69,7 @@ typedef struct MPOOL { pgno_t curcache; /* current number of cached pages */ pgno_t maxcache; /* max number of cached pages */ pgno_t npages; /* number of pages in the file */ - u_long pagesize; /* file page size */ + unsigned long pagesize; /* file page size */ int fd; /* file descriptor */ /* page in conversion routine */ void (*pgin)(void *, pgno_t, void *); @@ -76,25 +77,32 @@ typedef struct MPOOL { void (*pgout)(void *, pgno_t, void *); void *pgcookie; /* cookie for page in/out routines */ #ifdef STATISTICS - u_long cachehit; - u_long cachemiss; - u_long pagealloc; - u_long pageflush; - u_long pageget; - u_long pagenew; - u_long pageput; - u_long pageread; - u_long pagewrite; + unsigned long cachehit; + unsigned long cachemiss; + unsigned long pagealloc; + unsigned long pageflush; + unsigned long pageget; + unsigned long pagenew; + unsigned long pageput; + unsigned long pageread; + unsigned long pagewrite; #endif } MPOOL; +#define MPOOL_IGNOREPIN 0x01 /* Ignore if the page is pinned. */ +#define MPOOL_PAGE_REQUEST 0x01 /* Allocate a new page with a + specific page number. */ +#define MPOOL_PAGE_NEXT 0x02 /* Allocate a new page with the next + page number. */ + __BEGIN_DECLS MPOOL *mpool_open(void *, int, pgno_t, pgno_t); void mpool_filter(MPOOL *, void (*)(void *, pgno_t, void *), void (*)(void *, pgno_t, void *), void *); -void *mpool_new(MPOOL *, pgno_t *); -void *mpool_get(MPOOL *, pgno_t, u_int); -int mpool_put(MPOOL *, void *, u_int); +void *mpool_new(MPOOL *, pgno_t *, unsigned int); +void *mpool_get(MPOOL *, pgno_t, unsigned int); +int mpool_delete(MPOOL *, void *); +int mpool_put(MPOOL *, void *, unsigned int); int mpool_sync(MPOOL *); int mpool_close(MPOOL *); #ifdef STATISTICS diff --git a/include/ndbm.h b/include/ndbm.h index e144ba8..1277e70 100644 --- a/include/ndbm.h +++ b/include/ndbm.h @@ -70,11 +70,15 @@ int dbm_delete(DBM *, datum); int dbm_error(DBM *); datum dbm_fetch(DBM *, datum); datum dbm_firstkey(DBM *); +#if __BSD_VISIBLE long dbm_forder(DBM *, datum); +#endif datum dbm_nextkey(DBM *); DBM *dbm_open(const char *, int, int); int dbm_store(DBM *, datum, datum, int); +#if __BSD_VISIBLE int dbm_dirfno(DBM *); +#endif __END_DECLS #endif /* !_NDBM_H_ */ diff --git a/include/netdb.h b/include/netdb.h index cd7fc74..1c9ef27 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -217,67 +217,73 @@ struct addrinfo { __BEGIN_DECLS void endhostent(void); void endnetent(void); -void endnetgrent(void); void endprotoent(void); void endservent(void); -void freehostent(struct hostent *); +#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 200112) struct hostent *gethostbyaddr(const void *, socklen_t, int); +struct hostent *gethostbyname(const char *); +#endif +struct hostent *gethostent(void); +struct netent *getnetbyaddr(uint32_t, int); +struct netent *getnetbyname(const char *); +struct netent *getnetent(void); +struct protoent *getprotobyname(const char *); +struct protoent *getprotobynumber(int); +struct protoent *getprotoent(void); +struct servent *getservbyname(const char *, const char *); +struct servent *getservbyport(int, const char *); +struct servent *getservent(void); +void sethostent(int); +/* void sethostfile(const char *); */ +void setnetent(int); +void setprotoent(int); +int getaddrinfo(const char *, const char *, + const struct addrinfo *, struct addrinfo **); +int getnameinfo(const struct sockaddr *, socklen_t, char *, + size_t, char *, size_t, int); +void freeaddrinfo(struct addrinfo *); +const char *gai_strerror(int); +void setservent(int); + +#if __BSD_VISIBLE +void endnetgrent(void); +void freehostent(struct hostent *); int gethostbyaddr_r(const void *, socklen_t, int, struct hostent *, char *, size_t, struct hostent **, int *); -struct hostent *gethostbyname(const char *); int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *); struct hostent *gethostbyname2(const char *, int); int gethostbyname2_r(const char *, int, struct hostent *, char *, size_t, struct hostent **, int *); -struct hostent *gethostent(void); int gethostent_r(struct hostent *, char *, size_t, struct hostent **, int *); struct hostent *getipnodebyaddr(const void *, size_t, int, int *); struct hostent *getipnodebyname(const char *, int, int, int *); -struct netent *getnetbyaddr(uint32_t, int); int getnetbyaddr_r(uint32_t, int, struct netent *, char *, size_t, struct netent**, int *); -struct netent *getnetbyname(const char *); int getnetbyname_r(const char *, struct netent *, char *, size_t, struct netent **, int *); -struct netent *getnetent(void); int getnetent_r(struct netent *, char *, size_t, struct netent **, int *); int getnetgrent(char **, char **, char **); -struct protoent *getprotobyname(const char *); int getprotobyname_r(const char *, struct protoent *, char *, size_t, struct protoent **); -struct protoent *getprotobynumber(int); int getprotobynumber_r(int, struct protoent *, char *, size_t, struct protoent **); -struct protoent *getprotoent(void); int getprotoent_r(struct protoent *, char *, size_t, struct protoent **); -struct servent *getservbyname(const char *, const char *); int getservbyname_r(const char *, const char *, struct servent *, char *, size_t, struct servent **); -struct servent *getservbyport(int, const char *); int getservbyport_r(int, const char *, struct servent *, char *, size_t, struct servent **); -struct servent *getservent(void); int getservent_r(struct servent *, char *, size_t, struct servent **); void herror(const char *); __const char *hstrerror(int); int innetgr(const char *, const char *, const char *, const char *); -void sethostent(int); -/* void sethostfile(const char *); */ -void setnetent(int); -void setprotoent(int); -int getaddrinfo(const char *, const char *, - const struct addrinfo *, struct addrinfo **); -int getnameinfo(const struct sockaddr *, socklen_t, char *, - size_t, char *, size_t, int); -void freeaddrinfo(struct addrinfo *); -const char *gai_strerror(int); void setnetgrent(const char *); -void setservent(int); +#endif + /* * PRIVATE functions specific to the FreeBSD implementation diff --git a/include/pthread.h b/include/pthread.h index fad12b1..9edd48b 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -205,7 +205,6 @@ int pthread_join(pthread_t, void **); int pthread_key_create(pthread_key_t *, void (*) (void *)); int pthread_key_delete(pthread_key_t); -int pthread_kill(pthread_t, int); int pthread_mutexattr_init(pthread_mutexattr_t *); int pthread_mutexattr_destroy(pthread_mutexattr_t *); int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, @@ -241,7 +240,6 @@ int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); pthread_t pthread_self(void); int pthread_setspecific(pthread_key_t, const void *); -int pthread_sigmask(int, const __sigset_t *, __sigset_t *); int pthread_spin_init(pthread_spinlock_t *, int); int pthread_spin_destroy(pthread_spinlock_t *); @@ -253,9 +251,11 @@ int pthread_setcancelstate(int, int *); int pthread_setcanceltype(int, int *); void pthread_testcancel(void); +#if __BSD_VISIBLE int pthread_getprio(pthread_t); int pthread_setprio(pthread_t, int); void pthread_yield(void); +#endif int pthread_mutexattr_getprioceiling(pthread_mutexattr_t *, int *); @@ -281,8 +281,10 @@ int pthread_getschedparam(pthread_t pthread, int *, struct sched_param *); int pthread_setschedparam(pthread_t, int, const struct sched_param *); +#if __XSI_VISIBLE int pthread_getconcurrency(void); int pthread_setconcurrency(int); +#endif void __pthread_cleanup_push_imp(void (*)(void *), void *, struct _pthread_cleanup_info *); diff --git a/include/pwd.h b/include/pwd.h index 4503ddb..6906db8 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -152,10 +152,13 @@ __BEGIN_DECLS struct passwd *getpwnam(const char *); struct passwd *getpwuid(uid_t); -#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 +#if __XSI_VISIBLE >= 500 void endpwent(void); struct passwd *getpwent(void); void setpwent(void); +#endif + +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **); int getpwuid_r(uid_t, struct passwd *, char *, size_t, diff --git a/include/setjmp.h b/include/setjmp.h index 9564411..9e25f60 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -48,7 +48,7 @@ #include <machine/setjmp.h> __BEGIN_DECLS -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __BSD_VISIBLE || __XSI_VISIBLE >= 600 void _longjmp(jmp_buf, int) __dead2; int _setjmp(jmp_buf); #endif diff --git a/include/signal.h b/include/signal.h index 8d7c281..7ad494d 100644 --- a/include/signal.h +++ b/include/signal.h @@ -58,11 +58,24 @@ typedef __pid_t pid_t; #endif #endif +#if __POSIX_VISIBLE || __XSI_VISIBLE +struct pthread; /* XXX */ +typedef struct pthread *__pthread_t; +#if !defined(_PTHREAD_T_DECLARED) && __POSIX_VISIBLE >= 200809 +typedef __pthread_t pthread_t; +#define _PTHREAD_T_DECLARED +#endif +#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */ + __BEGIN_DECLS int raise(int); #if __POSIX_VISIBLE || __XSI_VISIBLE int kill(__pid_t, int); +#ifndef _PTH_PTHREAD_H_ /* XXX kludge to work around GNU Pth brokenness */ +int pthread_kill(__pthread_t, int); +int pthread_sigmask(int, const __sigset_t *, __sigset_t *); +#endif int sigaction(int, const struct sigaction * __restrict, struct sigaction * __restrict); int sigaddset(sigset_t *, int); @@ -91,7 +104,7 @@ int sigaltstack(const stack_t * __restrict, stack_t * __restrict); int sigpause(int); #endif -#if __POSIX_VISIBLE >= 200112 +#if __XSI_VISIBLE >= 600 int siginterrupt(int, int); #endif diff --git a/include/stdio.h b/include/stdio.h index 78c62e8..8446d63 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -360,7 +360,7 @@ int vdprintf(int, const char * __restrict, __va_list); #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) #define _WITH_GETLINE #elif defined(_POSIX_C_SOURCE) -#if _POSIX_C_SOURCE > 200809 +#if _POSIX_C_SOURCE >= 200809 #define _WITH_GETLINE #endif #endif @@ -374,14 +374,14 @@ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) #define _WITH_DPRINTF #elif defined(_POSIX_C_SOURCE) -#if _POSIX_C_SOURCE > 200809 +#if _POSIX_C_SOURCE >= 200809 #define _WITH_DPRINTF #endif #endif #endif #ifdef _WITH_DPRINTF -int dprintf(int, const char * __restrict, ...); +int (dprintf)(int, const char * __restrict, ...); #endif #endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ diff --git a/include/stdlib.h b/include/stdlib.h index cd15706..265398e 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -80,7 +80,6 @@ extern int __mb_cur_max; __BEGIN_DECLS void abort(void) __dead2; -void abort2(const char *, int, void **) __dead2; int abs(int) __pure2; int atexit(void (*)(void)); double atof(const char *); @@ -196,7 +195,7 @@ long jrand48(unsigned short[3]); char *l64a(long); void lcong48(unsigned short[7]); long lrand48(void); -#if !defined(_MKTEMP_DECLARED) && __XSI_VISIBLE <= 600 +#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600) char *mktemp(char *); #define _MKTEMP_DECLARED #endif @@ -240,6 +239,7 @@ extern void (*_malloc_message)(const char *, const char *, const char *, void *alloca(size_t); #endif +void abort2(const char *, int, void **) __dead2; __uint32_t arc4random(void); void arc4random_addrandom(unsigned char *, int); diff --git a/include/string.h b/include/string.h index 5923cb5..bd4ed2e 100644 --- a/include/string.h +++ b/include/string.h @@ -55,11 +55,13 @@ typedef __size_t size_t; #endif __BEGIN_DECLS -#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __XSI_VISIBLE >= 600 void *memccpy(void * __restrict, const void * __restrict, int, size_t); #endif void *memchr(const void *, int, size_t) __pure; +#if __BSD_VISIBLE void *memrchr(const void *, int, size_t) __pure; +#endif int memcmp(const void *, const void *, size_t) __pure; void *memcpy(void * __restrict, const void * __restrict, size_t); #if __BSD_VISIBLE diff --git a/include/unistd.h b/include/unistd.h index 704d935..4b567b8 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -328,7 +328,6 @@ int chown(const char *, uid_t, gid_t); int close(int); int dup(int); int dup2(int, int); -int eaccess(const char *, int); int execl(const char *, const char *, ...); int execle(const char *, const char *, ...); int execlp(const char *, const char *, ...); @@ -360,7 +359,6 @@ ssize_t read(int, void *, size_t); int rmdir(const char *); int setgid(gid_t); int setpgid(pid_t, pid_t); -void setproctitle(const char *_fmt, ...) __printf0like(1, 2); pid_t setsid(void); int setuid(uid_t); unsigned int sleep(unsigned int); @@ -431,7 +429,6 @@ int truncate(const char *, off_t); #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE int faccessat(int, const char *, int, int); -int fchmodat(int, const char *, mode_t, int); int fchownat(int, const char *, uid_t, gid_t, int); int fexecve(int, char *const [], char *const []); int linkat(int, const char *, int, const char *, int); @@ -470,7 +467,7 @@ void sync(void); #endif /* __XSI_VISIBLE */ -#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE +#if (__XSI_VISIBLE && __XSI_VISIBLE <= 500) || __BSD_VISIBLE int brk(const void *); int chroot(const char *); int getdtablesize(void); @@ -479,7 +476,7 @@ char *getpass(const char *); void *sbrk(intptr_t); #endif -#if __XSI_VISIBLE <= 600 || __BSD_VISIBLE +#if (__XSI_VISIBLE && __XSI_VISIBLE <= 600) || __BSD_VISIBLE char *getwd(char *); /* obsoleted by getcwd() */ useconds_t ualarm(useconds_t, useconds_t); @@ -497,6 +494,7 @@ const char * int crypt_set_format(const char *); int des_cipher(const char *, char *, long, int); int des_setkey(const char *key); +int eaccess(const char *, int); void endusershell(void); int exect(const char *, char * const *, char * const *); int execvP(const char *, const char *, char * const *); @@ -563,6 +561,7 @@ int setkey(const char *); #endif int setlogin(const char *); void *setmode(const char *); +void setproctitle(const char *_fmt, ...) __printf0like(1, 2); int setresgid(gid_t, gid_t, gid_t); int setresuid(uid_t, uid_t, uid_t); int setrgid(gid_t); |