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.
This commit is contained in:
Christopher Haster
2026-01-30 13:10:25 -06:00
parent 85b7a48df7
commit 91cbcfd389
+4 -3
View File
@@ -8,6 +8,9 @@
#ifndef LFS3_UTIL_H #ifndef LFS3_UTIL_H
#define 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 // 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). // 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 // provided by the config file. To start, I would suggest copying lfs3_util.h
// and modifying as needed. // and modifying as needed.
#ifdef LFS3_CFG #ifdef LFS3_CFG
#define LFS3_STRINGIZE(x) LFS3_STRINGIZE2(x) #include LFS3_STRINGIFY(LFS3_CFG)
#define LFS3_STRINGIZE2(x) #x
#include LFS3_STRINGIZE(LFS3_CFG)
#else #else