delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/06/21/16:16:27

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=YyE0P9WUYekBQeNP
qHFuaovQ6eHUYEJxdUlqf3/kMVoLWn6Yq8h8bmZ9KWIMh/afeEohfoOBbfT19Ziy
2hTiV7ZbJNuRAMGyBReNzGe8twOvcJHaG5/BLf9Vk6tz9UCJYMcd9b1xZNM4G40s
DOnlBzY7ll0zz4RUGIm/9Ug/eeQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=NYJjYK/SmwZVJ1tNofI7Tr
u4348=; b=lXTA8C+nWqKJ1+/LdgsRtHDQqaNWxGJhwjwq1x2XC8OFMDcBrHG8+H
tIv88VG4pltfR6GZGb57Q1zGYwVoU2wKZW3udBul5n7bbEro2oDzmchUw+w0j+LY
4sOr4EA8zP3F8/SQQACO+QUMIn0owmmlGGidUPlPg0Ylfqi980lbQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FREEMAIL_REPLY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 spammy=blanks, 21062019, 21.06.2019, H*r:sk:mailout
X-HELO: mailout05.t-online.de
Subject: Re: Process argument passing problems
To: cygwin AT cygwin DOT com
References: <5be40c24ed860fb56dc28523f464cadd5068c268 DOT camel AT gmail DOT com>
From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= <HBBroeker AT t-online DOT de>
Openpgp: preference=signencrypt
Message-ID: <13855b6c-f65e-b07f-3f6f-4ffd5cb945a6@t-online.de>
Date: Fri, 21 Jun 2019 22:15:23 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1
MIME-Version: 1.0
In-Reply-To: <5be40c24ed860fb56dc28523f464cadd5068c268.camel@gmail.com>
X-IsSubscribed: yes

Am 21.06.2019 um 17:19 schrieb reiter DOT christoph AT gmail DOT com:
> Hey everyone,
> 
> I have to following problem (using cmd.exe):
> 
> C:\cygwin64\home\xy>C:\cygwin64\bin\echo.exe -DFOO=\"BAR\" -DBAR=\"FOO\"
> -DFOO=\BAR" -DBAR="FOO"
> 
> I would have expected:
> 
> -DFOO="BAR" -DBAR="FOO"

Expecting cmd.exe to parse command lines in anything resembling a sane
way is, unfortunately, an exercise in futility.

Microsoft allowed blanks in filenames with hardly any regard for the
concepts of command lines and their parsing.  We're still fighting with
the repercussions now, 25 years later.

> Context: I'm executing various cygwin programs through (native) Python and
> passing C macros to gcc like 'gcc -DFOO=\"BAR\"' fails because of this.

Are you sure Python even goes through cmd.exe to pass those command
lines?  If it doesn't, figuring out what cmd.exe does may be even less
fruitful than it already is.

> More background: https://github.com/msys2/MINGW-packages/issues/3548

Please note that that's about MSYS2, which, while closely related to
Cygwin, is not really the topic of this mailing list.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019