{"thread":{"id":"28974","subject":"[PATCH 1/3] MSVC: Remove vcbuild/include/sys/poll.h","startedAt":"2011-11-18T16:44:28Z","lastAt":"2011-11-22T07:30:00Z","messageCount":5,"participants":["Vincent van Ravesteijn","Sebastian Schuberth"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"179706","messageId":"1321634670-4968-1-git-send-email-vfr@lyx.org","threadId":"28974","inReplyTo":null,"subject":"[PATCH 1/3] MSVC: Remove vcbuild/include/sys/poll.h","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-11-18T16:44:28Z","receivedAt":"2011-11-18T16:44:28Z","isPatch":true,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"In v1.7.7.1-432-g0f77dea (Oct 24 2011; Erik Faye-Lund; mingw: move\npoll out of sys-folder) poll.h was moved out of the compat/win32/sys\nfolder. As the change in the Makefile also affects the MSVC build,\nthis file was no longer used.\n\nSigned-off-by: Vincent van Ravesteijn <vfr@lyx.org>\n---\n compat/vcbuild/include/sys/poll.h |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n delete mode 100644 compat/vcbuild/include/sys/poll.h\n\ndiff --git a/compat/vcbuild/include/sys/poll.h b/compat/vcbuild/include/sys/poll.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/sys/poll.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\n-- \n1.7.4.1\n"},{"id":"179707","messageId":"1321634670-4968-2-git-send-email-vfr@lyx.org","threadId":"28974","inReplyTo":"1321634670-4968-1-git-send-email-vfr@lyx.org","subject":"[PATCH 2/3] Compile fix for MSVC: fix poll-related macro redefines","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-11-18T16:44:29Z","receivedAt":"2011-11-18T16:44:29Z","isPatch":true,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"This seems to be related to the poll-emulation... I see that these things\nare guarded by an \"#if(_WIN32_WINNT >= 0x0600)\" in <winsock2.h>, which\nmeans it's supported for Windows Vista and above... We still support\nWindows XP, so it seems someone has set this too high :)\n\nI'd prefer to set this from the Makefile, but this generates a warning in\ncompat/win32/poll.c about redefining a macro (poll.c wants it to be 0x502,\nwhich is Windows XP with SP2, rather than 0x501 which is normal Windows\nXP).\n\nProposed-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSubmitted-by: Vincent van Ravesteijn <vfr@lyx.org>\n---\n compat/mingw.h    |    1 +\n git-compat-util.h |    1 +\n 2 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex fecf0d0..ff18401 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -1,3 +1,4 @@\n+#define _WIN32_WINNT 0x0501\n #include <winsock2.h>\n #include <ws2tcpip.h>\n \ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 5ef8ff7..76cbfe6 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -85,6 +85,7 @@\n #define _SGI_SOURCE 1\n \n #ifdef WIN32 /* Both MinGW and MSVC */\n+#  define _WIN32_WINNT 0x0501\n #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */\n #include <winsock2.h>\n #include <windows.h>\n-- \n1.7.4.1\n"},{"id":"179708","messageId":"1321634670-4968-3-git-send-email-vfr@lyx.org","threadId":"28974","inReplyTo":"1321634670-4968-1-git-send-email-vfr@lyx.org","subject":"[PATCH 3/3] Compile fix for MSVC: Use NO_INET_PTON and NO_INET_NTOP","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-11-18T16:44:30Z","receivedAt":"2011-11-18T16:44:30Z","isPatch":true,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"This is needed to compile daemon.c.\n\nIn v1.7.3.2-162-ga666b47 (Nov 4 2010; Erik Faye-Lund <kusmabite@gmail.com>;\ndaemon: opt-out on features that require posix) this was introduced for\nMingW, but this is also necessary for MSVC.\n\nSigned-off-by: Vincent van Ravesteijn <vfr@lyx.org>\n---\n Makefile |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex ee34eab..b9d53aa 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1120,6 +1120,8 @@ ifeq ($(uname_S),Windows)\n \tBLK_SHA1 = YesPlease\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tNATIVE_CRLF = YesPlease\n+\tNO_INET_PTON = YesPlease\n+\tNO_INET_NTOP = YesPlease\n \n \tCC = compat/vcbuild/scripts/clink.pl\n \tAR = compat/vcbuild/scripts/lib.pl\n-- \n1.7.4.1\n"},{"id":"179710","messageId":"4EC6978D.3020604@gmail.com","threadId":"28974","inReplyTo":"1321634670-4968-2-git-send-email-vfr@lyx.org","subject":"Re: [PATCH 2/3] Compile fix for MSVC: fix poll-related macro redefines","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2011-11-18T17:36:13Z","receivedAt":"2011-11-18T17:36:13Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On 18.11.2011 17:44, Vincent van Ravesteijn wrote:\n\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index 5ef8ff7..76cbfe6 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -85,6 +85,7 @@\n>  #define _SGI_SOURCE 1\n>\n>  #ifdef WIN32 /* Both MinGW and MSVC */\n> +#  define _WIN32_WINNT 0x0501\n>  #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */\n>  #include<winsock2.h>\n>  #include<windows.h>\n\nIt seems the indentation is wrong (does not match the surrounding code) \nhere.\n\n-- \nSebastian Schuberth\n"},{"id":"179817","messageId":"4ECB4F78.40309@lyx.org","threadId":"28974","inReplyTo":"4EC6978D.3020604@gmail.com","subject":"Re: [PATCH 2/3] Compile fix for MSVC: fix poll-related macro redefines","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-11-22T07:30:00Z","receivedAt":"2011-11-22T07:30:00Z","isPatch":true,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"Op 18-11-2011 18:36, Sebastian Schuberth schreef:\n> On 18.11.2011 17:44, Vincent van Ravesteijn wrote:\n>\n>> diff --git a/git-compat-util.h b/git-compat-util.h\n>> index 5ef8ff7..76cbfe6 100644\n>> --- a/git-compat-util.h\n>> +++ b/git-compat-util.h\n>> @@ -85,6 +85,7 @@\n>>  #define _SGI_SOURCE 1\n>>\n>>  #ifdef WIN32 /* Both MinGW and MSVC */\n>> +#  define _WIN32_WINNT 0x0501\n>>  #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */\n>>  #include<winsock2.h>\n>>  #include<windows.h>\n>\n> It seems the indentation is wrong (does not match the surrounding \n> code) here.\n>\n\nYes, you're right. I will reroll the patch series when there is somewhat \nmore feedback on the series.\n\nVincent\n"}]}