Changeset 0ffbed9 in mainline for uspace/lib/posix/unistd.h
- Timestamp:
- 2011-06-19T17:49:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5974661
- Parents:
- f48b637 (diff), 32fb6944 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/unistd.h
rf48b637 r0ffbed9 1 1 /* 2 2 * Copyright (c) 2011 Jiri Zarevucky 3 * Copyright (c) 2011 Petr Koupy 3 4 * All rights reserved. 4 5 * … … 26 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 28 */ 28 29 30 /** @addtogroup libposix 31 * @{ 32 */ 33 /** @file 34 */ 35 29 36 #ifndef POSIX_UNISTD_H_ 30 37 #define POSIX_UNISTD_H_ 31 38 32 39 #include "libc/unistd.h" 40 #include "sys/types.h" 33 41 34 /* #include <getopt.h> */ 42 /* Process Termination */ 43 #define _exit exit 35 44 45 /* Option Arguments */ 36 46 extern char *optarg; 37 47 extern int optind, opterr, optopt; 38 48 extern int getopt(int, char * const [], const char *); 39 49 40 extern int isatty(int fd); 50 /* Identifying Terminals */ 51 extern int posix_isatty(int fd); 41 52 53 /* Process Identification */ 42 54 #define getpid task_get_id 55 extern posix_uid_t posix_getuid(void); 56 extern posix_gid_t posix_getgid(void); 43 57 58 /* Standard Streams */ 59 #undef STDIN_FILENO 44 60 #define STDIN_FILENO (fileno(stdin)) 61 #undef STDOUT_FILENO 45 62 #define STDOUT_FILENO (fileno(stdout)) 63 #undef STDERR_FILENO 46 64 #define STDERR_FILENO (fileno(stderr)) 65 66 /* File Accessibility */ 67 #undef F_OK 68 #undef X_OK 69 #undef W_OK 70 #undef R_OK 71 #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_TCK 83 }; 84 extern long posix_sysconf(int name); 85 86 #ifndef LIBPOSIX_INTERNAL 87 #define isatty posix_isatty 88 89 #define getuid posix_getuid 90 #define getgid posix_getgid 91 92 #define access posix_access 93 94 #define sysconf posix_sysconf 95 #endif 47 96 48 97 #endif /* POSIX_UNISTD_H_ */ 49 98 99 /** @} 100 */
Note:
See TracChangeset
for help on using the changeset viewer.