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]

RE: Preprocessor variable for detecting platform


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]