aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/cc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/cc')
-rw-r--r--sys/cmd/cc/cc.c18
-rw-r--r--sys/cmd/cc/lex.c18
2 files changed, 36 insertions, 0 deletions
diff --git a/sys/cmd/cc/cc.c b/sys/cmd/cc/cc.c
index 3246292..3602643 100644
--- a/sys/cmd/cc/cc.c
+++ b/sys/cmd/cc/cc.c
@@ -54,6 +54,24 @@ getstr(string key, int *ok)
return idx;
}
+static
+void
+·free(void* _, void* ptr) {
+ return free(ptr);
+}
+
+static
+void *
+·alloc(void* _, uint n, ulong size) {
+ return malloc(n*size);
+}
+
+static
+void *
+·calloc(void* _, uint n, ulong size) {
+ return calloc(n, size);
+}
+
static
int
morestrtab(StrTab *tab, int n)
diff --git a/sys/cmd/cc/lex.c b/sys/cmd/cc/lex.c
index 1396358..0963fb9 100644
--- a/sys/cmd/cc/lex.c
+++ b/sys/cmd/cc/lex.c
@@ -791,6 +791,24 @@ Nospace:
#define PTR_HASH(p) (uintptr)(p)
#define PTR_EQUAL(p1, p2) ((uintptr)(p1) == (uintptr)(p2))
+static
+void
+·free(void* _, void* ptr) {
+ return free(ptr);
+}
+
+static
+void *
+·alloc(void* _, uint n, ulong size) {
+ return malloc(n*size);
+}
+
+static
+void *
+·calloc(void* _, uint n, ulong size) {
+ return calloc(n, size);
+}
+
static
int
moresymtab(SymTab *tab, int n)