#define CFG_ADD(TYPE,NAME,STUFF) \ #ifndef USING_ ## TYPE /* does not work */ \ #define USING_ ## TYPE /* does not work */ \ #endif #include "configfile.h" #undef CFG_ADD /* and later: */ #ifdef USING_int static int compare_int(const void * a, const void * b); #endif #ifdef USING_double static int compare_double(const void * a, const void * b); #endif /* further down */ #ifdef USING_int static int compare_int(const void * a, const void * b) { /* ... */ } #endif #ifdef USING_double static int compare_double(const void * a, const void * b) { /* ... */ } #endif