src/SDL_internal.h
changeset 10680 fe759a74b018
parent 10638 d11daa346140
child 10737 3406a0f8b041
     1.1 --- a/src/SDL_internal.h	Tue Dec 06 00:40:09 2016 -0800
     1.2 +++ b/src/SDL_internal.h	Tue Dec 06 02:20:58 2016 -0500
     1.3 @@ -26,6 +26,15 @@
     1.4  #define _GNU_SOURCE
     1.5  #endif
     1.6  
     1.7 +/* This is for a variable-length array at the end of a struct:
     1.8 +    struct x { int y; char z[SDL_VARIABLE_LENGTH_ARRAY]; };
     1.9 +   Use this because GCC 2 needs different magic than other compilers. */
    1.10 +#if (defined(__GNUC__) && (__GNUC__ <= 2))
    1.11 +#define SDL_VARIABLE_LENGTH_ARRAY 1
    1.12 +#else
    1.13 +#define SDL_VARIABLE_LENGTH_ARRAY
    1.14 +#endif
    1.15 +
    1.16  #include "dynapi/SDL_dynapi.h"
    1.17  
    1.18  #if SDL_DYNAMIC_API