Skip to content

Commit 6fb9211

Browse files
committed
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.
1 parent 30d9143 commit 6fb9211

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lfs_util.h

+18
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,38 @@
2626

2727
// LFS_BIGGEST enables all opt-in features
2828
#ifdef LFS_BIGGEST
29+
#ifndef LFS_CKPROGS
2930
#define LFS_CKPROGS
31+
#endif
32+
#ifndef LFS_CKFETCHES
3033
#define LFS_CKFETCHES
34+
#endif
35+
#ifndef LFS_CKPARITY
3136
#define LFS_CKPARITY
37+
#endif
38+
#ifndef LFS_CKDATACKSUMS
3239
#define LFS_CKDATACKSUMS
40+
#endif
41+
#ifndef LFS_GC
3342
#define LFS_GC
3443
#endif
44+
#endif
3545

3646
// LFS_NO_LOG disables all logging macros
3747
#ifdef LFS_NO_LOG
48+
#ifndef LFS_NO_DEBUG
3849
#define LFS_NO_DEBUG
50+
#endif
51+
#ifndef LFS_NO_INFO
3952
#define LFS_NO_INFO
53+
#endif
54+
#ifndef LFS_NO_WARN
4055
#define LFS_NO_WARN
56+
#endif
57+
#ifndef LFS_NO_ERROR
4158
#define LFS_NO_ERROR
4259
#endif
60+
#endif
4361

4462

4563
// System includes

0 commit comments

Comments
 (0)