Re: Patch to guard #define WIN32_LEAN_AND_MEAN

Nick Wellnhofer <[email protected]>
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
On 09/11/2017 16:58, Roumen Petrov wrote:
> It is more correct do not define WIN32_LEAN_AND_MEAN in libxml and/or libxslt 
> code. Better is configure.ac and respective configuation file for msvc to 
> define such macro.

Why? Personally, I try to avoid defining macros on the command line wherever 
possible because it's action at a distance and inflexible. In my opinion, it's 
more robust to define the macro in code, having a single source of truth. Note 
that we only define the macro in .c files, so users including the public 
headers won't run into conflicts. I'm aware that there is a bit of redundancy 
right now because the macro is defined every time we include windows.h but 
this could be worked around.

Chromium is an exception since they integrate a static build of the library, 
but `configs -= [ ... ]` seems like a simple solution.

Nick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.