[PATCH v2 1/4] ucrtbase: Implement _calloc_base.

Alex Henrie alexhenrie24 at gmail.com
Thu Jun 16 19:02:23 CDT 2016


Cc: Piotr Caban <piotr at codeweavers.com>

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

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/msvcrt/heap.c                                              | 8 ++++++++
 dlls/ucrtbase/ucrtbase.spec                                     | 2 +-
 3 files changed, 10 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/msvcrt/heap.c b/dlls/msvcrt/heap.c
index 3fe0227..ae663de 100644
--- a/dlls/msvcrt/heap.c
+++ b/dlls/msvcrt/heap.c
@@ -406,6 +406,14 @@ void* CDECL MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size)
 }
 
 /*********************************************************************
+ *		_calloc_base (UCRTBASE.@)
+ */
+void* CDECL _calloc_base(MSVCRT_size_t count, MSVCRT_size_t size)
+{
+  return MSVCRT_calloc(count, size);
+}
+
+/*********************************************************************
  *		free (MSVCRT.@)
  */
 void CDECL MSVCRT_free(void* ptr)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 690072b..4ebf2c6 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)
 @ cdecl _cexit() MSVCRT__cexit
 @ cdecl _cgets(ptr)
 @ stub _cgets_s
-- 
2.8.3




More information about the wine-patches mailing list