This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vfork always fail problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]