diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-06-04 14:32:25 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-06-04 14:32:25 +0800 |
commit | 4d76449e7f45d125b8427e63e06d733ee73a84c4 (patch) | |
tree | 4f7eaa14aaeb82957e931f547c409e9f4a22b38e /request.h | |
parent | 4195a7f93387a60fb3c8a37d7a14189728a57e7b (diff) |
Android configure wrappers
Diffstat (limited to 'request.h')
-rw-r--r-- | request.h | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1,7 +1,7 @@ #ifndef ICCLIENT_REQUEST_H #define ICCLIENT_REQUEST_H -#if defined(ANDROID) && defined(DEBUG) +#if defined __ANDROID__ && defined DEBUG #include <android/log.h> #endif #include <string.h> @@ -77,19 +77,18 @@ inline void request(size_t (*writefunction)(void *, size_t, size_t, void *), #ifdef DEBUG CURLcode res = -#endif // DEBUG +#endif curl_easy_perform(curl); #ifdef DEBUG if (res != CURLE_OK) { const char *error = curl_easy_strerror(res); -#ifdef ANDROID - __android_log_print(ANDROID_LOG_ERROR, "libicclient", "%s: %s", __func__, - error); +#ifdef __ANDROID__ + __android_log_print(ANDROID_LOG_ERROR, "libicclient.so", "%s: %s", __func__, error); #else fprintf(stderr, "%s: %s\n", __func__, error); -#endif // ANDROID +#endif } -#endif // DEBUG +#endif } -#endif // ICCLIENT_REQUEST_H +#endif |