From 91cbcfd38981012ccd3146850884a5b33192b324 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Fri, 30 Jan 2026 13:10:25 -0600 Subject: [PATCH] util: Defined LFS3_STRINGIFY unconditionally This was already made unconditional upstream as a part of LFS_DEFINES support. We should try to avoid conditional definitions that depend on unintuitive conditions (LFS3_CFG in this case). It just makes the whole codebase more fragile. --- lfs3_util.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lfs3_util.h b/lfs3_util.h index 467fd1f5..d5b3e069 100644 --- a/lfs3_util.h +++ b/lfs3_util.h @@ -8,6 +8,9 @@ #ifndef LFS3_UTIL_H #define LFS3_UTIL_H +#define LFS3_STRINGIFY_(x) #x +#define LFS3_STRINGIFY(x) LFS3_STRINGIFY_(x) + // Users can override lfs3_util.h with their own configuration by defining // LFS3_CFG as a header file to include (-DLFS3_CFG=my_cfg.h). // @@ -15,9 +18,7 @@ // provided by the config file. To start, I would suggest copying lfs3_util.h // and modifying as needed. #ifdef LFS3_CFG -#define LFS3_STRINGIZE(x) LFS3_STRINGIZE2(x) -#define LFS3_STRINGIZE2(x) #x -#include LFS3_STRINGIZE(LFS3_CFG) +#include LFS3_STRINGIFY(LFS3_CFG) #else