Changes in uspace/lib/posix/include/posix/unistd.h [1165a419:7f9df7b9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/include/posix/unistd.h
r1165a419 r7f9df7b9 37 37 #define POSIX_UNISTD_H_ 38 38 39 #ifndef __POSIX_DEF__40 #define __POSIX_DEF__(x) x41 #endif42 43 39 #include "sys/types.h" 44 40 #include "stddef.h" … … 51 47 #define _exit exit 52 48 53 extern char * __POSIX_DEF__(optarg);49 extern char *optarg; 54 50 extern int optind, opterr, optopt; 55 extern int __POSIX_DEF__(getopt)(int, char * const [], const char *);51 extern int getopt(int, char * const [], const char *); 56 52 57 53 /* Environment */ 58 extern char ** __POSIX_DEF__(environ);54 extern char **environ; 59 55 60 56 /* Sleeping */ 61 extern unsigned int __POSIX_DEF__(sleep)(unsigned int);57 extern unsigned int sleep(unsigned int); 62 58 63 59 /* Login Information */ 64 extern char * __POSIX_DEF__(getlogin)(void);65 extern int __POSIX_DEF__(getlogin_r)(char *name, size_t namesize);60 extern char *getlogin(void); 61 extern int getlogin_r(char *name, size_t namesize); 66 62 67 63 /* Identifying Terminals */ 68 extern int __POSIX_DEF__(isatty)(int fd);64 extern int isatty(int fd); 69 65 70 66 /* Working Directory */ 71 extern char * __POSIX_DEF__(getcwd)(char *buf, size_t size);72 extern int __POSIX_DEF__(chdir)(const char *path);67 extern char *getcwd(char *buf, size_t size); 68 extern int chdir(const char *path); 73 69 74 70 /* Query Memory Parameters */ 75 extern int __POSIX_DEF__(getpagesize)(void);71 extern int getpagesize(void); 76 72 77 73 /* Process Identification */ 78 extern __POSIX_DEF__(pid_t) __POSIX_DEF__(getpid)(void);79 extern __POSIX_DEF__(uid_t) __POSIX_DEF__(getuid)(void);80 extern __POSIX_DEF__(gid_t) __POSIX_DEF__(getgid)(void);74 extern pid_t getpid(void); 75 extern uid_t getuid(void); 76 extern gid_t getgid(void); 81 77 82 78 /* File Manipulation */ 83 extern int __POSIX_DEF__(close)(int fildes);84 extern ssize_t __POSIX_DEF__(read)(int fildes, void *buf, size_t nbyte);85 extern ssize_t __POSIX_DEF__(write)(int fildes, const void *buf, size_t nbyte);86 extern __POSIX_DEF__(off_t) __POSIX_DEF__(lseek)(int fildes,87 __POSIX_DEF__(off_t)offset, int whence);88 extern int __POSIX_DEF__(fsync)(int fildes);89 extern int __POSIX_DEF__(ftruncate)(int fildes, __POSIX_DEF__(off_t)length);90 extern int __POSIX_DEF__(rmdir)(const char *path);91 extern int __POSIX_DEF__(unlink)(const char *path);92 extern int __POSIX_DEF__(dup)(int fildes);93 extern int __POSIX_DEF__(dup2)(int fildes, int fildes2);79 extern int close(int fildes); 80 extern ssize_t read(int fildes, void *buf, size_t nbyte); 81 extern ssize_t write(int fildes, const void *buf, size_t nbyte); 82 extern off_t lseek(int fildes, 83 off_t offset, int whence); 84 extern int fsync(int fildes); 85 extern int ftruncate(int fildes, off_t length); 86 extern int rmdir(const char *path); 87 extern int unlink(const char *path); 88 extern int dup(int fildes); 89 extern int dup2(int fildes, int fildes2); 94 90 95 91 /* Standard Streams */ … … 110 106 #define W_OK 2 /* Test for write permission. */ 111 107 #define R_OK 4 /* Test for read permission. */ 112 extern int __POSIX_DEF__(access)(const char *path, int amode);108 extern int access(const char *path, int amode); 113 109 114 110 /* System Parameters */ … … 119 115 _SC_CLK_TCK 120 116 }; 121 extern long __POSIX_DEF__(sysconf)(int name);117 extern long sysconf(int name); 122 118 123 119 /* Path Configuration Parameters */ … … 143 139 _PC_VDISABLE 144 140 }; 145 extern long __POSIX_DEF__(pathconf)(const char *path, int name);141 extern long pathconf(const char *path, int name); 146 142 147 143 /* Creating a Process */ 148 extern __POSIX_DEF__(pid_t) __POSIX_DEF__(fork)(void);144 extern pid_t fork(void); 149 145 150 146 /* Executing a File */ 151 extern int __POSIX_DEF__(execv)(const char *path, char *const argv[]);152 extern int __POSIX_DEF__(execvp)(const char *file, char *const argv[]);147 extern int execv(const char *path, char *const argv[]); 148 extern int execvp(const char *file, char *const argv[]); 153 149 154 150 /* Creating a Pipe */ 155 extern int __POSIX_DEF__(pipe)(int fildes[2]);151 extern int pipe(int fildes[2]); 156 152 157 153 /* Issue alarm signal. */ 158 extern unsigned int __POSIX_DEF__(alarm)(unsigned int);154 extern unsigned int alarm(unsigned int); 159 155 160 156 #endif /* POSIX_UNISTD_H_ */
Note:
See TracChangeset
for help on using the changeset viewer.