Use SDL's stdinc functions instead of C runtime calls.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 05 Jan 2016 02:29:16 -0500
changeset 10030 061b1b467bd3
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
--- a/src/haptic/linux/SDL_syshaptic.c	Tue Jan 05 02:27:50 2016 -0500
+++ b/src/haptic/linux/SDL_syshaptic.c	Tue Jan 05 02:29:16 2016 -0500
@@ -690,7 +690,7 @@
         else if (!src->dir[0])
             *dest = (src->dir[1] >= 0 ? 0x8000 : 0);
         else {
-            float f = atan2(src->dir[1], src->dir[0]);    /* Ideally we'd use fixed point math instead of floats... */
+            float f = SDL_atan2(src->dir[1], src->dir[0]);    /* Ideally we'd use fixed point math instead of floats... */
                     /*
                       atan2 takes the parameters: Y-axis-value and X-axis-value (in that order)
                        - Y-axis-value is the second coordinate (from center to SOUTH)
--- a/src/video/x11/SDL_x11modes.c	Tue Jan 05 02:27:50 2016 -0500
+++ b/src/video/x11/SDL_x11modes.c	Tue Jan 05 02:29:16 2016 -0500
@@ -342,7 +342,7 @@
         X11_XFree(props);
     }
 
-    inches = (int)((SDL_sqrt(widthmm * widthmm + heightmm * heightmm) / 25.4f) + 0.5f);
+    inches = (int)((SDL_sqrtf(widthmm * widthmm + heightmm * heightmm) / 25.4f) + 0.5f);
     if (*name && inches) {
         const size_t len = SDL_strlen(name);
         SDL_snprintf(&name[len], namelen-len, " %d\"", inches);
--- a/src/video/x11/edid-parse.c	Tue Jan 05 02:27:50 2016 -0500
+++ b/src/video/x11/edid-parse.c	Tue Jan 05 02:29:16 2016 -0500
@@ -21,6 +21,8 @@
  */
 
 /* Author: Soren Sandmann <sandmann@redhat.com> */
+#include "../../SDL_internal.h"
+#include "SDL_stdinc.h"
 
 #include "edid.h"
 #include <stdlib.h>
@@ -247,7 +249,7 @@
     high = (high << 2) | low;
 
     for (i = 0; i < 10; ++i)
-	result += get_bit (high, i) * pow (2, i - 10);
+	result += get_bit (high, i) * SDL_pow (2, i - 10);
 
     return result;
 }