Changes in uspace/lib/posix/unistd.h [59f799b:a16210b5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/unistd.h
r59f799b ra16210b5 1 1 /* 2 2 * Copyright (c) 2011 Jiri Zarevucky 3 * Copyright (c) 2011 Petr Koupy4 3 * All rights reserved. 5 4 * … … 27 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 27 */ 29 30 /** @addtogroup libposix 31 * @{ 32 */ 33 /** @file 34 */ 35 28 36 29 #ifndef POSIX_UNISTD_H_ 37 30 #define POSIX_UNISTD_H_ 38 31 39 32 #include "libc/unistd.h" 40 #include "sys/types.h"41 33 42 /* Process Termination */ 43 #define _exit exit 34 /* #include <getopt.h> */ 44 35 45 /* Option Arguments */46 36 extern char *optarg; 47 37 extern int optind, opterr, optopt; 48 38 extern int getopt(int, char * const [], const char *); 49 39 50 /* Identifying Terminals */ 51 extern int posix_isatty(int fd); 40 extern int isatty(int fd); 52 41 53 /* Process Identification */54 42 #define getpid task_get_id 55 extern posix_uid_t posix_getuid(void);56 extern posix_gid_t posix_getgid(void);57 43 58 /* Standard Streams */59 #undef STDIN_FILENO60 44 #define STDIN_FILENO (fileno(stdin)) 61 #undef STDOUT_FILENO62 45 #define STDOUT_FILENO (fileno(stdout)) 63 #undef STDERR_FILENO64 46 #define STDERR_FILENO (fileno(stderr)) 65 66 /* File Accessibility */67 #undef F_OK68 #undef X_OK69 #undef W_OK70 #undef R_OK71 #define F_OK 0 /* Test for existence. */72 #define X_OK 1 /* Test for execute permission. */73 #define W_OK 2 /* Test for write permission. */74 #define R_OK 4 /* Test for read permission. */75 extern int posix_access(const char *path, int amode);76 77 /* System Parameters */78 enum {79 _SC_PHYS_PAGES,80 _SC_AVPHYS_PAGES,81 _SC_PAGESIZE,82 _SC_CLK_TCK83 };84 extern long posix_sysconf(int name);85 86 #ifndef LIBPOSIX_INTERNAL87 #define isatty posix_isatty88 89 #define getuid posix_getuid90 #define getgid posix_getgid91 92 #define access posix_access93 94 #define sysconf posix_sysconf95 #endif96 47 97 48 #endif /* POSIX_UNISTD_H_ */ 98 49 99 /** @}100 */
Note:
See TracChangeset
for help on using the changeset viewer.