delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/05/18/11:10:14

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 18 May 2010 11:09:58 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: vfork always fail problem
Message-ID: <20100518150957.GA7838@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <AANLkTik_jo0N1YtUTFLzsqAsv5OkkyjCG9epeMq55bWk AT mail DOT gmail DOT com> <op DOT vcop6qoo1e62zd AT merlin DOT emma DOT line DOT org> <AANLkTikoAoUAarNLwuIHe6GypKg62rjKR1VPyQYygT17 AT mail DOT gmail DOT com> <20100514192202 DOT GB8785 AT calimero DOT vinschen DOT de> <u1vd9ahgy DOT fsf AT acm DOT org> <20100518143136 DOT GB5909 AT ednor DOT casa DOT cgf DOT cx> <4BF2A806 DOT 9030603 AT redhat DOT com>
MIME-Version: 1.0
In-Reply-To: <4BF2A806.9030603@redhat.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Tue, May 18, 2010 at 08:45:26AM -0600, Eric Blake wrote:
>On 05/18/2010 08:31 AM, Christopher Faylor wrote:
>>>
>>> -      WCHAR corefile[strlen (p) + sizeof (".stackdump")];
>>> +      WCHAR corefile[wcslen (p) + sizeof (L".stackdump")];
>>                                     ^^^^^^^^^^^^^^^^^^^^^^
>> No L" is needed here, AFAICT.
>>
>> I've checked this in, removing the L.
>
>I had to think about that, so I'm replying to document my thoughts.  You
>want either 'sizeof (".stackdump")' or 'sizeof (L".stackdump") / sizeof
>WCHAR'; and since both give the same value, Chris' change is correct.

Lately, I've been partial to (strlen (".stackdump") + 1) since that
usually translates to a constant.  I didn't do that in this case since
the original code didn't do it.

Of course, the L doesn't hurt anything, regardless.

Btw, there is now a snapshot with this change:

  http://cygwin.com/snapshots/

To the OP: please check it out and verify that it solves your problem.

cgf

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