There is already declaration for msvcrt _aligned_offset_malloc() function,
so add export also declaration for mingw __mingw_aligned_offset_malloc()
function.
At the same time, remove also uneeded declaration of this function from
mingw-w64-crt/misc/mingw-aligned-malloc.c file and use the new one from
malloc.h.
---
mingw-w64-crt/misc/mingw-aligned-malloc.c | 3 ---
mingw-w64-headers/crt/malloc.h | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/mingw-w64-crt/misc/mingw-aligned-malloc.c
b/mingw-w64-crt/misc/mingw-aligned-malloc.c
index ca5f866e2f55..5029b6007842 100644
--- a/mingw-w64-crt/misc/mingw-aligned-malloc.c
+++ b/mingw-w64-crt/misc/mingw-aligned-malloc.c
@@ -18,9 +18,6 @@
#include <stdint.h> /* uintptr_t */
#include <string.h> /* memmove */
-/* Forward declarations: */
-void *__mingw_aligned_offset_malloc (size_t, size_t, size_t);
-
#define NOT_POWER_OF_TWO(n) (((n) & ((n) - 1)))
#define UI(p) ((uintptr_t) (p))
#define CP(p) ((char *) p)
diff --git a/mingw-w64-headers/crt/malloc.h b/mingw-w64-headers/crt/malloc.h
index 9c498c2918bd..cc72d4cac909 100644
--- a/mingw-w64-headers/crt/malloc.h
+++ b/mingw-w64-headers/crt/malloc.h
@@ -131,6 +131,7 @@ extern "C" {
void * __mingw_aligned_malloc (size_t _Size, size_t _Alignment);
void __mingw_aligned_free (void *_Memory);
void * __mingw_aligned_offset_realloc (void *_Memory, size_t _Size, size_t
_Alignment, size_t _Offset);
+void * __mingw_aligned_offset_malloc (size_t, size_t, size_t);
void * __mingw_aligned_realloc (void *_Memory, size_t _Size, size_t _Offset);
#if defined(__x86_64__) || defined(__i386__)
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public