Mercurial > sdl-ios-xcode
comparison include/SDL_stdinc.h @ 2735:204be4fc2726
Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 27 Aug 2008 15:10:03 +0000 |
parents | 6259afb046c5 |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2734:dd25eabe441c | 2735:204be4fc2726 |
---|---|
145 SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1); | 145 SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1); |
146 SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2); | 146 SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2); |
147 SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2); | 147 SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2); |
148 SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4); | 148 SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4); |
149 SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4); | 149 SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4); |
150 #ifndef __NINTENDODS__ /* TODO: figure out why the following happens: | |
151 include/SDL_stdinc.h:150: error: size of array 'SDL_dummy_uint64' is negative | |
152 include/SDL_stdinc.h:151: error: size of array 'SDL_dummy_sint64' is negative */ | |
150 SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8); | 153 SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8); |
151 SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8); | 154 SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8); |
155 #endif | |
152 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ | 156 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ |
153 | 157 |
154 /* Check to make sure enums are the size of ints, for structure packing. | 158 /* Check to make sure enums are the size of ints, for structure packing. |
155 For both Watcom C/C++ and Borland C/C++ the compiler option that makes | 159 For both Watcom C/C++ and Borland C/C++ the compiler option that makes |
156 enums having the size of an int must be enabled. | 160 enums having the size of an int must be enabled. |
160 #ifdef __MWERKS__ | 164 #ifdef __MWERKS__ |
161 #pragma enumsalwaysint on | 165 #pragma enumsalwaysint on |
162 #endif | 166 #endif |
163 | 167 |
164 #ifndef DOXYGEN_SHOULD_IGNORE_THIS | 168 #ifndef DOXYGEN_SHOULD_IGNORE_THIS |
169 #ifndef __NINTENDODS__ /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */ | |
165 typedef enum | 170 typedef enum |
166 { | 171 { |
167 DUMMY_ENUM_VALUE | 172 DUMMY_ENUM_VALUE |
168 } SDL_DUMMY_ENUM; | 173 } SDL_DUMMY_ENUM; |
169 | 174 |
170 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); | 175 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); |
176 #endif | |
171 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ | 177 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ |
172 | 178 |
173 #include "begin_code.h" | 179 #include "begin_code.h" |
174 /* Set up for C function definitions, even when using C++ */ | 180 /* Set up for C function definitions, even when using C++ */ |
175 #ifdef __cplusplus | 181 #ifdef __cplusplus |
423 #endif | 429 #endif |
424 | 430 |
425 #ifdef HAVE_WCSLEN | 431 #ifdef HAVE_WCSLEN |
426 #define SDL_wcslen wcslen | 432 #define SDL_wcslen wcslen |
427 #else | 433 #else |
434 #if !defined(wchar_t) && defined(__NINTENDODS__) | |
435 #define wchar_t short /* TODO: figure out why libnds doesn't have this */ | |
436 #endif | |
428 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t * string); | 437 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t * string); |
429 #endif | 438 #endif |
430 | 439 |
431 #ifdef HAVE_STRLCPY | 440 #ifdef HAVE_STRLCPY |
432 #define SDL_strlcpy strlcpy | 441 #define SDL_strlcpy strlcpy |