msvcrt: implement memcpy in msvcrt instead of forwarding to ntdll (2/2) (resend)
Austin English
austinenglish at gmail.com
Thu Dec 13 22:03:21 CST 2012
--
-Austin
-------------- next part --------------
From b217ea20023c93e7c5868f80aeaa06470724d6af Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish at gmail.com>
Date: Thu, 13 Dec 2012 20:01:48 -0800
Subject: [PATCH 2/2] msvcrt: implement memcpy in msvcrt instead of forwarding
to ntdll (2/2) (resend)
---
dlls/msvcrt/msvcrt.spec | 2 +-
dlls/msvcrt/string.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index c4d0332..274554b 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -1338,7 +1338,7 @@
@ cdecl mbtowc(ptr str long) MSVCRT_mbtowc
@ cdecl memchr(ptr long long) ntdll.memchr
@ cdecl memcmp(ptr ptr long) ntdll.memcmp
-@ cdecl memcpy(ptr ptr long) ntdll.memcpy
+@ cdecl memcpy(ptr ptr long) MSVCRT_memcpy
@ cdecl memcpy_s(ptr long ptr long)
@ cdecl memmove(ptr ptr long) ntdll.memmove
@ cdecl memmove_s(ptr long ptr long)
diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index 1e46488..d8b5594 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -1605,3 +1605,15 @@ int CDECL MSVCRT_I10_OUTPUT(MSVCRT__LDOUBLE ld80, int prec, int flag, struct _I1
return 1;
}
#undef I10_OUTPUT_MAX_PREC
+
+/*********************************************************************
+ * memcpy (NTDLL.@)
+ *
+ * Note: Copied from NTDLL. Some applications using a custom import resolver
+ * failed when the function was forwarded to ntdll (which native does not do).
+ */
+void * __cdecl MSVCRT_memcpy( void *dst, const void *src, size_t n )
+{
+ return memmove( dst, src, n );
+}
+
--
1.7.8.6
More information about the wine-patches
mailing list