From: David Given Date: Fri, 11 Nov 2016 19:17:10 +0000 (+0100) Subject: Rename addr_t to address_t to avoid clashes with the system addr_t. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d82df74a7a33cfab66a86b13efcad751d331d26d;p=ack.git Rename addr_t to address_t to avoid clashes with the system addr_t. --- diff --git a/mach/proto/ncg/data.h b/mach/proto/ncg/data.h index c1d0e183e..ddd232b98 100644 --- a/mach/proto/ncg/data.h +++ b/mach/proto/ncg/data.h @@ -12,13 +12,13 @@ typedef struct cost { typedef struct { string ea_str; word ea_off; -} addr_t; +} address_t; typedef struct { int t_token; /* kind of token, -1 for register */ union { word aw; /* integer type */ - addr_t aa; /* address type */ + address_t aa; /* address type */ int ar; /* register type */ } t_att[TOKENSIZE]; } token_t,*token_p; diff --git a/mach/proto/ncg/gencode.c b/mach/proto/ncg/gencode.c index 415d59f51..68676868e 100644 --- a/mach/proto/ncg/gencode.c +++ b/mach/proto/ncg/gencode.c @@ -72,7 +72,7 @@ genstr(stringno) { fputs(codestrings[stringno],codefile); } -string ad2str(ad) addr_t ad; { +string ad2str(ad) address_t ad; { static char buf[100]; if (ad.ea_str==0) @@ -87,7 +87,7 @@ string ad2str(ad) addr_t ad; { return(mystrcpy(buf)); } -praddr(ad) addr_t ad; { +praddr(ad) address_t ad; { if (ad.ea_str==0 || *(ad.ea_str) == '\0') fprintf(codefile,WRD_FMT,ad.ea_off); diff --git a/mach/proto/ncg/result.h b/mach/proto/ncg/result.h index 7ceb2f114..fdb9e16e1 100644 --- a/mach/proto/ncg/result.h +++ b/mach/proto/ncg/result.h @@ -9,7 +9,7 @@ struct result { union { word e_con; int e_reg; - addr_t e_addr; + address_t e_addr; } e_v; /* value */ }; diff --git a/util/LLgen/build.lua b/util/LLgen/build.lua index 44abc871c..9cde5630c 100644 --- a/util/LLgen/build.lua +++ b/util/LLgen/build.lua @@ -1,3 +1,8 @@ +clibrary { + name = "headers", + hdrs = { "./src/*.h" } +} + cprogram { name = "llgen", @@ -6,6 +11,7 @@ cprogram { -- do this. srcs = { "./src/*.c" }, + deps = { "+headers" }, vars = { ["+cflags"] = { "-DLIBDIR=\\\""..posix.getcwd().."/"..cwd().."/lib\\\"",