Changeset b08ef1fd in mainline
- Timestamp:
- 2011-06-16T02:57:47Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 491e1ee
- Parents:
- 4f4b4e7
- Location:
- uspace/lib/posix
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/stdio.c
r4f4b4e7 rb08ef1fd 111 111 } 112 112 113 /** 114 * 115 * @param stream 116 * @param offset 117 * @param whence 118 * @return 119 */ 120 int posix_fseeko(FILE *stream, posix_off_t offset, int whence) 121 { 122 // TODO 123 not_implemented(); 124 } 125 126 /** 127 * 128 * @param stream 129 * @return 130 */ 131 posix_off_t posix_ftello(FILE *stream) 132 { 133 // TODO 134 not_implemented(); 135 } 136 113 137 /** @} 114 138 */ -
uspace/lib/posix/stdio.h
r4f4b4e7 rb08ef1fd 38 38 39 39 #include "libc/stdio.h" 40 #include "sys/types.h" 40 41 41 42 /* Character Input/Output */ … … 52 53 extern void posix_perror(const char *s); 53 54 55 /* File Positioning */ 56 extern int posix_fseeko(FILE *stream, posix_off_t offset, int whence); 57 extern posix_off_t posix_ftello(FILE *stream); 58 54 59 #ifndef POSIX_INTERNAL 55 60 #define freopen posix_freopen 56 61 57 62 #define perror posix_perror 63 64 #define fseeko posix_fseeko 65 #define ftello posix_ftello 58 66 #endif 59 67 -
uspace/lib/posix/sys/stat.h
r4f4b4e7 rb08ef1fd 38 38 39 39 #include "../libc/sys/stat.h" 40 #include "time.h" 40 #include "types.h" 41 #include "../time.h" 41 42 42 43 /* values are the same as on Linux */ … … 108 109 #define S_ISSOCK(m) ((m & S_IFSOCK) != 0) /* socket? (Not in POSIX.1-1996.) */ 109 110 110 typedef devmap_handle_t posix_dev_t;111 typedef unsigned int posix_ino_t;112 typedef unsigned int posix_nlink_t;113 typedef unsigned int posix_uid_t;114 typedef unsigned int posix_gid_t;115 typedef aoff64_t posix_off_t;116 typedef unsigned int posix_blksize_t;117 typedef unsigned int posix_blkcnt_t;118 119 111 struct posix_stat { 120 112 struct stat sys_stat; … … 139 131 140 132 #ifndef LIBPOSIX_INTERNAL 141 #define dev_t posix_dev_t142 #define nlink_t posix_nlink_t143 #define uid_t posix_uid_t144 #define gid_t posix_gid_t145 #define off_t posix_off_t146 #define blksize_t posix_blksize_t147 #define blkcnt_t posix_blkcnt_t148 149 133 #define fstat posix_fstat 150 134 #define stat posix_stat -
uspace/lib/posix/sys/types.h
r4f4b4e7 rb08ef1fd 38 38 39 39 #include "../libc/sys/types.h" 40 #include <ipc/devmap.h> 40 41 #include <task.h> 41 42 42 43 typedef task_id_t posix_pid_t; 44 typedef devmap_handle_t posix_dev_t; 45 typedef unsigned int posix_ino_t; 46 typedef unsigned int posix_nlink_t; 47 typedef unsigned int posix_uid_t; 48 typedef unsigned int posix_gid_t; 49 typedef aoff64_t posix_off_t; 50 typedef unsigned int posix_blksize_t; 51 typedef unsigned int posix_blkcnt_t; 43 52 44 53 #ifndef POSIX_INTERNAL 45 54 #define pid_t posix_pid_t 55 #define dev_t posix_dev_t 56 #define nlink_t posix_nlink_t 57 #define uid_t posix_uid_t 58 #define gid_t posix_gid_t 59 #define off_t posix_off_t 60 #define blksize_t posix_blksize_t 61 #define blkcnt_t posix_blkcnt_t 46 62 #endif 47 63 -
uspace/lib/posix/unistd.c
r4f4b4e7 rb08ef1fd 50 50 } 51 51 52 /** 53 * 54 * @param path 55 * @param amode 56 * @return 57 */ 58 int posix_access(const char *path, int amode) 59 { 60 // TODO 61 not_implemented(); 62 } 63 52 64 /** @} 53 65 */ -
uspace/lib/posix/unistd.h
r4f4b4e7 rb08ef1fd 61 61 #define STDERR_FILENO (fileno(stderr)) 62 62 63 /* File Accessibility */ 64 #undef F_OK 65 #undef X_OK 66 #undef W_OK 67 #undef R_OK 68 #define F_OK 0 /* Test for existence. */ 69 #define X_OK 1 /* Test for execute permission. */ 70 #define W_OK 2 /* Test for write permission. */ 71 #define R_OK 4 /* Test for read permission. */ 72 extern int posix_access(const char *path, int amode); 73 63 74 #ifndef POSIX_INTERNAL 64 75 #define isatty posix_isatty 76 77 #define access posix_access 65 78 #endif 66 79
Note:
See TracChangeset
for help on using the changeset viewer.