diff options
| author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-02 09:18:58 +0800 |
|---|---|---|
| committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-02 09:18:58 +0800 |
| commit | ebfa1718a36a8a0f3cf4571bc48b1990129af703 (patch) | |
| tree | 02e26979473dbd94dd40eaf3b3f178eb479082e4 /ticket.c | |
| parent | 3cdd7f552d2d7b816901851a10aa61b65b365934 (diff) | |
Fix Android macro and tidy up
Diffstat (limited to 'ticket.c')
| -rw-r--r-- | ticket.c | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -1,3 +1,6 @@ +#if defined __ANDROID__ && defined DEBUG +#include <android/log.h> +#endif #include <stdlib.h> #include "post.h" #include "rtclient/ticket.h" @@ -93,13 +96,13 @@ static size_t history_handler(void *contents, size_t size, size_t nmemb } } else { #ifdef DEBUG -#ifdef ANDROID - __android_log_print(ANDROID_LOG_INFO, "librtclient" - , "%s response status:\n%s", __func__, line); +#ifdef __ANDROID__ + __android_log_print(ANDROID_LOG_INFO, "librtclient", + "%s response status:\n%s", __func__, line); #else printf("%s response status:\n%s\n", __func__, line); -#endif // ANDROID -#endif // DEBUG +#endif +#endif } return realsize; @@ -295,13 +298,13 @@ static size_t history_l_handler(void *contents, size_t size, size_t nmemb } } else { #ifdef DEBUG -#ifdef ANDROID - __android_log_print(ANDROID_LOG_INFO, "librtclient" - , "%s response status:\n%s", __func__, line); +#ifdef __ANDROID__ + __android_log_print(ANDROID_LOG_INFO, "librtclient", + "%s response status:\n%s", __func__, line); #else printf("%s response status:\n%s\n", __func__, line); -#endif // ANDROID -#endif // DEBUG +#endif +#endif } return realsize; |