https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3ff17d5d7102be885fdb8…
commit 3ff17d5d7102be885fdb8919c79a0b571593b7b5
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Thu Dec 28 19:46:53 2017 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Feb 2 14:58:08 2023 +0100
[WINESYNC] msvcrt: Don't include MSVC 8.0+ heap functions in SOs for older DLLs.
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 42ab0af66b74f7572db2f6d0256f49fae7527221 by Alex Henrie
<alexhenrie24(a)gmail.com>
---
sdk/lib/crt/wine/heap.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/sdk/lib/crt/wine/heap.c b/sdk/lib/crt/wine/heap.c
index a1c86c5f2db..9c6ed0e053a 100644
--- a/sdk/lib/crt/wine/heap.c
+++ b/sdk/lib/crt/wine/heap.c
@@ -397,8 +397,9 @@ MSVCRT_size_t CDECL _msize(void* mem)
return size;
}
+#if _MSVCR_VER>=80
/*********************************************************************
- * _aligned_msize (MSVCR100.@)
+ * _aligned_msize (MSVCR80.@)
*/
size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offset)
{
@@ -412,6 +413,7 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment,
MSVCRT_size_t offs
alloc_ptr = SAVED_PTR(p);
return _msize(*alloc_ptr)-alignment-sizeof(void*);
}
+#endif
/*********************************************************************
* calloc (MSVCRT.@)
@@ -429,6 +431,7 @@ void* CDECL MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size)
return msvcrt_heap_alloc(HEAP_ZERO_MEMORY, bytes);
}
+#if _MSVCR_VER>=140
/*********************************************************************
* _calloc_base (UCRTBASE.@)
*/
@@ -436,6 +439,7 @@ void* CDECL _calloc_base(MSVCRT_size_t count, MSVCRT_size_t size)
{
return MSVCRT_calloc(count, size);
}
+#endif
/*********************************************************************
* free (MSVCRT.@)
@@ -445,6 +449,7 @@ void CDECL MSVCRT_free(void* ptr)
msvcrt_heap_free(ptr);
}
+#if _MSVCR_VER>=140
/*********************************************************************
* _free_base (UCRTBASE.@)
*/
@@ -452,6 +457,7 @@ void CDECL _free_base(void* ptr)
{
msvcrt_heap_free(ptr);
}
+#endif
/*********************************************************************
* malloc (MSVCRT.@)
@@ -464,6 +470,7 @@ void* CDECL MSVCRT_malloc(MSVCRT_size_t size)
return ret;
}
+#if _MSVCR_VER>=140
/*********************************************************************
* _malloc_base (UCRTBASE.@)
*/
@@ -471,6 +478,7 @@ void* CDECL _malloc_base(MSVCRT_size_t size)
{
return MSVCRT_malloc(size);
}
+#endif
/*********************************************************************
* realloc (MSVCRT.@)
@@ -483,6 +491,7 @@ void* CDECL MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
return NULL;
}
+#if _MSVCR_VER>=140
/*********************************************************************
* _realloc_base (UCRTBASE.@)
*/
@@ -490,9 +499,11 @@ void* CDECL _realloc_base(void* ptr, MSVCRT_size_t size)
{
return MSVCRT_realloc(ptr, size);
}
+#endif
+#if _MSVCR_VER>=80
/*********************************************************************
- * _recalloc (MSVCR100.@)
+ * _recalloc (MSVCR80.@)
*/
void* CDECL _recalloc(void *mem, MSVCRT_size_t num, MSVCRT_size_t size)
{
@@ -515,6 +526,7 @@ void* CDECL _recalloc(void *mem, MSVCRT_size_t num, MSVCRT_size_t
size)
memset((BYTE*)ret+old_size, 0, size-old_size);
return ret;
}
+#endif
/*********************************************************************
* __p__amblksiz (MSVCRT.@)
@@ -763,6 +775,7 @@ int CDECL MSVCRT_memmove_s(void *dest, MSVCRT_size_t numberOfElements,
const voi
return 0;
}
+#if _MSVCR_VER>=100
/*********************************************************************
* wmemmove_s (MSVCR100.@)
*/
@@ -785,6 +798,7 @@ int CDECL wmemmove_s(MSVCRT_wchar_t *dest, MSVCRT_size_t
numberOfElements,
memmove(dest, src, sizeof(MSVCRT_wchar_t)*count);
return 0;
}
+#endif
/*********************************************************************
* memcpy_s (MSVCRT.@)
@@ -812,6 +826,7 @@ int CDECL MSVCRT_memcpy_s(void *dest, MSVCRT_size_t numberOfElements,
const void
return 0;
}
+#if _MSVCR_VER>=100
/*********************************************************************
* wmemcpy_s (MSVCR100.@)
*/
@@ -837,6 +852,7 @@ int CDECL wmemcpy_s(MSVCRT_wchar_t *dest, MSVCRT_size_t
numberOfElements,
memcpy(dest, src, sizeof(MSVCRT_wchar_t)*count);
return 0;
}
+#endif
/*********************************************************************
* strncpy_s (MSVCRT.@)