Added intptr to types.h and changed sound code to use that, because using stdint.h caused conflicts atleast with gcc 2.95

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1076 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2003-07-21 02:42:18 +00:00
parent 3533b5329a
commit a91b438794
3 changed files with 14 additions and 8 deletions
+1 -7
View File
@@ -23,12 +23,6 @@
#include "types.h" #include "types.h"
#include "SDL_byteorder.h" #include "SDL_byteorder.h"
#ifdef _MSC_VER
# include <stddef.h>
#else
# include <stdint.h>
#endif
/** /**
* The interface heavily influenced by OpenAL * The interface heavily influenced by OpenAL
* to the point where you should use OpenAL's * to the point where you should use OpenAL's
@@ -164,7 +158,7 @@ typedef enum
* Interface Types * Interface Types
*/ */
typedef intptr_t mixSDL_Object; typedef intptr mixSDL_Object;
typedef int mixSDL_IntVal; typedef int mixSDL_IntVal;
typedef struct _mixSDL_Buffer typedef struct _mixSDL_Buffer
+1 -1
View File
@@ -39,7 +39,7 @@
* Interface Types * Interface Types
*/ */
typedef intptr_t TFBSound_Object; typedef intptr TFBSound_Object;
typedef int TFBSound_IntVal; typedef int TFBSound_IntVal;
typedef const int TFBSound_SourceProp; typedef const int TFBSound_SourceProp;
typedef const int TFBSound_BufferProp; typedef const int TFBSound_BufferProp;
+12
View File
@@ -101,6 +101,18 @@ typedef struct
#undef UQM_INT16 #undef UQM_INT16
#undef UQM_INT32 #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 /* Make sure the types really have the right sizes
* Adapted from SDL * Adapted from SDL
* This will generate "negative subscript or subscript is too large" * This will generate "negative subscript or subscript is too large"