diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-05-19 22:09:20 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-05-19 22:09:34 +0900 |
commit | feb8dc55b6d2acd8f87e0415af65ff861cc55828 (patch) | |
tree | 896c87887a4b2fbf4fed1c4968b9001118113640 /win32/file.c | |
parent | 5e81e8675a020ecd493620a4ff38db8fcf4b972a (diff) |
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
| ^~~~~~~~~~~~~~~~~~~~
```
Diffstat (limited to 'win32/file.c')
-rw-r--r-- | win32/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/file.c b/win32/file.c index 133b5fbdb0..a1b40984d0 100644 --- a/win32/file.c +++ b/win32/file.c @@ -2,12 +2,12 @@ /* 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" |