1
0
mirror of https://git.code.sf.net/p/mingw-w64/mingw-w64 synced 2025-04-18 17:44:18 +03:00

headers: Add missing declaration for __mingw_aligned_offset_malloc()

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.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Pali Rohár 2025-04-08 00:20:42 +02:00 committed by Martin Storsjö
parent 1e8b1ccdd4
commit ecf5fdb410
2 changed files with 1 additions and 3 deletions

View File

@ -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)

View File

@ -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__)