From 5641227c9ba1da7dd69f0c3b4a5a024339340d88 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Tue, 7 Nov 2017 16:21:52 +0200 Subject: [PATCH 1/2] strerror_override: re-organize strerror_override.h Always include before _json_c_strerror() definition. Should fix linker issues on MSVC. Signed-off-by: Alexandru Ardelean --- strerror_override.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strerror_override.h b/strerror_override.h index 15d8320..5c087f3 100644 --- a/strerror_override.h +++ b/strerror_override.h @@ -10,12 +10,12 @@ extern "C" { #endif +#include + JSON_EXPORT char *_json_c_strerror(int errno_in); #ifndef STRERROR_OVERRIDE_IMPL #define strerror _json_c_strerror -#else -#include #endif #ifdef __cplusplus From 03f3b95248cf82e35bee73f617d0ebfc37af7ef8 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Tue, 7 Nov 2017 16:50:58 +0200 Subject: [PATCH 2/2] json_util: define `strtoll` as _strtoi64 for MSVC Got the idea from this blog post: http://www.enchantedage.com/node/231 Simple & concise stuff :) Signed-off-by: Alexandru Ardelean --- json_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/json_util.c b/json_util.c index 00cdc30..c7c2325 100644 --- a/json_util.c +++ b/json_util.c @@ -39,6 +39,7 @@ #endif /* HAVE_UNISTD_H */ #ifdef WIN32 +# define strtoll _strtoi64 # define WIN32_LEAN_AND_MEAN # include # include