From: Martin S. <ma...@ma...> - 2020-12-04 07:45:00
|
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ö <ma...@ma...> --- mingw-w64-headers/crt/malloc.h | 17 +---------------- mingw-w64-headers/crt/stdlib.h | 8 +------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/mingw-w64-headers/crt/malloc.h b/mingw-w64-headers/crt/malloc.h index 24e3e5647..e73b70597 100644 --- a/mingw-w64-headers/crt/malloc.h +++ b/mingw-w64-headers/crt/malloc.h @@ -53,7 +53,7 @@ extern "C" { 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 @@ extern "C" { #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 @@ extern "C" { _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 f414f2507..a0997c464 100644 --- a/mingw-w64-headers/crt/stdlib.h +++ b/mingw-w64-headers/crt/stdlib.h @@ -532,15 +532,9 @@ float __cdecl __MINGW_NOTHROW strtof(const char * __restrict__ _Str,char ** __re 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); -- 2.17.1 |