From 0aef3cbcdea6c71e1f875a9b195dae13bff62ecb Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Tue, 28 Jan 2025 14:50:46 -0600 Subject: [PATCH] Allow redundant defines in define aliases A bit ugly, but this seems necessary in order to allow defines that seem reasonable to provide together, such as -DLFS_NO_LOG and -DLFS_NO_DEBUG. This is useful for allowing define combinations that also work in older builds. --- lfs_util.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lfs_util.h b/lfs_util.h index 6405e35b..3a73b2e4 100644 --- a/lfs_util.h +++ b/lfs_util.h @@ -26,20 +26,38 @@ // LFS_BIGGEST enables all opt-in features #ifdef LFS_BIGGEST +#ifndef LFS_CKPROGS #define LFS_CKPROGS +#endif +#ifndef LFS_CKFETCHES #define LFS_CKFETCHES +#endif +#ifndef LFS_CKPARITY #define LFS_CKPARITY +#endif +#ifndef LFS_CKDATACKSUMS #define LFS_CKDATACKSUMS +#endif +#ifndef LFS_GC #define LFS_GC #endif +#endif // LFS_NO_LOG disables all logging macros #ifdef LFS_NO_LOG +#ifndef LFS_NO_DEBUG #define LFS_NO_DEBUG +#endif +#ifndef LFS_NO_INFO #define LFS_NO_INFO +#endif +#ifndef LFS_NO_WARN #define LFS_NO_WARN +#endif +#ifndef LFS_NO_ERROR #define LFS_NO_ERROR #endif +#endif // System includes