changeset 536:0d2db7efa105

Add isnan for __APPLE__ and darwin version ident for OSX.
author Christian Kamm <kamm incasoftware de>
date Sun, 24 Aug 2008 16:59:08 +0200
parents f79bbd1d0b27
children bfbd71f60572
files dmd/expression.c dmd/mars.c
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dmd/expression.c	Sun Aug 24 16:54:06 2008 +0200
+++ b/dmd/expression.c	Sun Aug 24 16:59:08 2008 +0200
@@ -25,6 +25,12 @@
 #endif
 #endif
 
+#ifdef __APPLE__
+#ifndef isnan
+int isnan(double);
+#endif
+#endif
+
 #if IN_GCC
 // Issues with using -include total.h (defines integer_t) and then complex.h fails...
 #undef integer_t
--- a/dmd/mars.c	Sun Aug 24 16:54:06 2008 +0200
+++ b/dmd/mars.c	Sun Aug 24 16:59:08 2008 +0200
@@ -314,6 +314,8 @@
     global.params.os = OSWindows;
 #elif linux
     global.params.os = OSLinux;
+#elif __APPLY__
+    global.params.os = OSMacOSX;
 #else
 #error
 #endif /* linux */
@@ -749,12 +751,16 @@
 	global.params.tt_os = "-pc-mingw32";
 	break;
 
-    case OSLinux: 
+    case OSLinux:
 	VersionCondition::addPredefinedGlobalIdent("linux");
 	VersionCondition::addPredefinedGlobalIdent("Posix");
 	global.params.tt_os = "-pc-linux-gnu";
 	break;
 
+    case OSMacOSX:
+	VersionCondition::addPredefinedGlobalIdent("darwin");
+	global.params.tt_os = "-pc-darwin-gnu";
+
     default:
 	assert(false && "Target OS not supported");
     }