From c0b3eb07bdf3f8b0221d3a54cc79a7ca31daa66c Mon Sep 17 00:00:00 2001 From: red031000 Date: Wed, 19 Feb 2025 01:31:56 +0000 Subject: [PATCH] rename arith.h to stdlib.h because apparently that affects codegen --- arm9/lib/MSL_C/include/MSL.h | 4 ++-- arm9/lib/MSL_C/include/arith.h | 6 ------ arm9/lib/MSL_C/include/stdlib.h | 8 ++++++++ arm9/lib/MSL_C/src/arith.c | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) delete mode 100644 arm9/lib/MSL_C/include/arith.h create mode 100644 arm9/lib/MSL_C/include/stdlib.h diff --git a/arm9/lib/MSL_C/include/MSL.h b/arm9/lib/MSL_C/include/MSL.h index a21bbc756..f3287f28e 100644 --- a/arm9/lib/MSL_C/include/MSL.h +++ b/arm9/lib/MSL_C/include/MSL.h @@ -3,8 +3,8 @@ //include all msl files here -#include "string.h" -#include "arith.h" #include "rand.h" +#include "stdlib.h" +#include "string.h" #endif //MSL_H diff --git a/arm9/lib/MSL_C/include/arith.h b/arm9/lib/MSL_C/include/arith.h deleted file mode 100644 index b998fb728..000000000 --- a/arm9/lib/MSL_C/include/arith.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEDIAMOND_MSL_C_ARITH_H -#define POKEDIAMOND_MSL_C_ARITH_H - -int abs(int val); - -#endif //POKEDIAMOND_MSL_C_ARITH_H diff --git a/arm9/lib/MSL_C/include/stdlib.h b/arm9/lib/MSL_C/include/stdlib.h new file mode 100644 index 000000000..21772e8b7 --- /dev/null +++ b/arm9/lib/MSL_C/include/stdlib.h @@ -0,0 +1,8 @@ +#ifndef POKEDIAMOND_MSL_C_STDLIB_H +#define POKEDIAMOND_MSL_C_STDLIB_H + +// this file MUST be called stdlib.h, as the filename affects matching for some reason + +int abs(int val); + +#endif // POKEDIAMOND_MSL_C_STDLIB_H diff --git a/arm9/lib/MSL_C/src/arith.c b/arm9/lib/MSL_C/src/arith.c index 33d315005..57373cca1 100644 --- a/arm9/lib/MSL_C/src/arith.c +++ b/arm9/lib/MSL_C/src/arith.c @@ -1,5 +1,5 @@ -#include "arith.h" #include "code32.h" +#include "stdlib.h" int abs(int val) { return val < 0 ? -val : val;