Changes in / [5c5117c:f3a605be] in mainline
- Location:
- uspace/lib/posix
- Files:
-
- 1 added
- 8 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/Makefile
r5c5117c rf3a605be 43 43 stdio.c \ 44 44 stdlib.c \ 45 stdlib/strtold.c \46 45 string.c \ 47 46 strings.c \ -
uspace/lib/posix/fcntl.c
r5c5117c rf3a605be 35 35 #define LIBPOSIX_INTERNAL 36 36 37 #include " internal/common.h"37 #include "common.h" 38 38 #include "fcntl.h" 39 39 -
uspace/lib/posix/fnmatch.c
r5c5117c rf3a605be 35 35 #define LIBPOSIX_INTERNAL 36 36 37 #include " internal/common.h"37 #include "common.h" 38 38 #include "fnmatch.h" 39 39 -
uspace/lib/posix/getopt.c
r5c5117c rf3a605be 35 35 #define LIBPOSIX_INTERNAL 36 36 37 #include " internal/common.h"37 #include "common.h" 38 38 #include "getopt.h" 39 39 -
uspace/lib/posix/stdio.c
r5c5117c rf3a605be 39 39 #include <errno.h> 40 40 41 #include " internal/common.h"41 #include "common.h" 42 42 #include "stdio.h" 43 43 #include "string.h" -
uspace/lib/posix/stdlib.c
r5c5117c rf3a605be 37 37 38 38 #include "stdlib.h" 39 #include " internal/common.h"39 #include "common.h" 40 40 41 41 /** … … 77 77 78 78 /** 79 * Converts a string representation of a floating-point number to 80 * its native representation. See posix_strtold(). 81 * 79 * 82 80 * @param nptr 83 81 * @param endptr … … 86 84 float posix_strtof(const char *restrict nptr, char **restrict endptr) 87 85 { 88 return (float) posix_strtold(nptr, endptr); 86 // TODO 87 not_implemented(); 89 88 } 90 89 91 90 /** 92 * Converts a string representation of a floating-point number to 93 * its native representation. See posix_strtold(). 94 * 91 * 95 92 * @param nptr 96 93 * @param endptr … … 99 96 double posix_strtod(const char *restrict nptr, char **restrict endptr) 100 97 { 101 return (double) posix_strtold(nptr, endptr); 98 // TODO 99 not_implemented(); 100 } 101 102 /** 103 * 104 * @param nptr 105 * @param endptr 106 * @return 107 */ 108 long double posix_strtold(const char *restrict nptr, char **restrict endptr) 109 { 110 // TODO 111 not_implemented(); 102 112 } 103 113 -
uspace/lib/posix/string.h
r5c5117c rf3a605be 102 102 extern size_t posix_strnlen(const char *s, size_t n); 103 103 104 /* Legacy declarations */105 extern int posix_ffs(int i);106 107 104 #ifndef LIBPOSIX_INTERNAL 108 105 #define strcpy posix_strcpy … … 137 134 #define strlen posix_strlen 138 135 #define strnlen posix_strnlen 139 140 #define ffs posix_ffs141 136 #endif 142 137 -
uspace/lib/posix/strings.c
r5c5117c rf3a605be 36 36 #define LIBPOSIX_INTERNAL 37 37 38 #include " internal/common.h"38 #include "common.h" 39 39 #include "strings.h" 40 40 #include "string.h" 41 #include "ctype.h"42 41 43 42 /** … … 60 59 int posix_strcasecmp(const char *s1, const char *s2) 61 60 { 62 return posix_strncasecmp(s1, s2, STR_NO_LIMIT); 61 // TODO 62 not_implemented(); 63 63 } 64 64 … … 72 72 int posix_strncasecmp(const char *s1, const char *s2, size_t n) 73 73 { 74 for (size_t i = 0; i < n; ++i) { 75 int cmp = tolower(s1[i]) - tolower(s2[i]); 76 if (cmp != 0) { 77 return cmp; 78 } 79 80 if (s1[i] == 0) { 81 return 0; 82 } 83 } 84 85 return 0; 74 // TODO 75 not_implemented(); 86 76 } 87 77 -
uspace/lib/posix/sys/stat.c
r5c5117c rf3a605be 37 37 38 38 #include "stat.h" 39 #include "../ internal/common.h"39 #include "../common.h" 40 40 #include <mem.h> 41 41 -
uspace/lib/posix/sys/stat.h
r5c5117c rf3a605be 40 40 #include "types.h" 41 41 #include "../time.h" 42 #include <ipc/devmap.h>43 #include <task.h>44 45 typedef devmap_handle_t posix_dev_t;46 typedef task_id_t posix_pid_t;47 42 48 43 /* values are the same as on Linux */ … … 139 134 140 135 #ifndef LIBPOSIX_INTERNAL 141 #define dev_t posix_dev_t142 #define pid_t posix_pid_t143 136 #define fstat posix_fstat 144 137 #define lstat posix_lstat -
uspace/lib/posix/sys/types.h
r5c5117c rf3a605be 38 38 39 39 #include "../libc/sys/types.h" 40 #include <ipc/devmap.h> 41 #include <task.h> 40 42 43 typedef task_id_t posix_pid_t; 44 typedef devmap_handle_t posix_dev_t; 41 45 typedef unsigned int posix_ino_t; 42 46 typedef unsigned int posix_nlink_t; … … 48 52 49 53 #ifndef LIBPOSIX_INTERNAL 50 #define ino_t posix_ino_t 54 #define pid_t posix_pid_t 55 #define dev_t posix_dev_t 51 56 #define nlink_t posix_nlink_t 52 57 #define uid_t posix_uid_t -
uspace/lib/posix/time.c
r5c5117c rf3a605be 36 36 #define LIBPOSIX_INTERNAL 37 37 38 #include " internal/common.h"38 #include "common.h" 39 39 #include "time.h" 40 40 -
uspace/lib/posix/unistd.c
r5c5117c rf3a605be 36 36 #define LIBPOSIX_INTERNAL 37 37 38 #include " internal/common.h"38 #include "common.h" 39 39 #include "unistd.h" 40 41 /* Array of environment variable strings (NAME=VALUE). */42 char **environ = NULL;43 40 44 41 /** -
uspace/lib/posix/unistd.h
r5c5117c rf3a605be 48 48 extern int getopt(int, char * const [], const char *); 49 49 50 /* Environmental Variables */51 extern char **posix_environ;52 53 50 /* Identifying Terminals */ 54 51 extern int posix_isatty(int fd); … … 88 85 89 86 #ifndef LIBPOSIX_INTERNAL 90 #define environ posix_environ91 92 87 #define isatty posix_isatty 93 88
Note:
See TracChangeset
for help on using the changeset viewer.