This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

which macro does gcc define beforehand ?


Hi all,

I'm trying to find a macro for each platform I intend to use gcc.
On windows platform, _WIN32 is defined,
__APPLE__ or MACOSX are defined for the apple (powerpc) platforms.
I would like to find one macro for the solaris platform, which will be different than a linux one.

Basically, I'd like to do that
#ifdef __THE_MACRO__
#  define __MY_APP_PLATFORM_1__
#elif defined(__ANOTHER_MACRO__)
#  define __MY_APP_PLATFORM_2__
#endif
etc...
(It's somehow my way to "detect" which platform I'm running on.
If anyone has a better suggestion, feel free to tell me :) )

Thanks

@ + Daz

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]