mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
The alloc_size attribute isn't supported in clang 3.x
This commit is contained in:
@@ -182,7 +182,7 @@
|
|||||||
#endif /* SDL_MALLOC not defined */
|
#endif /* SDL_MALLOC not defined */
|
||||||
|
|
||||||
#ifndef SDL_ALLOC_SIZE
|
#ifndef SDL_ALLOC_SIZE
|
||||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
#if (defined(__clang__) && __clang_major__ >= 4) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
||||||
#define SDL_ALLOC_SIZE(p) __attribute__((alloc_size(p)))
|
#define SDL_ALLOC_SIZE(p) __attribute__((alloc_size(p)))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define SDL_ALLOC_SIZE(p)
|
#define SDL_ALLOC_SIZE(p)
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
#endif /* SDL_ALLOC_SIZE not defined */
|
#endif /* SDL_ALLOC_SIZE not defined */
|
||||||
|
|
||||||
#ifndef SDL_ALLOC_SIZE2
|
#ifndef SDL_ALLOC_SIZE2
|
||||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
#if (defined(__clang__) && __clang_major__ >= 4) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
||||||
#define SDL_ALLOC_SIZE2(p1, p2) __attribute__((alloc_size(p1, p2)))
|
#define SDL_ALLOC_SIZE2(p1, p2) __attribute__((alloc_size(p1, p2)))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define SDL_ALLOC_SIZE2(p1, p2)
|
#define SDL_ALLOC_SIZE2(p1, p2)
|
||||||
|
Reference in New Issue
Block a user