Re: #define DARWIN set by Xcode?
Re: #define DARWIN set by Xcode?
- Subject: Re: #define DARWIN set by Xcode?
- From: "Peter O'Gorman" <email@hidden>
- Date: Sun, 19 Nov 2006 20:18:04 +0900
On Nov 17, 2006, at 3:20 PM, Steve Checkoway wrote:
On Nov 16, 2006, at 9:33 PM, Rick Mann wrote:
What's the proper #define set by Xcode to indicate a build is
occurring on Darwin/Mac OS X?
$ gcc -dM -E -x c - <<<''|grep -i apple
#define __APPLE_CC__ 5363
#define __APPLE__ 1
#define __VERSION__ "4.0.1 (Apple Computer, Inc. build 5363)"
Well, it is probably best to roll your own define, if you can't, many
people seem to use:
#if defined(__APPLE__) && defined(__MACH__)
__APPLE__ is defined for builds on classic too, so may not limit the
conditional enough. __APPLE_CC__ is only defined for gcc on darwin,
someone may be using a different compiler.
Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden