diff options
author | Marat Dukhan <maratek@gmail.com> | 2018-02-19 22:43:26 -0800 |
---|---|---|
committer | Marat Dukhan <maratek@gmail.com> | 2018-02-19 22:48:12 -0800 |
commit | b2fc4ab8099b802de934f24adf2da6e4c863bd3c (patch) | |
tree | e2e22022cc4d4d1de9eba0e6628f127e7e8806ee /src/log.c | |
parent | a9e55a6afde89722af7ee30dc7bd27435e96226b (diff) | |
download | cpuinfo-b2fc4ab8099b802de934f24adf2da6e4c863bd3c.tar.gz |
Windows support
Diffstat (limited to 'src/log.c')
-rw-r--r-- | src/log.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,6 +1,8 @@ #include <stdarg.h> #include <stdio.h> -#include <unistd.h> +#ifndef _WIN32 + #include <unistd.h> +#endif #include <log.h> @@ -9,7 +11,7 @@ va_list args; va_start(args, format); - #ifdef __ANDROID__ + #if defined(__ANDROID__) || defined(_WIN32) fprintf(stderr, "Error: "); vfprintf(stderr, format, args); fprintf(stderr, "\n"); @@ -29,7 +31,7 @@ va_list args; va_start(args, format); - #ifdef __ANDROID__ + #if defined(__ANDROID__) || defined(_WIN32) fprintf(stderr, "Warning: "); vfprintf(stderr, format, args); fprintf(stderr, "\n"); @@ -49,7 +51,7 @@ va_list args; va_start(args, format); - #ifdef __ANDROID__ + #if defined(__ANDROID__) || defined(_WIN32) printf("Note: "); vprintf(format, args); printf("\n"); @@ -68,7 +70,7 @@ va_list args; va_start(args, format); - #ifdef __ANDROID__ + #if defined(__ANDROID__) || defined(_WIN32) printf("Debug: "); vprintf(format, args); printf("\n"); |