CONFIG_FEATURE_ versus ENABLE_FEATURE_

Robert P. J. Day rpjday at mindspring.com
Thu Apr 6 13:30:50 UTC 2006


  is there a recipe for the proper usage of macros CONFIG_FEATURE_x
versus ENABLE_FEATURE_x?  superficially, it's obvious that the
"CONFIG" macros are to be used in preprocessor directives, while the
"ENABLE" ones are to be used in actual C code, but that's not always
followed.

  as an example, in the util-linux/ directory, we have the following
examples:

	dmesg.c:	if (ENABLE_FEATURE_CLEAN_UP) {
	fsck_minix.c:	#ifdef CONFIG_FEATURE_CLEAN_UP
	mount.c:	#if ENABLE_FEATURE_CLEAN_UP		????

is there no way this can be simplified, perhaps down to a single set
of macros for both purposes?

rday



More information about the busybox mailing list