mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-24 18:50:05 +00:00
begin_code.h: add gcc version checks to the alloc_size attributes.
This commit is contained in:
parent
4b6390261b
commit
14b902faca
@ -172,16 +172,17 @@
|
||||
#ifndef SDL_MALLOC
|
||||
#if defined(__GNUC__)
|
||||
#define SDL_MALLOC __attribute__((malloc))
|
||||
// FIXME
|
||||
//#elif defined(_MSC_VER)
|
||||
//#define SDL_MALLOC __declspec(allocator) __desclspec(restrict)
|
||||
/* FIXME
|
||||
#elif defined(_MSC_VER)
|
||||
#define SDL_MALLOC __declspec(allocator) __desclspec(restrict)
|
||||
*/
|
||||
#else
|
||||
#define SDL_MALLOC
|
||||
#endif
|
||||
#endif /* SDL_MALLOC not defined */
|
||||
|
||||
#ifndef SDL_ALLOC_SIZE
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
||||
#define SDL_ALLOC_SIZE(p) __attribute__((alloc_size(p)))
|
||||
#elif defined(_MSC_VER)
|
||||
#define SDL_ALLOC_SIZE(p)
|
||||
@ -191,7 +192,7 @@
|
||||
#endif /* SDL_ALLOC_SIZE not defined */
|
||||
|
||||
#ifndef SDL_ALLOC_SIZE2
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
||||
#define SDL_ALLOC_SIZE2(p1, p2) __attribute__((alloc_size(p1, p2)))
|
||||
#elif defined(_MSC_VER)
|
||||
#define SDL_ALLOC_SIZE2(p1, p2)
|
||||
|
Loading…
Reference in New Issue
Block a user