diff options
Diffstat (limited to 'libc/include/unistd.h')
-rw-r--r-- | libc/include/unistd.h | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/libc/include/unistd.h b/libc/include/unistd.h index 29758f5..7fbafdf 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -47,13 +47,14 @@ __BEGIN_DECLS #define SEEK_CUR 1 #define SEEK_END 2 -extern char **environ; +extern char** environ; + extern __noreturn void _exit(int); extern pid_t fork(void); extern pid_t vfork(void); extern pid_t getpid(void); -extern pid_t gettid(void); +extern pid_t gettid(void) __pure2; extern pid_t getpgid(pid_t); extern int setpgid(pid_t, pid_t); extern pid_t getppid(void); @@ -64,14 +65,12 @@ extern pid_t setsid(void); extern int execv(const char *, char * const *); extern int execvp(const char *, char * const *); +extern int execvpe(const char *, char * const *, char * const *); extern int execve(const char *, char * const *, char * const *); extern int execl(const char *, const char *, ...); extern int execlp(const char *, const char *, ...); extern int execle(const char *, const char *, ...); -/* IMPORTANT: See comment under <sys/prctl.h> about this declaration */ -extern int prctl(int option, ...); - extern int nice(int); extern int setuid(uid_t); @@ -90,7 +89,6 @@ extern int setresuid(uid_t, uid_t, uid_t); extern int setresgid(gid_t, gid_t, gid_t); extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); -extern int issetugid(void); extern char* getlogin(void); extern char* getusershell(void); extern void setusershell(void); @@ -163,8 +161,6 @@ extern int usleep(useconds_t); extern int gethostname(char *, size_t); -extern int getdtablesize(void); - extern void *__brk(void *); extern int brk(void *); extern void *sbrk(ptrdiff_t); @@ -174,7 +170,7 @@ extern char *optarg; extern int optind, opterr, optopt; extern int isatty(int); -extern char* ttyname(int); +extern char* ttyname(int) __warnattr("ttyname is not thread-safe; use ttyname_r instead"); extern int ttyname_r(int, char*, size_t); extern int acct(const char* filepath); @@ -185,26 +181,17 @@ extern int sysconf(int name); extern int daemon(int, int); -/* A special syscall that is only available on the ARM, not x86 function. */ -extern int cacheflush(long start, long end, long flags); +#if defined(__arm__) || (defined(__mips__) && !defined(__LP64__)) +extern int cacheflush(long, long, long); + /* __attribute__((deprecated("use __builtin___clear_cache instead"))); */ +#endif extern pid_t tcgetpgrp(int fd); extern int tcsetpgrp(int fd, pid_t _pid); -#if 0 /* MISSING FROM BIONIC */ -extern int execvpe(const char *, char * const *, char * const *); -extern int execlpe(const char *, const char *, ...); -extern int getfsuid(uid_t); -extern int setfsuid(uid_t); -extern int getlogin_r(char* name, size_t namesize); -extern int sethostname(const char *, size_t); -extern int getdomainname(char *, size_t); -extern int setdomainname(const char *, size_t); -#endif /* MISSING */ - /* Used to retry syscalls that can return EINTR. */ #define TEMP_FAILURE_RETRY(exp) ({ \ - typeof (exp) _rc; \ + __typeof__(exp) _rc; \ do { \ _rc = (exp); \ } while (_rc == -1 && errno == EINTR); \ |