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: Mac OS X version at compile-time




On 6 Oct 2004, at 23:23, Peter Lovell wrote:

Does anyone know of a convenient way to determine at compile-time (C preprocessor time, actually) which version of headers are being used? I know there are macros in "AvailabilityMacros.h" but that's not applicable to the problem I have.
...
In early versions, there is not typedef for "socklen_t".
...
So, is there a #define somewhere which I can test?? Or a more appropriate solution?

Generally it's considered better practice to test for exactly the functionliaty that you require. Does your project have a configure script? If so, you could make that check of socklen_t is defined, and conditionally typedef it if needs be.


 -- Finlay

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Mac OS X version at compile-time (From: Peter Lovell <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.