Essentially I got four cases in existing code:
- macro ABC is unset
- macro ABC is set, but empty: #define ABCor-DABC
- macro ABC is set, and evaluates to true: #define ABC 1or-DABC=1
- macro ABC is set, and evaluates to false: #define ABC 0or-DABC=0
I want the 1st and 4th, and 2nd and 3rd case to be the same:
#if defined(ABC) && IS_EMPTY(ABC)
#   undef ABC
#   define ABC 1
#endif
#if !defined(ABC) || !(ABC)
#   undef ABC
#   define ABC 0
#endif
How do I do IS_EMPTY(X)?
 
    