[LCP]list all defines

Andy Zivkovic andy at zivkotech.net.au
Fri Jul 13 12:36:06 UTC 2001


Thanks to all who replied.
At least one person seemed to not understand why I want to know what was
defined. it's so I can do this:

#if defined(__WIN32)
#include <headers needed for windows>

#elsif defined(__linux)
#include <headers needed for linux>

#elsif defined(__sun)
#include <headers needed for solaris>

#endif


since some platforms don't have some of the headers the other platforms
need, I can't include them all, because I'll just get an error and it won't
attempt to compile the program. The above gets around it, without having to
manually comment out certain lines each time I try it somewhere else.

thanks again,
Andy




More information about the linuxCprogramming mailing list