1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
      |                ^~~~~~~~~~~~~~~~~~~~
```
This commit is contained in:
Nobuyoshi Nakada 2020-05-19 22:09:20 +09:00
parent 5e81e8675a
commit feb8dc55b6
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -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"