how to use #ifdef with an OR condition?

Whoami picture Whoami · Mar 13, 2012 · Viewed 124.4k times · Source

Sorry for asking very basic question. I would like to set OR condition in #ifdef directive.? How to do that ? I tried

#ifdef LINUX | ANDROID
...
..
#endif 

It did not work? What is the proper way?

Answer

zvrba picture zvrba · Mar 13, 2012

Like this

#if defined(LINUX) || defined(ANDROID)