include/SDL_types.h
changeset 463 bf7389310d27
parent 297 f6ffac90895c
child 534 1ea658a3dd52
     1.1 --- a/include/SDL_types.h	Tue Aug 20 16:58:49 2002 +0000
     1.2 +++ b/include/SDL_types.h	Wed Aug 21 04:16:31 2002 +0000
     1.3 @@ -84,6 +84,17 @@
     1.4  SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
     1.5  SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
     1.6  
     1.7 +/* Check to make sure enums are the size of ints, for structure packing.
     1.8 +   For both Watcom C/C++ and Borland C/C++ the compiler option that makes
     1.9 +   enums having the size of an int must be enabled.
    1.10 +   This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
    1.11 +*/
    1.12 +typedef enum {
    1.13 +	DUMMY_ENUM_VALUE
    1.14 +} SDL_DUMMY_ENUM;
    1.15 +
    1.16 +SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
    1.17 +
    1.18  #undef SDL_COMPILE_TIME_ASSERT
    1.19  
    1.20  /* General keyboard/mouse state definitions */