Mercurial > projects > ddmd
diff main.d @ 14:2cc604139636
Implemented Linux support for ddmd. Some parts are a bit hacky to just "get it working", that said, druntime and phobos compile, and unittests pass.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sun, 04 Apr 2010 02:06:32 +0100 |
parents | d706d958e4e8 |
children | fd4acc376c45 |
line wrap: on
line diff
--- a/main.d Wed Mar 31 16:29:36 2010 +0400 +++ b/main.d Sun Apr 04 02:06:32 2010 +0100 @@ -57,8 +57,12 @@ shared bool _d_isHalting = false; -import win32.windows; - +version (Windows) +{ + import win32.windows; +} +/* Link to druntimes main() */ +/+ extern (C) int main(int argc, char **argv) { char[][] args; @@ -141,7 +145,7 @@ return result; } - ++/ int main(string[] args) { Array files = new Array(); @@ -179,7 +183,7 @@ version (TARGET_WINDOS) { global.params.defaultlibname = "phobos"; -} else version (XXX) { //#elif TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS +} else version (POSIX) { //#elif TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS global.params.defaultlibname = "phobos2"; } else version (TARGET_NET) { } else { @@ -228,8 +232,8 @@ version (_WIN32) { inifile(args[0], "sc.ini"); -} else version (XXX) {///linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 - inifile(argv[0], "dmd.conf"); +} else version (POSIX) {///linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4 + inifile(args[0], "dmd.conf"); } else { static assert (false, "fix this"); } @@ -1102,4 +1106,4 @@ } return status; -} \ No newline at end of file +}