Commit d36cbc4a authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

include/msvcrt: Add __WINE_(ALLOC_SIZE|DEALLOC|MALLOC) attributes to _aligned_malloc functions.

parent 3a688e81
......@@ -342,6 +342,12 @@ typedef struct threadlocaleinfostruct {
#define __WINE_CRT_SCANF_ATTR(fmt,args)
#endif
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
#define __WINE_ALLOC_SIZE(...) __attribute__((__alloc_size__(__VA_ARGS__)))
#else
#define __WINE_ALLOC_SIZE(...)
#endif
#if defined(__GNUC__) && (__GNUC__ > 10)
#define __WINE_DEALLOC(...) __attribute__((malloc (__VA_ARGS__)))
#else
......
......@@ -36,10 +36,10 @@ _ACRTIMP void* __cdecl _expand(void*,size_t);
_ACRTIMP size_t __cdecl _msize(void*);
_ACRTIMP void __cdecl _aligned_free(void*);
_ACRTIMP void* __cdecl _aligned_malloc(size_t,size_t);
_ACRTIMP void* __cdecl _aligned_offset_malloc(size_t,size_t,size_t);
_ACRTIMP void* __cdecl _aligned_realloc(void*,size_t,size_t);
_ACRTIMP void* __cdecl _aligned_offset_realloc(void*,size_t,size_t,size_t);
_ACRTIMP void* __cdecl _aligned_malloc(size_t,size_t) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(_aligned_free) __WINE_MALLOC;
_ACRTIMP void* __cdecl _aligned_offset_malloc(size_t,size_t,size_t) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(_aligned_free) __WINE_MALLOC;
_ACRTIMP void* __cdecl _aligned_realloc(void*,size_t,size_t) __WINE_ALLOC_SIZE(2) __WINE_DEALLOC(_aligned_free);
_ACRTIMP void* __cdecl _aligned_offset_realloc(void*,size_t,size_t,size_t) __WINE_ALLOC_SIZE(2) __WINE_DEALLOC(_aligned_free);
#ifdef __cplusplus
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment