use SDL2's platform defines to normalise platform guards

This commit is contained in:
IntelOrca committed 2016-01-14 20:12:43 +00:00
1 parent e68ae821db
commit cdee534eb1
21 files changed
+83 -65

No files matched your search

+5 -4
View File
@@ -10,11 +10,12 @@ void http_dispose() { }
#else
#include <SDL.h>
#include "../core/Math.hpp"
// cURL includes windows.h, but we don't need all of it.
#define WIN32_LEAN_AND_MEAN
#ifdef __WINDOWS__
// cURL includes windows.h, but we don't need all of it.
#define WIN32_LEAN_AND_MEAN
#endif
#include <curl/curl.h>
#define MIME_TYPE_APPLICATION_JSON "application/json"
@@ -117,7 +118,7 @@ http_json_response *http_request_json(const http_json_request *request)
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, true);
#ifdef _WIN32
#ifdef __WINDOWS__
// On GNU/Linux (and OS X), curl will use the system certs by default
curl_easy_setopt(curl, CURLOPT_CAINFO, "curl-ca-bundle.crt");
#endif