{"thread":{"id":"28809","subject":"[PATCHv2] Compile fix for MSVC","startedAt":"2011-10-31T19:12:41Z","lastAt":"2011-11-04T15:39:43Z","messageCount":22,"participants":["Vincent van Ravesteijn","Junio C Hamano","Johannes Schindelin","Erik Faye-Lund","Pat Thoyts","Sebastian Schuberth"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"178569","messageId":"1320088364-25916-1-git-send-email-vfr@lyx.org","threadId":"28809","inReplyTo":null,"subject":"[PATCHv2] Compile fix for MSVC","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-10-31T19:12:41Z","receivedAt":"2011-10-31T19:12:41Z","isPatch":false,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"This is a re-roll of the patch series sent to the list \non 21-10-2011.\n\nThis time the lines are not wrapped and the commit messages\nare updated with changes from me and Junio.\n\n[PATCH 1/3] Compile fix for MSVC: Do not include sys/resources.h\n[PATCH 2/3] Compile fix for MSVC: Include <io.h>\n[PATCH 3/3] MSVC: Remove unneeded header stubs\n"},{"id":"178570","messageId":"1320088364-25916-2-git-send-email-vfr@lyx.org","threadId":"28809","inReplyTo":"1320088364-25916-1-git-send-email-vfr@lyx.org","subject":"[PATCH 1/3] Compile fix for MSVC: Do not include sys/resources.h","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-10-31T19:12:42Z","receivedAt":"2011-10-31T19:12:42Z","isPatch":true,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"Do not include header files when compiling with MSVC that do not\nexist and which are also not included when compiling with MINGW.\nA direct consequence is that git can be compiled again with MSVC\nbecause the missing \"sys/resources.h\" is no longer included.\n\nInstead of current\n\n\t#ifndef mingw32 is the only one that is strange\n        ... everything for systems that is not strange ...\n        #else\n        ... include mingw specific tweaks ...\n        #endif\n        #ifdef msvc is also strange\n        ... include msvc specific tweaks ...\n        #endif\n\nit turns things around and says what it wants to achieve in a more direct\nway, i.e.\n\n\t#if mingw32\n        #include \"compat/mingw.h\"\n\t#elif msvc\n        #include \"compat/msvc.h\"\n\t#else\n        ... all the others ...\n\t#endif\n\nwhich makes it look simpler.\n\nSigned-off-by: Vincent van Ravesteijn <vfr@lyx.org>\nHelped-by: Junio C Hamano <gitster@pobox.com>\n---\n git-compat-util.h |   13 ++++++-------\n 1 files changed, 6 insertions(+), 7 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 5ef8ff7..53186da 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -116,7 +116,12 @@\n #else\n #include <poll.h>\n #endif\n-#ifndef __MINGW32__\n+#if defined(__MINGW32__)\n+/* pull in Windows compatibility stuff */\n+#include \"compat/mingw.h\"\n+#elif defined(_MSC_VER)\n+#include \"compat/msvc.h\"\n+#else\n #include <sys/wait.h>\n #include <sys/resource.h>\n #include <sys/socket.h>\n@@ -145,12 +150,6 @@\n #include <grp.h>\n #define _ALL_SOURCE 1\n #endif\n-#else \t/* __MINGW32__ */\n-/* pull in Windows compatibility stuff */\n-#include \"compat/mingw.h\"\n-#endif\t/* __MINGW32__ */\n-#ifdef _MSC_VER\n-#include \"compat/msvc.h\"\n #endif\n \n #ifndef NO_LIBGEN_H\n-- \n1.7.4.1\n"},{"id":"178571","messageId":"1320088364-25916-3-git-send-email-vfr@lyx.org","threadId":"28809","inReplyTo":"1320088364-25916-1-git-send-email-vfr@lyx.org","subject":"[PATCH 2/3] Compile fix for MSVC: Include <io.h>","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-10-31T19:12:43Z","receivedAt":"2011-10-31T19:12:43Z","isPatch":true,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"This include is needed for _commit(..) which is used in mingw.h.\n\nSigned-off-by: Vincent van Ravesteijn <vfr@lyx.org>\n---\n compat/msvc.h |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/msvc.h b/compat/msvc.h\nindex a33b01c..aa4b563 100644\n--- a/compat/msvc.h\n+++ b/compat/msvc.h\n@@ -4,6 +4,7 @@\n #include <direct.h>\n #include <process.h>\n #include <malloc.h>\n+#include <io.h>\n \n /* porting function */\n #define inline __inline\n-- \n1.7.4.1\n"},{"id":"178572","messageId":"1320088364-25916-4-git-send-email-vfr@lyx.org","threadId":"28809","inReplyTo":"1320088364-25916-1-git-send-email-vfr@lyx.org","subject":"[PATCH 3/3] MSVC: Remove unneeded header stubs","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-10-31T19:12:44Z","receivedAt":"2011-10-31T19:12:44Z","isPatch":true,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"These headers are no longer needed since they are no longer\nunnecessarily included in git-compat-util.h.\n\nSigned-off-by: Vincent van Ravesteijn <vfr@lyx.org>\n---\n compat/vcbuild/include/arpa/inet.h   |    1 -\n compat/vcbuild/include/grp.h         |    1 -\n compat/vcbuild/include/inttypes.h    |    1 -\n compat/vcbuild/include/netdb.h       |    1 -\n compat/vcbuild/include/netinet/in.h  |    1 -\n compat/vcbuild/include/netinet/tcp.h |    1 -\n compat/vcbuild/include/pwd.h         |    1 -\n compat/vcbuild/include/sys/ioctl.h   |    1 -\n compat/vcbuild/include/sys/select.h  |    1 -\n compat/vcbuild/include/sys/socket.h  |    1 -\n compat/vcbuild/include/sys/wait.h    |    1 -\n compat/vcbuild/include/termios.h     |    1 -\n 12 files changed, 0 insertions(+), 12 deletions(-)\n delete mode 100644 compat/vcbuild/include/arpa/inet.h\n delete mode 100644 compat/vcbuild/include/grp.h\n delete mode 100644 compat/vcbuild/include/inttypes.h\n delete mode 100644 compat/vcbuild/include/netdb.h\n delete mode 100644 compat/vcbuild/include/netinet/in.h\n delete mode 100644 compat/vcbuild/include/netinet/tcp.h\n delete mode 100644 compat/vcbuild/include/pwd.h\n delete mode 100644 compat/vcbuild/include/sys/ioctl.h\n delete mode 100644 compat/vcbuild/include/sys/select.h\n delete mode 100644 compat/vcbuild/include/sys/socket.h\n delete mode 100644 compat/vcbuild/include/sys/wait.h\n delete mode 100644 compat/vcbuild/include/termios.h\n\ndiff --git a/compat/vcbuild/include/arpa/inet.h b/compat/vcbuild/include/arpa/inet.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/arpa/inet.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/grp.h b/compat/vcbuild/include/grp.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/grp.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/inttypes.h b/compat/vcbuild/include/inttypes.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/inttypes.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/netdb.h b/compat/vcbuild/include/netdb.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/netdb.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/netinet/in.h b/compat/vcbuild/include/netinet/in.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/netinet/in.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/netinet/tcp.h b/compat/vcbuild/include/netinet/tcp.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/netinet/tcp.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/pwd.h b/compat/vcbuild/include/pwd.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/pwd.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/sys/ioctl.h b/compat/vcbuild/include/sys/ioctl.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/sys/ioctl.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/sys/select.h b/compat/vcbuild/include/sys/select.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/sys/select.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/sys/socket.h b/compat/vcbuild/include/sys/socket.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/sys/socket.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/sys/wait.h b/compat/vcbuild/include/sys/wait.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/sys/wait.h\n+++ /dev/null\n@@ -1 +0,0 @@\n-/* Intentionally empty file to support building git with MSVC */\ndiff --git a/compat/vcbuild/include/termios.h b/compat/vcbuild/include/termios.h\ndeleted file mode 100644\nindex 0d8552a..0000000\n--- a/compat/vcbuild/include/termios.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":"178580","messageId":"7vd3dcq4s5.fsf@alter.siamese.dyndns.org","threadId":"28809","inReplyTo":"1320088364-25916-1-git-send-email-vfr@lyx.org","subject":"Re: [PATCHv2] Compile fix for MSVC","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-31T20:34:18Z","receivedAt":"2011-10-31T20:34:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks. The patch looks good from a POSIX person's point of view, and I do\nnot immediately see how this would break other variants of Windows build\nat least from the code inspection.\n\nSo I'll queue this, but I'll leave it to you and msysgit folks to decide\nif this topic should be merged to 1.7.8-rc1, as I do not have equipment,\nexpertise, nor time to judge it myself (other than the code inspection we\nhave already done here).\n\nPlease give me an Ack or two by the end of this week. Thanks.\n"},{"id":"178604","messageId":"alpine.DEB.1.00.1110311908240.1930@bonsai2","threadId":"28809","inReplyTo":"7vd3dcq4s5.fsf@alter.siamese.dyndns.org","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2011-11-01T00:09:27Z","receivedAt":"2011-11-01T00:09:27Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 31 Oct 2011, Junio C Hamano wrote:\n\n> Thanks. The patch looks good from a POSIX person's point of view, and I \n> do not immediately see how this would break other variants of Windows \n> build at least from the code inspection.\n\nAs my virtual machine still ran the test suite after my latest rebasing \nmerge when I left work, I could not test the MSVC stuff just yet. I wanted \nto do that tomorrow and either merge or come back with suggestions.\n\nCiao,\nJohannes\n"},{"id":"178605","messageId":"CABPQNSaW+ciEzAMruYVgK_y2xf=sExYiFfdbS4xonKe=h-APjA@mail.gmail.com","threadId":"28809","inReplyTo":"7vd3dcq4s5.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCHv2] Compile fix for MSVC","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2011-11-01T00:36:27Z","receivedAt":"2011-11-01T00:36:27Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Mon, Oct 31, 2011 at 9:34 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Thanks. The patch looks good from a POSIX person's point of view, and I do\n> not immediately see how this would break other variants of Windows build\n> at least from the code inspection.\n>\n> So I'll queue this, but I'll leave it to you and msysgit folks to decide\n> if this topic should be merged to 1.7.8-rc1, as I do not have equipment,\n> expertise, nor time to judge it myself (other than the code inspection we\n> have already done here).\n>\n> Please give me an Ack or two by the end of this week. Thanks.\n\nThe result of applying this on top of the current master (1.7.8-rc0)\ncompiles and seem to runs fine for me, both with the MinGW supplied by\nmsysGit, and MSVC (as outlined by compat/vcbuild/README). Without the\npatches, it fails to build with MSVC. In addition, the changes looks\ngood to me. So:\n\nAcked-by: Erik Faye-Lund <kusmabite@gmail.com>\n"},{"id":"178608","messageId":"7vd3dco6y8.fsf@alter.siamese.dyndns.org","threadId":"28809","inReplyTo":"alpine.DEB.1.00.1110311908240.1930@bonsai2","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-01T03:30:23Z","receivedAt":"2011-11-01T03:30:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> As my virtual machine still ran the test suite after my latest rebasing \n> merge when I left work, I could not test the MSVC stuff just yet. I wanted \n> to do that tomorrow and either merge or come back with suggestions.\n\nThanks.\n"},{"id":"178609","messageId":"7v8vo0o6xp.fsf@alter.siamese.dyndns.org","threadId":"28809","inReplyTo":"CABPQNSaW+ciEzAMruYVgK_y2xf=sExYiFfdbS4xonKe=h-APjA@mail.gmail.com","subject":"Re: [PATCHv2] Compile fix for MSVC","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-01T03:30:42Z","receivedAt":"2011-11-01T03:30:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Erik Faye-Lund <kusmabite@gmail.com> writes:\n\n> The result of applying this on top of the current master (1.7.8-rc0)\n> compiles and seem to runs fine for me, both with the MinGW supplied by\n> msysGit, and MSVC (as outlined by compat/vcbuild/README). Without the\n> patches, it fails to build with MSVC. In addition, the changes looks\n> good to me. So:\n>\n> Acked-by: Erik Faye-Lund <kusmabite@gmail.com>\n\nThanks.\n"},{"id":"178621","messageId":"CABPQNSaCRRRpEQPG1Mb4DovkMdQSBhHTm-i7y5M4iT+ndHX4XA@mail.gmail.com","threadId":"28809","inReplyTo":"alpine.DEB.1.00.1110311908240.1930@bonsai2","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2011-11-01T11:56:21Z","receivedAt":"2011-11-01T11:56:21Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Nov 1, 2011 at 1:09 AM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Mon, 31 Oct 2011, Junio C Hamano wrote:\n>\n>> Thanks. The patch looks good from a POSIX person's point of view, and I\n>> do not immediately see how this would break other variants of Windows\n>> build at least from the code inspection.\n>\n> As my virtual machine still ran the test suite after my latest rebasing\n> merge when I left work, I could not test the MSVC stuff just yet. I wanted\n> to do that tomorrow and either merge or come back with suggestions.\n\nI've applied the patches to 'devel', verified that the result builds,\nand pushed it out.\n\nHowever, it still doesn't compile with MSVC on top of our 'devel':\nmake: *** No rule to make target `compat/win32/sys/poll.h', needed by `daemon.o'\n\nThe fix for this problem is the following:\n\n---8<---\ndiff --git a/Makefile b/Makefile\nindex 2837e79..70edb11 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -518,7 +518,7 @@ LIB_H += compat/mingw.h\n LIB_H += compat/obstack.h\n LIB_H += compat/win32/pthread.h\n LIB_H += compat/win32/syslog.h\n-LIB_H += compat/win32/sys/poll.h\n+LIB_H += compat/win32/poll.h\n LIB_H += compat/win32/dirent.h\n LIB_H += connected.h\n LIB_H += csum-file.h\n---8<---\n\nThis is a slip-up in my patch 0f77dea, but I don't quite understand\nwhy this didn't cause any troubles until now... I guess the MSVC parts\nof Makefile are somehow more dependent on LIB_H or something...\n\nJunio, is it too late to squash in a fix-up? If it is, I can send a\nfixup-patch instead...\n\nAnyway, with that fix in place, it still breaks here:\ncompat/win32\\poll.h(26) : warning C4005: 'POLLIN' : macro redefinition\n        C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include\\winsock2.h(1495) :\n see previous definition of 'POLLIN'\ncompat/win32\\poll.h(27) : warning C4005: 'POLLPRI' : macro redefinition\n        C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include\\winsock2.h(1496) :\n see previous definition of 'POLLPRI'\n[...]\ncompat/win32\\poll.h(35) : warning C4005: 'POLLWRBAND' : macro redefinition\n        C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include\\winsock2.h(1500) :\n see previous definition of 'POLLWRBAND'\ncompat/win32\\poll.h(38) : error C2011: 'pollfd' : 'struct' type redefinition\n        C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include\\winsock2.h(1506) :\n see declaration of 'pollfd'\n\nAgain, this seems to be related to the poll-emulation... I see that\nthese things are guarded by an \"#if(_WIN32_WINNT >= 0x0600)\" in\n<winsock2.h>, which means it's supported for Windows Vista and\nabove... We still support Windows XP, so it seems someone has set this\ntoo high :)\n\nAnd this seems to indeed be the case, as compat/win32/poll.c takes\ncare to set it to 0x0502 before including. Something like this fixes\nthat problem for me:\n---8<---\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex cdaa7ba..0b8e1aa 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 0135dcc..e66c21e 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---8<---\n\nI'd prefer to set this from the Makefile, but this generates a warning\nin compat/win32/poll.c about redefining a macro (poll.c wants it to be\n0x502, which is Windows XP with SP2, rather than 0x501 which is normal\nWindows XP):\n---8<---\ndiff --git a/Makefile b/Makefile\nindex 2837e79..a4aa785 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1131,7 +1131,10 @@ ifeq ($(uname_S),Windows)\n \tCC = compat/vcbuild/scripts/clink.pl\n \tAR = compat/vcbuild/scripts/lib.pl\n \tCFLAGS =\n-\tBASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild\n-Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H\n-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE\n+\tBASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild \\\n+\t        -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H \\\n+\t\t-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE \\\n+\t\t-D_WIN32_WINNT=0x501\n \tCOMPAT_OBJS = compat/msvc.o compat/winansi.o \\\n \t\tcompat/win32/pthread.o compat/win32/syslog.o \\\n \t\tcompat/win32/poll.o compat/win32/dirent.o\n---8<---\n\n(this will probably both be line-wrapped and white-space-broken, but\nyou get the point)\n\n...But now I get a complaint about LF_FACESIZE and TMPF_TRUETYPE:\n    CC compat/winansi.o\nwinansi.c\ncompat/winansi.c(39) : error C2065: 'LF_FACESIZE' : undeclared identifier\ncompat/winansi.c(39) : error C2057: expected constant expression\ncompat/winansi.c(56) : warning C4113: 'FARPROC' differs in parameter lists from\n'PGETCURRENTCONSOLEFONTEX'\ncompat/winansi.c(74) : error C2065: 'TMPF_TRUETYPE' : undeclared identifier\nmake: *** [compat/winansi.o] Error 1\n\nLuckily, Karsten Blees already sent a patch for this:\nhttp://osdir.com/ml/msysgit/2011-10/msg00031.html\n\n...And with that applied, that problem goes away.\n\nUnfortunately, it's not the last error I get:\n    LINK git-daemon.exe\ndaemon.o : error LNK2001: unresolved external symbol _inet_pton\ndaemon.o : error LNK2001: unresolved external symbol _inet_ntop\ngit-daemon.exe : fatal error LNK1120: 2 unresolved externals\nmake: *** [git-daemon.exe] Error 1\n\nThe following patch makes that go away:\n---8<---\ndiff --git a/Makefile b/Makefile\nindex 2837e79..c87c7c5 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1124,6 +1124,8 @@ ifeq ($(uname_S),Windows)\n        NO_CURL = YesPlease\n        NO_PYTHON = YesPlease\n        BLK_SHA1 = YesPlease\n+       NO_INET_PTON = YesPlease\n+       NO_INET_NTOP = YesPlease\n        NO_POSIX_GOODIES = UnfortunatelyYes\n        NATIVE_CRLF = YesPlease\n        NO_D_INO_IN_DIRENT = YesPlease\n---8<---\n(again, probably white-space broken, but you get the point)\n\nAnd THEN it compiles fine from 'devel'.\n\nSo there's some more work left to be done. Unfortunately, I don't have\ntime to polish these changes for at least a week, so unless someone\nvolunteers it'll take some time...\n"},{"id":"178631","messageId":"7vy5vzn65u.fsf@alter.siamese.dyndns.org","threadId":"28809","inReplyTo":"CABPQNSaCRRRpEQPG1Mb4DovkMdQSBhHTm-i7y5M4iT+ndHX4XA@mail.gmail.com","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-01T16:45:01Z","receivedAt":"2011-11-01T16:45:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Erik Faye-Lund <kusmabite@gmail.com> writes:\n\n> This is a slip-up in my patch 0f77dea, but I don't quite understand\n> why this didn't cause any troubles until now... I guess the MSVC parts\n> of Makefile are somehow more dependent on LIB_H or something...\n>\n> Junio, is it too late to squash in a fix-up? If it is, I can send a\n> fixup-patch instead...\n\nI can queue this for v1.7.8-rc1 if you want, as it is a fix whether or not\nwe define MSVC or not while building.\n\n-- >8 --\nFrom: Erik Faye-Lund <kusmabite@gmail.com>\nDate: Tue, 1 Nov 2011 12:56:21 +0100\nSubject: [PATCH] mingw: poll.h is no longer in sys/\n\nEarlier we moved this header file in the code but forgot to\nupdate the Makefile that refers to it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4c09b35..ee34eab 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -515,7 +515,7 @@ LIB_H += compat/mingw.h\n LIB_H += compat/obstack.h\n LIB_H += compat/win32/pthread.h\n LIB_H += compat/win32/syslog.h\n-LIB_H += compat/win32/sys/poll.h\n+LIB_H += compat/win32/poll.h\n LIB_H += compat/win32/dirent.h\n LIB_H += connected.h\n LIB_H += csum-file.h\n-- \n1.7.8.rc0.88.g45c5be\n\n> Anyway, with that fix in place, it still breaks here:\n> ...\n> Again, this seems to be related to the poll-emulation... I see that\n> these things are guarded by an \"#if(_WIN32_WINNT >= 0x0600)\" in\n> <winsock2.h>, which means it's supported for Windows Vista and\n> above... We still support Windows XP, so it seems someone has set this\n> too high :)\n> ...\n> And THEN it compiles fine from 'devel'.\n>\n> So there's some more work left to be done. Unfortunately, I don't have\n> time to polish these changes for at least a week, so unless someone\n> volunteers it'll take some time...\n\nIt seems, from your description, that msvc update series has some way to\ngo and it probably is better to be cooked by Windows-savvy folks for\nanother cycle. Which would mean that your upload-archive series is still\ngood to go as long as it works for non-MSVC/mingw people, right?\n"},{"id":"178637","messageId":"alpine.DEB.1.00.1111011332400.32316@s15462909.onlinehome-server.info","threadId":"28809","inReplyTo":"CABPQNSaCRRRpEQPG1Mb4DovkMdQSBhHTm-i7y5M4iT+ndHX4XA@mail.gmail.com","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2011-11-01T18:40:18Z","receivedAt":"2011-11-01T18:40:18Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi kusma,\n\nOn Tue, 1 Nov 2011, Erik Faye-Lund wrote:\n\n> On Tue, Nov 1, 2011 at 1:09 AM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n>\n> > On Mon, 31 Oct 2011, Junio C Hamano wrote:\n> >\n> >> Thanks. The patch looks good from a POSIX person's point of view, and \n> >> I do not immediately see how this would break other variants of \n> >> Windows build at least from the code inspection.\n> >\n> > As my virtual machine still ran the test suite after my latest \n> > rebasing merge when I left work, I could not test the MSVC stuff just \n> > yet. I wanted to do that tomorrow and either merge or come back with \n> > suggestions.\n> \n> I've applied the patches to 'devel', verified that the result builds, \n> and pushed it out.\n\nI've applied your patches and made up commit messages. So far, I only \ntested with MSVCE 9.0 (AKA Express 2008) before running out of time. \nPlease have a look at the commits (since I could build a git.exe with the \ncorrect version, I felt comfortable enough to push out to 'devel').\n\nMaybe if someone donates Jenkins resources, we could make an automatic \nbranch in the future that has git.sln in it (similar to the 'html' branch \nin git.git).\n\nCiao,\nDscho\n"},{"id":"178644","messageId":"CABPQNSaiFpmHa_GLF8PaejvXTkqCMoWG+Cd4MbNrqXF-SXR1yw@mail.gmail.com","threadId":"28809","inReplyTo":"7vy5vzn65u.fsf@alter.siamese.dyndns.org","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2011-11-01T20:35:47Z","receivedAt":"2011-11-01T20:35:47Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Nov 1, 2011 at 5:45 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Erik Faye-Lund <kusmabite@gmail.com> writes:\n>\n>> This is a slip-up in my patch 0f77dea, but I don't quite understand\n>> why this didn't cause any troubles until now... I guess the MSVC parts\n>> of Makefile are somehow more dependent on LIB_H or something...\n>>\n>> Junio, is it too late to squash in a fix-up? If it is, I can send a\n>> fixup-patch instead...\n>\n> I can queue this for v1.7.8-rc1 if you want, as it is a fix whether or not\n> we define MSVC or not while building.\n\nYes, please do. This looks good to me, thanks for picking it up :)\n\n>> So there's some more work left to be done. Unfortunately, I don't have\n>> time to polish these changes for at least a week, so unless someone\n>> volunteers it'll take some time...\n>\n> It seems, from your description, that msvc update series has some way to\n> go and it probably is better to be cooked by Windows-savvy folks for\n> another cycle.\n\nI don't think you need to hold these three patches; with them I was\nable to build your 'master'. I believe the problems I bumped into only\nexist in msysgit's 'devel' (or in your 'next', which msysgit/devel is\nbased upon).\n\n> Which would mean that your upload-archive series is still\n> good to go as long as it works for non-MSVC/mingw people, right?\n>\n\nYes. Apart from the slip-up with LIB_H, my upload-archive series\nshould be unrelated to the issues I found here.\n"},{"id":"178645","messageId":"CABPQNSb07fRUCqPCX7JbfGW_55etZZtPyP=yuCKV9wJeNP-iQw@mail.gmail.com","threadId":"28809","inReplyTo":"alpine.DEB.1.00.1111011332400.32316@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCHv2] Compile fix for MSVC","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2011-11-01T20:43:41Z","receivedAt":"2011-11-01T20:43:41Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Nov 1, 2011 at 7:40 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi kusma,\n>\n> On Tue, 1 Nov 2011, Erik Faye-Lund wrote:\n>> I've applied the patches to 'devel', verified that the result builds,\n>> and pushed it out.\n>\n> I've applied your patches and made up commit messages. So far, I only\n> tested with MSVCE 9.0 (AKA Express 2008) before running out of time.\n> Please have a look at the commits (since I could build a git.exe with the\n> correct version, I felt comfortable enough to push out to 'devel').\n\nThe commits look good to me. Thanks for following up on it :)\n\n> Maybe if someone donates Jenkins resources, we could make an automatic\n> branch in the future that has git.sln in it (similar to the 'html' branch\n> in git.git).\n\nCloudBees seems to have some kind of a free Jenkins service. Perhaps\nit's sufficient?\nhttp://www.cloudbees.com/dev-pricing.cb\n"},{"id":"178647","messageId":"7vobwvlge3.fsf@alter.siamese.dyndns.org","threadId":"28809","inReplyTo":"CABPQNSaiFpmHa_GLF8PaejvXTkqCMoWG+Cd4MbNrqXF-SXR1yw@mail.gmail.com","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-01T20:47:00Z","receivedAt":"2011-11-01T20:47:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Erik Faye-Lund <kusmabite@gmail.com> writes:\n\n>> It seems, from your description, that msvc update series has some way to\n>> go and it probably is better to be cooked by Windows-savvy folks for\n>> another cycle.\n>\n> I don't think you need to hold these three patches; with them I was\n> able to build your 'master'. I believe the problems I bumped into only\n> exist in msysgit's 'devel' (or in your 'next', which msysgit/devel is\n> based upon).\n\nOk, then. Thanks for clarifying.\n"},{"id":"178657","messageId":"CAAH6HY8WfOQQ4g54y7mriq6BKoJCWYsVPrQUTMndqpKdniLAtw@mail.gmail.com","threadId":"28809","inReplyTo":"alpine.DEB.1.00.1111011332400.32316@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCHv2] Compile fix for MSVC","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-11-01T22:32:56Z","receivedAt":"2011-11-01T22:32:56Z","isPatch":false,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"> Maybe if someone donates Jenkins resources, we could make an automatic\n> branch in the future that has git.sln in it (similar to the 'html' branch\n> in git.git).\n>\n\nAs long as this means to just run a not so complicated perl script, this\nCould even be done in a commit hook.\n\nJust another question. How does the (msys)git community feel about adding\nCMake support ? I can probably do that quite easily.\n\nVincent\n"},{"id":"178660","messageId":"alpine.DEB.1.00.1111011738550.32316@s15462909.onlinehome-server.info","threadId":"28809","inReplyTo":"CAAH6HY8WfOQQ4g54y7mriq6BKoJCWYsVPrQUTMndqpKdniLAtw@mail.gmail.com","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2011-11-01T22:40:41Z","receivedAt":"2011-11-01T22:40:41Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 1 Nov 2011, Vincent van Ravesteijn wrote:\n\n> > Maybe if someone donates Jenkins resources, we could make an automatic \n> > branch in the future that has git.sln in it (similar to the 'html' \n> > branch in git.git).\n> \n> As long as this means to just run a not so complicated perl script, this \n> Could even be done in a commit hook.\n\nI actually was thinking about something automatic which does not require \nany of the busy msysGit developers to do something manual every once in a \nwhile.\n\n> Just another question. How does the (msys)git community feel about \n> adding CMake support ? I can probably do that quite easily.\n\nThere was somebody who strongly favored CMake over any other solution but \nwas not willing to maintain it in the long run (also, I have to admit that \nI have had quite a few problems with CMake, but maybe I am just pampered \nby projects that Just Compile...)\n\nCiao,\nJohannes\n"},{"id":"178661","messageId":"alpine.DEB.1.00.1111011750420.32316@s15462909.onlinehome-server.info","threadId":"28809","inReplyTo":"CABPQNSb07fRUCqPCX7JbfGW_55etZZtPyP=yuCKV9wJeNP-iQw@mail.gmail.com","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2011-11-01T22:51:59Z","receivedAt":"2011-11-01T22:51:59Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi kusma,\n\nOn Tue, 1 Nov 2011, Erik Faye-Lund wrote:\n\n> On Tue, Nov 1, 2011 at 7:40 PM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n>\n> > Maybe if someone donates Jenkins resources, we could make an automatic \n> > branch in the future that has git.sln in it (similar to the 'html' \n> > branch in git.git).\n> \n> CloudBees seems to have some kind of a free Jenkins service. Perhaps \n> it's sufficient? http://www.cloudbees.com/dev-pricing.cb\n\nLooks quite cool, but keep in mind: they only have Linux build machines. \nWe'd need to pimp up our cross-platform compiling capabilities; WINE will \nmost likely not be good enough (we'd only have 2000 minutes per month).\n\nCiao,\nDscho\n"},{"id":"178663","messageId":"CAAH6HY81WNWu2Dj7RA+Rwm8avNzC7TyS0rMJwZECNZuuSO-WVQ@mail.gmail.com","threadId":"28809","inReplyTo":"alpine.DEB.1.00.1111011738550.32316@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCHv2] Compile fix for MSVC","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-11-01T23:33:07Z","receivedAt":"2011-11-01T23:33:07Z","isPatch":false,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":">\n>\n> > > Maybe if someone donates Jenkins resources, we could make an automatic\n> > > branch in the future that has git.sln in it (similar to the 'html'\n> > > branch in git.git).\n> >\n> > As long as this means to just run a not so complicated perl script, this\n> > Could even be done in a commit hook.\n>\n> I actually was thinking about something automatic which does not require\n> any of the busy msysGit developers to do something manual every once in a\n> while.\n\n\nI thought that a commit hook, was something automatic (iff the busy\ndevelopers\ndo commit something once in a while). I guess I can even set this up very\neasily\n(given push rights, otherwise it will involve manual labor again).\n\n\n\n> > Just another question. How does the (msys)git community feel about\n> > adding CMake support ? I can probably do that quite easily.\n>\n> There was somebody who strongly favored CMake over any other solution but\n> was not willing to maintain it in the long run (also, I have to admit that\n> I have had quite a few problems with CMake, but maybe I am just pampered\n> by projects that Just Compile...)\n>\n\nThe current way of generating a MSVC project is rather outdated, so the\nworst\nthing that can happen is that you have a different build system which is not\nmaintained. At least the CMake people will continue to improve on their\nside.\n\nVincent\n"},{"id":"178664","messageId":"CABNJ2G+Km4wob4_uNYQLkQUL61-ohZg5cL2yu7j1cngoL9W7Cw@mail.gmail.com","threadId":"28809","inReplyTo":"CAAH6HY8WfOQQ4g54y7mriq6BKoJCWYsVPrQUTMndqpKdniLAtw@mail.gmail.com","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Pat Thoyts","fromEmail":"patthoyts@gmail.com","sentAt":"2011-11-02T00:48:37Z","receivedAt":"2011-11-02T00:48:37Z","isPatch":false,"sender":{"key":"patthoyts@gmail.com","avatar":"https://gravatar.com/avatar/bee887a777c790bd241f398217723fbe4b854428671db83db32216a28654cb25?d=mp&s=160"},"body":"On 1 November 2011 22:32, Vincent van Ravesteijn <vfr@lyx.org> wrote:\n>\n>> Maybe if someone donates Jenkins resources, we could make an automatic\n>> branch in the future that has git.sln in it (similar to the 'html' branch\n>> in git.git).\n>>\n>\n> As long as this means to just run a not so complicated perl script, this\n> Could even be done in a commit hook.\n>\n> Just another question. How does the (msys)git community feel about adding\n> CMake support ? I can probably do that quite easily.\n>\n> Vincent\n>\n\n-1. We have a make. We don't need two of them.\n"},{"id":"178668","messageId":"4EB0F27A.1040908@lyx.org","threadId":"28809","inReplyTo":"CABNJ2G+Km4wob4_uNYQLkQUL61-ohZg5cL2yu7j1cngoL9W7Cw@mail.gmail.com","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Vincent van Ravesteijn","fromEmail":"vfr@lyx.org","sentAt":"2011-11-02T07:34:18Z","receivedAt":"2011-11-02T07:34:18Z","isPatch":false,"sender":{"key":"vfr@lyx.org","avatar":"https://avatars.githubusercontent.com/u/687868?v=4"},"body":"Op 2-11-2011 1:48, Pat Thoyts schreef:\n> On 1 November 2011 22:32, Vincent van Ravesteijn<vfr@lyx.org>  wrote:\n>>> Maybe if someone donates Jenkins resources, we could make an automatic\n>>> branch in the future that has git.sln in it (similar to the 'html' branch\n>>> in git.git).\n>>>\n>> As long as this means to just run a not so complicated perl script, this\n>> Could even be done in a commit hook.\n>>\n>> Just another question. How does the (msys)git community feel about adding\n>> CMake support ? I can probably do that quite easily.\n>>\n>> Vincent\n>>\n> -1. We have a make. We don't need two of them.\n\nMake won't offer anything if you want to support MSVC. So, if you want \nto support MSVC, there has to be some sort of alternative.\n\nVincent\n"},{"id":"178828","messageId":"4EB4073F.6070100@gmail.com","threadId":"28809","inReplyTo":"CABNJ2G+Km4wob4_uNYQLkQUL61-ohZg5cL2yu7j1cngoL9W7Cw@mail.gmail.com","subject":"Re: [msysGit] Re: [PATCHv2] Compile fix for MSVC","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2011-11-04T15:39:43Z","receivedAt":"2011-11-04T15:39:43Z","isPatch":false,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On 02.11.2011 01:48, Pat Thoyts wrote:\n\n>> As long as this means to just run a not so complicated perl script, this\n>> Could even be done in a commit hook.\n>>\n>> Just another question. How does the (msys)git community feel about adding\n>> CMake support ? I can probably do that quite easily.\n>\n> -1. We have a make. We don't need two of them.\n\nI don't see CMake as an alternative to make as CMake would be used to \ngenerate the Makefile, which is currently hard-coded and committed.\n\nHowever, I don't see any benefit in using CMake as long as the Linux \nguys don't use it to create their Makefile, too.\n\n-- \nSebastian Schuberth\n"}]}