SDL/src/stdlib
Sam Lantinga beacc372d4 Fixed bug 2274 - SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined
Ghassan Al-Mashareqa

The SDL_ceil function is implemented incorrectly when HAVE_CEIL is not defined (HAVE_LIBC not defined).

The following code:

    double val = SDL_ceil(2.3);
    printf("%g", val);

prints "2.0", as STD_ceil is defined as:

    double
    SDL_ceil(double x)
    {
    #ifdef HAVE_CEIL
        return ceil(x);
    #else
        return (double)(int)((x)+0.5);
    #endif /* HAVE_CEIL */
    }

This functions is used in the SDL_BuildAudioResampleCVT function of the audio subsystem (SDL_audiocvt.c), and causes a bug in that function.
2013-11-27 00:29:46 -08:00
..
SDL_getenv.c Fixed building using MinGW 2013-10-17 23:02:29 -07:00
SDL_iconv.c Christoph Mallon: Remove pointless if (x) before SDL_free(x) 2013-08-29 08:29:21 -07:00
SDL_malloc.c Removed the inline functions from SDL_stdinc.h 2013-07-05 23:57:19 -07:00
SDL_qsort.c Removed the inline functions from SDL_stdinc.h 2013-07-05 23:57:19 -07:00
SDL_stdlib.c Fixed bug 2274 - SDL_ceil is incorrectly implemented when HAVE_LIBC is not defined 2013-11-27 00:29:46 -08:00
SDL_string.c Fixed bug 2082 - SDL stdlib implementation does not force upper case for %X format specifier 2013-09-05 06:59:34 -07:00