Removed the inline functions from SDL_stdinc.h

Having the SDL functions inline is causing build issues, and in the case of malloc(), etc. causing malloc/free mismatches, if the application build environment differs from the SDL build environment.

In the interest of safety and consistency, the functions will always be in the SDL library and will only be redirected to the C library there, if they are available.

See the following threads on the SDL mailing list for the gruesome details:
* SDL_stdinc.h inlines problematic when application not compiled in exact same feature environment
* Error compiling program against SDL2 with -std=c++11 g++ flag
This commit is contained in:
Sam Lantinga 2013-07-05 23:57:19 -07:00
parent 3a78485f2d
commit cfd541e89c
9 changed files with 469 additions and 788 deletions

View file

@ -27,6 +27,18 @@
typedef unsigned int u_int32_t;
#define atan SDL_uclibc_atan
#define __ieee754_atan2 SDL_uclibc_atan2
#define copysign SDL_uclibc_copysign
#define cos SDL_uclibc_cos
#define fabs SDL_uclibc_fabs
#define floor SDL_uclibc_floor
#define __ieee754_log SDL_uclibc_log
#define __ieee754_pow SDL_uclibc_pow
#define scalbn SDL_uclibc_scalbn
#define sin SDL_uclibc_sin
#define __ieee754_sqrt SDL_uclibc_sqrt
/* The original fdlibm code used statements like:
n0 = ((*(int*)&one)>>29)^1; * index of high word *
ix0 = *(n0+(int*)&x); * high word of x *