got c11_sanity.c working (both segregated and single-header)

from now on I'm assuming both will work.
This commit is contained in:
ed
2025-02-11 20:26:03 -05:00
parent f41658efd8
commit 90836817e9
4 changed files with 24 additions and 5 deletions
+5 -2
View File
@@ -7,7 +7,7 @@
#endif
#ifndef GENERATE_SINGLEHEADER
#define GENERATE_SINGLEHEADER 0
#define GENERATE_SINGLEHEADER 1
#endif
#define path_refactor_script path_gen_c11 "c11.refactor"
@@ -264,7 +264,6 @@ int main()
print_fmt("%S", implementation_guard_start);
new_line();
define(lit("STB_SPRINTF_IMPLEMENTATION"), MT_Statement);
define(lit("STB_SPRINTF_DECORATE(name)"), MT_Expression, .content = lit("md_##name"), .flags = MF_Functional);
// print();
preprocess_if("MD_BUILD_STATIC"); {
@@ -356,6 +355,10 @@ int main()
print(banner_base);
new_line();
define(lit("STB_SPRINTF_IMPLEMENTATION"), MT_Statement);
print_section(refactor_and_format(r_tp_stb_sprintf_source), lit("STB snprintf Source"));
new_line();
print_section(r_base_platform_c, lit("Platform"));
print_section(r_base_debug_c, lit("Debug"));
print_section(r_base_memory_substrate_c, lit("Memory Substrate"));
+1 -1
View File
@@ -69,7 +69,7 @@ void register_library_macros()
// third_party/stb/stb_sprintf.h
gen_register_macros( args(
((gen_Macro) { lit("STB_SPRINTF_H_INCLUDE"), MT_Statement, }),
((gen_Macro) { lit("STBSP__ASAN"), MT_Statement, MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__ASAN"), MT_Statement, MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__PUBLICDEC"), MT_Expression, MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__ATTRIBUTE_FORMAT"), MT_Expression, MF_Functional | MF_Allow_As_Attribute }),
((gen_Macro) { lit("STBSP__NOTUSED"), MT_Expression, MF_Functional | MF_Allow_As_Attribute }),