From: Alexandre Julliard Subject: Re: [PATCH] wininet: Include winsock2.h before stdlib.h. Message-Id: <87imp7cksc.fsf@wine> Date: Wed, 02 Oct 2019 15:57:23 +0200 In-Reply-To: (Jacek Caban's message of "Wed, 2 Oct 2019 14:28:18 +0200") References: Jacek Caban writes: > Hi Francois, > > > On 02/10/2019 12:33, Francois Gouget wrote: >> Otherwise winsock2.h's fd_set macros break which is >> included by on NetBSD. >> Moving winsock2.h after all system includes may work too because >> http.c does not (currently) use any of the fd_set APIs. But it seems >> like there would be a higher risk of mixing Unix socket types from the >> Unix headers with the Windows ones. >> So include winsock2.h first as recommended, but then _WIN32 is defined >> which causes zlib.h to use FAR which is not allowed in Wine code. So >> carve out an exception for it. > > > Using FAR by host zlib.h is worrying. Ideally, we'd move wininet to PE > file and not have to deal with it. zlib is one of the reasons it's not > done yet (using host APIs for proxy settings is the other > reason). Maybe we should import zlib to Wine and build it against > msvcrt? Yes, building as PE would be better. zlib should be fairly easy to fix, but I haven't done it yet because it wouldn't help without also fixing the proxy settings thing. Anybody wants to have a look at that one? -- Alexandre Julliard julliard@winehq.org