[pkg-d-commits] [ldc] 45/211: Don't append dot to unknown extension for -of filename

Matthias Klumpp mak at moszumanska.debian.org
Sun Apr 23 22:36:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.1.0
in repository ldc.

commit b9811cef1c96032d0a6c34fca09e33d4cab4e809
Author: Martin <noone at nowhere.com>
Date:   Tue Sep 27 20:45:48 2016 +0200

    Don't append dot to unknown extension for -of filename
    
    I've previously missed this part when moving to the DMD output filenames.
    LDC used to enforce the target object file extension for all produced
    objects.
    
    So in `compilable/ldc_output_filenames.sh`, we tried to produce the object
    file `myObj.myExt.` instead of `myObj.myExt`. The tests passed on Windows,
    but failed at least on Linux.
---
 driver/main.cpp | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/driver/main.cpp b/driver/main.cpp
index 6097e12..ca945e5 100644
--- a/driver/main.cpp
+++ b/driver/main.cpp
@@ -626,15 +626,6 @@ void parseCommandLine(int argc, char **argv, Strings &sourceFiles,
       // so treat both 'o' and 'obj' extensions as object files
       global.params.output_o = OUTPUTFLAGset;
       autofound = true;
-    } else {
-      // append dot, so forceExt won't change existing name even if it contains
-      // dots
-      size_t len = strlen(global.params.objname);
-      char *s = static_cast<char *>(mem.xmalloc(len + 1 + 1));
-      memcpy(s, global.params.objname, len);
-      s[len] = '.';
-      s[len + 1] = 0;
-      global.params.objname = s;
     }
     if (autofound && global.params.output_o == OUTPUTFLAGdefault) {
       global.params.output_o = OUTPUTFLAGno;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list