| | |
| | | #ifdef HAVE_FLOAT_H |
| | | # include <float.h> |
| | | #endif |
| | | #if defined(HAVE_ALLOCA) && !defined(alloca) |
| | | # if defined(HAVE_ALLOCA_H) |
| | | # include <alloca.h> |
| | | # elif defined(__GNUC__) |
| | | # define alloca __builtin_alloca |
| | | # elif defined(_MSC_VER) |
| | | # include <malloc.h> |
| | | # define alloca _alloca |
| | | # elif defined(__WATCOMC__) |
| | | # include <malloc.h> |
| | | # elif defined(__BORLANDC__) |
| | | # include <malloc.h> |
| | | # elif defined(__DMC__) |
| | | # include <stdlib.h> |
| | | # elif defined(__AIX__) |
| | | #pragma alloca |
| | | # elif defined(__MRC__) |
| | | void *alloca(unsigned); |
| | | # else |
| | | char *alloca(); |
| | | # endif |
| | | #endif |
| | | |
| | | /** |
| | | * The number of elements in an array. |
| | |
| | | extern "C" { |
| | | #endif |
| | | |
| | | #if defined(HAVE_ALLOCA) && !defined(alloca) |
| | | # if defined(HAVE_ALLOCA_H) |
| | | # include <alloca.h> |
| | | # elif defined(__GNUC__) |
| | | # define alloca __builtin_alloca |
| | | # elif defined(_MSC_VER) |
| | | # include <malloc.h> |
| | | # define alloca _alloca |
| | | # elif defined(__WATCOMC__) |
| | | # include <malloc.h> |
| | | # elif defined(__BORLANDC__) |
| | | # include <malloc.h> |
| | | # elif defined(__DMC__) |
| | | # include <stdlib.h> |
| | | # elif defined(__AIX__) |
| | | #pragma alloca |
| | | # elif defined(__MRC__) |
| | | void *alloca(unsigned); |
| | | # else |
| | | char *alloca(); |
| | | # endif |
| | | #endif |
| | | #ifdef HAVE_ALLOCA |
| | | #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count)) |
| | | #define SDL_stack_free(data) |
| | |
| | | #endif |
| | | } |
| | | |
| | | |
| | | extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); |
| | | |
| | | extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); |
| | | extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); |
| | | |
| | | extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr); |
| | | extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); |
| | | extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); |
| | | extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); |
| | |
| | | extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y); |
| | | extern DECLSPEC double SDLCALL SDL_cos(double x); |
| | | extern DECLSPEC float SDLCALL SDL_cosf(float x); |
| | | extern DECLSPEC double SDLCALL SDL_exp(double x); |
| | | extern DECLSPEC float SDLCALL SDL_expf(float x); |
| | | extern DECLSPEC double SDLCALL SDL_fabs(double x); |
| | | extern DECLSPEC float SDLCALL SDL_fabsf(float x); |
| | | extern DECLSPEC double SDLCALL SDL_floor(double x); |