site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com /* * Data types. */ typedef u_char sa_family_t; #ifdef _BSD_SOCKLEN_T_ typedef _BSD_SOCKLEN_T_ socklen_t; #undef _BSD_SOCKLEN_T_ #endif Thanks.....Peter _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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? This email sent to site_archiver@lists.apple.com