• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question about properly detecting the targeted Mac OS X build system.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Question about properly detecting the targeted Mac OS X build system. (From: Terry Simons <email@hidden>)

  • Prev by Date: Re: Any way to get tiny "clear console" button back?
  • Next by Date: Re: #include file not found for ppc, found for Intel
  • Previous by thread: Question about properly detecting the targeted Mac OS X build system.
  • Next by thread: llvm?
  • Index(es):
    • Date
    • Thread