diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ast.c | 1 | ||||
| -rw-r--r-- | src/cli.c | 1 | ||||
| -rw-r--r-- | src/codegen.c | 1 | ||||
| -rw-r--r-- | src/common.c | 1 | ||||
| -rw-r--r-- | src/fs.c | 1 | ||||
| -rw-r--r-- | src/io.c | 1 | ||||
| -rw-r--r-- | src/json.c | 1 | ||||
| -rw-r--r-- | src/main.c | 1 | ||||
| -rw-r--r-- | src/parse.c | 1 | ||||
| -rw-r--r-- | src/preprocess.c | 1 | ||||
| -rw-r--r-- | src/std.h | 7 | ||||
| -rw-r--r-- | src/sys.c | 3 | ||||
| -rw-r--r-- | src/token.c | 1 | ||||
| -rw-r--r-- | src/tokenize.c | 1 |
14 files changed, 16 insertions, 6 deletions
@@ -1,4 +1,5 @@ #include "ast.h" +#include <stdlib.h> #include <string.h> #include "common.h" #include "preprocess.h" @@ -1,5 +1,6 @@ #include "cli.h" #include <stdio.h> +#include <stdlib.h> #include <string.h> #include "common.h" #include "version.h" diff --git a/src/codegen.c b/src/codegen.c index 6b3c858..db6514d 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -1,4 +1,5 @@ #include "codegen.h" +#include <stdlib.h> #include <string.h> #include "common.h" #include "preprocess.h" diff --git a/src/common.c b/src/common.c index 75ca0ca..61b2805 100644 --- a/src/common.c +++ b/src/common.c @@ -1,6 +1,7 @@ #include "common.h" #include <stdarg.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> void fatal_error(const char* msg, ...) { @@ -1,4 +1,5 @@ #include "fs.h" +#include <stdlib.h> #include <string.h> #include "std.h" @@ -1,5 +1,6 @@ #include "io.h" #include <stdio.h> +#include <stdlib.h> #include <string.h> #include "common.h" #include "json.h" @@ -1,5 +1,6 @@ #include "json.h" #include <stdio.h> +#include <stdlib.h> #include "common.h" struct JsonBuilder { @@ -1,3 +1,4 @@ +#include <stdlib.h> #include <string.h> #include "ast.h" #include "cli.h" diff --git a/src/parse.c b/src/parse.c index afbb282..911a59e 100644 --- a/src/parse.c +++ b/src/parse.c @@ -1,5 +1,6 @@ #include "parse.h" #include <stdio.h> +#include <stdlib.h> #include <string.h> #include "common.h" #include "tokenize.h" diff --git a/src/preprocess.c b/src/preprocess.c index 00b01dd..a32e0e5 100644 --- a/src/preprocess.c +++ b/src/preprocess.c @@ -1,6 +1,7 @@ #include "preprocess.h" #include <ctype.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include "common.h" #include "parse.h" @@ -3,13 +3,8 @@ #include <stddef.h> -int atoi(const char*); -void* calloc(size_t, size_t); -void exit(int); +// TODO: <stdlib.h> int mkstemps(char*, int); -void* realloc(void*, size_t); -long strtol(const char*, char**, int); -int system(const char*); #define assert(x) \ do { \ @@ -1,8 +1,11 @@ #include "sys.h" +#include <stdlib.h> #include "std.h" // TODO: #inclue some header. +#ifndef __ducc__ typedef long ssize_t; +#endif ssize_t readlink(const char*, char*, size_t); static char* get_self_path() { diff --git a/src/token.c b/src/token.c index 1942ffb..554d783 100644 --- a/src/token.c +++ b/src/token.c @@ -1,5 +1,6 @@ #include "token.h" #include <stdio.h> +#include <stdlib.h> #include <string.h> #include "common.h" #include "json.h" diff --git a/src/tokenize.c b/src/tokenize.c index c6f46a5..cb945e1 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -1,4 +1,5 @@ #include "tokenize.h" +#include <stdlib.h> #include <string.h> #include "common.h" |
