GNU bug report logs -
#12993
Wrong icon for Cygw32-Emacs
Previous Next
Full log
Message #38 received at 12993 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 12/10/2012 11:57 AM, Eli Zaretskii wrote:
>> Date: Mon, 10 Dec 2012 08:24:30 -0800
>> From: Daniel Colascione <dancol <at> dancol.org>
>> CC: 12993 <at> debbugs.gnu.org, angelo.graziosi <at> alice.it
>>
>>> SetErrorMode (SEM_FAILCRITICALERRORS);
>>> -
>>> - /* Invoke the NT CRT startup routine now that our housecleaning
>>> - is finished. */
>>> -#ifdef HAVE_NTGUI
>>> - /* determine WinMain args like crt0.c does */
>>> - hinst = GetModuleHandle (NULL);
>>> - lpCmdLine = GetCommandLine ();
>>> - nCmdShow = SW_SHOWDEFAULT;
>>> -#endif
>>> mainCRTStartup ();
>>> }
>>>
>>> What do you know about lpCmdLine and nCmdShow, and "what crt0.c does"
>>> with them, to be sure they can be removed?
>>
>> I removed dead code. Those variables are never used; the C runtime (to
>> which we dynamically link anyway) handles this initialization
>> internally.
>
> I'm not sure. To me, it looks like we are _replacing_ the _start
> function from the C runtime, and therefore whoever wrote this code
> wanted to do things like the C runtime does. I see similar code in
> crt0.c from the Windows Platform SDK. If you know why this is dead
> code, please tell the details.
I don't see that code in my copy of VS10's crt0.c.
The code is useless because it doesn't affect program execution. The symbols
lpCmdLine and nCmdShow are defined only because we define them. (If you declare
them extern without defining them, compilation fails.) Therefore, Emacs is the
only user of these variables. The variables aren't used elsewhere in Emacs code
either.
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 12 years and 49 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.