23 badsize(
size_t sizeoftype,
size_t hardcodetype)
25 return sizeoftype != hardcodetype;
35 SDL_Log(
"sizeof(Uint8) != 1, instead = %u\n",
36 (
unsigned int)
sizeof(
Uint8));
41 SDL_Log(
"sizeof(Uint16) != 2, instead = %u\n",
42 (
unsigned int)
sizeof(
Uint16));
47 SDL_Log(
"sizeof(Uint32) != 4, instead = %u\n",
48 (
unsigned int)
sizeof(
Uint32));
53 SDL_Log(
"sizeof(Uint64) != 8, instead = %u\n",
54 (
unsigned int)
sizeof(
Uint64));
57 if (verbose && !error)
58 SDL_Log(
"All data types are the expected size.\n");
60 return (error ? 1 : 0);
71 Uint32 value32 = 0xEFBEADDE;
72 Uint32 swapped32 = 0xDEADBEEF;
77 value64 |= 0xCDAB3412;
78 swapped64 = 0x1234ABCD;
80 swapped64 |= 0xDEADBEEF;
83 SDL_Log(
"Detected a %s endian machine.\n",
86 if ((*((
char *) &value) >> 4) == 0
x1) {
93 SDL_Log(
"Actually a %s endian machine!\n",
99 SDL_Log(
"Value 16 = 0x%X, swapped = 0x%X\n", value16,
104 SDL_Log(
"16 bit value swapped incorrectly!\n");
109 SDL_Log(
"Value 32 = 0x%X, swapped = 0x%X\n", value32,
114 SDL_Log(
"32 bit value swapped incorrectly!\n");
124 SDL_Log(
"64 bit value swapped incorrectly!\n");
128 return (error ? 1 : 0);
172 SDL_Log(
"'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
191 if (argv[1] && (
SDL_strcmp(argv[1],
"-q") == 0)) {
const struct SDL_AssertData * next
GLuint GLfloat GLfloat GLfloat x1
uint32_t Uint32
An unsigned 32-bit integer type.
#define SDL_GetAssertionReport
uint64_t Uint64
An unsigned 64-bit integer type.
unsigned int trigger_count
SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)
#define SDL_assert_paranoid(condition)
GLsizei const GLfloat * value
uint8_t Uint8
An unsigned 8-bit integer type.
SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x)
#define SDL_GetCPUCacheLineSize
#define SDL_assert(condition)
#define SDL_LogSetPriority
SDL_FORCE_INLINE Uint64 SDL_Swap64(Uint64 x)
uint16_t Uint16
An unsigned 16-bit integer type.
#define SDL_assert_release(condition)