From a8eaa2f2e560547e63c7976960435e1ae23a22b1 Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 12 Apr 2017 10:24:56 +0000 Subject: a patch from Bjørnar Luteberget for compatibility with MSVC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/runtime/c/gu/string.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/runtime/c/gu/string.c') diff --git a/src/runtime/c/gu/string.c b/src/runtime/c/gu/string.c index 5a31c8806..3e754a72c 100644 --- a/src/runtime/c/gu/string.c +++ b/src/runtime/c/gu/string.c @@ -5,7 +5,7 @@ #include #include #include -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(_MSC_VER) #include #endif @@ -273,7 +273,7 @@ gu_string_eq_fn(GuEquality* self, const void* p1, const void* p2) return strcmp((GuString) p1, (GuString) p2) == 0; } -GuEquality gu_string_equality[1] = { { gu_string_eq_fn } }; +GU_API_DATA GuEquality gu_string_equality[1] = { { gu_string_eq_fn } }; static int gu_string_cmp_fn(GuOrder* self, const void* p1, const void* p2) @@ -282,7 +282,7 @@ gu_string_cmp_fn(GuOrder* self, const void* p1, const void* p2) return strcmp((GuString) p1, (GuString) p2); } -GuOrder gu_string_order[1] = { { gu_string_cmp_fn } }; +GU_API_DATA GuOrder gu_string_order[1] = { { gu_string_cmp_fn } }; static GuHash gu_string_hasher_hash(GuHasher* self, const void* p) @@ -291,7 +291,7 @@ gu_string_hasher_hash(GuHasher* self, const void* p) return gu_string_hash(0, (GuString) p); } -GuHasher gu_string_hasher[1] = { +GU_API_DATA GuHasher gu_string_hasher[1] = { { .eq = { gu_string_eq_fn }, .hash = gu_string_hasher_hash -- cgit v1.2.3