diff dmd/mars.c @ 637:29dc68c949b0

Applied the FreeBSD patch from Ralith, closes ticket #95 , slightly changed but basically the same. Thanx Ralith :)
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Thu, 02 Oct 2008 03:25:46 +0200
parents 12bda38ea366
children 94b01f15814f
line wrap: on
line diff
--- a/dmd/mars.c	Thu Oct 02 01:42:21 2008 +0200
+++ b/dmd/mars.c	Thu Oct 02 03:25:46 2008 +0200
@@ -330,8 +330,10 @@
     global.params.os = OSLinux;
 #elif __APPLE__
     global.params.os = OSMacOSX;
+#elif __FreeBSD__
+    global.params.os = OSFreeBSD;
 #else
-#error
+#error Unsupported OS
 #endif /* linux */
 
     assert(global.params.os != OSinvalid);
@@ -843,6 +845,11 @@
 	global.params.tt_os = "-pc-darwin-gnu";
     break;
 
+    case OSFreeBSD:
+    VersionCondition::addPredefinedGlobalIdent("freebsd");
+    VersionCondition::addPredefinedGlobalIdent("Posix");
+    break;
+
     default:
 	assert(false && "Target OS not supported");
     }