Mercurial > sdl-ios-xcode
comparison test/testplatform.c @ 1615:d5298e8f22b3
Ugh, more 64-bit cleanup
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 31 Mar 2006 06:27:47 +0000 |
parents | 7a610f25c12f |
children | f12379c41042 |
comparison
equal
deleted
inserted
replaced
1614:6162b8d921ce | 1615:d5298e8f22b3 |
---|---|
19 { | 19 { |
20 int error = 0; | 20 int error = 0; |
21 | 21 |
22 if ( badsize(sizeof(Uint8), 1) ) { | 22 if ( badsize(sizeof(Uint8), 1) ) { |
23 if ( verbose ) | 23 if ( verbose ) |
24 printf("sizeof(Uint8) != 1, instead = %d\n", | 24 printf("sizeof(Uint8) != 1, instead = %ul\n", |
25 sizeof(Uint8)); | 25 sizeof(Uint8)); |
26 ++error; | 26 ++error; |
27 } | 27 } |
28 if ( badsize(sizeof(Uint16), 2) ) { | 28 if ( badsize(sizeof(Uint16), 2) ) { |
29 if ( verbose ) | 29 if ( verbose ) |
30 printf("sizeof(Uint16) != 2, instead = %d\n", | 30 printf("sizeof(Uint16) != 2, instead = %ul\n", |
31 sizeof(Uint16)); | 31 sizeof(Uint16)); |
32 ++error; | 32 ++error; |
33 } | 33 } |
34 if ( badsize(sizeof(Uint32), 4) ) { | 34 if ( badsize(sizeof(Uint32), 4) ) { |
35 if ( verbose ) | 35 if ( verbose ) |
36 printf("sizeof(Uint32) != 4, instead = %d\n", | 36 printf("sizeof(Uint32) != 4, instead = %ul\n", |
37 sizeof(Uint32)); | 37 sizeof(Uint32)); |
38 ++error; | 38 ++error; |
39 } | 39 } |
40 #ifdef SDL_HAS_64BIT_TYPE | 40 #ifdef SDL_HAS_64BIT_TYPE |
41 if ( badsize(sizeof(Uint64), 8) ) { | 41 if ( badsize(sizeof(Uint64), 8) ) { |
42 if ( verbose ) | 42 if ( verbose ) |
43 printf("sizeof(Uint64) != 8, instead = %d\n", | 43 printf("sizeof(Uint64) != 8, instead = %ul\n", |
44 sizeof(Uint64)); | 44 sizeof(Uint64)); |
45 ++error; | 45 ++error; |
46 } | 46 } |
47 #else | 47 #else |
48 if ( verbose ) { | 48 if ( verbose ) { |
108 } | 108 } |
109 ++error; | 109 ++error; |
110 } | 110 } |
111 #ifdef SDL_HAS_64BIT_TYPE | 111 #ifdef SDL_HAS_64BIT_TYPE |
112 if ( verbose ) { | 112 if ( verbose ) { |
113 #ifdef _MSC_VER | |
114 printf("Value 64 = 0x%I64X, swapped = 0x%I64X\n", value64, SDL_Swap64(value64)); | |
115 #else | |
113 printf("Value 64 = 0x%llX, swapped = 0x%llX\n", value64, SDL_Swap64(value64)); | 116 printf("Value 64 = 0x%llX, swapped = 0x%llX\n", value64, SDL_Swap64(value64)); |
117 #endif | |
114 } | 118 } |
115 if ( SDL_Swap64(value64) != swapped64 ) { | 119 if ( SDL_Swap64(value64) != swapped64 ) { |
116 if ( verbose ) { | 120 if ( verbose ) { |
117 printf("64 bit value swapped incorrectly!\n"); | 121 printf("64 bit value swapped incorrectly!\n"); |
118 } | 122 } |