[PATCH 2/4] ucrtbase: Forward _calloc_base to MSVCRT_calloc.

Alex Henrie alexhenrie24 at gmail.com
Tue Jun 14 13:28:13 CDT 2016


Cc: Piotr Caban <piotr at codeweavers.com>

For https://bugs.winehq.org/show_bug.cgi?id=40796

The Windows 10 SDK helpfully explains that calloc simply wraps
_calloc_dbg if _DEBUG is defined and _calloc_base if _DEBUG is not
defined. Since Wine will not be implementing _calloc_dbg because it is
only available in debug builds of the C runtime library, we can make
_calloc_base wrap calloc instead.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec | 2 +-
 dlls/ucrtbase/ucrtbase.spec                                     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec b/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec
index 18ca9d4..85b2b83 100644
--- a/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec
@@ -7,7 +7,7 @@
 @ cdecl _aligned_realloc(ptr long long) ucrtbase._aligned_realloc
 @ stub _aligned_recalloc
 @ cdecl _callnewh(long) ucrtbase._callnewh
-@ stub _calloc_base
+@ cdecl _calloc_base(long long) ucrtbase._calloc_base
 @ cdecl _expand(ptr long) ucrtbase._expand
 @ stub _free_base
 @ cdecl _get_heap_handle() ucrtbase._get_heap_handle
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 690072b..365674b 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -211,7 +211,7 @@
 @ cdecl _c_exit() MSVCRT__c_exit
 @ cdecl _cabs(long) MSVCRT__cabs
 @ cdecl _callnewh(long)
-@ stub _calloc_base
+@ cdecl _calloc_base(long long) MSVCRT_calloc
 @ cdecl _cexit() MSVCRT__cexit
 @ cdecl _cgets(ptr)
 @ stub _cgets_s
-- 
2.8.3




More information about the wine-patches mailing list