From a00571abd3f0cba014aa8b942b5b242df1ff24de Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 18 Aug 2025 19:28:19 -0400 Subject: Fix some compatibility issues, including #embed and `alignof` and some Makefile comment parsing issues. --- src/tomo.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/tomo.c') diff --git a/src/tomo.c b/src/tomo.c index e8012f9e..4cad76a0 100644 --- a/src/tomo.c +++ b/src/tomo.c @@ -13,6 +13,7 @@ #endif #include "ast.h" +#include "changes.md.h" #include "compile.h" #include "modules.h" #include "naming.h" @@ -97,11 +98,6 @@ static Text_t config_summary, // of that directory. as_owner = Text(""); -static const char changelog[] = { -#embed "../CHANGES.md" - , 0 -}; - static void transpile_header(env_t *base_env, Path_t path); static void transpile_code(env_t *base_env, Path_t path); static void compile_object_file(Path_t path); @@ -230,7 +226,7 @@ int main(int argc, char *argv[]) } if (show_changelog) { - print_inline(changelog); + print_inline(string_slice(CHANGES_md, CHANGES_md_len)); return 0; } @@ -693,7 +689,7 @@ void build_file_dependency_graph(Path_t path, Table_t *to_compile, Table_t *to_l time_t latest_included_modification_time(Path_t path) { static Table_t c_modification_times = {}; - const TypeInfo_t time_info = {.size=sizeof(time_t), .align=alignof(time_t), .tag=OpaqueInfo}; + const TypeInfo_t time_info = {.size=sizeof(time_t), .align=__alignof__(time_t), .tag=OpaqueInfo}; time_t *cached_latest = Table$get(c_modification_times, &path, Table$info(&Path$info, &time_info)); if (cached_latest) return *cached_latest; -- cgit v1.2.3