From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: GIT Mailing-list <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Erik Faye-Lund <kusmabite@gmail.com>,
Jonathan Nieder <jrnieder@gmail.com>,
Johannes Sixt <j6t@kdbg.org>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH 1/5] msvc: Fix compilation errors caused by poll.h emulation
Date: Thu, 31 Jan 2013 18:28:35 +0000 [thread overview]
Message-ID: <510AB7D3.7010407@ramsay1.demon.co.uk> (raw)
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.
Also, we delete the compat/vcbuild/include/sys/poll.h header file, since
it is now redundant and it's presence may cause some confusion.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
compat/vcbuild/include/sys/poll.h | 1 -
git-compat-util.h | 3 +++
2 files changed, 3 insertions(+), 1 deletion(-)
delete mode 100644 compat/vcbuild/include/sys/poll.h
diff --git a/compat/vcbuild/include/sys/poll.h b/compat/vcbuild/include/sys/poll.h
deleted file mode 100644
index 0d8552a..0000000
--- a/compat/vcbuild/include/sys/poll.h
+++ /dev/null
@@ -1 +0,0 @@
-/* Intentionally empty file to support building git with MSVC */
diff --git a/git-compat-util.h b/git-compat-util.h
index cc2abee..204cb1e 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -86,6 +86,9 @@
#define _SGI_SOURCE 1
#ifdef WIN32 /* Both MinGW and MSVC */
+# if defined (_MSC_VER)
+# define _WIN32_WINNT 0x0502
+# endif
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
#include <winsock2.h>
#include <windows.h>
--
1.8.1
next reply other threads:[~2013-01-31 18:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-31 18:28 Ramsay Jones [this message]
2013-05-09 1:42 ` [PATCH 1/5] msvc: Fix compilation errors caused by poll.h emulation Sven Strickroth
2013-05-09 20:35 ` Ramsay Jones
2013-05-09 21:12 ` Sven Strickroth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=510AB7D3.7010407@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jrnieder@gmail.com \
--cc=kusmabite@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).