Re: [PATCH] Compile fix for MSVC: Move poll.h out of sys-folder

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

 



Op 18-11-2011 15:28, Erik Faye-Lund schreef:
On Fri, Nov 18, 2011 at 3:09 PM, Erik Faye-Lund<kusmabite@xxxxxxxxx>  wrote:
On Fri, Nov 18, 2011 at 2:47 PM, Vincent van Ravesteijn<vfr@xxxxxxx>  wrote:
In v1.7.7.1-432-g0f77dea (Oct 24 2011; Erik Faye-Lund; mingw: move
poll out of sys-folder) poll.h was moved out of the compat/win32/sys
folder. As the change in the Makefile also affects the MSVC build,
the same must be done for poll.h in compat/vcbuild/include/sys/poll.h.

Signed-off-by: Vincent van Ravesteijn<vfr@xxxxxxx>
---
  compat/vcbuild/include/poll.h     |    1 +
  compat/vcbuild/include/sys/poll.h |    1 -
  2 files changed, 1 insertions(+), 1 deletions(-)
  create mode 100644 compat/vcbuild/include/poll.h
  delete mode 100644 compat/vcbuild/include/sys/poll.h

This looks strange to me. vcbuild/include/poll.h will only prevent the
correct header from being included, while compiling an linking against
compat/win32/poll.[co]... That seems dangerous to me, because the
interface might be declared differently.

Instead, I think compat/vcbuild/include/poll.h should be removed, and
_WIN32_WINNT set to a value below 0x600. That way the poll-stuff
doesn't get pulled in by winsock2.h (as it's Vista and above only).

This was already discussed in your "[PATCHv2] Compile fix for MSVC" thread:
http://mid.gmane.org/CABPQNSaCRRRpEQPG1Mb4DovkMdQSBhHTm-i7y5M4iT+ndHX4XA@xxxxxxxxxxxxxx

Here's the patch that fixes it.
Johannes Schindelin was nice enough to create a commit based on my
e-mail, feel free to pick it up and submit it:

https://github.com/msysgit/git/commit/9ca803910f3625bf686699f6b0bf71a8c68bccae

I resended a patch series including this one.

Vincent
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]