summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c10
-rw-r--r--src/compiler.sml5
2 files changed, 12 insertions, 3 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index ffef10e7..0c6eefd5 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -1033,10 +1033,18 @@ static void buf_check_ctx(uw_context ctx, buf *b, size_t extra, const char *desc
}
}
-static void uw_check_heap(uw_context ctx, size_t extra) {
+void uw_check_heap(uw_context ctx, size_t extra) {
buf_check_ctx(ctx, &ctx->heap, extra, "heap chunk");
}
+char *uw_heap_front(uw_context ctx) {
+ return ctx->heap.front;
+}
+
+void uw_set_heap_front(uw_context ctx, char *fr) {
+ ctx->heap.front = fr;
+}
+
void *uw_malloc(uw_context ctx, size_t len) {
void *result;
diff --git a/src/compiler.sml b/src/compiler.sml
index b0dfe387..fb5ed0e0 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -413,7 +413,7 @@ fun parseUrp' fname =
sources = #sources new @ #sources old
}
in
- foldr (fn (fname, job) => merge (job, parseUrp' fname)) job (!libs)
+ foldr (fn (fname, job) => merge (job, pu fname)) job (!libs)
end
fun parsePkind s =
@@ -876,7 +876,8 @@ fun compileC {cname, oname, ename, libs, profile, debug, link = link'} =
val urweb_o = clibFile "urweb.o"
val driver_o = clibFile "driver.o"
- val compile = "gcc " ^ Config.gccArgs ^ " -Wstrict-prototypes -Werror -O3 -I include -c " ^ cname ^ " -o " ^ oname
+ val compile = "gcc " ^ Config.gccArgs ^ " -Wstrict-prototypes -Werror -O3 -I " ^ Config.includ
+ ^ " -c " ^ cname ^ " -o " ^ oname
val link = "gcc -Werror -O3 -lm -lmhash -pthread " ^ libs ^ " " ^ urweb_o ^ " " ^ oname ^ " " ^ driver_o ^ " -o " ^ ename
val (compile, link) =