RE: Preprocessor variable for detecting platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dale,

> how do I determine what the appropriate preprocessor
variable that would indicate for example, being on a Linux platform vs
an AIX platform.

Refer to the GCC documentation for that platform, man gcc

Use this trick to view the predefined preprocessor identifiers
echo '' | gcc -E -dM -x c - | sort

Hopefully the relevant one is obvious.  (Sometimes there are a few that look appropriate, which requires a little more documentation diving investigation.)

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux