include/SDL_types.h
changeset 534 1ea658a3dd52
parent 463 bf7389310d27
child 654 e92bcf2573cb
equal deleted inserted replaced
533:263e4884f70d 534:1ea658a3dd52
    87 /* Check to make sure enums are the size of ints, for structure packing.
    87 /* Check to make sure enums are the size of ints, for structure packing.
    88    For both Watcom C/C++ and Borland C/C++ the compiler option that makes
    88    For both Watcom C/C++ and Borland C/C++ the compiler option that makes
    89    enums having the size of an int must be enabled.
    89    enums having the size of an int must be enabled.
    90    This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
    90    This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
    91 */
    91 */
       
    92 /* Enable enums always int in CodeWarrior (for MPW use "-enum int") */
       
    93 #ifdef __MWERKS__
       
    94 #pragma enumsalwaysint on
       
    95 #endif
       
    96 
    92 typedef enum {
    97 typedef enum {
    93 	DUMMY_ENUM_VALUE
    98 	DUMMY_ENUM_VALUE
    94 } SDL_DUMMY_ENUM;
    99 } SDL_DUMMY_ENUM;
    95 
   100 
    96 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
   101 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));