diff options
Diffstat (limited to 'src/libc/include')
-rw-r--r-- | src/libc/include/ctype.h | 1 | ||||
-rw-r--r-- | src/libc/include/inttypes.h | 3 | ||||
-rw-r--r-- | src/libc/include/spawn.h | 21 | ||||
-rw-r--r-- | src/libc/include/stdio.h | 4 | ||||
-rw-r--r-- | src/libc/include/string.h | 1 | ||||
-rw-r--r-- | src/libc/include/sys/wait.h | 2 | ||||
-rw-r--r-- | src/libc/include/unistd.h | 1 |
7 files changed, 33 insertions, 0 deletions
diff --git a/src/libc/include/ctype.h b/src/libc/include/ctype.h index 1ebb111..f33b645 100644 --- a/src/libc/include/ctype.h +++ b/src/libc/include/ctype.h @@ -2,6 +2,7 @@ int isalnum(int c); int isalpha(int c); +int isblank(int c); int iscntrl(int c); int isdigit(int c); int isgraph(int c); diff --git a/src/libc/include/inttypes.h b/src/libc/include/inttypes.h index d44129a..2890655 100644 --- a/src/libc/include/inttypes.h +++ b/src/libc/include/inttypes.h @@ -1,6 +1,7 @@ #include <stdint.h> #define PRId64 "ld" +#define PRIi64 "li" #define PRIo64 "lo" #define PRIu64 "lu" #define PRIx64 "lx" @@ -9,11 +10,13 @@ #define PRId32 "d" #define PRIo32 "o" #define PRIu32 "u" +#define PRIuLEAST32 "u" #define PRIx32 "x" #define SCNu32 "u" #define PRId16 "d" #define PRIo16 "o" #define PRIu16 "u" +#define PRIuLEAST16 "u" #define PRIx16 "x" #define SCNu16 "u" diff --git a/src/libc/include/spawn.h b/src/libc/include/spawn.h new file mode 100644 index 0000000..936518a --- /dev/null +++ b/src/libc/include/spawn.h @@ -0,0 +1,21 @@ +#pragma once +#include <sys/types.h> + +typedef struct { + struct file_action *f; +} posix_spawn_file_actions_t; + +typedef struct {} posix_spawnattr_t; + +int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *facts, int from, int to); +int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *facts); +int posix_spawn_file_actions_init(posix_spawn_file_actions_t *facts); + +int posix_spawnp( + pid_t *restrict pid, + const char *restrict file, + const posix_spawn_file_actions_t *restrict file_actions, + const posix_spawnattr_t *restrict attrp, + char *const argv[restrict], + char *const envp[restrict] +); diff --git a/src/libc/include/stdio.h b/src/libc/include/stdio.h index c579df5..b582e8f 100644 --- a/src/libc/include/stdio.h +++ b/src/libc/include/stdio.h @@ -1,4 +1,5 @@ #pragma once + #include <bits/file.h> #include <stdarg.h> #include <stddef.h> @@ -27,6 +28,7 @@ int printf(const char *restrict fmt, ...); int fprintf(FILE *restrict f, const char *restrict fmt, ...); int sprintf(char *restrict s, const char *restrict fmt, ...); +int snprintf(char *restrict str, size_t len, const char *restrict fmt, ...); int vprintf(const char *restrict fmt, va_list ap); int vsprintf(char *restrict s, const char *restrict fmt, va_list ap); @@ -86,4 +88,6 @@ char *tmpnam(char *s); int sscanf(const char *restrict s, const char *restrict format, ...); int vsscanf(const char* str, const char* format, va_list ap); +int fscanf(FILE* fp, const char* format, ...); +int vfscanf(FILE* fp, const char* format, va_list ap); int vcbscanf(void* fp, int (*fgetc)(void*), int (*ungetc)(int, void*), const char* restrict format, va_list ap); diff --git a/src/libc/include/string.h b/src/libc/include/string.h index 8b04b39..0bf4082 100644 --- a/src/libc/include/string.h +++ b/src/libc/include/string.h @@ -27,3 +27,4 @@ char *strdup(const char *s); size_t strnlen(const char *s, size_t len); char *strerror(int errnum); +char *strsignal(int sig); diff --git a/src/libc/include/sys/wait.h b/src/libc/include/sys/wait.h index 5f0d2cc..cc8b9a8 100644 --- a/src/libc/include/sys/wait.h +++ b/src/libc/include/sys/wait.h @@ -4,6 +4,7 @@ #define WIFSTOPPED(x) 0 #define WEXITSTATUS(x) ((x)&0xFF) #define WIFEXITED(x) 1 +#define WIFSIGNALED(x) 0 #define WSTOPSIG(x) 0 #define WTERMSIG(x) 0 @@ -12,3 +13,4 @@ pid_t wait(int *wstatus); pid_t wait3(int *wstatus, int opts, struct rusage *rusage); +pid_t waitpid(pid_t pid, int *wstatus, int opts); diff --git a/src/libc/include/unistd.h b/src/libc/include/unistd.h index ac5afc0..750d6e2 100644 --- a/src/libc/include/unistd.h +++ b/src/libc/include/unistd.h @@ -22,6 +22,7 @@ int isatty(int fd); int execv(const char *path, char *const argv[]); int execvp(const char *path, char *const argv[]); +int execvpe(const char *path, char *const argv[], char *const envp[]); int execve(const char *path, char *const argv[], char *const envp[]); int chdir(const char *path); |