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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401345
This commit is contained in:
Sam Lantinga 2006-02-07 12:11:33 +00:00
parent dd8d77d906
commit 78516b5663
24 changed files with 513 additions and 117 deletions

View file

@ -62,6 +62,12 @@ extern "C" {
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 @@ extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size,
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
}