diff include/SDL_stdlib.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
line wrap: on
line diff
--- a/include/SDL_stdlib.h	Tue Feb 07 11:18:21 2006 +0000
+++ b/include/SDL_stdlib.h	Tue Feb 07 12:11:33 2006 +0000
@@ -62,6 +62,12 @@
 extern DECLSPEC void * SDLCALL SDL_malloc(size_t size);
 #endif
 
+#ifdef HAVE_CALLOC
+#define SDL_calloc	calloc
+#else
+extern DECLSPEC void * SDLCALL SDL_calloc(size_t nmemb, size_t size);
+#endif
+
 #ifdef HAVE_REALLOC
 #define SDL_realloc	realloc
 #else
@@ -101,6 +107,12 @@
            int (*compare)(const void *, const void *));
 #endif
 
+#ifdef HAVE_ABS
+#define SDL_abs		abs
+#else
+#define SDL_abs(X)	((X) < 0 ? -(X) : (X))
+#endif
+
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 }