From 4c1cf7d02ce2578882c25bce1499db4c12fd4ac9 Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Thu, 2 Apr 2026 08:07:20 +0200 Subject: [PATCH] Avoid macro redefinition conflicts by undefining symbols prior to definition --- tools/xtadkgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/xtadkgen.c b/tools/xtadkgen.c index 8a49632..f449a80 100644 --- a/tools/xtadkgen.c +++ b/tools/xtadkgen.c @@ -50,7 +50,8 @@ void ProcessSourceFile(FILE* InFile, FILE* OutFile) } /* Generate the corresponding C-preprocessor macro definition */ - fprintf(OutFile, "#define %s %s\n", SymbolName, ValuePointer); + fprintf(OutFile, "#undef %s\n", SymbolName); + fprintf(OutFile, "#define %s %s\n\n", SymbolName, ValuePointer); } } }