include/SDL_types.h
changeset 1353 7ba544e2888d
parent 1346 1b5fbaf1d2c6
child 1354 22f39393668a
     1.1 --- a/include/SDL_types.h	Thu Feb 09 05:46:55 2006 +0000
     1.2 +++ b/include/SDL_types.h	Thu Feb 09 09:07:13 2006 +0000
     1.3 @@ -20,105 +20,4 @@
     1.4      slouken@libsdl.org
     1.5  */
     1.6  
     1.7 -/* General data types used by the SDL library */
     1.8 -
     1.9 -#ifndef _SDL_types_h
    1.10 -#define _SDL_types_h
    1.11 -
    1.12 -#include <sys/types.h>
    1.13 -#ifdef _MSC_VER
    1.14 -#ifndef _SIZE_T_DEFINED
    1.15 -#ifdef  _WIN64
    1.16 -typedef unsigned __int64    size_t;
    1.17 -#else
    1.18 -typedef _W64 unsigned int   size_t;
    1.19 -#endif
    1.20 -#define _SIZE_T_DEFINED
    1.21 -#endif
    1.22 -typedef size_t uintptr_t;
    1.23 -#endif
    1.24 -
    1.25 -/* The number of elements in an array */
    1.26 -#define SDL_arraysize(array)	(sizeof(array)/sizeof(array[0]))
    1.27 -#define SDL_TABLESIZE(table)	SDL_arraysize(table)
    1.28 -
    1.29 -/* Basic data types */
    1.30 -typedef enum SDL_bool {
    1.31 -	SDL_FALSE = 0,
    1.32 -	SDL_TRUE  = 1
    1.33 -} SDL_bool;
    1.34 -
    1.35 -#ifdef H_MMBASIC /* mmbasic.h (Tru64 MME) */
    1.36 -/* Some of the basic types are already defined in mmbasic.h */
    1.37 -typedef signed char	Sint8;
    1.38 -typedef signed short	Sint16;
    1.39 -typedef signed int	Sint32;
    1.40 -#else
    1.41 -typedef unsigned char	Uint8;
    1.42 -typedef signed char	Sint8;
    1.43 -typedef unsigned short	Uint16;
    1.44 -typedef signed short	Sint16;
    1.45 -typedef unsigned int	Uint32;
    1.46 -typedef signed int	Sint32;
    1.47 -#endif
    1.48 -
    1.49 -/* Figure out how to support 64-bit datatypes */
    1.50 -#if !defined(__STRICT_ANSI__)
    1.51 -#ifdef __osf__ /* Tru64 */
    1.52 -#define SDL_HAS_64BIT_TYPE	long
    1.53 -#elif defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C) || defined(__DECC) || defined(__WATCOMC__)
    1.54 -#define SDL_HAS_64BIT_TYPE	long long
    1.55 -#elif defined(_MSC_VER) /* VC++ */
    1.56 -#define SDL_HAS_64BIT_TYPE	__int64
    1.57 -#endif
    1.58 -#endif /* !__STRICT_ANSI__ */
    1.59 -
    1.60 -/* The 64-bit type isn't available on EPOC/Symbian OS */
    1.61 -#ifdef __SYMBIAN32__
    1.62 -#undef SDL_HAS_64BIT_TYPE
    1.63 -#endif
    1.64 -
    1.65 -/* The 64-bit datatype isn't supported on all platforms */
    1.66 -#ifdef SDL_HAS_64BIT_TYPE
    1.67 -#ifndef H_MMBASIC
    1.68 -typedef unsigned SDL_HAS_64BIT_TYPE Uint64;
    1.69 -#endif
    1.70 -typedef SDL_HAS_64BIT_TYPE Sint64;
    1.71 -#else
    1.72 -/* This is really just a hack to prevent the compiler from complaining */
    1.73 -typedef struct {
    1.74 -	Uint32 hi;
    1.75 -	Uint32 lo;
    1.76 -} Uint64, Sint64;
    1.77 -#endif
    1.78 -
    1.79 -/* Make sure the types really have the right sizes */
    1.80 -#define SDL_COMPILE_TIME_ASSERT(name, x)               \
    1.81 -       typedef int SDL_dummy_ ## name[(x) * 2 - 1]
    1.82 -
    1.83 -SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
    1.84 -SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
    1.85 -SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
    1.86 -SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
    1.87 -SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
    1.88 -SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
    1.89 -SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
    1.90 -SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
    1.91 -
    1.92 -/* Check to make sure enums are the size of ints, for structure packing.
    1.93 -   For both Watcom C/C++ and Borland C/C++ the compiler option that makes
    1.94 -   enums having the size of an int must be enabled.
    1.95 -   This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
    1.96 -*/
    1.97 -/* Enable enums always int in CodeWarrior (for MPW use "-enum int") */
    1.98 -#ifdef __MWERKS__
    1.99 -#pragma enumsalwaysint on
   1.100 -#endif
   1.101 -
   1.102 -typedef enum {
   1.103 -	DUMMY_ENUM_VALUE
   1.104 -} SDL_DUMMY_ENUM;
   1.105 -
   1.106 -SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
   1.107 -
   1.108 -#endif
   1.109 +#include "SDL_stdinc.h"