Changeset baeeee2 in mainline
- Timestamp:
- 2012-09-04T12:44:40Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 32b3a12
- Parents:
- f8cbe2c3
- Location:
- uspace/lib/posix
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/include/posix/errno.h
rf8cbe2c3 rbaeeee2 66 66 #undef errno 67 67 #define errno (*__posix_errno()) 68 69 #include "unistd.h"70 68 71 69 extern int *__posix_errno(void); -
uspace/lib/posix/include/posix/signal.h
rf8cbe2c3 rbaeeee2 36 36 #define POSIX_SIGNAL_H_ 37 37 38 #include "libc/errno.h"39 38 #include "sys/types.h" 40 39 -
uspace/lib/posix/include/posix/stddef.h
rf8cbe2c3 rbaeeee2 36 36 #define POSIX_STDDEF_H_ 37 37 38 #include " libc/stddef.h"38 #include "sys/types.h" 39 39 40 40 #ifndef NULL -
uspace/lib/posix/include/posix/stdio.h
rf8cbe2c3 rbaeeee2 41 41 #include "libc/stdio.h" 42 42 #include "sys/types.h" 43 #include " libc/stdarg.h"43 #include "stdarg.h" 44 44 #include "limits.h" 45 45 -
uspace/lib/posix/include/posix/stdlib.h
rf8cbe2c3 rbaeeee2 37 37 #define POSIX_STDLIB_H_ 38 38 39 #include " libc/stdlib.h"39 #include "sys/types.h" 40 40 41 41 #ifndef NULL … … 51 51 extern int posix_atexit(void (*func)(void)); 52 52 extern void exit(int status); 53 extern void abort(void) __attribute__((noreturn)); 53 54 54 55 /* Absolute Value */ -
uspace/lib/posix/include/posix/sys/mman.h
rf8cbe2c3 rbaeeee2 36 36 #define POSIX_SYS_MMAN_H_ 37 37 38 #include "libc/sys/mman.h" 38 #include "sys/types.h" 39 #include <abi/mm/as.h> 40 41 #define MAP_FAILED ((void *) -1) 42 43 #define MAP_SHARED (1 << 0) 44 #define MAP_PRIVATE (1 << 1) 45 #define MAP_FIXED (1 << 2) 46 #define MAP_ANONYMOUS (1 << 3) 39 47 40 48 #undef PROT_NONE … … 43 51 #undef PROT_EXEC 44 52 #define PROT_NONE 0 45 #define PROT_READ PROTO_READ 46 #define PROT_WRITE PROTO_WRITE 47 #define PROT_EXEC PROTO_EXEC 53 #define PROT_READ AS_AREA_READ 54 #define PROT_WRITE AS_AREA_WRITE 55 #define PROT_EXEC AS_AREA_EXEC 56 57 extern void *mmap(void *start, size_t length, int prot, int flags, int fd, 58 posix_off_t offset); 59 extern int munmap(void *start, size_t length); 48 60 49 61 #endif /* POSIX_SYS_MMAN_H_ */ -
uspace/lib/posix/include/posix/sys/stat.h
rf8cbe2c3 rbaeeee2 37 37 #define POSIX_SYS_STAT_H_ 38 38 39 #include "libc/sys/stat.h"40 39 #include "types.h" 41 40 #include "../time.h" … … 130 129 extern int posix_chmod(const char *path, mode_t mode); 131 130 extern mode_t posix_umask(mode_t mask); 131 extern int mkdir(const char *, mode_t); 132 132 133 133 #ifndef LIBPOSIX_INTERNAL -
uspace/lib/posix/include/posix/sys/types.h
rf8cbe2c3 rbaeeee2 38 38 39 39 #include "libc/sys/types.h" 40 #include "libc/sys/time.h" 40 41 41 42 typedef unsigned int posix_ino_t; -
uspace/lib/posix/include/posix/time.h
rf8cbe2c3 rbaeeee2 37 37 #define POSIX_TIME_H_ 38 38 39 #include "libc/time.h"40 39 #include "sys/types.h" 41 40 -
uspace/lib/posix/include/posix/unistd.h
rf8cbe2c3 rbaeeee2 37 37 #define POSIX_UNISTD_H_ 38 38 39 #include "libc/unistd.h"40 39 #include "sys/types.h" 40 #include "stddef.h" 41 41 42 42 /* Process Termination */ -
uspace/lib/posix/source/fnmatch.c
rf8cbe2c3 rbaeeee2 42 42 */ 43 43 44 #define LIBPOSIX_INTERNAL 45 44 46 #include "posix/stdbool.h" 45 47 #include "posix/ctype.h" … … 47 49 #include "posix/stdlib.h" 48 50 #include "posix/assert.h" 49 50 #define LIBPOSIX_INTERNAL51 51 52 52 #include "internal/common.h" … … 182 182 { "alnum", isalnum }, 183 183 { "alpha", isalpha }, 184 { "blank", isblank },185 { "cntrl", iscntrl },184 { "blank", posix_isblank }, 185 { "cntrl", posix_iscntrl }, 186 186 { "digit", isdigit }, 187 { "graph", isgraph },187 { "graph", posix_isgraph }, 188 188 { "lower", islower }, 189 { "print", isprint },190 { "punct", ispunct },189 { "print", posix_isprint }, 190 { "punct", posix_ispunct }, 191 191 { "space", isspace }, 192 192 { "upper", isupper }, 193 { "xdigit", isxdigit }193 { "xdigit", posix_isxdigit } 194 194 }; 195 195 … … 204 204 { 205 205 const struct _char_class *class = elem; 206 return strcmp((const char *) key, class->name);206 return posix_strcmp((const char *) key, class->name); 207 207 } 208 208 … … 217 217 { 218 218 /* Search for class in the array of supported character classes. */ 219 const struct _char_class *class = bsearch(cname, _char_classes,219 const struct _char_class *class = posix_bsearch(cname, _char_classes, 220 220 sizeof(_char_classes) / sizeof(struct _char_class), 221 221 sizeof(struct _char_class), _class_compare); … … 549 549 end = string; 550 550 } else { 551 end = strchrnul(string, pathname ? '/' : '\0');551 end = gnu_strchrnul(string, pathname ? '/' : '\0'); 552 552 } 553 553 … … 581 581 { 582 582 assert(s != NULL); 583 char *result = strdup(s);583 char *result = posix_strdup(s); 584 584 for (char *i = result; *i != '\0'; ++i) { 585 585 *i = tolower(*i); -
uspace/lib/posix/source/sys/stat.c
rf8cbe2c3 rbaeeee2 38 38 #include "../internal/common.h" 39 39 #include "posix/sys/stat.h" 40 #include "libc/sys/stat.h" 40 41 41 42 #include "posix/errno.h"
Note:
See TracChangeset
for help on using the changeset viewer.