From f7aa9cb0c589482602ab6eaedf61a6854e2bec4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=C3=A4schle?= Date: Fri, 18 Sep 2020 11:51:55 +0200 Subject: [PATCH] vlib: fix C warning for UNICODE macro redefinition on windows (#6415) --- vlib/v/gen/cheaders.v | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vlib/v/gen/cheaders.v b/vlib/v/gen/cheaders.v index 23082f6a01..8eed5626b6 100644 --- a/vlib/v/gen/cheaders.v +++ b/vlib/v/gen/cheaders.v @@ -28,7 +28,7 @@ const ( #define __NOINLINE __attribute__((noinline)) #define __IRQHANDLER __attribute__((interrupt)) -#if defined(__x86_64__) +#if defined(__x86_64__) #define __V_amd64 1 #endif #if defined(__aarch64__) || defined(__arm64__) @@ -38,7 +38,7 @@ const ( // Using just __GNUC__ for detecting gcc, is not reliable because other compilers define it too: #ifdef __GNUC__ #define __V_GCC__ -#endif +#endif #ifdef __TINYC__ #undef __V_GCC__ #endif @@ -187,8 +187,12 @@ $c_common_macros #endif #define _WIN32_WINNT 0x0600 #define WIN32_LEAN_AND_MEAN + #ifndef _UNICODE #define _UNICODE + #endif + #ifndef UNICODE #define UNICODE + #endif #include #include // _waccess