Mercurial > projects > ldc
diff dmd/mars.c @ 872:aa953cc960b6
Apply BlueZeniX's patch for OpenSolaris compatibility. Fixes #158.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 04 Jan 2009 15:49:28 +0100 |
parents | 82ad6c0c601c |
children | 330f999ade44 |
line wrap: on
line diff
--- a/dmd/mars.c Sun Jan 04 15:39:34 2009 +0100 +++ b/dmd/mars.c Sun Jan 04 15:49:28 2009 +0100 @@ -338,8 +338,10 @@ global.params.os = OSMacOSX; #elif __FreeBSD__ global.params.os = OSFreeBSD; +#elif defined (__SVR4) && defined (__sun) + global.params.os = OSSolaris; #else -#error Unsupported OS + #error Unsupported OS #endif /* linux */ assert(global.params.os != OSinvalid); @@ -694,6 +696,8 @@ global.params.os = OSMacOSX; else if(strcmp(p + 2, "FreeBSD") == 0) global.params.os = OSFreeBSD; + else if(strcmp(p + 2, "Solaris") == 0) + global.params.os = OSSolaris; else error("unrecognized target os '%s'", p + 2); } @@ -929,6 +933,11 @@ VersionCondition::addPredefinedGlobalIdent("Posix"); break; + case OSSolaris: + VersionCondition::addPredefinedGlobalIdent("solaris"); + VersionCondition::addPredefinedGlobalIdent("Posix"); + break; + default: assert(false && "Target OS not supported"); }