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.
I'm trying to adapt an open-source project for Max OS X. This will then
be built by various developers as needed, on varying OSs and versions.
Most of this is OK but I ran into a problem with a change to
<sys/socket.h>
In early versions, there is not typedef for "socklen_t". But in OS X
10.2 and later, there is this definition ...
So, my code which includes <sys/socket.h> cannot determine whether it
is defined or not. I think an easy solution for this would have been to
add
#define SOCKLEN_T_DEFINED
in the block, but that opportunity has passed us by. The only way I can
see is to check the version of the headers being used.
So, is there a #define somewhere which I can test?? Or a more
appropriate solution?
Thanks.....Peter
_______________________________________________
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