SDL 1.3 requires a 64-bit type for the platform.
This commit is contained in:
parent
da1479c45f
commit
5c01c4797c
16 changed files with 5 additions and 2350 deletions
|
@ -43,21 +43,7 @@
|
|||
#undef volatile
|
||||
|
||||
/* C datatypes */
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#undef size_t
|
||||
#undef int8_t
|
||||
#undef uint8_t
|
||||
#undef int16_t
|
||||
#undef uint16_t
|
||||
#undef int32_t
|
||||
#undef uint32_t
|
||||
#undef int64_t
|
||||
#undef uint64_t
|
||||
#undef uintptr_t
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#undef SIZEOF_VOIDP
|
||||
#undef SDL_HAS_64BIT_TYPE
|
||||
#undef HAVE_GCC_ATOMICS
|
||||
#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
|
||||
|
||||
|
|
|
@ -33,16 +33,6 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
|
||||
/*
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
*/
|
||||
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
|
@ -115,9 +105,6 @@ typedef unsigned int uint32_t;
|
|||
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
typedef unsigned int size_t;
|
||||
//typedef unsigned long uintptr_t;
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_ANDROID 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
|
|
@ -25,24 +25,12 @@
|
|||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define SDL_HAS_64BIT_TYPE 1
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define SDL_HAS_64BIT_TYPE 1
|
||||
|
||||
/* Useful headers */
|
||||
/* If we specified an SDK or have a post-PowerPC chip, then alloca.h exists. */
|
||||
#if ( (MAC_OS_X_VERSION_MIN_REQUIRED >= 1030) || (!defined(__POWERPC__)) )
|
||||
|
|
|
@ -47,7 +47,6 @@ typedef unsigned long long uint64_t;
|
|||
typedef unsigned long uintptr_t;
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#define SDL_HAS_64BIT_TYPE
|
||||
#ifdef __GNUC__
|
||||
#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
|
||||
#endif
|
||||
|
|
|
@ -48,8 +48,6 @@ typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
|
|||
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
#define SDL_HAS_64BIT_TYPE 1
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define SDL_HAS_64BIT_TYPE 1
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
|
|
@ -76,7 +76,6 @@ typedef unsigned int uintptr_t;
|
|||
#else
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
#define SDL_HAS_64BIT_TYPE 1
|
||||
|
||||
/* Enabled for SDL 1.2 (binary compatibility) */
|
||||
//#define HAVE_LIBC 1
|
||||
|
|
|
@ -28,12 +28,6 @@
|
|||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* Make sure that this isn't included by Visual C++ */
|
||||
#ifdef _MSC_VER
|
||||
#error You should copy include/SDL_config.h.default to include/SDL_config.h
|
||||
#endif
|
||||
|
||||
#define SDL_HAS_64BIT_TYPE 1
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
|
|
@ -153,7 +153,6 @@ SDL_Swap32(Uint32 x)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
static __inline__ Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
|
@ -195,14 +194,6 @@ SDL_Swap64(Uint64 x)
|
|||
return (x);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
/**
|
||||
* This is mainly to keep compilers from complaining in SDL code.
|
||||
* If there is no real 64-bit datatype, then compilers will complain about
|
||||
* the fake 64-bit datatype that SDL provides when it compiles user code.
|
||||
*/
|
||||
#define SDL_Swap64(X) (X)
|
||||
#endif /* SDL_HAS_64BIT_TYPE */
|
||||
|
||||
|
||||
static __inline__ float
|
||||
|
|
|
@ -144,22 +144,14 @@ typedef int32_t Sint32;
|
|||
*/
|
||||
typedef uint32_t Uint32;
|
||||
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
/**
|
||||
* \brief A signed 64-bit integer type.
|
||||
* \warning On platforms without any sort of 64-bit datatype, this is equivalent to Sint32!
|
||||
*/
|
||||
typedef int64_t Sint64;
|
||||
/**
|
||||
* \brief An unsigned 64-bit integer type.
|
||||
* \warning On platforms without any sort of 64-bit datatype, this is equivalent to Uint32!
|
||||
*/
|
||||
typedef uint64_t Uint64;
|
||||
#else
|
||||
/* This is really just a hack to prevent the compiler from complaining */
|
||||
typedef Sint32 Sint64;
|
||||
typedef Uint32 Uint64;
|
||||
#endif
|
||||
|
||||
/*@}*//*Basic data types*/
|
||||
|
||||
|
@ -174,10 +166,8 @@ SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
|
|||
SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
|
||||
SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
|
||||
SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
|
||||
SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
||||
#endif
|
||||
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
|
||||
/** \endcond */
|
||||
|
||||
|
@ -545,8 +535,6 @@ extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string,
|
|||
char **endp, int base);
|
||||
#endif
|
||||
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
|
||||
#ifdef HAVE__I64TOA
|
||||
#define SDL_lltoa _i64toa
|
||||
#else
|
||||
|
@ -575,8 +563,6 @@ extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp,
|
|||
int base);
|
||||
#endif
|
||||
|
||||
#endif /* SDL_HAS_64BIT_TYPE */
|
||||
|
||||
#ifdef HAVE_STRTOD
|
||||
#define SDL_strtod strtod
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue