From 193c8c73834b701f93c421fc88a2ecb715fd6fe5 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 27 Jul 2005 06:55:36 +0000 Subject: #ifdef reduction infrastructure, based on an argument between Shaun Jackman, Rob Landley, and others. Currently CONFIG options are defined or undefined, so we chop out code with #ifdefs, ala: #ifdef CONFIG_THING stuff(); #endif This creates a new header file, bb_config.h, which sets the CONFIG entry to 1 or 0, and lets us do: if(CONFIG_THING) stuff(); And let the compiler do dead code elimination to get rid of it. (Note: #ifdef will still work because for the 1 case it's a static const int, not a #define.) --- include/libbb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index 1aa7b41bd..a544465fe 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -41,7 +41,7 @@ #include -#include "config.h" +#include "bb_config.h" #ifdef CONFIG_SELINUX #include #endif -- cgit v1.2.3