From c3e721054822b6f2d099abb186c91518bc29be2c Mon Sep 17 00:00:00 2001 From: Nick Zitzmann Date: Tue, 30 Jul 2013 20:20:20 -0600 Subject: md5 & metalink: use better build macros on Apple operating systems Previously we used __MAC_10_X and __IPHONE_X to mark digest-generating code that was specific to OS X and iOS. Now we use __MAC_OS_X_VERSION_MAX_ALLOWED and __IPHONE_OS_VERSION_MAX_ALLOWED instead of those macros. Bug: http://sourceforge.net/p/curl/bugs/1255/ Reported by: Edward Rudd --- src/tool_metalink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/tool_metalink.c') diff --git a/src/tool_metalink.c b/src/tool_metalink.c index f9e9869b2..be5fc26c4 100644 --- a/src/tool_metalink.c +++ b/src/tool_metalink.c @@ -57,12 +57,15 @@ # ifdef HAVE_NSS_INITCONTEXT static NSSInitContext *nss_context; # endif -#elif defined(__MAC_10_4) || defined(__IPHONE_5_0) +#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \ + (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \ + (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \ + (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000)) /* For Apple operating systems: CommonCrypto has the functions we need. The library's headers are even backward-compatible with OpenSSL's headers as long as we define COMMON_DIGEST_FOR_OPENSSL first. - These functions are available on Tiger and later, as well as iOS 5.0 + These functions are available on Tiger and later, as well as iOS 2.0 and later. If you're building for an older cat, well, sorry. */ # define COMMON_DIGEST_FOR_OPENSSL # include -- cgit v1.2.3