git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] msvc: Fix compilation errors caused by poll.h emulation

From
SSSven Strickroth <sven@cs-ware.de>
Date
May 9, 2013, 01:42 UTC
Message-ID
<518AFEFC.8010904@cs-ware.de>
In-Reply-To
<510AB7D3.7010407@ramsay1.demon.co.uk>
Am 31.01.2013 19:28 schrieb Ramsay Jones:
Show 10 quoted lines
> Commit 0f77dea9 ("mingw: move poll out of sys-folder", 24-10-2011), along
> with other commits in the 'ef/mingw-upload-archive' branch (see commit
> 7406aa20), effectively reintroduced the same problem addressed by commit
> 56fb3ddc ("msvc: Fix compilation errors in compat/win32/sys/poll.c",
> 04-12-2010).
> 
> In order to fix the compilation errors, we use the same solution adopted
> in that earlier commit. In particular, we set _WIN32_WINNT to 0x0502
> (which would target Windows Server 2003) prior to including the winsock2.h
> header file.

This change causes problems compiling with MSVC2012 for me. If I don't define NO_SYS_POLL_H git-compat-util.h now tries to include <sys/poll.h> which does not exist for MSVC and if I define NO_SYS_POLL_H git-compat-util.h now tries to include <poll.h> which also doesn't exist for MSVC.

Including compat/poll into the includes path causes redefinition errors.
How have you tested this?

I think the check in git-compat-util.h has to be extended to only include any poll.h if _MSC_VER is defined.

-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server
Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 4 in “msvc: Fix compilation errors caused by poll.h emulation”
  1. 1/5 msvc: Fix compilation errors caused by poll.h emulationRamsay Jones, Jan 31, 2013
  2. Sven StrickrothMay 9, 2013
  3. Ramsay JonesMay 9, 2013
  4. Sven StrickrothMay 9, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.