GCC question
andrew clarke
mail at ozzmosis.com
Sun Sep 6 02:10:46 UTC 2015
On Sat 2015-09-05 08:34:27 UTC-0453, William A. Mahaffey III (wam at hiwaay.net) wrote:
>> I have some code which was originally SGI native, then moved to Linux
> (FC14 x86_64 & CentOS 5). I am now interested in getting it going under
> FreeBSD 9.3R. Due to differences in system header file includes, I need
> to tweek some of my app-specific header files. I have poked around the
> (*COPIOUS* !!!!) GCC man page & I couldn't find (or missed) either how
> to get it to regurgitate its default compiler-defines or a tabulation of
> those defines, so I can use them to conditionally include system headers
> in my own header files. Where is this info :-) ? TIA & have a nice
> (long) weekend.
You probably want:
gcc -dM -E - < /dev/null
Ordinarily to detect FreeBSD you'd use:
#ifdef __FreeBSD__
...
#endif
More information about the freebsd-questions
mailing list