bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12993: Wrong icon for Cygw32-Emacs


From: Daniel Colascione
Subject: bug#12993: Wrong icon for Cygw32-Emacs
Date: Mon, 10 Dec 2012 13:05:40 -0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2

On 12/10/2012 11:57 AM, Eli Zaretskii wrote:
>> Date: Mon, 10 Dec 2012 08:24:30 -0800
>> From: Daniel Colascione <dancol@dancol.org>
>> CC: 12993@debbugs.gnu.org, angelo.graziosi@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.


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]