X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Funistd.h;h=693c54dc8ab5a3d2c1ab2c8cb613009778b2b39b;hp=35df1cd5f23b451a6e6b36e9ec0ac54c72ab23c7;hb=af3330d7648627816fbc82aa3247419e8a528230;hpb=1db283bf19c3e2a41345895b887a88aea086cb29 diff --git a/include/unistd.h b/include/unistd.h index 35df1cd5..693c54dc 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -9,9 +9,6 @@ extern "C" { #define STDOUT_FILENO 1 #define STDERR_FILENO 2 -#undef SEEK_SET -#undef SEEK_CUR -#undef SEEK_END #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 @@ -55,8 +52,8 @@ int link(const char *, const char *); int linkat(int, const char *, int, const char *, int); int symlink(const char *, const char *); int symlinkat(const char *, int, const char *); -int readlink(const char *, char *, size_t); -int readlinkat(int, const char *, char *, size_t); +ssize_t readlink(const char *, char *, size_t); +ssize_t readlinkat(int, const char *, char *, size_t); int unlink(const char *); int unlinkat(int, const char *, int); int rmdir(const char *); @@ -67,6 +64,7 @@ int ftruncate(int, off_t); #define R_OK 4 #define W_OK 2 #define X_OK 1 + int access(const char *, int); int faccessat(int, const char *, int, int); @@ -81,10 +79,10 @@ int pause(void); pid_t fork(void); int execve(const char *, char *const [], char *const []); int execv(const char *, char *const []); -int execle(const char *, ...); -int execl(const char *, ...); +int execle(const char *, const char *, ...); +int execl(const char *, const char *, ...); int execvp(const char *, char *const []); -int execlp(const char *, ...); +int execlp(const char *, const char *, ...); int fexecve(int, char *const [], char *const []); void _exit(int); @@ -132,30 +130,60 @@ size_t confstr(int, char *, size_t); #define F_TLOCK 2 #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 setpgrp(void); -char *crypt(const char *, const char *); -void encrypt(char *, int); -void swab(const void *, void *, ssize_t); long gethostid(void); int nice(int); void sync(void); #endif -#ifdef _GNU_SOURCE +#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) +#define L_SET 0 +#define L_INCR 1 +#define L_XTND 2 int brk(void *); void *sbrk(intptr_t); pid_t vfork(void); int vhangup(void); int chroot(const char *); int getpagesize(void); +int getdtablesize(void); int sethostname(const char *, size_t); +int getdomainname(char *, size_t); int usleep(unsigned); unsigned ualarm(unsigned, unsigned); -int setgroups(int, const gid_t []); +int setgroups(size_t, const gid_t []); +char *getpass(const char *); +int daemon(int, int); +void setusershell(void); +void endusershell(void); +char *getusershell(void); +#endif + +#ifdef _GNU_SOURCE +pid_t forkall(void); int setresuid(uid_t, uid_t, uid_t); int setresgid(gid_t, gid_t, gid_t); +int getresuid(uid_t *, uid_t *, uid_t *); +int getresgid(gid_t *, gid_t *, gid_t *); +char *get_current_dir_name(void); +#endif + +#ifdef _LARGEFILE64_SOURCE +#define lseek64 lseek +#define pread64 pread +#define pwrite64 pwrite +#define truncate64 truncate +#define ftruncate64 ftruncate +#define lockf64 lockf +#define off64_t off_t #endif #define _XOPEN_VERSION 700