Re: Question about properly detecting the targeted Mac OS X build system.
Re: Question about properly detecting the targeted Mac OS X build system.
- Subject: Re: Question about properly detecting the targeted Mac OS X build system.
- From: Chris Espinosa <email@hidden>
- Date: Wed, 31 Oct 2007 08:23:30 -0700
On Oct 31, 2007, at 1:47 AM, Terry Simons wrote: I'm trying to work around an issue with a piece of code that isn't supported in Mac OS X 10.3.
My current workaround seems somewhat brute-force:
#ifdef __APPLE__ // We need to find something to replace the below sysconf call with #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 #warning Mac OS X 10.3 and earlier do not define _SC_GETGR_R_SIZE_MAX. #else buflen = sysconf(_SC_GETGR_R_SIZE_MAX); #endif #else buflen = sysconf(_SC_GETGR_R_SIZE_MAX); #endif
Am I handling this correct?
Yes. What's the proper manner to deal with this sort of thing?
It depends on what you're trying to do, if you want the code to compile for 10.4 and later but not for 10.3 this is a perfectly reasonable way to do it.
Chris |
_______________________________________________
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