Ticket #1727: 0001-Correctly-quote-set-calls-in-Windows-scripts.patch

File 0001-Correctly-quote-set-calls-in-Windows-scripts.patch, 1.5 KB (added by Vasilij Schneidermann, 14 months ago)
  • egg-compile.scm

    From 1ad80d74e2513f7872bc9af38e9f0b588397a85c Mon Sep 17 00:00:00 2001
    From: Vasilij Schneidermann <mail@vasilij.de>
    Date: Sun, 11 Apr 2021 20:01:23 +0200
    Subject: [PATCH] Correctly quote set calls in Windows scripts
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    According to ​https://ss64.com/nt/set.html, the set command should
    quote its entire argument, including the name. Likewise, quotes inside
    paths are illegal, therefore no quotes should be used inside PATH.
    
    It appears that the Windows shell cannot deal with quoting inside an
    argument, only when quotes surround the argument. This is not the case
    on Unix environments at all.
    
    Closes #1727
    ---
     egg-compile.scm | 16 ++++++++--------
     1 file changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/egg-compile.scm b/egg-compile.scm
    index be05f6a6..583f5b41 100644
    a b EOF 
    11231123    ((windows)
    11241124     (printf #<<EOF
    11251125@echo off~%
    1126 set PATH=~a;%PATH%
    1127 set CHICKEN_CC=~a
    1128 set CHICKEN_CXX=~a
    1129 set CHICKEN_CSC=~a
    1130 set CHICKEN_CSI=~a
     1126set "PATH=~a;%PATH%"
     1127set "CHICKEN_CC=~a"
     1128set "CHICKEN_CXX=~a"
     1129set "CHICKEN_CSC=~a"
     1130set "CHICKEN_CSI=~a"
    11311131
    11321132EOF
    1133              (qs* default-bindir platform) (qs* default-cc platform)
    1134              (qs* default-cxx platform) (qs* default-csc platform)
    1135              (qs* default-csi platform)))))
     1133             default-bindir default-cc
     1134             default-cxx default-csc
     1135             default-csi))))
    11361136
    11371137(define ((build-suffix mode name info) platform)
    11381138  (case platform