comparison include/SDL_string.h @ 1341:d02b552e5304

Configure dynamically generates SDL_config.h I'm still wrestling with autoheader, but this should work for now... Fixed lots of build problems with C library support disabled
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 12:11:33 +0000
parents 3692456e7b0f
children 7ba544e2888d
comparison
equal deleted inserted replaced
1340:58b114ef50e7 1341:d02b552e5304
199 #define SDL_strncat strncat 199 #define SDL_strncat strncat
200 #else 200 #else
201 #define SDL_strncat(dst, src, n) (SDL_strncpy(dst+SDL_strlen(dst), src, n), dst) 201 #define SDL_strncat(dst, src, n) (SDL_strncpy(dst+SDL_strlen(dst), src, n), dst)
202 #endif 202 #endif
203 203
204 #ifdef HAVE_STRDUP
205 #define SDL_strdup strdup
206 #else
207 extern DECLSPEC char * SDLCALL SDL_strdup(const char *string);
208 #endif
209
204 #ifdef HAVE__STRREV 210 #ifdef HAVE__STRREV
205 #define SDL_strrev _strrev 211 #define SDL_strrev _strrev
206 #else 212 #else
207 extern DECLSPEC char * SDLCALL SDL_strrev(char *string); 213 extern DECLSPEC char * SDLCALL SDL_strrev(char *string);
208 #endif 214 #endif
286 #else 292 #else
287 extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int base); 293 extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int base);
288 #endif 294 #endif
289 295
290 #endif /* SDL_HAS_64BIT_TYPE */ 296 #endif /* SDL_HAS_64BIT_TYPE */
297
298 #ifdef HAVE_STRTOD
299 #define SDL_strtod strtod
300 #else
301 extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp);
302 #endif
303
304 #ifdef HAVE_ATOI
305 #define SDL_atoi atoi
306 #else
307 #define SDL_atoi(X) SDL_strtol(X, NULL, 0)
308 #endif
309
310 #ifdef HAVE_ATOF
311 #define SDL_atof atof
312 #else
313 #define SDL_atof(X) SDL_strtod(X, NULL)
314 #endif
291 315
292 #ifdef HAVE_STRCMP 316 #ifdef HAVE_STRCMP
293 #define SDL_strcmp strcmp 317 #define SDL_strcmp strcmp
294 #else 318 #else
295 extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2); 319 extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);