Don't include <math.h> when HAVE_MATH_H isn't defined
authorSam Lantinga <slouken@libsdl.org>
Sun, 12 Oct 2008 16:21:36 +0000
changeset 276826861c61142a
parent 2767 73b9f5fc6690
child 2769 2a46b5912665
Don't include <math.h> when HAVE_MATH_H isn't defined
XCodeiPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj
src/audio/SDL_audiocvt.c
src/libm/math.h
     1.1 --- a/XCodeiPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj	Sun Oct 12 16:15:43 2008 +0000
     1.2 +++ b/XCodeiPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj	Sun Oct 12 16:21:36 2008 +0000
     1.3 @@ -720,6 +720,7 @@
     1.4  					"\"$(SRCROOT)/../SDLiPod/build/Release-iphoneos\"",
     1.5  					"\"$(SRCROOT)\"",
     1.6  					"\"$(SRCROOT)/../SDLiPod/build/Debug-iphonesimulator\"",
     1.7 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
     1.8  				);
     1.9  				PRODUCT_NAME = Rectangles;
    1.10  			};
    1.11 @@ -738,6 +739,7 @@
    1.12  					"\"$(SRCROOT)/../SDLiPod/build/Release-iphoneos\"",
    1.13  					"\"$(SRCROOT)\"",
    1.14  					"\"$(SRCROOT)/../SDLiPod/build/Debug-iphonesimulator\"",
    1.15 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.16  				);
    1.17  				PRODUCT_NAME = Rectangles;
    1.18  			};
    1.19 @@ -791,6 +793,10 @@
    1.20  				GCC_PRECOMPILE_PREFIX_HEADER = YES;
    1.21  				GCC_PREFIX_HEADER = "";
    1.22  				INFOPLIST_FILE = Info.plist;
    1.23 +				LIBRARY_SEARCH_PATHS = (
    1.24 +					"$(inherited)",
    1.25 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.26 +				);
    1.27  				OTHER_LDFLAGS = (
    1.28  					"-framework",
    1.29  					Foundation,
    1.30 @@ -814,6 +820,10 @@
    1.31  				GCC_PRECOMPILE_PREFIX_HEADER = YES;
    1.32  				GCC_PREFIX_HEADER = "";
    1.33  				INFOPLIST_FILE = Info.plist;
    1.34 +				LIBRARY_SEARCH_PATHS = (
    1.35 +					"$(inherited)",
    1.36 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.37 +				);
    1.38  				OTHER_LDFLAGS = (
    1.39  					"-framework",
    1.40  					Foundation,
    1.41 @@ -839,6 +849,10 @@
    1.42  				GCC_PREFIX_HEADER = "";
    1.43  				INFOPLIST_FILE = Info.plist;
    1.44  				INSTALL_PATH = "$(HOME)/Applications";
    1.45 +				LIBRARY_SEARCH_PATHS = (
    1.46 +					"$(inherited)",
    1.47 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.48 +				);
    1.49  				OTHER_LDFLAGS = (
    1.50  					"-framework",
    1.51  					Foundation,
    1.52 @@ -863,6 +877,10 @@
    1.53  				GCC_PREFIX_HEADER = "";
    1.54  				INFOPLIST_FILE = Info.plist;
    1.55  				INSTALL_PATH = "$(HOME)/Applications";
    1.56 +				LIBRARY_SEARCH_PATHS = (
    1.57 +					"$(inherited)",
    1.58 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.59 +				);
    1.60  				OTHER_LDFLAGS = (
    1.61  					"-framework",
    1.62  					Foundation,
    1.63 @@ -891,6 +909,7 @@
    1.64  				LIBRARY_SEARCH_PATHS = (
    1.65  					"$(inherited)",
    1.66  					"\\\\\\\"$(SRCROOT)\\\\\\\"",
    1.67 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.68  				);
    1.69  				OTHER_LDFLAGS = (
    1.70  					"-framework",
    1.71 @@ -919,6 +938,7 @@
    1.72  				LIBRARY_SEARCH_PATHS = (
    1.73  					"$(inherited)",
    1.74  					"\\\\\\\"$(SRCROOT)\\\\\\\"",
    1.75 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.76  				);
    1.77  				OTHER_LDFLAGS = (
    1.78  					"-framework",
    1.79 @@ -945,6 +965,10 @@
    1.80  				GCC_PREFIX_HEADER = "";
    1.81  				INFOPLIST_FILE = Info.plist;
    1.82  				INSTALL_PATH = "$(HOME)/Applications";
    1.83 +				LIBRARY_SEARCH_PATHS = (
    1.84 +					"$(inherited)",
    1.85 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.86 +				);
    1.87  				OTHER_LDFLAGS = (
    1.88  					"-framework",
    1.89  					Foundation,
    1.90 @@ -969,6 +993,10 @@
    1.91  				GCC_PREFIX_HEADER = "";
    1.92  				INFOPLIST_FILE = Info.plist;
    1.93  				INSTALL_PATH = "$(HOME)/Applications";
    1.94 +				LIBRARY_SEARCH_PATHS = (
    1.95 +					"$(inherited)",
    1.96 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
    1.97 +				);
    1.98  				OTHER_LDFLAGS = (
    1.99  					"-framework",
   1.100  					Foundation,
   1.101 @@ -997,6 +1025,7 @@
   1.102  				LIBRARY_SEARCH_PATHS = (
   1.103  					"$(inherited)",
   1.104  					"\\\"$(SRCROOT)\\\"",
   1.105 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
   1.106  				);
   1.107  				OTHER_LDFLAGS = (
   1.108  					"-framework",
   1.109 @@ -1025,6 +1054,7 @@
   1.110  				LIBRARY_SEARCH_PATHS = (
   1.111  					"$(inherited)",
   1.112  					"\\\"$(SRCROOT)\\\"",
   1.113 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
   1.114  				);
   1.115  				OTHER_LDFLAGS = (
   1.116  					"-framework",
   1.117 @@ -1054,6 +1084,7 @@
   1.118  				LIBRARY_SEARCH_PATHS = (
   1.119  					"$(inherited)",
   1.120  					"\"$(SRCROOT)\"",
   1.121 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
   1.122  				);
   1.123  				OTHER_LDFLAGS = (
   1.124  					"-framework",
   1.125 @@ -1082,6 +1113,7 @@
   1.126  				LIBRARY_SEARCH_PATHS = (
   1.127  					"$(inherited)",
   1.128  					"\"$(SRCROOT)\"",
   1.129 +					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
   1.130  				);
   1.131  				OTHER_LDFLAGS = (
   1.132  					"-framework",
     2.1 --- a/src/audio/SDL_audiocvt.c	Sun Oct 12 16:15:43 2008 +0000
     2.2 +++ b/src/audio/SDL_audiocvt.c	Sun Oct 12 16:21:36 2008 +0000
     2.3 @@ -21,9 +21,6 @@
     2.4  */
     2.5  #include "SDL_config.h"
     2.6  
     2.7 -#define _USE_MATH_DEFINES
     2.8 -#include <math.h>
     2.9 -
    2.10  /* Functions for audio drivers to perform runtime conversion of audio format */
    2.11  
    2.12  #include "SDL_audio.h"
     3.1 --- a/src/libm/math.h	Sun Oct 12 16:15:43 2008 +0000
     3.2 +++ b/src/libm/math.h	Sun Oct 12 16:21:36 2008 +0000
     3.3 @@ -22,6 +22,7 @@
     3.4  #include "SDL_config.h"
     3.5  
     3.6  #ifdef HAVE_MATH_H
     3.7 +#define _USE_MATH_DEFINES
     3.8  #include <math.h>
     3.9  #else
    3.10