Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what defines do I look for?



On Tuesday, March 12, 2002, at 09:53 AM, Benjamin Reed wrote:
Peter O'Gorman [email@hidden] wrote:
Define _DARWIN_ somewhere in the Makefile, or stick with _APPLE_...

Look at the output of
cc -v -E /dev/null

to see what defines you have to play with.

Ahh, that helps, thanks.

Looking at them, perhaps it's better to do:

#if (defined(__APPLE__) && defined(__MACH__))

Making broad generalizations about what is included in an Apple-developed, Mach-based, system is probably not what you want.


You should stick to the specifics. In other words, if you are trying to deal with non-existence of say, poll(2), on the system, then ifdef specifically for that. Try not to paint such a broad brush, as the specifics will change (but __APPLE__ and __MACH__ will not).

--Jim
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.



References: 
 >Re: what defines do I look for? (From: Benjamin Reed <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.