ruby-changes:61297
From: Nobuyoshi <ko1@a...>
Date: Wed, 20 May 2020 10:22:30 +0900 (JST)
Subject: [ruby-changes:61297] feb8dc55b6 (master): Include wchar.h before wrapping memchr
https://git.ruby-lang.org/ruby.git/commit/?id=feb8dc55b6 From feb8dc55b6d2acd8f87e0415af65ff861cc55828 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 19 May 2020 22:09:20 +0900 Subject: Include wchar.h before wrapping memchr On mingw, wmemcpy() is defined as an inline function using memcpy(), and the static inline wrapper causes a warning. ``` In file included from include/ruby/ruby.h:39, from win32/file.c:5: include/ruby/internal/memory.h:284:16: warning: 'ruby_nonempty_memcpy' is static but used in inline function 'wmemcpy' which is not static 284 | #define memcpy ruby_nonempty_memcpy | ^~~~~~~~~~~~~~~~~~~~ ``` diff --git a/win32/file.c b/win32/file.c index 133b5fb..a1b4098 100644 --- a/win32/file.c +++ b/win32/file.c @@ -2,12 +2,12 @@ https://github.com/ruby/ruby/blob/trunk/win32/file.c#L2 /* before stdio.h in ruby/define.h */ # define MINGW_HAS_SECURE_API 1 #endif +#include <wchar.h> #include "ruby/ruby.h" #include "ruby/encoding.h" #include "internal.h" #include "internal/error.h" #include <winbase.h> -#include <wchar.h> #include <shlwapi.h> #include "win32/file.h" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/