headers: Remove workarounds for undeffing _aligned_malloc These workarounds stem from an earlier attempt to work around clashes between _mm_malloc and _mm_free with _aligned_malloc, see 228f1adee765b7ff16575b816ad07745d3f2bc9b for where the earlier "#define _aligned_malloc ..." workaround was removed. Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit f70a833750e95f4a3de8d37c9b6ba6403cea0e04)
diff --git a/mingw-w64-headers/crt/malloc.h b/mingw-w64-headers/crt/malloc.h index 24e3e56..e73b705 100644 --- a/mingw-w64-headers/crt/malloc.h +++ b/mingw-w64-headers/crt/malloc.h
@@ -53,7 +53,7 @@ extern unsigned int _amblksiz; /* Make sure that X86intrin.h doesn't produce here collisions. */ -#if (!defined (_XMMINTRIN_H_INCLUDED) && !defined (_MM_MALLOC_H_INCLUDED)) || defined(_aligned_malloc) +#if (!defined (_XMMINTRIN_H_INCLUDED) && !defined (_MM_MALLOC_H_INCLUDED)) #define __DO_ALIGN_DEFINES #endif @@ -61,13 +61,6 @@ #define _MM_MALLOC_H_INCLUDED #endif -#ifdef __DO_ALIGN_DEFINES -#pragma push_macro("_aligned_free") -#pragma push_macro("_aligned_malloc") -#undef _aligned_free -#undef _aligned_malloc -#endif - #define _mm_free(a) _aligned_free(a) #define _mm_malloc(a,b) _aligned_malloc(a,b) @@ -91,14 +84,6 @@ _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); #endif -#ifdef __DO_ALIGN_DEFINES -#undef __DO_ALIGN_DEFINES - -#pragma pop_macro("_aligned_malloc") -#pragma pop_macro("_aligned_free") - -#endif - /* Users should really use MS provided versions */ void * __mingw_aligned_malloc (size_t _Size, size_t _Alignment); void __mingw_aligned_free (void *_Memory);
diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h index f414f25..a0997c4 100644 --- a/mingw-w64-headers/crt/stdlib.h +++ b/mingw-w64-headers/crt/stdlib.h
@@ -532,15 +532,9 @@ void *__cdecl realloc(void *_Memory,size_t _NewSize); _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size); /* Make sure that X86intrin.h doesn't produce here collisions. */ -#if (!defined (_XMMINTRIN_H_INCLUDED) && !defined (_MM_MALLOC_H_INCLUDED)) || defined(_aligned_malloc) -#pragma push_macro("_aligned_free") -#pragma push_macro("_aligned_malloc") -#undef _aligned_free -#undef _aligned_malloc +#if (!defined (_XMMINTRIN_H_INCLUDED) && !defined (_MM_MALLOC_H_INCLUDED)) _CRTIMP void __cdecl _aligned_free(void *_Memory); _CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment); -#pragma pop_macro("_aligned_free") -#pragma pop_macro("_aligned_malloc") #endif _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset); _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);