bug-gnulib
[Top][All Lists]
Advanced

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

Re: Emacs build fails on Windows mingw64


From: Paul Eggert
Subject: Re: Emacs build fails on Windows mingw64
Date: Sun, 24 Oct 2021 08:25:29 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 10/24/21 2:26 AM, Eli Zaretskii wrote:
Let me turn the table and ask why that declaration of strdup is at all
needed in Gnulib's string.h when it's used in MinGW builds?

It's so that apps can be checked better statically. For example, the contrived code:

   return strcmp (x, strdup (x));

getts a diagnostic about a memory leak. This can be helpful regardless of whether Gnulib's strdup substitute code is used.

The Gnulib wrapper here is merely mimicking what glibc does; it's not a Gnulib invention.


ntlib cannot include config.h,
due to various redefinitions and redirections we do in ms-w32.h for
Emacs.

I now see Emacs has a symbol DEFER_MS_W3_H to deal with this glitch. So how about the attached patch instead? If it doesn't suffice, presumably something like DEFER_MS_W3_H would suffice.

Attachment: 0001-Include-config.h-first-in-MS-Windows-source.patch
Description: Text Data


reply via email to

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