Use SDL's stdinc functions instead of C runtime calls.
authorRyan C. Gordon
Tue, 05 Jan 2016 02:29:16 -0500
changeset 10030061b1b467bd3
parent 10029 4c992fd19316
child 10031 2b3baddd9afa
Use SDL's stdinc functions instead of C runtime calls.
src/haptic/linux/SDL_syshaptic.c
src/video/x11/SDL_x11modes.c
src/video/x11/edid-parse.c
     1.1 --- a/src/haptic/linux/SDL_syshaptic.c	Tue Jan 05 02:27:50 2016 -0500
     1.2 +++ b/src/haptic/linux/SDL_syshaptic.c	Tue Jan 05 02:29:16 2016 -0500
     1.3 @@ -690,7 +690,7 @@
     1.4          else if (!src->dir[0])
     1.5              *dest = (src->dir[1] >= 0 ? 0x8000 : 0);
     1.6          else {
     1.7 -            float f = atan2(src->dir[1], src->dir[0]);    /* Ideally we'd use fixed point math instead of floats... */
     1.8 +            float f = SDL_atan2(src->dir[1], src->dir[0]);    /* Ideally we'd use fixed point math instead of floats... */
     1.9                      /*
    1.10                        atan2 takes the parameters: Y-axis-value and X-axis-value (in that order)
    1.11                         - Y-axis-value is the second coordinate (from center to SOUTH)
     2.1 --- a/src/video/x11/SDL_x11modes.c	Tue Jan 05 02:27:50 2016 -0500
     2.2 +++ b/src/video/x11/SDL_x11modes.c	Tue Jan 05 02:29:16 2016 -0500
     2.3 @@ -342,7 +342,7 @@
     2.4          X11_XFree(props);
     2.5      }
     2.6  
     2.7 -    inches = (int)((SDL_sqrt(widthmm * widthmm + heightmm * heightmm) / 25.4f) + 0.5f);
     2.8 +    inches = (int)((SDL_sqrtf(widthmm * widthmm + heightmm * heightmm) / 25.4f) + 0.5f);
     2.9      if (*name && inches) {
    2.10          const size_t len = SDL_strlen(name);
    2.11          SDL_snprintf(&name[len], namelen-len, " %d\"", inches);
     3.1 --- a/src/video/x11/edid-parse.c	Tue Jan 05 02:27:50 2016 -0500
     3.2 +++ b/src/video/x11/edid-parse.c	Tue Jan 05 02:29:16 2016 -0500
     3.3 @@ -21,6 +21,8 @@
     3.4   */
     3.5  
     3.6  /* Author: Soren Sandmann <sandmann@redhat.com> */
     3.7 +#include "../../SDL_internal.h"
     3.8 +#include "SDL_stdinc.h"
     3.9  
    3.10  #include "edid.h"
    3.11  #include <stdlib.h>
    3.12 @@ -247,7 +249,7 @@
    3.13      high = (high << 2) | low;
    3.14  
    3.15      for (i = 0; i < 10; ++i)
    3.16 -	result += get_bit (high, i) * pow (2, i - 10);
    3.17 +	result += get_bit (high, i) * SDL_pow (2, i - 10);
    3.18  
    3.19      return result;
    3.20  }