diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-05-26 14:19:20 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-05-26 16:58:40 +0900 |
commit | 17d17de0e8891bba2ab509714fc52764eaeafd65 (patch) | |
tree | e11462db6cfca72f213016d15d5b0b6ee802b8e7 | |
parent | 04eb05a8e0456ee00fa7443803283b78337d6515 (diff) |
Get rid of redefinition of memcpy on mingw
-rw-r--r-- | include/ruby/internal/memory.h | 2 | ||||
-rw-r--r-- | win32/file.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/ruby/internal/memory.h b/include/ruby/internal/memory.h index 5214f2b391..0128a7f748 100644 --- a/include/ruby/internal/memory.h +++ b/include/ruby/internal/memory.h @@ -264,6 +264,7 @@ rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize) store, rbimpl_size_mul_or_raise(count, elsize), count); } +#ifndef __MINGW32__ RBIMPL_ATTR_NOALIAS() RBIMPL_ATTR_NONNULL((1)) RBIMPL_ATTR_RETURNS_NONNULL() @@ -282,5 +283,6 @@ ruby_nonempty_memcpy(void *dest, const void *src, size_t n) } #undef memcpy #define memcpy ruby_nonempty_memcpy +#endif #endif /* RBIMPL_MEMORY_H */ diff --git a/win32/file.c b/win32/file.c index a1b40984d0..133b5fbdb0 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" |