From: Fletcher T. Penney Date: Tue, 5 Mar 2019 00:03:54 +0000 (-0500) Subject: UPDATED: Automatically disable libCurl on iOS X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1298f11410fdf33dec0a04070af104e763f993e9;p=multimarkdown UPDATED: Automatically disable libCurl on iOS --- diff --git a/Sources/libMultiMarkdown/epub.c b/Sources/libMultiMarkdown/epub.c index 1a47e76..e16a51f 100644 --- a/Sources/libMultiMarkdown/epub.c +++ b/Sources/libMultiMarkdown/epub.c @@ -58,6 +58,21 @@ #include #include +#ifdef __APPLE__ + #include "TargetConditionals.h" + #if TARGET_IPHONE_SIMULATOR + // iOS Simulator + #undef USE_CURL + #elif TARGET_OS_IPHONE + // iOS device + #undef USE_CURL + #elif TARGET_OS_MAC + // Other kinds of Mac OS + #else + # error "Unknown Apple platform" + #endif +#endif + #ifdef USE_CURL #include #endif diff --git a/Sources/libMultiMarkdown/opendocument.c b/Sources/libMultiMarkdown/opendocument.c index ba0239c..c34ce8a 100644 --- a/Sources/libMultiMarkdown/opendocument.c +++ b/Sources/libMultiMarkdown/opendocument.c @@ -101,6 +101,21 @@ */ +#ifdef __APPLE__ + #include "TargetConditionals.h" + #if TARGET_IPHONE_SIMULATOR + // iOS Simulator + #undef USE_CURL + #elif TARGET_OS_IPHONE + // iOS device + #undef USE_CURL + #elif TARGET_OS_MAC + // Other kinds of Mac OS + #else + # error "Unknown Apple platform" + #endif +#endif + #ifdef USE_CURL #include #endif diff --git a/Sources/libMultiMarkdown/textbundle.c b/Sources/libMultiMarkdown/textbundle.c index 88b83e0..44e67ba 100644 --- a/Sources/libMultiMarkdown/textbundle.c +++ b/Sources/libMultiMarkdown/textbundle.c @@ -105,6 +105,21 @@ #include #include +#ifdef __APPLE__ + #include "TargetConditionals.h" + #if TARGET_IPHONE_SIMULATOR + // iOS Simulator + #undef USE_CURL + #elif TARGET_OS_IPHONE + // iOS device + #undef USE_CURL + #elif TARGET_OS_MAC + // Other kinds of Mac OS + #else + # error "Unknown Apple platform" + #endif +#endif + #ifdef USE_CURL #include #endif