path: root/util/util.h
diff options
authorOri Bernstein <>2017-02-17 22:21:41 -0800
committerOri Bernstein <>2017-02-17 23:32:19 -0800
commit61a91a2cc9be621ee517b2cb4114922bd5da351f (patch)
tree2dbf60c0c0d4b03c65c59146f44e4f7c8f1c9cb2 /util/util.h
parent210b24e9cf07baef21fb0fd943f81f38a3196945 (diff)
Search for usefiles relative to the output.
For most uses, this is equivalent to compiler cwd, but supports out of tree builds better. It also means that builds behave the same way regardless of the directory that the compiler is run from, which is convenient for testing. This also drops support for `.use` suffixes on local uses.
Diffstat (limited to 'util/util.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/util/util.h b/util/util.h
index 60a344b..49f10d6 100644
--- a/util/util.h
+++ b/util/util.h
@@ -121,6 +121,7 @@ void *zrealloc(void *p, size_t oldsz, size_t size);
void *xrealloc(void *p, size_t size);
void die(char *msg, ...) FATAL;
char *strdupn(char *s, size_t len);
+char *xstrdup(char *s);
char *strjoin(char *u, char *v);
void *memdup(void *mem, size_t len);
size_t bprintf(char *buf, size_t len, char *fmt, ...);