diff gen/linker.cpp @ 534:7e2867ed70d9

Get rid of isLinux and isWindows in favor of global.params.os.
author Christian Kamm <kamm incasoftware de>
date Sun, 24 Aug 2008 16:22:58 +0200
parents 723027dd9593
children c23f4cfe4f2b
line wrap: on
line diff
--- a/gen/linker.cpp	Thu Aug 21 15:35:39 2008 +0200
+++ b/gen/linker.cpp	Sun Aug 24 16:22:58 2008 +0200
@@ -72,7 +72,7 @@
         else
             exestr = "a.out";
     }
-    if (global.params.isWindows)
+    if (global.params.os == OSWindows)
         exestr.append(".exe");
 
     std::string outopt = "-o=" + exestr;
@@ -151,13 +151,13 @@
     }
 
     // default libs
-    if(global.params.isLinux)
+    if(global.params.os == OSLinux)
     {
         args.push_back("-lpthread");
         args.push_back("-ldl");
         args.push_back("-lm");
     }
-    else if (global.params.isWindows)
+    else if (global.params.os == OSWindows)
     {
         // FIXME: I'd assume kernel32 etc
     }
@@ -174,12 +174,11 @@
     std::string runtime_path(global.params.runtimePath);
 
     // path seperator can be \ on windows, but we check for /
-    if (global.params.isWindows)
-    {
-        int i=0;
-        while ((i = runtime_path.find("\\", i)) > 0)
-            runtime_path.replace(i, 1, "/");
-    }
+#if _WIN32
+    int i=0;
+    while ((i = runtime_path.find("\\", i)) > 0)
+        runtime_path.replace(i, 1, "/");
+#endif
 
     if (*runtime_path.rbegin() != '/')
         runtime_path.append("/");