Fix undefined behavior in some preprocessor define checks

Macros like the one below would produce undefined behavior when used as
expression/condition in #if preprocessor directives:
This patch replaces all such statements with a more verbose but
well-defined #if/#define x 1/#else/#define x 0/#endif

Found by clang (warning introduced in r258128), reported by Idwer.

Signed-off-by: Stefan Tauner <>
Acked-by: Carl-Daniel Hailfinger <>
2 files changed