{"thread":{"id":"37692","subject":"[PATCH v5] MinGW(-W64) compilation","startedAt":"2014-10-08T18:00:53Z","lastAt":"2014-10-14T07:08:22Z","messageCount":45,"participants":["Marat Radchenko","Junio C Hamano","Erik Faye-Lund","Johannes Schindelin","Ray Donnelly"],"isPatch":true,"patchVersion":5,"patchTotal":null},"messages":[{"id":"250367","messageId":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":null,"subject":"[PATCH v5] MinGW(-W64) compilation","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:00:53Z","receivedAt":"2014-10-08T18:00:53Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64).\n\n*Compilation* tested on:\n - MSVC\n - msysGit environment (twice)\n - Linux cross-toolchain i686-pc-mingw32\n - Linux cross-toolchain i686-w64-mingw32\n - Linux cross-toolchain x86_64-w64-mingw32\n\nAlso, this patchset is confirmed to pass msysgit testsuite.\n\nAttention: in order to build on MinGW-W64, you need a version that has\nhttps://sourceforge.net/p/mingw-w64/bugs/397 fixed. Otherwise, you'll get:\n\n  compat/poll/poll.c: In function 'poll':\n  compat/poll/poll.c:541:7: warning: implicit declaration of function 'MsgWaitForMultipleObjects'\n  compat/poll/poll.c:542:26: error 'QS_ALLINPUT' undeclared (first use in this function)\n\n-------\n\nCosmetic changes since v4:\n\n * Reworded 'MSVC: config.mak.uname: drop -D__USE_MINGW_ACCESS from CFLAGS'\n   (added note about MinGW section)\n * Reworded 'MINGW: config.mak.uname: reorganize MinGW settings'\n   (now uses gender-neutral singular 'they')\n * Reworded 'Fix pointer -> integer casts on IL32P64 systems'\n   (added references to Gnulib commits)\n\n-------\n\nAdditional note:\n\ntodays git.git/master is broken on both MSVC and MinGW-W64 because of 7559a1be + 4e6d207c:\nMSVC doesn't have sigset_t at all, MinGW-W64 has it in sys/types.h, but it is only\navailable with -D_POSIX. I hope this can be resolved separately as a regression for MSVC.\n\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250368","messageId":"1412791267-13356-2-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 01/14] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:00:54Z","receivedAt":"2014-10-08T18:00:54Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"Unlike MinGW, MinGW-W64 has lseek already properly defined in io.h.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\nAcked-by: Eric Faye-Lund <kusmabite@gmail.com>\n---\n compat/mingw.h | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 5e499cf..36a47cb 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -286,7 +286,9 @@ static inline int getrlimit(int resource, struct rlimit *rlp)\n  * Use mingw specific stat()/lstat()/fstat() implementations on Windows.\n  */\n #define off_t off64_t\n+#ifndef lseek\n #define lseek _lseeki64\n+#endif\n \n /* use struct stat with 64 bit st_size */\n #ifdef stat\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250369","messageId":"1412791267-13356-3-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 02/14] MSVC: config.mak.uname: drop -D__USE_MINGW_ACCESS from CFLAGS","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:00:55Z","receivedAt":"2014-10-08T18:00:55Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"-D__USE_MINGW_ACCESS only affects MinGW and does nothing when\nMSVC is used.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\nAcked-by: Eric Faye-Lund <kusmabite@gmail.com>\n---\n config.mak.uname | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex a2f380f..20cbdcf 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -368,7 +368,7 @@ ifeq ($(uname_S),Windows)\n \tCOMPAT_OBJS = compat/msvc.o compat/winansi.o \\\n \t\tcompat/win32/pthread.o compat/win32/syslog.o \\\n \t\tcompat/win32/dirent.o\n-\tCOMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\\\".exe\\\"\n+\tCOMPAT_CFLAGS = -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\\\".exe\\\"\n \tBASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE\n \tEXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj\n \tPTHREAD_LIBS =\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250370","messageId":"1412791267-13356-4-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 03/14] MINGW: compat/mingw.h: drop fork() definition","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:00:56Z","receivedAt":"2014-10-08T18:00:56Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"fork() is not used in MinGW builds but causes a compiler warning\non x86_64 MinGW-W64: conflicting types for built-in function 'fork'\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\nAcked-by: Eric Faye-Lund <kusmabite@gmail.com>\n---\n compat/mingw.h | 2 --\n 1 file changed, 2 deletions(-)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 36a47cb..1ddd663 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -92,8 +92,6 @@ static inline int symlink(const char *oldpath, const char *newpath)\n { errno = ENOSYS; return -1; }\n static inline int fchmod(int fildes, mode_t mode)\n { errno = ENOSYS; return -1; }\n-static inline pid_t fork(void)\n-{ errno = ENOSYS; return -1; }\n static inline unsigned int alarm(unsigned int seconds)\n { return 0; }\n static inline int fsync(int fd)\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250372","messageId":"1412791267-13356-5-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 04/14] MINGW: do not fail at redefining pid_t on MinGW-W64","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:00:57Z","receivedAt":"2014-10-08T18:00:57Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"pid_t is available in sys/types.h on both MinGW and MinGW-W64\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\nAcked-by: Eric Faye-Lund <kusmabite@gmail.com>\n---\n compat/mingw.h | 1 -\n compat/msvc.h  | 2 ++\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 1ddd663..ba05044 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -5,7 +5,6 @@\n  * things that are not available in header files\n  */\n \n-typedef int pid_t;\n typedef int uid_t;\n typedef int socklen_t;\n #define hstrerror strerror\ndiff --git a/compat/msvc.h b/compat/msvc.h\nindex 580bb55..a63d878 100644\n--- a/compat/msvc.h\n+++ b/compat/msvc.h\n@@ -15,6 +15,8 @@\n #define strtoull     _strtoui64\n #define strtoll      _strtoi64\n \n+typedef int pid_t;\n+\n static __inline int strcasecmp (const char *s1, const char *s2)\n {\n \tint size1 = strlen(s1);\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250374","messageId":"1412791267-13356-6-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 05/14] MINGW: config.mak.uname: allow using cURL for non-msysGit builds","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:00:58Z","receivedAt":"2014-10-08T18:00:58Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"Is it absolutely valid and possible to have cURL in generic\nMinGW environment. Building Git without cURL is still possible\nby passing NO_CURL=1\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\nAcked-by: Eric Faye-Lund <kusmabite@gmail.com>\n---\n config.mak.uname | 2 --\n 1 file changed, 2 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 20cbdcf..324a7fc 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -531,8 +531,6 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\n \tINTERNAL_QSORT = YesPlease\n \tHAVE_LIBCHARSET_H = YesPlease\n \tNO_GETTEXT = YesPlease\n-else\n-\tNO_CURL = YesPlease\n endif\n endif\n ifeq ($(uname_S),QNX)\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250371","messageId":"1412791267-13356-7-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 06/14] MINGW: compat/winansi.c: do not redefine CONSOLE_FONT_INFOEX","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:00:59Z","receivedAt":"2014-10-08T18:00:59Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"Unlike MinGW, MinGW-W64 has CONSOLE_FONT_INFOEX already properly defined\nin wincon.h.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n compat/winansi.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/compat/winansi.c b/compat/winansi.c\nindex efc5bb3..0ac3297 100644\n--- a/compat/winansi.c\n+++ b/compat/winansi.c\n@@ -22,7 +22,7 @@ static int non_ascii_used = 0;\n static HANDLE hthread, hread, hwrite;\n static HANDLE hconsole1, hconsole2;\n \n-#ifdef __MINGW32__\n+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)\n typedef struct _CONSOLE_FONT_INFOEX {\n \tULONG cbSize;\n \tDWORD nFont;\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250373","messageId":"1412791267-13356-8-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:01:00Z","receivedAt":"2014-10-08T18:01:00Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"From: Ray Donnelly <mingw.android@gmail.com>\n\nSigned-off-by: Ray Donnelly <mingw.android@gmail.com>\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n config.mak.uname | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 324a7fc..4470a928 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -6,6 +6,7 @@ uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')\n uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')\n uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')\n uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')\n+CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')\n \n ifdef MSVC\n \t# avoid the MingW and Cygwin configuration sections\n@@ -509,12 +510,15 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tDEFAULT_HELP_FORMAT = html\n \tNO_D_INO_IN_DIRENT = YesPlease\n-\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32\n+\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32\n+\tifneq (,$(findstring i686,$(CC_MACH)))\n+\t\tCOMPAT_CFLAGS += -D_USE_32BIT_TIME_T\n+\t\tBASIC_LDFLAGS += -Wl,--large-address-aware\n+\tendif\n \tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n \tCOMPAT_OBJS += compat/mingw.o compat/winansi.o \\\n \t\tcompat/win32/pthread.o compat/win32/syslog.o \\\n \t\tcompat/win32/dirent.o\n-\tBASIC_LDFLAGS += -Wl,--large-address-aware\n \tEXTLIBS += -lws2_32\n \tGITLIBS += git.res\n \tPTHREAD_LIBS =\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250375","messageId":"1412791267-13356-9-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 08/14] MINGW: git-compat-util.h: use inttypes.h for printf macros","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:01:01Z","receivedAt":"2014-10-08T18:01:01Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"All MinGW flavors have inttypes.h, so just include it.\n\nHowever, we need to pass -D__USE_MINGW_ANSI_STDIO=1 to select\nGNU-compatible macro definitions on MinGW-W64:\nhttp://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/\n\nAs a side-effect, Git no longer builds with MSVC < 2010 due to\nits lack of stdint.h but hopefully that is not a problem.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n compat/mingw.h    |  2 --\n compat/msvc.h     |  3 +++\n config.mak.uname  |  3 ++-\n git-compat-util.h | 11 ++++++-----\n 4 files changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex ba05044..59a50fc 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -358,8 +358,6 @@ static inline char *mingw_find_last_dir_sep(const char *path)\n int mingw_offset_1st_component(const char *path);\n #define offset_1st_component mingw_offset_1st_component\n #define PATH_SEP ';'\n-#define PRIuMAX \"I64u\"\n-#define PRId64 \"I64d\"\n \n void mingw_open_html(const char *path);\n #define open_html mingw_open_html\ndiff --git a/compat/msvc.h b/compat/msvc.h\nindex a63d878..84a03f9 100644\n--- a/compat/msvc.h\n+++ b/compat/msvc.h\n@@ -17,6 +17,9 @@\n \n typedef int pid_t;\n \n+#define PRIuMAX \"I64u\"\n+#define PRId64 \"I64d\"\n+\n static __inline int strcasecmp (const char *s1, const char *s2)\n {\n \tint size1 = strlen(s1);\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 4470a928..c7aaa1c 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -328,6 +328,7 @@ ifeq ($(uname_S),Windows)\n \tNO_PREAD = YesPlease\n \tNEEDS_CRYPTO_WITH_SSL = YesPlease\n \tNO_LIBGEN_H = YesPlease\n+\tNO_INTTYPES_H = UnfortunatelyYes\n \tNO_POLL = YesPlease\n \tNO_SYMLINK_HEAD = YesPlease\n \tNO_IPV6 = YesPlease\n@@ -510,7 +511,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tDEFAULT_HELP_FORMAT = html\n \tNO_D_INO_IN_DIRENT = YesPlease\n-\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32\n+\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D__USE_MINGW_ANSI_STDIO=1 -DNOGDI -Icompat -Icompat/win32\n \tifneq (,$(findstring i686,$(CC_MACH)))\n \t\tCOMPAT_CFLAGS += -D_USE_32BIT_TIME_T\n \t\tBASIC_LDFLAGS += -Wl,--large-address-aware\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex fb41118..b338277 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -96,6 +96,12 @@\n #define GIT_WINDOWS_NATIVE\n #endif\n \n+#ifndef NO_INTTYPES_H\n+#include <inttypes.h>\n+#else\n+#include <stdint.h>\n+#endif\n+\n #include <unistd.h>\n #include <stdio.h>\n #include <sys/stat.h>\n@@ -147,11 +153,6 @@\n #include <netdb.h>\n #include <pwd.h>\n #include <sys/un.h>\n-#ifndef NO_INTTYPES_H\n-#include <inttypes.h>\n-#else\n-#include <stdint.h>\n-#endif\n #ifdef NO_INTPTR_T\n /*\n  * On I16LP32, ILP32 and LP64 \"long\" is the save bet, however\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250376","messageId":"1412791267-13356-10-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 09/14] MINGW: config.mak.uname: reorganize MinGW settings","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:01:02Z","receivedAt":"2014-10-08T18:01:02Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"HAVE_LIBCHARSET_H and NO_R_TO_GCC_LINKER are not specific to\nmsysGit, they're general MinGW settings.\n\nLogic behind HAVE_LIBCHARSET_H: if user is on MinGW and has iconv,\nwe expect him to have libcharset.h. If user doesn't have iconv,\nhe has to explicitly say so via NO_ICONV=1 regardless of this\ncommit.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n config.mak.uname | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex c7aaa1c..f79c0e0 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -532,11 +532,11 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\n \tprefix =\n \tINSTALL = /bin/install\n \tEXTLIBS += /mingw/lib/libz.a\n-\tNO_R_TO_GCC_LINKER = YesPlease\n \tINTERNAL_QSORT = YesPlease\n-\tHAVE_LIBCHARSET_H = YesPlease\n \tNO_GETTEXT = YesPlease\n endif\n+\tHAVE_LIBCHARSET_H = YesPlease\n+\tNO_R_TO_GCC_LINKER = YesPlease\n endif\n ifeq ($(uname_S),QNX)\n \tCOMPAT_CFLAGS += -DSA_RESTART=0\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250379","messageId":"1412791267-13356-11-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 10/14] Makefile: introduce CROSS_COMPILE variable","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:01:03Z","receivedAt":"2014-10-08T18:01:03Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"To ease cross-compilation process, introduce a single variable\nwith the prefix to all compiler-related executables.\n\nDefine CROSS_COMPILE=foo- if your compiler and binary utilities\nare foo-cc, foo-ar, foo-strip, etc.  More specific variables\noverride this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-\nthen the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n Makefile         | 19 +++++++++++++------\n config.mak.uname |  2 +-\n 2 files changed, 14 insertions(+), 7 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex f34a2d4..c412996 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -339,6 +339,11 @@ all::\n # return NULL when it receives a bogus time_t.\n #\n # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.\n+#\n+# Define CROSS_COMPILE=foo- if your compiler and binary utilities\n+# are foo-cc, foo-ar, foo-strip, etc.  More specific variables\n+# override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-\n+# then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.\n \n GIT-VERSION-FILE: FORCE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -350,7 +355,6 @@ CFLAGS = -g -O2 -Wall\n LDFLAGS =\n ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)\n ALL_LDFLAGS = $(LDFLAGS)\n-STRIP ?= strip\n \n # Among the variables below, these:\n #   gitexecdir\n@@ -390,8 +394,12 @@ htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))\n \n export prefix bindir sharedir sysconfdir gitwebdir localedir\n \n-CC = cc\n-AR = ar\n+AR = $(CROSS_COMPILE)ar\n+CC = $(CROSS_COMPILE)cc\n+GCOV = $(CROSS_COMPILE)gcov\n+RC = $(CROSS_COMPILE)windres\n+STRIP = $(CROSS_COMPILE)strip\n+\n RM = rm -f\n DIFF = diff\n TAR = tar\n@@ -404,13 +412,12 @@ XGETTEXT = xgettext\n MSGFMT = msgfmt\n PTHREAD_LIBS = -lpthread\n PTHREAD_CFLAGS =\n-GCOV = gcov\n \n export TCL_PATH TCLTK_PATH\n \n SPARSE_FLAGS =\n \n-\n+RCFLAGS =\n \n ### --- END CONFIGURATION SECTION ---\n \n@@ -1669,7 +1676,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES\n \tmv $@+ $@\n \n git.res: git.rc GIT-VERSION-FILE\n-\t$(QUIET_RC)$(RC) \\\n+\t$(QUIET_RC)$(RC) $(RCFLAGS) \\\n \t  $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \\\n \t  -DGIT_VERSION=\"\\\\\\\"$(GIT_VERSION)\\\\\\\"\" $< -o $@\n \ndiff --git a/config.mak.uname b/config.mak.uname\nindex f79c0e0..9f7037e 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -523,7 +523,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tEXTLIBS += -lws2_32\n \tGITLIBS += git.res\n \tPTHREAD_LIBS =\n-\tRC = windres -O coff\n+\tRCFLAGS += -O coff\n \tNATIVE_CRLF = YesPlease\n \tX = .exe\n \tSPARSE_FLAGS = -Wno-one-bit-signed-bitfield\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250382","messageId":"1412791267-13356-12-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 11/14] compat/nedmalloc/malloc.c.h: fix compilation under MinGW-W64","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:01:04Z","receivedAt":"2014-10-08T18:01:04Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"1. Unlike MinGW, MinGW-W64 already provides _ReadWriteBarrier macro,\n   so don't try to redefine it.\n\n2. MinGW-W64 has a strange definition FORCEINLINE as\n   extern __inline__ __attribute__((__always_inline__,__gnu_inline__))\n\n   'extern' doesn't work together with 'static', so #undef MinGW-W64\n   version of FORCEINLINE.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n compat/nedmalloc/malloc.c.h | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h\nindex f216a2a..a6c8cac 100644\n--- a/compat/nedmalloc/malloc.c.h\n+++ b/compat/nedmalloc/malloc.c.h\n@@ -715,6 +715,10 @@ struct mallinfo {\n #endif /* HAVE_USR_INCLUDE_MALLOC_H */\n #endif /* NO_MALLINFO */\n \n+#ifdef __MINGW64_VERSION_MAJOR\n+  #undef FORCEINLINE\n+#endif\n+\n /*\n   Try to persuade compilers to inline. The most critical functions for\n   inlining are defined as macros, so these aren't used for them.\n@@ -1382,7 +1386,9 @@ LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);\n \n   /*** Atomic operations ***/\n   #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100\n-    #define _ReadWriteBarrier() __sync_synchronize()\n+    #ifndef _ReadWriteBarrier\n+      #define _ReadWriteBarrier() __sync_synchronize()\n+    #endif\n   #else\n     static __inline__ __attribute__((always_inline)) long __sync_lock_test_and_set(volatile long * const Target, const long Value)\n     {\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250381","messageId":"1412791267-13356-13-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 12/14] Fix pointer -> integer casts on IL32P64 systems","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:01:05Z","receivedAt":"2014-10-08T18:01:05Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"This commit touches regcomp.c from Gnulib,\nwas fixed upstream in 3a4836d1.\n\nThis commit also touches poll.c from Gnulib,\nwas fixed upstream in d295f6c5.\n\nThis commit also touches regex_internal.h from Gnulib,\nwas fixed upstream in 8335a4d6.\n\nWrt ShellExecute in winansi.c, quoting [1]:\n\n  MSDN says you can cast the result to an integer and compare the result\n  against 32... You could cast in the other direction, comparing the return\n  value against (HINSTANCE)32... Or you could cast the result to an INT_PTR\n  and compare the result against 32.\n\nWe use the third option: cast HINSTANCE to intptr_t.\n\n[1]: http://blogs.msdn.com/b/oldnewthing/archive/2006/11/08/1035971.aspx\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n compat/mingw.c                | 8 ++++----\n compat/poll/poll.c            | 2 +-\n compat/regex/regcomp.c        | 4 ++--\n compat/regex/regex_internal.h | 1 +\n compat/win32/pthread.h        | 2 +-\n compat/winansi.c              | 2 +-\n pack-revindex.c               | 2 +-\n sha1_file.c                   | 8 ++++----\n 8 files changed, 15 insertions(+), 14 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex c5c37e5..27925d9 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -674,13 +674,13 @@ int pipe(int filedes[2])\n \t\terrno = err_win_to_posix(GetLastError());\n \t\treturn -1;\n \t}\n-\tfiledes[0] = _open_osfhandle((int)h[0], O_NOINHERIT);\n+\tfiledes[0] = _open_osfhandle((intptr_t)h[0], O_NOINHERIT);\n \tif (filedes[0] < 0) {\n \t\tCloseHandle(h[0]);\n \t\tCloseHandle(h[1]);\n \t\treturn -1;\n \t}\n-\tfiledes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);\n+\tfiledes[1] = _open_osfhandle((intptr_t)h[1], O_NOINHERIT);\n \tif (filedes[0] < 0) {\n \t\tclose(filedes[0]);\n \t\tCloseHandle(h[1]);\n@@ -1819,7 +1819,7 @@ void mingw_open_html(const char *unixpath)\n \t\t\tconst char *, const char *, const char *, INT);\n \tT ShellExecute;\n \tHMODULE shell32;\n-\tint r;\n+\tintptr_t r;\n \n \tshell32 = LoadLibrary(\"shell32.dll\");\n \tif (!shell32)\n@@ -1829,7 +1829,7 @@ void mingw_open_html(const char *unixpath)\n \t\tdie(\"cannot run browser\");\n \n \tprintf(\"Launching default browser to display HTML ...\\n\");\n-\tr = (int)ShellExecute(NULL, \"open\", htmlpath, NULL, \"\\\\\", SW_SHOWNORMAL);\n+\tr = (intptr_t)ShellExecute(NULL, \"open\", htmlpath, NULL, \"\\\\\", SW_SHOWNORMAL);\n \tFreeLibrary(shell32);\n \t/* see the MSDN documentation referring to the result codes here */\n \tif (r <= 32) {\ndiff --git a/compat/poll/poll.c b/compat/poll/poll.c\nindex a9b41d8..8941249 100644\n--- a/compat/poll/poll.c\n+++ b/compat/poll/poll.c\n@@ -76,7 +76,7 @@\n \n #ifdef WIN32_NATIVE\n \n-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)\n+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)\n \n static BOOL\n IsSocketHandle (HANDLE h)\ndiff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c\nindex 06f3088..d8bde06 100644\n--- a/compat/regex/regcomp.c\n+++ b/compat/regex/regcomp.c\n@@ -2577,7 +2577,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,\n     old_tree = NULL;\n \n   if (elem->token.type == SUBEXP)\n-    postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);\n+    postorder (elem, mark_opt_subexp, (void *) (intptr_t) elem->token.opr.idx);\n \n   tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT));\n   if (BE (tree == NULL, 0))\n@@ -3806,7 +3806,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,\n static reg_errcode_t\n mark_opt_subexp (void *extra, bin_tree_t *node)\n {\n-  int idx = (int) (long) extra;\n+  int idx = (int) (intptr_t) extra;\n   if (node->token.type == SUBEXP && node->token.opr.idx == idx)\n     node->token.opt_subexp = 1;\n \ndiff --git a/compat/regex/regex_internal.h b/compat/regex/regex_internal.h\nindex 4184d7f..da12670 100644\n--- a/compat/regex/regex_internal.h\n+++ b/compat/regex/regex_internal.h\n@@ -26,6 +26,7 @@\n #include <stdio.h>\n #include <stdlib.h>\n #include <string.h>\n+#include <stdint.h>\n \n #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC\n # include <langinfo.h>\ndiff --git a/compat/win32/pthread.h b/compat/win32/pthread.h\nindex 8ad1873..6ccfb7b 100644\n--- a/compat/win32/pthread.h\n+++ b/compat/win32/pthread.h\n@@ -77,7 +77,7 @@ extern pthread_t pthread_self(void);\n \n static inline int pthread_exit(void *ret)\n {\n-\tExitThread((DWORD)ret);\n+\tExitThread((DWORD)(uintptr_t)ret);\n }\n \n typedef DWORD pthread_key_t;\ndiff --git a/compat/winansi.c b/compat/winansi.c\nindex 0ac3297..ca4c295 100644\n--- a/compat/winansi.c\n+++ b/compat/winansi.c\n@@ -452,7 +452,7 @@ static HANDLE duplicate_handle(HANDLE hnd)\n \tHANDLE hresult, hproc = GetCurrentProcess();\n \tif (!DuplicateHandle(hproc, hnd, hproc, &hresult, 0, TRUE,\n \t\t\tDUPLICATE_SAME_ACCESS))\n-\t\tdie_lasterr(\"DuplicateHandle(%li) failed\", (long) hnd);\n+\t\tdie_lasterr(\"DuplicateHandle(%p) failed\", hnd);\n \treturn hresult;\n }\n \ndiff --git a/pack-revindex.c b/pack-revindex.c\nindex 5c8376e..df02e9f 100644\n--- a/pack-revindex.c\n+++ b/pack-revindex.c\n@@ -21,7 +21,7 @@ static int pack_revindex_hashsz;\n \n static int pack_revindex_ix(struct packed_git *p)\n {\n-\tunsigned long ui = (unsigned long)p;\n+\tuintptr_t ui = (uintptr_t)p;\n \tint i;\n \n \tui = ui ^ (ui >> 16); /* defeat structure alignment */\ndiff --git a/sha1_file.c b/sha1_file.c\nindex c08c0cb..a534fda 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1966,11 +1966,11 @@ static struct delta_base_cache_entry {\n \tenum object_type type;\n } delta_base_cache[MAX_DELTA_CACHE];\n \n-static unsigned long pack_entry_hash(struct packed_git *p, off_t base_offset)\n+static uintptr_t pack_entry_hash(struct packed_git *p, off_t base_offset)\n {\n-\tunsigned long hash;\n+\tuintptr_t hash;\n \n-\thash = (unsigned long)p + (unsigned long)base_offset;\n+\thash = (uintptr_t)p + base_offset;\n \thash += (hash >> 8) + (hash >> 16);\n \treturn hash % MAX_DELTA_CACHE;\n }\n@@ -1978,7 +1978,7 @@ static unsigned long pack_entry_hash(struct packed_git *p, off_t base_offset)\n static struct delta_base_cache_entry *\n get_delta_base_cache_entry(struct packed_git *p, off_t base_offset)\n {\n-\tunsigned long hash = pack_entry_hash(p, base_offset);\n+\tuintptr_t hash = pack_entry_hash(p, base_offset);\n \treturn delta_base_cache + hash;\n }\n \n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250380","messageId":"1412791267-13356-14-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:01:06Z","receivedAt":"2014-10-08T18:01:06Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n git-compat-util.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex b338277..101c9d7 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);\n #endif\n \n #define DEFAULT_PACKED_GIT_LIMIT \\\n-\t((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n+\t((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n \n #ifdef NO_PREAD\n #define pread git_pread\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250378","messageId":"1412791267-13356-15-git-send-email-marat@slonopotamus.org","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"[PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-08T18:01:07Z","receivedAt":"2014-10-08T18:01:07Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"When crosscompiling, one cannot rely on `uname` from host system.\n\nSigned-off-by: Marat Radchenko <marat@slonopotamus.org>\n---\n config.mak.uname | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 9f7037e..182da50 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -14,6 +14,11 @@ ifdef MSVC\n \tuname_O := Windows\n endif\n \n+ifneq (,$(findstring mingw,$(CC_MACH)))\n+\tuname_S := MINGW\n+\tuname_O := MINGW\n+endif\n+\n # We choose to avoid \"if .. else if .. else .. endif endif\"\n # because maintaining the nesting to match is a pain.  If\n # we had \"elif\" things would have been much nicer...\n-- \n2.1.1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250386","messageId":"xmqqioju9xiz.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"1412791267-13356-14-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-08T19:22:44Z","receivedAt":"2014-10-08T19:22:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> ---\n>  git-compat-util.h | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index b338277..101c9d7 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);\n>  #endif\n>  \n>  #define DEFAULT_PACKED_GIT_LIMIT \\\n> -\t((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n> +\t((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n\n1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always\nlarge enough?  Just checking.\n\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250387","messageId":"xmqqh9ze9xhp.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH v5] MinGW(-W64) compilation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-08T19:23:30Z","receivedAt":"2014-10-08T19:23:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64).\n\nAs Dscho explained in a sub-thread, I really do not want to bypass\nmsysgit folks when dealing with things that relate to Windows, for\nat least two reasons:\n\n * I can be a patch monkey and apply them to my tree but then I\n   would be pushing out changes that I didn't try out myself\n   otherwise.  Granted, that is true for platforms other than\n   Windows that I do not regularly build and test on, but when I\n   know there are capable folks who have been working on Windows\n   issues for a long time, not asking for their help does not make\n   much sense.\n\n * They still have other changes that are yet to be fed to my tree,\n   and I do not actively track and compare their tree.  A patch\n   series prepared against my tree may collide with their ongoing\n   effort to make Git on Windows platform better and risk making\n   more work for them, not less.\n\nThe earlier part of your series (including the ones that were Acked\nby EFL) looked sensible to me: 1-6, 9, 11, 12 (outside compat/ part\nonly).\n\nI could take them directly to my tree, but that is still on \"as long\nas msysgit folks are OK with them\" basis.\n\nThanks.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250388","messageId":"xmqqa9569xgi.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"1412791267-13356-8-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-08T19:24:13Z","receivedAt":"2014-10-08T19:24:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> Subject: Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64\n\nPlease prefix with MinGW: like you did for other changes.\n\n> From: Ray Donnelly <mingw.android@gmail.com>\n\nNeeds a bit of explanation what breaks without this change.  I can\nsee that unconditional use of USE_32BIT_TIME_T probably goes against\na 64-bit platform by looking at the change, but \"Fix Blah\" is never\ninformative enough to justify any change in the log message.  We\nwant to be able to read \"Fix Blah *how*/*why*\" in our \"git log\" (and\nprefereably in \"git shortlog\").\n\nThanks.\n\n> Signed-off-by: Ray Donnelly <mingw.android@gmail.com>\n> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> ---\n>  config.mak.uname | 8 ++++++--\n>  1 file changed, 6 insertions(+), 2 deletions(-)\n>\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 324a7fc..4470a928 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -6,6 +6,7 @@ uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')\n>  uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')\n>  uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')\n>  uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')\n> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')\n>  \n>  ifdef MSVC\n>  \t# avoid the MingW and Cygwin configuration sections\n> @@ -509,12 +510,15 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n>  \tNO_POSIX_GOODIES = UnfortunatelyYes\n>  \tDEFAULT_HELP_FORMAT = html\n>  \tNO_D_INO_IN_DIRENT = YesPlease\n> -\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32\n> +\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32\n> +\tifneq (,$(findstring i686,$(CC_MACH)))\n> +\t\tCOMPAT_CFLAGS += -D_USE_32BIT_TIME_T\n> +\t\tBASIC_LDFLAGS += -Wl,--large-address-aware\n> +\tendif\n>  \tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n>  \tCOMPAT_OBJS += compat/mingw.o compat/winansi.o \\\n>  \t\tcompat/win32/pthread.o compat/win32/syslog.o \\\n>  \t\tcompat/win32/dirent.o\n> -\tBASIC_LDFLAGS += -Wl,--large-address-aware\n>  \tEXTLIBS += -lws2_32\n>  \tGITLIBS += git.res\n>  \tPTHREAD_LIBS =\n> -- \n> 2.1.1\n>\n> -- \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250389","messageId":"xmqq38ay9xdz.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"1412791267-13356-9-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH 08/14] MINGW: git-compat-util.h: use inttypes.h for printf macros","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-08T19:25:44Z","receivedAt":"2014-10-08T19:25:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> All MinGW flavors have inttypes.h, so just include it.\n>\n> However, we need to pass -D__USE_MINGW_ANSI_STDIO=1 to select\n> GNU-compatible macro definitions on MinGW-W64:\n> http://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/\n>\n> As a side-effect, Git no longer builds with MSVC < 2010 due to\n> its lack of stdint.h but hopefully that is not a problem.\n\nThat \"hopefully\" does not build much confidence.\n\n\"All have inttypes.h, so just include it\" does not say why it is a\ngood idea to do so, if the source before this patch built OK without\nincluding it.\n\n    Bad things like this and that happen because the current code\n    does not include inttypes.h, but the header exists everywhere so\n    we can fix this and that by including it.\n\nwould be more understandable, but otherwise, it is unclear what\nproblems it attempts to fix, and if it is an improvement overall to\ntrade it off with the possible breakage on some systems.\n\nThe log message also needs to explain why inclusion order in\ngit-compat-util.h must be changed.  What problem does that change\nfix?\n\n> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> ---\n>  compat/mingw.h    |  2 --\n>  compat/msvc.h     |  3 +++\n>  config.mak.uname  |  3 ++-\n>  git-compat-util.h | 11 ++++++-----\n>  4 files changed, 11 insertions(+), 8 deletions(-)\n>\n> diff --git a/compat/mingw.h b/compat/mingw.h\n> index ba05044..59a50fc 100644\n> --- a/compat/mingw.h\n> +++ b/compat/mingw.h\n> @@ -358,8 +358,6 @@ static inline char *mingw_find_last_dir_sep(const char *path)\n>  int mingw_offset_1st_component(const char *path);\n>  #define offset_1st_component mingw_offset_1st_component\n>  #define PATH_SEP ';'\n> -#define PRIuMAX \"I64u\"\n> -#define PRId64 \"I64d\"\n>  \n>  void mingw_open_html(const char *path);\n>  #define open_html mingw_open_html\n> diff --git a/compat/msvc.h b/compat/msvc.h\n> index a63d878..84a03f9 100644\n> --- a/compat/msvc.h\n> +++ b/compat/msvc.h\n> @@ -17,6 +17,9 @@\n>  \n>  typedef int pid_t;\n>  \n> +#define PRIuMAX \"I64u\"\n> +#define PRId64 \"I64d\"\n> +\n>  static __inline int strcasecmp (const char *s1, const char *s2)\n>  {\n>  \tint size1 = strlen(s1);\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 4470a928..c7aaa1c 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -328,6 +328,7 @@ ifeq ($(uname_S),Windows)\n>  \tNO_PREAD = YesPlease\n>  \tNEEDS_CRYPTO_WITH_SSL = YesPlease\n>  \tNO_LIBGEN_H = YesPlease\n> +\tNO_INTTYPES_H = UnfortunatelyYes\n>  \tNO_POLL = YesPlease\n>  \tNO_SYMLINK_HEAD = YesPlease\n>  \tNO_IPV6 = YesPlease\n> @@ -510,7 +511,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n>  \tNO_POSIX_GOODIES = UnfortunatelyYes\n>  \tDEFAULT_HELP_FORMAT = html\n>  \tNO_D_INO_IN_DIRENT = YesPlease\n> -\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32\n> +\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D__USE_MINGW_ANSI_STDIO=1 -DNOGDI -Icompat -Icompat/win32\n>  \tifneq (,$(findstring i686,$(CC_MACH)))\n>  \t\tCOMPAT_CFLAGS += -D_USE_32BIT_TIME_T\n>  \t\tBASIC_LDFLAGS += -Wl,--large-address-aware\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index fb41118..b338277 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -96,6 +96,12 @@\n>  #define GIT_WINDOWS_NATIVE\n>  #endif\n>  \n> +#ifndef NO_INTTYPES_H\n> +#include <inttypes.h>\n> +#else\n> +#include <stdint.h>\n> +#endif\n> +\n>  #include <unistd.h>\n>  #include <stdio.h>\n>  #include <sys/stat.h>\n> @@ -147,11 +153,6 @@\n>  #include <netdb.h>\n>  #include <pwd.h>\n>  #include <sys/un.h>\n> -#ifndef NO_INTTYPES_H\n> -#include <inttypes.h>\n> -#else\n> -#include <stdint.h>\n> -#endif\n>  #ifdef NO_INTPTR_T\n>  /*\n>   * On I16LP32, ILP32 and LP64 \"long\" is the save bet, however\n> -- \n> 2.1.1\n>\n> -- \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250390","messageId":"xmqqvbnu8it7.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"1412791267-13356-11-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH 10/14] Makefile: introduce CROSS_COMPILE variable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-08T19:25:56Z","receivedAt":"2014-10-08T19:25:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> To ease cross-compilation process, introduce a single variable\n> with the prefix to all compiler-related executables.\n>\n> Define CROSS_COMPILE=foo- if your compiler and binary utilities\n> are foo-cc, foo-ar, foo-strip, etc.  More specific variables\n> override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-\n> then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.\n>\n> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> ---\n>  Makefile         | 19 +++++++++++++------\n>  config.mak.uname |  2 +-\n>  2 files changed, 14 insertions(+), 7 deletions(-)\n>\n> diff --git a/Makefile b/Makefile\n> index f34a2d4..c412996 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -339,6 +339,11 @@ all::\n>  # return NULL when it receives a bogus time_t.\n>  #\n>  # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.\n> +#\n> +# Define CROSS_COMPILE=foo- if your compiler and binary utilities\n> +# are foo-cc, foo-ar, foo-strip, etc.  More specific variables\n> +# override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-\n> +# then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.\n\nI think you forgot the \"default to empty\", i.e.\n\nCROSS_COMPILE =\n\nsomewhere to prevent stray an environment variable from affecting\nthe build (which you did correctly for RCFLAGS).\n\n>  GIT-VERSION-FILE: FORCE\n>  \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n> @@ -350,7 +355,6 @@ CFLAGS = -g -O2 -Wall\n>  LDFLAGS =\n>  ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)\n>  ALL_LDFLAGS = $(LDFLAGS)\n> -STRIP ?= strip\n>  \n>  # Among the variables below, these:\n>  #   gitexecdir\n> @@ -390,8 +394,12 @@ htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))\n>  \n>  export prefix bindir sharedir sysconfdir gitwebdir localedir\n>  \n> -CC = cc\n> -AR = ar\n> +AR = $(CROSS_COMPILE)ar\n> +CC = $(CROSS_COMPILE)cc\n> +GCOV = $(CROSS_COMPILE)gcov\n> +RC = $(CROSS_COMPILE)windres\n> +STRIP = $(CROSS_COMPILE)strip\n> +\n>  RM = rm -f\n>  DIFF = diff\n>  TAR = tar\n> @@ -404,13 +412,12 @@ XGETTEXT = xgettext\n>  MSGFMT = msgfmt\n>  PTHREAD_LIBS = -lpthread\n>  PTHREAD_CFLAGS =\n> -GCOV = gcov\n>  \n>  export TCL_PATH TCLTK_PATH\n>  \n>  SPARSE_FLAGS =\n>  \n> -\n> +RCFLAGS =\n>  \n>  ### --- END CONFIGURATION SECTION ---\n>  \n> @@ -1669,7 +1676,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES\n>  \tmv $@+ $@\n>  \n>  git.res: git.rc GIT-VERSION-FILE\n> -\t$(QUIET_RC)$(RC) \\\n> +\t$(QUIET_RC)$(RC) $(RCFLAGS) \\\n>  \t  $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \\\n>  \t  -DGIT_VERSION=\"\\\\\\\"$(GIT_VERSION)\\\\\\\"\" $< -o $@\n>  \n> diff --git a/config.mak.uname b/config.mak.uname\n> index f79c0e0..9f7037e 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -523,7 +523,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n>  \tEXTLIBS += -lws2_32\n>  \tGITLIBS += git.res\n>  \tPTHREAD_LIBS =\n> -\tRC = windres -O coff\n> +\tRCFLAGS += -O coff\n>  \tNATIVE_CRLF = YesPlease\n>  \tX = .exe\n>  \tSPARSE_FLAGS = -Wno-one-bit-signed-bitfield\n> -- \n> 2.1.1\n>\n> -- \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250391","messageId":"xmqqoatm8irn.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"1412791267-13356-15-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-08T19:26:52Z","receivedAt":"2014-10-08T19:26:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> When crosscompiling, one cannot rely on `uname` from host system.\n\nThat may well be true, but is that limited to cross-compiling to\nmingw?   Would it be generally true for any cross compilation,\nwouldn't it?\n\nWhat I am wondering is if it is a better solution to make it easier\nto allow somebody who is cross compiling to express \"Mr.  Makefile,\nwe know better than you and want you to do a MINGW build for us\nwithout checking with `uname -?` yourself\", i.e.\n\n\t$ make uname_O=MINGW uname_S=MINGW\n\nwhich would hopefully allow cross-compilation into other\nenvironments, not just MINGW.\n\n>\n> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> ---\n>  config.mak.uname | 5 +++++\n>  1 file changed, 5 insertions(+)\n>\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 9f7037e..182da50 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -14,6 +14,11 @@ ifdef MSVC\n>  \tuname_O := Windows\n>  endif\n>  \n> +ifneq (,$(findstring mingw,$(CC_MACH)))\n> +\tuname_S := MINGW\n> +\tuname_O := MINGW\n> +endif\n> +\n>  # We choose to avoid \"if .. else if .. else .. endif endif\"\n>  # because maintaining the nesting to match is a pain.  If\n>  # we had \"elif\" things would have been much nicer...\n> -- \n> 2.1.1\n>\n> -- \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250393","messageId":"xmqqfvey8h4t.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"xmqqioju9xiz.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-08T20:02:10Z","receivedAt":"2014-10-08T20:02:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Marat Radchenko <marat@slonopotamus.org> writes:\n>\n>> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n>> ---\n>>  git-compat-util.h | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/git-compat-util.h b/git-compat-util.h\n>> index b338277..101c9d7 100644\n>> --- a/git-compat-util.h\n>> +++ b/git-compat-util.h\n>> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);\n>>  #endif\n>>  \n>>  #define DEFAULT_PACKED_GIT_LIMIT \\\n>> -\t((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n>> +\t((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n>\n> 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always\n> large enough?  Just checking.\n\nHeh, I was being silly.  This gives the default value for a variable\nwhose type is size_t, so it would better fit.  So please throw 13 in\nthe list of changes I found sensible in the other message.\n\nThanks.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250402","messageId":"CABPQNSZXLSfvAOYfER2KYHedityyA+OEo4C5sfu-8K1KkL1R7g@mail.gmail.com","threadId":"37692","inReplyTo":"1412791267-13356-2-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH 01/14] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-10-09T01:01:34Z","receivedAt":"2014-10-09T01:01:34Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Oct 8, 2014 at 8:00 PM, Marat Radchenko <marat@slonopotamus.org> wrote:\n> Unlike MinGW, MinGW-W64 has lseek already properly defined in io.h.\n>\n> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> Acked-by: Eric Faye-Lund <kusmabite@gmail.com>\n\nI spell my name with a K, \"Erik Faye-Lund\".\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250409","messageId":"20141009050318.GA17479@seldon","threadId":"37692","inReplyTo":"xmqqoatm8irn.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-09T05:03:18Z","receivedAt":"2014-10-09T05:03:18Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"On Wed, Oct 08, 2014 at 12:26:52PM -0700, Junio C Hamano wrote:\n> Marat Radchenko <marat@slonopotamus.org> writes:\n> \n> > When crosscompiling, one cannot rely on `uname` from host system.\n> \n> That may well be true, but is that limited to cross-compiling to\n> mingw?   Would it be generally true for any cross compilation,\n> wouldn't it?\n> \n> What I am wondering is if it is a better solution to make it easier\n> to allow somebody who is cross compiling to express \"Mr.  Makefile,\n> we know better than you and want you to do a MINGW build for us\n> without checking with `uname -?` yourself\", i.e.\n> \n> \t$ make uname_O=MINGW uname_S=MINGW\n> \n> which would hopefully allow cross-compilation into other\n> environments, not just MINGW.\n\nSo, do you really want this patch to be changed from 5-liner into\na full-blow system detection rewrite based on `cc -dumpmachine`\ninstead of `uname`?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250410","messageId":"20141009050540.GB17479@seldon","threadId":"37692","inReplyTo":"xmqqfvey8h4t.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-09T05:05:41Z","receivedAt":"2014-10-09T05:05:41Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"On Wed, Oct 08, 2014 at 01:02:10PM -0700, Junio C Hamano wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > Marat Radchenko <marat@slonopotamus.org> writes:\n> >\n> >> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> >> ---\n> >>  git-compat-util.h | 2 +-\n> >>  1 file changed, 1 insertion(+), 1 deletion(-)\n> >>\n> >> diff --git a/git-compat-util.h b/git-compat-util.h\n> >> index b338277..101c9d7 100644\n> >> --- a/git-compat-util.h\n> >> +++ b/git-compat-util.h\n> >> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);\n> >>  #endif\n> >>  \n> >>  #define DEFAULT_PACKED_GIT_LIMIT \\\n> >> -\t((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n> >> +\t((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n> >\n> > 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always\n> > large enough?  Just checking.\n> \n> Heh, I was being silly.  This gives the default value for a variable\n> whose type is size_t, so it would better fit.  So please throw 13 in\n> the list of changes I found sensible in the other message.\n\nIs it an Acked-by?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250412","messageId":"alpine.DEB.1.00.1410090751270.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"xmqqioju9xiz.fsf@gitster.dls.corp.google.com","subject":"Re: Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T06:08:31Z","receivedAt":"2014-10-09T06:08:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 8 Oct 2014, Junio C Hamano wrote:\n\n> Marat Radchenko <marat@slonopotamus.org> writes:\n> \n> >  #define DEFAULT_PACKED_GIT_LIMIT \\\n> > -\t((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n> > +\t((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n> \n> 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always\n> large enough?  Just checking.\n\nThe diff is a bit misleading as to what it *actually* changes. It *just*\ncasts the result to size_t. The arithmetic is performed with longs (thanks\nto the \"l\" in 1024l) and it only overflows 32 bit iff the sizeof() test\nverifies that we're at least on 64 bit -- this arithmetic operation is the\nsame as before the patch. I was fooled by the diff myself (adding another\nparenthesis just to add the cast would probably have helped, though).\n\nIMHO this is a good demonstration how a commit message that goes slightly\nbeyond the necessary can help tons of time by avoiding to let every\nreviewer/reader go through the exact same steps of puzzlement.\n\nCiao,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250413","messageId":"alpine.DEB.1.00.1410090848380.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"20141009050318.GA17479@seldon","subject":"Re: Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T07:04:50Z","receivedAt":"2014-10-09T07:04:50Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Marat,\n\nOn Thu, 9 Oct 2014, Marat Radchenko wrote:\n\n> On Wed, Oct 08, 2014 at 12:26:52PM -0700, Junio C Hamano wrote:\n> > Marat Radchenko <marat@slonopotamus.org> writes:\n> > \n> > > When crosscompiling, one cannot rely on `uname` from host system.\n> > \n> > That may well be true, but is that limited to cross-compiling to\n> > mingw?   Would it be generally true for any cross compilation,\n> > wouldn't it?\n> > \n> > What I am wondering is if it is a better solution to make it easier\n> > to allow somebody who is cross compiling to express \"Mr.  Makefile,\n> > we know better than you and want you to do a MINGW build for us\n> > without checking with `uname -?` yourself\", i.e.\n> > \n> > \t$ make uname_O=MINGW uname_S=MINGW\n> > \n> > which would hopefully allow cross-compilation into other\n> > environments, not just MINGW.\n> \n> So, do you really want this patch to be changed from 5-liner into\n> a full-blow system detection rewrite based on `cc -dumpmachine`\n> instead of `uname`?\n\nJunio's responsibility as a maintainer is to keep this project afloat for\na broader audience than this patch series tries to reach. Keeping that in\nmind, a patch that fixes a broad issue (in this case, cross-compiling)\n*just* for one small use case (in this case, cross-compiling for Windows\nusing MinGW) might need a very good argument to convince the maintainer\nthat a broader solution is either not achievable or so much more\ncomplicated that it is completely outside of the scope of this patch\nseries.\n\nFWIW this is *exactly* what I pointed out here:\n\n\thttps://github.com/dscho/git/commit/e31124d4e8ba4e48181306198648cdfe73ff9c30#comments\n\tHmm. This is a very narrow solution to the underlying problem.\n\tJust think about cross-compiling for e.g. MacOSX. The solution\n\tpresented in this commit works for MinGW, only for MinGW, and for\n\tMinGW alone. The commit message needs to do a much better job to\n\tmake that clear.\n\nAnd Junio actually pointed out that a broader solution is neither\nimpossible nor complex: Junio hinted at the use of the conditional\nassignment \"FOO ?= bar\":\n\n\thttps://www.gnu.org/software/make/manual/make.html#index-_003f_003d\n\nIMHO it would make tons of sense to replace the := assignments in\nhttps://github.com/dscho/git/blob/e31124d4e8ba4e48181306198648cdfe73ff9c30/config.mak.uname#L3-L8\nby ?= assignments.\n\nOf course it is very obvious where the idea for the patch we are\ndiscussing here comes from: the current config.mak.uname has this:\n\n\tifdef MSVC\n\t\t# avoid the MingW and Cygwin configuration sections\n\t\tuname_S := Windows\n\t\tuname_O := Windows\n\tendif\n\nThis could be cleaned up in the same run: to be assigned *before* the\nconditional assignments of uname_S. Likewise, the MINGW-specific part\nshould be done by searching for \"mingw\" in CROSS_COMPILE, also before the\nblock of the uname_* variable assignments.\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250414","messageId":"xmqq4mvd8zt0.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"20141009050540.GB17479@seldon","subject":"Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-09T07:31:07Z","receivedAt":"2014-10-09T07:31:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> On Wed, Oct 08, 2014 at 01:02:10PM -0700, Junio C Hamano wrote:\n>> Junio C Hamano <gitster@pobox.com> writes:\n>> \n>> > Marat Radchenko <marat@slonopotamus.org> writes:\n>> >\n>> >> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n>> >> ---\n>> >>  git-compat-util.h | 2 +-\n>> >>  1 file changed, 1 insertion(+), 1 deletion(-)\n>> >>\n>> >> diff --git a/git-compat-util.h b/git-compat-util.h\n>> >> index b338277..101c9d7 100644\n>> >> --- a/git-compat-util.h\n>> >> +++ b/git-compat-util.h\n>> >> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);\n>> >>  #endif\n>> >>  \n>> >>  #define DEFAULT_PACKED_GIT_LIMIT \\\n>> >> -\t((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n>> >> +\t((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))\n>> >\n>> > 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always\n>> > large enough?  Just checking.\n>> \n>> Heh, I was being silly.  This gives the default value for a variable\n>> whose type is size_t, so it would better fit.  So please throw 13 in\n>> the list of changes I found sensible in the other message.\n>\n> Is it an Acked-by?\n\nNot really.  It just shows that the change needs to be explained\nwell in the proposed log message.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250415","messageId":"xmqqzjd57l32.fsf@gitster.dls.corp.google.com","threadId":"37692","inReplyTo":"20141009050318.GA17479@seldon","subject":"Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-09T07:34:25Z","receivedAt":"2014-10-09T07:34:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marat Radchenko <marat@slonopotamus.org> writes:\n\n> On Wed, Oct 08, 2014 at 12:26:52PM -0700, Junio C Hamano wrote:\n> ...\n>> What I am wondering is if it is a better solution to make it easier\n>> to allow somebody who is cross compiling to express \"Mr.  Makefile,\n>> we know better than you and want you to do a MINGW build for us\n>> without checking with `uname -?` yourself\", i.e.\n>> \n>> \t$ make uname_O=MINGW uname_S=MINGW\n>> \n>> which would hopefully allow cross-compilation into other\n>> environments, not just MINGW.\n>\n> So, do you really want this patch to be changed from 5-liner into\n> a full-blow system detection rewrite based on `cc -dumpmachine`\n> instead of `uname`?\n\nNo, and I do not quite see why you even need to look at -dumbmachine\noutput when your goal is to make this command line\n\n>> \t$ make uname_O=MINGW uname_S=MINGW\n\nwork sensibly.  Wouldn't it be more like a series of\n\n\tifndef uname_O\n        uname_O := $(shell uname -o)\n\tendif\n\nor something like that?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250417","messageId":"alpine.DEB.1.00.1410090936381.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"xmqqzjd57l32.fsf@gitster.dls.corp.google.com","subject":"Re: [msysGit] Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T07:38:31Z","receivedAt":"2014-10-09T07:38:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 9 Oct 2014, Junio C Hamano wrote:\n\n> Marat Radchenko <marat@slonopotamus.org> writes:\n> \n> > On Wed, Oct 08, 2014 at 12:26:52PM -0700, Junio C Hamano wrote:\n> > ...\n> >> What I am wondering is if it is a better solution to make it easier\n> >> to allow somebody who is cross compiling to express \"Mr.  Makefile,\n> >> we know better than you and want you to do a MINGW build for us\n> >> without checking with `uname -?` yourself\", i.e.\n> >> \n> >> \t$ make uname_O=MINGW uname_S=MINGW\n> >> \n> >> which would hopefully allow cross-compilation into other\n> >> environments, not just MINGW.\n> >\n> > So, do you really want this patch to be changed from 5-liner into\n> > a full-blow system detection rewrite based on `cc -dumpmachine`\n> > instead of `uname`?\n> \n> No, and I do not quite see why you even need to look at -dumbmachine\n\nNice Freudian ;-)\n\n> output when your goal is to make this command line\n> \n> >> \t$ make uname_O=MINGW uname_S=MINGW\n> \n> work sensibly.  Wouldn't it be more like a series of\n> \n> \tifndef uname_O\n>         uname_O := $(shell uname -o)\n> \tendif\n> \n> or something like that?\n\nOr uname_O ?= $(shell uname -o)\n\nTo clarify: it would be enough to look at CROSS_COMPILE to determine\nwhether we're cross-compiling for MinGW.\n\nThe output of -dumpmachine is still needed for the correct CFLAGS/LDFLAGS.\n\nCiao,\nDscho\n"},{"id":"250419","messageId":"20141009084848.GA18125@seldon","threadId":"37692","inReplyTo":"xmqqzjd57l32.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-09T08:48:49Z","receivedAt":"2014-10-09T08:48:49Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"On Thu, Oct 09, 2014 at 12:34:25AM -0700, Junio C Hamano wrote:\n> No, and I do not quite see why you even need to look at -dumbmachine\n> output when your goal is to make this command line\n> \n> >> \t$ make uname_O=MINGW uname_S=MINGW\n> \n> work sensibly.  Wouldn't it be more like a series of\n> \n> \tifndef uname_O\n>         uname_O := $(shell uname -o)\n> \tendif\n> \n> or something like that?\n\nI don't want to tell `make` my system name several times. It should be\npossible to infer system type from CC.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250420","messageId":"alpine.DEB.1.00.1410091205560.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"1412791267-13356-1-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH v5] MinGW(-W64) compilation","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T10:11:01Z","receivedAt":"2014-10-09T10:11:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi all,\n\nOn Wed, 8 Oct 2014, Marat Radchenko wrote:\n\n> This patch series fixes building on modern MinGW and MinGW-W64\n> (including x86_64).\n\nTo make it more convenient to work on this patch series using Git, I\npushed this branch to\n\n\thttps://github.com/dscho/git/compare/git:master...w64-slonopotamus\n\nI also added one patch I find highly convenient:\n\nhttps://github.com/dscho/git/commit/29749c7d7b4638c63369d6cf067f5d524d0092f9\n\n-- snipsnap --\nSubject: [PATCH] MinGW-w64: Work around bug in MinGW-w64's winuser.h\n\nThis allows contributors to compile 64-bit Windows builds of Git without\nforcing them to use an unstable version of MinGW-w64.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/poll/poll.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/compat/poll/poll.c b/compat/poll/poll.c\nindex 8941249..dcbcbaf 100644\n--- a/compat/poll/poll.c\n+++ b/compat/poll/poll.c\n@@ -76,6 +76,18 @@\n \n #ifdef WIN32_NATIVE\n \n+/*\n+ * Work around https://sourceforge.net/p/mingw-w64/bugs/397. In short, some\n+ * definitions were put into the GUI-only section of winuser.h by mistake\n+ * in MinGW-w64 versions up to 3.1.0.\n+ */\n+#ifndef QS_ALLINPUT\n+#define QS_ALLINPUT 0xff\n+extern WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjects(DWORD nCount,\n+\tCONST HANDLE *pHandles, WINBOOL fWaitAll, DWORD dwMilliseconds,\n+\tDWORD dwWakeMask);\n+#endif\n+\n #define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)\n \n static BOOL\n-- \n2.0.0.rc3.9669.g840d1f9\n\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250421","messageId":"alpine.DEB.1.00.1410091213440.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"CAPc5daUo+Fw2Oh3LK+0HJCmtVjicYk62qiQ2v8h8pitYHAZL3w@mail.gmail.com","subject":"Re: Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T10:18:51Z","receivedAt":"2014-10-09T10:18:51Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 9 Oct 2014, Junio C Hamano wrote:\n\n> Isn't the primary reason we use colon-assign to avoid running the same\n> $(shell) over and over again every time $(uname_?) gets referenced? How\n> would it work with ?= ???\n\nI was under the impression that ?= would only define the variable once,\nthe next time ?= would be encountered, no assignment (and actually, no\nevaluation) would take place because the variable already has a value?\n\nAccording to\n\n\thttps://www.gnu.org/software/make/manual/make.html#index-_003f_003d\n\n\tFOO ?= bar\n\n\tis exactly equivalent to this (see The origin Function):\n\n\tifeq ($(origin FOO), undefined)\n\t  FOO = bar\n\tendif\n\n> Pardon misspellings and grammos, typed on a tablet.\n\nNo worries. But you really should use your tablet for reading books after\nmidnight instead of doing work... ;-)\n\nCiao,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250423","messageId":"20141009103921.GA18641@seldon","threadId":"37692","inReplyTo":"alpine.DEB.1.00.1410091205560.990@s15462909.onlinehome-server.info","subject":"Re: [PATCH v5] MinGW(-W64) compilation","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-09T10:39:21Z","receivedAt":"2014-10-09T10:39:21Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"On Thu, Oct 09, 2014 at 12:11:01PM +0200, Johannes Schindelin wrote:\n> I also added one patch I find highly convenient:\n> \n> https://github.com/dscho/git/commit/29749c7d7b4638c63369d6cf067f5d524d0092f9\n\nThere already were two attempts to this issue:\n\n 1. http://www.spinics.net/lists/git/msg230028.html\n 2. http://www.spinics.net/lists/git/msg229822.html\n\nNeither of them was accepted to git.git. I doubt your one will be.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250424","messageId":"alpine.DEB.1.00.1410091258110.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"20141009103921.GA18641@seldon","subject":"Re: [PATCH v5] MinGW(-W64) compilation","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T10:59:28Z","receivedAt":"2014-10-09T10:59:28Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Marat,\n\nOn Thu, 9 Oct 2014, Marat Radchenko wrote:\n\n> On Thu, Oct 09, 2014 at 12:11:01PM +0200, Johannes Schindelin wrote:\n> > I also added one patch I find highly convenient:\n> > \n> > https://github.com/dscho/git/commit/29749c7d7b4638c63369d6cf067f5d524d0092f9\n> \n> There already were two attempts to this issue:\n> \n>  1. http://www.spinics.net/lists/git/msg230028.html\n>  2. http://www.spinics.net/lists/git/msg229822.html\n> \n> Neither of them was accepted to git.git. I doubt your one will be.\n\nI would guess that they were not accepted mostly because they were not\ncoordinated with the Windows developers on the msysGit mailing list.\n\nLet's fix the rest of the issues, and then we can always carry this patch\nin Git for Windows until MinGW-w64 3.1.1 (or 3.2.0) is released.\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250427","messageId":"alpine.DEB.1.00.1410091747090.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"CAPc5daWdkz16RnORjtjw+oP3PO043Y57wAMm3TxC6L5GBJz8uQ@mail.gmail.com","subject":"Re: Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T15:49:55Z","receivedAt":"2014-10-09T15:49:55Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 9 Oct 2014, Junio C Hamano wrote:\n\n> I didn't mean multiple uses of ?= for the same variable. I meant\n> multiple uses of (references to) the variable. I.e. wouldn't FOO and\n> BAR behave differently below?\n> \n> FOO := $(shell random)\n> BAR = $(shell random)\n> all::\n>    echo $(FOO) and $(BAR)\n>    echo twice $(FOO) and $(BAR)\n\nYou're correct, of course, my mistake. I just tested with this:\n\n\tR ?= $(shell echo $$RANDOM)\n\n\tall:\n\t\techo The values of $(R), $(R) and $(R)\n\nand of course a \"make\" yields three different numbers. Sorry for missing\nthat.\n\nSo what we should do is something like\n\n\tifeq ($(uname_S),)\n\t\tuname_S := $(shell uname -s)\n\tendif\n\neven if repeating that pattern is kind of ugly...\n\nThanks for correcting my mistake,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250443","messageId":"alpine.DEB.1.00.1410092115100.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"1412791267-13356-8-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T19:22:19Z","receivedAt":"2014-10-09T19:22:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 8 Oct 2014, Marat Radchenko wrote:\n\n> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')\n\nThere is a rather huge problem with that. The latest mingw-w64 release,\n4.9.1, does not do what you expect here: while '.../mingw32/bin/gcc -m32\n-o 32.exe test.c' and '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work\nfine, producing i686 and x86_64 executables respectively,\n'.../mingw32/bin/gcc -dumpmachine' prints i686-w64-mingw32 *always*, even\nwhen specifying the -m64 option.\n\nSo unfortunately, the test introduced by this patch (intended to figure\nout whether the build targets i686, and skip a compiler and a linker\noption otherwise) is incorrect.\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250445","messageId":"CAOYw7dsNQZNYZRz1c7RM0+CuOtzTXMH-2zWJR5MbM_kH9eZ1Eg@mail.gmail.com","threadId":"37692","inReplyTo":"alpine.DEB.1.00.1410092115100.990@s15462909.onlinehome-server.info","subject":"Re: [msysGit] [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Ray Donnelly","fromEmail":"mingw.android@gmail.com","sentAt":"2014-10-09T19:25:42Z","receivedAt":"2014-10-09T19:25:42Z","isPatch":true,"sender":{"key":"mingw.android@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1042804?v=4"},"body":"On Thu, Oct 9, 2014 at 8:22 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Wed, 8 Oct 2014, Marat Radchenko wrote:\n>\n>> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')\n>\n> There is a rather huge problem with that. The latest mingw-w64 release,\n> 4.9.1, does not do what you expect here: while '.../mingw32/bin/gcc -m32\n> -o 32.exe test.c' and '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work\n> fine, producing i686 and x86_64 executables respectively,\n> '.../mingw32/bin/gcc -dumpmachine' prints i686-w64-mingw32 *always*, even\n> when specifying the -m64 option.\n>\n> So unfortunately, the test introduced by this patch (intended to figure\n> out whether the build targets i686, and skip a compiler and a linker\n> option otherwise) is incorrect.\n\nWhich release are you talking about? Can you point me to the tarball please?\n\n>\n> Ciao,\n> Johannes\n"},{"id":"250450","messageId":"alpine.DEB.1.00.1410092146310.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"CAOYw7dsNQZNYZRz1c7RM0+CuOtzTXMH-2zWJR5MbM_kH9eZ1Eg@mail.gmail.com","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-09T19:47:18Z","receivedAt":"2014-10-09T19:47:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ray,\n\nOn Thu, 9 Oct 2014, Ray Donnelly wrote:\n\n> On Thu, Oct 9, 2014 at 8:22 PM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n> >\n> > On Wed, 8 Oct 2014, Marat Radchenko wrote:\n> >\n> >> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')\n> >\n> > There is a rather huge problem with that. The latest mingw-w64\n> > release, 4.9.1, does not do what you expect here: while\n> > '.../mingw32/bin/gcc -m32 -o 32.exe test.c' and '.../mingw32/bin/gcc\n> > -m64 -o 64.exe test.c' work fine, producing i686 and x86_64\n> > executables respectively, '.../mingw32/bin/gcc -dumpmachine' prints\n> > i686-w64-mingw32 *always*, even when specifying the -m64 option.\n> >\n> > So unfortunately, the test introduced by this patch (intended to\n> > figure out whether the build targets i686, and skip a compiler and a\n> > linker option otherwise) is incorrect.\n> \n> Which release are you talking about? Can you point me to the tarball\n> please?\n\nCertainly:\n\nhttp://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.1/threads-win32/sjlj/\n\n(rev1, not rev0)\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250464","messageId":"CAOYw7dtouon0EXYQPnvpc7ZMARKwaureNTK6ZL+aByknpPG-9A@mail.gmail.com","threadId":"37692","inReplyTo":"alpine.DEB.1.00.1410092146310.990@s15462909.onlinehome-server.info","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Ray Donnelly","fromEmail":"mingw.android@gmail.com","sentAt":"2014-10-09T23:56:25Z","receivedAt":"2014-10-09T23:56:25Z","isPatch":true,"sender":{"key":"mingw.android@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1042804?v=4"},"body":"Thanks Johannes.\n\nOn Thu, Oct 9, 2014 at 8:47 PM, Johannes Schindelin <\nJohannes.Schindelin@gmx.de> wrote:\n> Hi Ray,\n>\n> On Thu, 9 Oct 2014, Ray Donnelly wrote:\n>\n>> On Thu, Oct 9, 2014 at 8:22 PM, Johannes Schindelin\n>> <Johannes.Schindelin@gmx.de> wrote:\n>> >\n>> > On Wed, 8 Oct 2014, Marat Radchenko wrote:\n>> >\n>> >> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo\nnot')\n>> >\n>> > There is a rather huge problem with that. The latest mingw-w64\n>> > release, 4.9.1, does not do what you expect here: while\n>> > '.../mingw32/bin/gcc -m32 -o 32.exe test.c' and '.../mingw32/bin/gcc\n>> > -m64 -o 64.exe test.c' work fine, producing i686 and x86_64\n>> > executables respectively, '.../mingw32/bin/gcc -dumpmachine' prints\n>> > i686-w64-mingw32 *always*, even when specifying the -m64 option.\n>> >\n>> > So unfortunately, the test introduced by this patch (intended to\n>> > figure out whether the build targets i686, and skip a compiler and a\n>> > linker option otherwise) is incorrect.\n>>\n>> Which release are you talking about? Can you point me to the tarball\n>> please?\n>\n> Certainly:\n>\n>\nhttp://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.1/threads-win32/sjlj/\n>\n> (rev1, not rev0)\n\nI guess I can add passing in CFLAGS also to try to catch that case. What\nwould you recommend?\n\nI've added support to build using your branch to MSYS2's MINGW-packages\ngit-git package in case anyone wants to help out:\n\nhttps://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-git-git\n\nChange _based_on_dscho_w64_msysgit=no to =yes. Note also that some more\npatches are needed before we can build, and I think more are needed. Using\nplain msysGit (I.e. =no) and 15 patches we are able to build a somewhat\nfunctional git.\n\n>\n> Ciao,\n> Johannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250471","messageId":"alpine.DEB.1.00.1410100809450.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"CAOYw7dtouon0EXYQPnvpc7ZMARKwaureNTK6ZL+aByknpPG-9A@mail.gmail.com","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-10T06:38:09Z","receivedAt":"2014-10-10T06:38:09Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ray,\n\nOn Fri, 10 Oct 2014, Ray Donnelly wrote:\n\n> On Thu, Oct 9, 2014 at 8:47 PM, Johannes Schindelin <\n> Johannes.Schindelin@gmx.de> wrote:\n> >\n> > On Thu, 9 Oct 2014, Ray Donnelly wrote:\n> >\n> >> On Thu, Oct 9, 2014 at 8:22 PM, Johannes Schindelin\n> >> <Johannes.Schindelin@gmx.de> wrote:\n> >> >\n> >> > On Wed, 8 Oct 2014, Marat Radchenko wrote:\n> >> >\n> >> >> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo\n> not')\n> >> >\n> >> > There is a rather huge problem with that. The latest mingw-w64\n> >> > release, 4.9.1, does not do what you expect here: while\n> >> > '.../mingw32/bin/gcc -m32 -o 32.exe test.c' and\n> >> > '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work fine, producing\n> >> > i686 and x86_64 executables respectively, '.../mingw32/bin/gcc\n> >> > -dumpmachine' prints i686-w64-mingw32 *always*, even when\n> >> > specifying the -m64 option.\n> >> >\n> >> > So unfortunately, the test introduced by this patch (intended to\n> >> > figure out whether the build targets i686, and skip a compiler and\n> >> > a linker option otherwise) is incorrect.\n> >>\n> >> Which release are you talking about? Can you point me to the tarball\n> >> please?\n> >\n> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.1/threads-win32/sjlj/\n> >\n> > (rev1, not rev0)\n> \n> I guess I can add passing in CFLAGS also to try to catch that case.\n\nWell, my tests say that the CFLAGS do *not* change the behavior of\n-dumpmachine. IOW `i686-w64-mingw32-gcc -m64 -dumpmachine` *still* spits\nout i686-w64-mingw32. Even if the -m64 flag would cause the compiler to\ngenerate 64-bit binaries.\n\n> I've added support to build using your branch to MSYS2's MINGW-packages\n> git-git package in case anyone wants to help out:\n> \n> https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-git-git\n\nInteresting.\n\nWith Git for Windows, we aim to become waaaaay more standards-compliant by\nproviding Git as a regular mingw-get'able package. To this end, we use\nmgwport recipes to build the required packages.\n\nIt looks as if the PKGBUILD system is similar, but *just* incompatible\nenough with mgwport to prevent code sharing. Is this fixable?\n\n> Change _based_on_dscho_w64_msysgit=no to =yes. Note also that some more\n> patches are needed before we can build, and I think more are needed.\n> Using plain msysGit (I.e. =no) and 15 patches we are able to build a\n> somewhat functional git.\n\nSo here is my plan, please let me know whether you think we can compromise\non a strategy that benefits both of us:\n\nSince I want mingw-get'able packages – also for 64-bit – I would like to\nkeep the CPU architecture dependent parts as contained as possible and use\nonly one package system for both. Likewise, I would really prefer to have\na single development environment for both architectures, and the Git for\nWindows SDK is really coming along nicely, thanks to the tremendous\nefforts put in by Thomas Braun and Sebastian Schuberth.\n\nI am planning, therefore, to provide the MinGW-w64 compiler as an add-on\npackage that needs to be installed in order to build 64-bit stuff.\n\nAt this stage, it is actually *more* than a plan: I already have a package\nto install 7za – required to unpack MinGW-w64 pre-built packages – and the\nscript to package mingw-w64 is in the process of being fleshed out.\n\nWith this compiler, and the 'w64' branch from https://github.com/dscho/git\n– intended to be merged into https://github.com/git-for-windows/git – the\nfollowing command-line produces 64-bit Git:\n\n\tPATH=/path/to/unpacked/mingw-w64/mingw64/bin/:$PATH \\\n\tmake \\\n\t\tCROSS_COMPILE=x86_64-w64-mingw32- CC='$(CROSS_COMPILE)gcc' \\\n\t\tAR=ar RC=windres \\\n\t\tNO_ICONV=1 NO_OPENSSL=1 NO_CURL=1 NEEDS_LIBICONV= USE_LIBPCRE=\n\nThe test suite passes so far (still running, at the time of writing it is\ngoing through t3404).\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250480","messageId":"alpine.DEB.1.00.1410101252240.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"alpine.DEB.1.00.1410100809450.990@s15462909.onlinehome-server.info","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-10T10:55:04Z","receivedAt":"2014-10-10T10:55:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 10 Oct 2014, Johannes Schindelin wrote:\n\n> With this [mingw-w64] compiler, and the 'w64' branch from\n> https://github.com/dscho/git – intended to be merged into\n> https://github.com/git-for-windows/git – the following command-line\n> produces 64-bit Git:\n> \n> \tPATH=/path/to/unpacked/mingw-w64/mingw64/bin/:$PATH \\\n> \tmake \\\n> \t\tCROSS_COMPILE=x86_64-w64-mingw32- CC='$(CROSS_COMPILE)gcc' \\\n> \t\tAR=ar RC=windres \\\n> \t\tNO_ICONV=1 NO_OPENSSL=1 NO_CURL=1 NEEDS_LIBICONV= USE_LIBPCRE=\n> \n> The test suite passes so far (still running, at the time of writing it is\n> going through t3404).\n\nAnd it stopped at t3900-i18n-commit.txt:\n\nnot ok 15 - ISO8859-1 should be shown in UTF-8 now\nnot ok 16 - eucJP should be shown in UTF-8 now\nnot ok 17 - ISO-2022-JP should be shown in UTF-8 now\nnot ok 23 - ISO8859-1 should be shown in UTF-8 now\nnot ok 24 - eucJP should be shown in UTF-8 now\nnot ok 25 - ISO-2022-JP should be shown in UTF-8 now\nnot ok 27 - ISO-2022-JP should be shown in eucJP now\nnot ok 28 - eucJP should be shown in ISO-2022-JP now\n\nInspecting the test case 15 above, it appears as if ISO-8859-1 was still\nshown as ISO-8859-1 instead of UTF-8:\n\n$ hexdump.exe /git/t/t3900/1-UTF-8.txt trash\ndirectory.t3900-i18n-commit/current\n---- /git/t/t3900/1-UTF-8.txt ----\n0000  c3 84 c3 8b c3 91 c3 8f  c3 96 0a 0a c3 81 62 c3\n0010  a7 64 c3 a8 66 67 0a\n---- trash directory.t3900-i18n-commit/current ----\n0000  c4 cb d1 cf d6 0a 0a c1  62 e7 64 e8 66 67 0a\n\nSo I fear we have still a ways to go before Git works as a 64-bit Windows\nbinary...\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250504","messageId":"alpine.DEB.1.00.1410111045100.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"CAOYw7dtSdR8GVYK2YrVjgQ7ZRExHjPBLCNQk7vchV66fx27xBw@mail.gmail.com","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-11T09:11:42Z","receivedAt":"2014-10-11T09:11:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ray,\n\nOn Fri, 10 Oct 2014, Ray Donnelly wrote:\n\n> what's the difference between https://github.com/msysgit/git and\n> https://github.com/git-for-windows/git ? I noticed that your fork is\n> forked from msysgit, not git-for-windows?\n\nI am glad you asked!\n\nGit for Windows was developed using the development environment called\n\"msysGit\" ever since 2007. Unfortunately the name caused a *real* lot of\nconfusion, not only because some people wondered what the heck MSys is,\nbut those who did not wonder mistook it for a *different* version of Git\nfor Windows.\n\nApart from the name, msysGit also has the shortcoming of abusing Git to\ndeploy binaries. In other words, msysGit itself is a Git-managed project\nthat delivers the complete development environment. Upgrading individual\ncomponents is unnecessarily hard, but msysGit's way was necessary because\nthere was no nice package manager for MinGW/MSys yet.\n\nThings have changed in the meantime, and pushed forward by Thomas Braun\nand Sebastian Schuberth, we now have a light-weight Git for Windows SDK –\nwhich is essentially a standard MinGW/MSys system managed through the\npackage manager mingw-get. The only two add-ons we have is a nicer\ninstaller (that Sebastian offered to MinGW but they declined) and the\naddition of our own mingw-get'able packages (such as openssl, libpcre, and\ngit itself).\n\nNeedless to say, I am a big fan of that new strategy. This is why we\ndecided to just phase out the name \"msysGit\" (as well as the GitHub org of\nthe same name) and work on Git for Windows (with the corresponding GitHub\norg, and using the name \"Git for Windows\" for the installer aimed at\n\"end-users\" and \"Git for Windows SDK\" for the development environment\ntargeting Git for Windows developers).\n\nI also added this writeup to the FAQ on the msysGit wiki:\nhttps://github.com/msysgit/msysgit/wiki/Relationship-to-Git-for-Windows\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250507","messageId":"alpine.DEB.1.00.1410111310530.990@s15462909.onlinehome-server.info","threadId":"37692","inReplyTo":"alpine.DEB.1.00.1410101252240.990@s15462909.onlinehome-server.info","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-10-11T11:12:31Z","receivedAt":"2014-10-11T11:12:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 10 Oct 2014, Johannes Schindelin wrote:\n\n> On Fri, 10 Oct 2014, Johannes Schindelin wrote:\n> \n> > With this [mingw-w64] compiler, and the 'w64' branch from\n> > https://github.com/dscho/git – intended to be merged into\n> > https://github.com/git-for-windows/git – the following command-line\n> > produces 64-bit Git:\n> > \n> > \tPATH=/path/to/unpacked/mingw-w64/mingw64/bin/:$PATH \\\n> > \tmake \\\n> > \t\tCROSS_COMPILE=x86_64-w64-mingw32- CC='$(CROSS_COMPILE)gcc' \\\n> > \t\tAR=ar RC=windres \\\n> > \t\tNO_ICONV=1 NO_OPENSSL=1 NO_CURL=1 NEEDS_LIBICONV= USE_LIBPCRE=\n> > \n> > The test suite passes so far (still running, at the time of writing it is\n> > going through t3404).\n> [...]\n> \n> So I fear we have still a ways to go before Git works as a 64-bit Windows\n> binary...\n\nIt seems to be not *all* that bad: only t3900, t3901, t4041, t4205, t4210,\nt5100, t6006 and t7102 display test failures.\n\nCiao,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"250599","messageId":"20141014070822.GA15460@seldon","threadId":"37692","inReplyTo":"alpine.DEB.1.00.1410092115100.990@s15462909.onlinehome-server.info","subject":"Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-10-14T07:08:22Z","receivedAt":"2014-10-14T07:08:22Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"On Thu, Oct 09, 2014 at 09:22:19PM +0200, Johannes Schindelin wrote:\n> Hi,\n> \n> On Wed, 8 Oct 2014, Marat Radchenko wrote:\n> \n> > +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')\n> \n> There is a rather huge problem with that. The latest mingw-w64 release,\n> 4.9.1, does not do what you expect here: while '.../mingw32/bin/gcc -m32\n> -o 32.exe test.c' and '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work\n> fine, producing i686 and x86_64 executables respectively,\n> '.../mingw32/bin/gcc -dumpmachine' prints i686-w64-mingw32 *always*, even\n> when specifying the -m64 option.\n> \n> So unfortunately, the test introduced by this patch (intended to figure\n> out whether the build targets i686, and skip a compiler and a linker\n> option otherwise) is incorrect.\n\nAccording to [1], it is by design. For now, I suggest using separate\ngcc binaries for 32/64, without messing with -m32. Of course we can\nfallback to `./configure` that will determine bitness by compiling something.\n\n[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52096#c1\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"}]}