aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/ast.c1
-rw-r--r--src/cli.c1
-rw-r--r--src/codegen.c1
-rw-r--r--src/common.c1
-rw-r--r--src/fs.c1
-rw-r--r--src/io.c1
-rw-r--r--src/main.c1
-rw-r--r--src/parse.c1
-rw-r--r--src/preprocess.c1
-rw-r--r--src/std.h10
-rw-r--r--src/token.c1
-rw-r--r--src/tokenize.c1
-rw-r--r--tests/include_stdc.sh2
13 files changed, 12 insertions, 11 deletions
diff --git a/src/ast.c b/src/ast.c
index d698543..cdfd9a0 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -1,4 +1,5 @@
#include "ast.h"
+#include <string.h>
#include "common.h"
#include "preprocess.h"
diff --git a/src/cli.c b/src/cli.c
index cd4cc42..7388370 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1,5 +1,6 @@
#include "cli.h"
#include <stdio.h>
+#include <string.h>
#include "common.h"
#include "version.h"
diff --git a/src/codegen.c b/src/codegen.c
index dccabe4..6b3c858 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -1,4 +1,5 @@
#include "codegen.h"
+#include <string.h>
#include "common.h"
#include "preprocess.h"
diff --git a/src/common.c b/src/common.c
index 02bb712..75ca0ca 100644
--- a/src/common.c
+++ b/src/common.c
@@ -1,6 +1,7 @@
#include "common.h"
#include <stdarg.h>
#include <stdio.h>
+#include <string.h>
void fatal_error(const char* msg, ...) {
va_list args;
diff --git a/src/fs.c b/src/fs.c
index a299ef9..b5e31dd 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -1,4 +1,5 @@
#include "fs.h"
+#include <string.h>
#include "std.h"
// 'ext' must include '.'.
diff --git a/src/io.c b/src/io.c
index 6b52318..7d0b875 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1,5 +1,6 @@
#include "io.h"
#include <stdio.h>
+#include <string.h>
#include "common.h"
#include "json.h"
diff --git a/src/main.c b/src/main.c
index 5a9fd56..469e5db 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,3 +1,4 @@
+#include <string.h>
#include "ast.h"
#include "cli.h"
#include "codegen.h"
diff --git a/src/parse.c b/src/parse.c
index f9c4cea..14fd7d2 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1,5 +1,6 @@
#include "parse.h"
#include <stdio.h>
+#include <string.h>
#include "common.h"
#include "tokenize.h"
diff --git a/src/preprocess.c b/src/preprocess.c
index bd7feae..5e029f2 100644
--- a/src/preprocess.c
+++ b/src/preprocess.c
@@ -1,6 +1,7 @@
#include "preprocess.h"
#include <ctype.h>
#include <stdio.h>
+#include <string.h>
#include "common.h"
#include "parse.h"
#include "sys.h"
diff --git a/src/std.h b/src/std.h
index a4fe905..2d7d8c8 100644
--- a/src/std.h
+++ b/src/std.h
@@ -6,18 +6,8 @@
int atoi(const char*);
void* calloc(size_t, size_t);
void exit(int);
-void* memcpy(void*, const void*, size_t);
-void* memmove(void*, const void*, size_t);
-void* memset(void*, int, size_t);
int mkstemps(char*, int);
void* realloc(void*, size_t);
-int strcmp(const char*, const char*);
-size_t strlen(const char*);
-int strncmp(const char*, const char*, size_t);
-char* strdup(const char*);
-char* strndup(const char*, size_t);
-char* strstr(const char*, const char*);
-char* strrchr(const char*, int);
long strtol(const char*, char**, int);
int system(const char*);
diff --git a/src/token.c b/src/token.c
index e825de1..1942ffb 100644
--- a/src/token.c
+++ b/src/token.c
@@ -1,5 +1,6 @@
#include "token.h"
#include <stdio.h>
+#include <string.h>
#include "common.h"
#include "json.h"
diff --git a/src/tokenize.c b/src/tokenize.c
index c897b02..c6f46a5 100644
--- a/src/tokenize.c
+++ b/src/tokenize.c
@@ -1,4 +1,5 @@
#include "tokenize.h"
+#include <string.h>
#include "common.h"
typedef struct {
diff --git a/tests/include_stdc.sh b/tests/include_stdc.sh
index deee597..9cb13fd 100644
--- a/tests/include_stdc.sh
+++ b/tests/include_stdc.sh
@@ -13,7 +13,7 @@ test_diff <<'EOF'
#include <stdint.h>
#include <stdio.h>
// #include <stdlib.h>
-// #include <string.h>
+#include <string.h>
#include <time.h>
#include <uchar.h>