I have code that I want to have two modes, debug and verbose. I define them in my header file as,
#define verbose TRUE
#def
#if defined(MACRO) is the same as #ifdef MACRO, but is longer. On the other hand it allows to add extra conditions with || or &&.
#if MACRO is similar to #ifdef MACRO but not 100%. If MACRO is 0 then #if MACRO will be negative - it requires MACRO to be defined and not be 0. #ifdef checks only whether it is defined even without value (#define MACRO).
Now is modern to use #if and enable/disable definitions with value 1 or 0:
#define FLAG_X 1 // or 0