#if with logical operators

 
#ifdef X || Y

Compiles, but do not work

#if defined(X) || defined(y)

 Does not compile. ('#if' - invalid preprocessor command)

 

There's a way to do that? 

Reason: