delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/07/17/10:21:06

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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=oTNVd0O1W5QhCJp5MCWsvvM4b8LvAI5CnGEJoTmp7hb
/5JGtmlnttMvs+ggRjM0oUbCZOBqZlmJYiP1nsTAqmtixj/6/egZ06BeD4I491Li
WxS5cRk7sIJudlUhQcUivG4Q5ysTuMrf7LBpt2ejcaiHVkO25DRTYbt995nuY1mU
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=jvt21HZkJQZacO6xWDmEBFdO6qU=; b=UKwx/yiYsr5TKRV8T
mWuhZm/QFe8Gj7qNcyd7gea0nmT1aG1dkB18wkK+PzJKpeDAK/ywbUol/8sYsxyz
98r3EvA4wcZmtR4urkIUPAoVd149/4YbM56uE4cokqTwMSgW8gE4xCXC/wrSftQa
Z+sTQYtuPdvrtS5+GSHJ7I3Lvk=
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
X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_20,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1
Message-ID: <51E6A836.80800@cwilson.fastmail.fm>
Date: Wed, 17 Jul 2013 10:20:38 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7
MIME-Version: 1.0
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Subject: Re: Issue with run.exe and PWD with spaces since last update (Cygwin 1.7.21)
References: <295777180 DOT 20130716202913 AT mtu-net DOT ru> <20130717125916 DOT GB21347 AT calimero DOT vinschen DOT de> <51E69DE2 DOT 10008 AT cwilson DOT fastmail DOT fm> <20130717134532 DOT GC32258 AT calimero DOT vinschen DOT de> <51E6A3DB DOT 7050605 AT cwilson DOT fastmail DOT fm> <20130717141042 DOT GE32258 AT calimero DOT vinschen DOT de>
In-Reply-To: <20130717141042.GE32258@calimero.vinschen.de>

On 7/17/2013 10:10 AM, Corinna Vinschen wrote:
> Uhm.  In that case, if ew *really* think your tools are the only
> affected ones, Why do we bother to fix libcmain.c?  Can't you then
> simply provide your own main() in case of building for Cygwin?

Perhaps, but I'm not sure of the ramifications. I think if you have a 
main() then you're going to get STD_HANDLES. Plus there's the whole 
concern about launching run[2].exe itself without a cmdbox, when it is 
used as a shortcut target.

This whole entrypoint thing is tied up in that, or at least it used to 
be.  Now, that may ONLY apply to the mingw[64]-compiled version, in 
which case I could do a

#ifdef __CYGWIN__
int main (int argc, char** argv)
{
    return realmain(argc, argv);
}
#endif
and avoid the -e WinMain AT 16 link argument. (Except I think I arrange to 
only do -e WinMain AT 16 on mingw...hmm...)

If you look closely at WinMain, it basically parses the result from 
GetCommandLine() into argc,argv, and then delegates. The only 
conceivable reason to do that, rather than just have a main(), was if 
you NEED to use WinMain() as the entry point for some other reason. Like 
ensuring that you "work" when compiled as a non-console app and don't 
pop up a dosbox...

--
Chuck


--
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