diff --git a/sc2/src/sc2code/libs/sound/mixsdl/mixer.h b/sc2/src/sc2code/libs/sound/mixsdl/mixer.h index 42319fbae..b1915eeb4 100644 --- a/sc2/src/sc2code/libs/sound/mixsdl/mixer.h +++ b/sc2/src/sc2code/libs/sound/mixsdl/mixer.h @@ -23,12 +23,6 @@ #include "types.h" #include "SDL_byteorder.h" -#ifdef _MSC_VER -# include -#else -# include -#endif - /** * The interface heavily influenced by OpenAL * to the point where you should use OpenAL's @@ -164,7 +158,7 @@ typedef enum * Interface Types */ -typedef intptr_t mixSDL_Object; +typedef intptr mixSDL_Object; typedef int mixSDL_IntVal; typedef struct _mixSDL_Buffer diff --git a/sc2/src/sc2code/libs/sound/sound_chooser.h b/sc2/src/sc2code/libs/sound/sound_chooser.h index 69c44ffff..605dfdc25 100644 --- a/sc2/src/sc2code/libs/sound/sound_chooser.h +++ b/sc2/src/sc2code/libs/sound/sound_chooser.h @@ -39,7 +39,7 @@ * Interface Types */ -typedef intptr_t TFBSound_Object; +typedef intptr TFBSound_Object; typedef int TFBSound_IntVal; typedef const int TFBSound_SourceProp; typedef const int TFBSound_BufferProp; diff --git a/sc2/src/types.h b/sc2/src/types.h index c5b5a3cab..c2cea16a2 100644 --- a/sc2/src/types.h +++ b/sc2/src/types.h @@ -101,6 +101,18 @@ typedef struct #undef UQM_INT16 #undef UQM_INT32 +#ifdef WIN32 +typedef sint32 intptr; +#elif defined (WIN64) || defined (_WIN64) +typedef sint64 intptr; +#else +# if __WORDSIZE == 64 +typedef sint64 intptr; +# else +typedef sint32 intptr; + #endif +#endif + /* Make sure the types really have the right sizes * Adapted from SDL * This will generate "negative subscript or subscript is too large"