changeset 2768:26861c61142a

Don't include <math.h> when HAVE_MATH_H isn't defined
author Sam Lantinga <slouken@libsdl.org>
date Sun, 12 Oct 2008 16:21:36 +0000
parents 73b9f5fc6690
children 2a46b5912665
files XCodeiPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj src/audio/SDL_audiocvt.c src/libm/math.h
diffstat 3 files changed, 33 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/XCodeiPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj	Sun Oct 12 16:15:43 2008 +0000
+++ b/XCodeiPhoneOS/Demos/DemosiPhoneOS.xcodeproj/project.pbxproj	Sun Oct 12 16:21:36 2008 +0000
@@ -720,6 +720,7 @@
 					"\"$(SRCROOT)/../SDLiPod/build/Release-iphoneos\"",
 					"\"$(SRCROOT)\"",
 					"\"$(SRCROOT)/../SDLiPod/build/Debug-iphonesimulator\"",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
 				);
 				PRODUCT_NAME = Rectangles;
 			};
@@ -738,6 +739,7 @@
 					"\"$(SRCROOT)/../SDLiPod/build/Release-iphoneos\"",
 					"\"$(SRCROOT)\"",
 					"\"$(SRCROOT)/../SDLiPod/build/Debug-iphonesimulator\"",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
 				);
 				PRODUCT_NAME = Rectangles;
 			};
@@ -791,6 +793,10 @@
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "";
 				INFOPLIST_FILE = Info.plist;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
+				);
 				OTHER_LDFLAGS = (
 					"-framework",
 					Foundation,
@@ -814,6 +820,10 @@
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "";
 				INFOPLIST_FILE = Info.plist;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
+				);
 				OTHER_LDFLAGS = (
 					"-framework",
 					Foundation,
@@ -839,6 +849,10 @@
 				GCC_PREFIX_HEADER = "";
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
+				);
 				OTHER_LDFLAGS = (
 					"-framework",
 					Foundation,
@@ -863,6 +877,10 @@
 				GCC_PREFIX_HEADER = "";
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
+				);
 				OTHER_LDFLAGS = (
 					"-framework",
 					Foundation,
@@ -891,6 +909,7 @@
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
 					"\\\\\\\"$(SRCROOT)\\\\\\\"",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
 				);
 				OTHER_LDFLAGS = (
 					"-framework",
@@ -919,6 +938,7 @@
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
 					"\\\\\\\"$(SRCROOT)\\\\\\\"",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
 				);
 				OTHER_LDFLAGS = (
 					"-framework",
@@ -945,6 +965,10 @@
 				GCC_PREFIX_HEADER = "";
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
+				);
 				OTHER_LDFLAGS = (
 					"-framework",
 					Foundation,
@@ -969,6 +993,10 @@
 				GCC_PREFIX_HEADER = "";
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Applications";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
+				);
 				OTHER_LDFLAGS = (
 					"-framework",
 					Foundation,
@@ -997,6 +1025,7 @@
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
 					"\\\"$(SRCROOT)\\\"",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
 				);
 				OTHER_LDFLAGS = (
 					"-framework",
@@ -1025,6 +1054,7 @@
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
 					"\\\"$(SRCROOT)\\\"",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
 				);
 				OTHER_LDFLAGS = (
 					"-framework",
@@ -1054,6 +1084,7 @@
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SRCROOT)\"",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
 				);
 				OTHER_LDFLAGS = (
 					"-framework",
@@ -1082,6 +1113,7 @@
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SRCROOT)\"",
+					"\"$(SRCROOT)/../SDL/build/Debug-iphoneos\"",
 				);
 				OTHER_LDFLAGS = (
 					"-framework",
--- a/src/audio/SDL_audiocvt.c	Sun Oct 12 16:15:43 2008 +0000
+++ b/src/audio/SDL_audiocvt.c	Sun Oct 12 16:21:36 2008 +0000
@@ -21,9 +21,6 @@
 */
 #include "SDL_config.h"
 
-#define _USE_MATH_DEFINES
-#include <math.h>
-
 /* Functions for audio drivers to perform runtime conversion of audio format */
 
 #include "SDL_audio.h"
--- a/src/libm/math.h	Sun Oct 12 16:15:43 2008 +0000
+++ b/src/libm/math.h	Sun Oct 12 16:21:36 2008 +0000
@@ -22,6 +22,7 @@
 #include "SDL_config.h"
 
 #ifdef HAVE_MATH_H
+#define _USE_MATH_DEFINES
 #include <math.h>
 #else