[PATCH 4/4] ucrtbase: Forward _free_base to MSVCRT_free.

Alex Henrie alexhenrie24 at gmail.com
Tue Jun 14 13:28:15 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 free simply wraps _free_dbg
if _DEBUG is defined and _free_base if _DEBUG is not defined. Since Wine
will not be implementing _free_dbg because it is only available in debug
builds of the C runtime library, we can make _free_base wrap free
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 6dbd207..418926e 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
@@ -9,7 +9,7 @@
 @ cdecl _callnewh(long) ucrtbase._callnewh
 @ cdecl _calloc_base(long long) ucrtbase._calloc_base
 @ cdecl _expand(ptr long) ucrtbase._expand
-@ stub _free_base
+@ cdecl _free_base(ptr) ucrtbase._free_base
 @ cdecl _get_heap_handle() ucrtbase._get_heap_handle
 @ cdecl _heapchk() ucrtbase._heapchk
 @ cdecl _heapmin() ucrtbase._heapmin
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 4d9b25a..b87e4cb 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -333,7 +333,7 @@
 @ cdecl _fputwchar(long) MSVCRT__fputwchar
 @ cdecl _fread_nolock(ptr long long ptr) MSVCRT__fread_nolock
 @ cdecl _fread_nolock_s(ptr long long long ptr) MSVCRT__fread_nolock_s
-@ stub _free_base
+@ cdecl _free_base(ptr) MSVCRT_free
 @ cdecl _free_locale(ptr) MSVCRT__free_locale
 @ cdecl _fseek_nolock(ptr long long) MSVCRT__fseek_nolock
 @ cdecl _fseeki64(ptr int64 long) MSVCRT__fseeki64
-- 
2.8.3




More information about the wine-patches mailing list