changeset 863:6c850977a941

modified gen/linker.cpp to only append .exe suffix on windows if not already present
author elrood
date Thu, 18 Dec 2008 19:24:33 +0100
parents e8337278f49b
children cd87b3f15ccf
files gen/linker.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gen/linker.cpp	Thu Dec 18 19:21:44 2008 +0100
+++ b/gen/linker.cpp	Thu Dec 18 19:24:33 2008 +0100
@@ -72,7 +72,7 @@
         else
             exestr = "a.out";
     }
-    if (global.params.os == OSWindows)
+    if (global.params.os == OSWindows && !(exestr.substr(exestr.length()-4) == ".exe"))
         exestr.append(".exe");
 
     std::string outopt = "-o=" + exestr;
@@ -240,7 +240,7 @@
         else
             exestr = "a.out";
     }
-    if (global.params.os == OSWindows)
+    if (global.params.os == OSWindows && !(exestr.rfind(".exe") == exestr.length()-4))
         exestr.append(".exe");
 
     args.push_back("-o");