]> granicus.if.org Git - multimarkdown/commitdiff
UPDATED: Automatically disable libCurl on iOS
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 5 Mar 2019 00:03:54 +0000 (19:03 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 5 Mar 2019 00:03:54 +0000 (19:03 -0500)
Sources/libMultiMarkdown/epub.c
Sources/libMultiMarkdown/opendocument.c
Sources/libMultiMarkdown/textbundle.c

index 1a47e76fefbd476e4dc8423ff8dd17969193066f..e16a51f11abf2d3c39e0856b733a598ca169a134 100644 (file)
 #include <stdlib.h>
 #include <sys/stat.h>
 
+#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 <curl/curl.h>
 #endif
index ba0239c716d019ffad3a6beb62d338140b22f058..c34ce8abedcdbae4fb5d12d5601f0356d161d166 100644 (file)
 
 */
 
+#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 <curl/curl.h>
 #endif
index 88b83e0daecceaf04a730c4097e0cd34128e52d8..44e67badb4b30ec5853a56fd7845288c9b293f62 100644 (file)
 #include <stdlib.h>
 #include <sys/stat.h>
 
+#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 <curl/curl.h>
 #endif