{"thread":{"id":"37641","subject":"[PATCH 01/14] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64","startedAt":"2014-09-28T13:24:16Z","lastAt":"2014-09-30T06:29:48Z","messageCount":18,"participants":["Marat Radchenko","Johannes Schindelin","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":14},"messages":[{"id":"249967","messageId":"1411910670-31285-1-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":null,"subject":"MinGW(-W64) compilation","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-09-28T13:24:16Z","receivedAt":"2014-09-28T13:24:16Z","isPatch":false,"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 (via WinGit environment)\n - msysGit environment\n - Linux cross-toolchain i686-pc-mingw32\n - Linux cross-toolchain i686-w64-mingw32\n - Linux cross-toolchain x86_64-w64-mingw32\n\nAttention: in order to build on MinGW-W64, you need to use 'sf/v3.x' branch\nfrom MinGW-W64 repo because MinGW-W64 releases do not yet have a fix\nfor https://sourceforge.net/p/mingw-w64/bugs/397\n\nWorkaround that allows to also build on older MinGW-W64 is currently\npending [1] on gnulib ML. If it is accepted, same fix [2] can be applied\nto Git copy of poll.c.\n\n[1]: http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00076.html\n[2]: http://git.661346.n2.nabble.com/PATCH-v2-MinGW-W64-cross-compilation-tp7609085p7609093.html\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":"249965","messageId":"1411910670-31285-2-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:17Z","receivedAt":"2014-09-28T13:24:17Z","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 df0e320..ed79368 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -281,7 +281,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":"249966","messageId":"1411910670-31285-3-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:18Z","receivedAt":"2014-09-28T13:24:18Z","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":"249968","messageId":"1411910670-31285-4-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:19Z","receivedAt":"2014-09-28T13:24:19Z","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 ed79368..948a174 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -93,8 +93,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":"249970","messageId":"1411910670-31285-5-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:20Z","receivedAt":"2014-09-28T13:24:20Z","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 948a174..d113b19 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":"249969","messageId":"1411910670-31285-6-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:21Z","receivedAt":"2014-09-28T13:24:21Z","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":"249974","messageId":"1411910670-31285-7-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:22Z","receivedAt":"2014-09-28T13:24:22Z","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":"249971","messageId":"1411910670-31285-8-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:23Z","receivedAt":"2014-09-28T13:24:23Z","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":"249973","messageId":"1411910670-31285-9-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:24Z","receivedAt":"2014-09-28T13:24:24Z","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 d113b19..4bae842 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -353,8 +353,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 0c4e663..9d2d5ab 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":"249972","messageId":"1411910670-31285-10-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:25Z","receivedAt":"2014-09-28T13:24:25Z","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":"249977","messageId":"1411910670-31285-11-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:26Z","receivedAt":"2014-09-28T13:24:26Z","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":"249978","messageId":"1411910670-31285-12-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:27Z","receivedAt":"2014-09-28T13:24:27Z","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":"249979","messageId":"1411910670-31285-13-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:28Z","receivedAt":"2014-09-28T13:24:28Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"This commit touches regcomp.c and poll.c from Gnulib,\nboth were fixed upstream in 2012 the same way.\n\nWrt ShellExecute, see [1].\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/win32/pthread.h | 2 +-\n compat/winansi.c       | 2 +-\n pack-revindex.c        | 2 +-\n sha1_file.c            | 8 ++++----\n 7 files changed, 14 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/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":"249976","messageId":"1411910670-31285-14-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:29Z","receivedAt":"2014-09-28T13:24:29Z","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 9d2d5ab..5f6659c 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":"249975","messageId":"1411910670-31285-15-git-send-email-marat@slonopotamus.org","threadId":"37641","inReplyTo":"1411910670-31285-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-09-28T13:24:30Z","receivedAt":"2014-09-28T13:24:30Z","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":"249981","messageId":"alpine.DEB.1.00.1409282255150.990@s15462909.onlinehome-server.info","threadId":"37641","inReplyTo":"1411910670-31285-1-git-send-email-marat@slonopotamus.org","subject":"Re: MinGW(-W64) compilation","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-09-28T20:55:40Z","receivedAt":"2014-09-28T20:55:40Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Marat,\n\nOn Sun, 28 Sep 2014, Marat Radchenko wrote:\n\n> This patch series fixes building on modern MinGW and MinGW-W64\n> (including x86_64!).\n\nAwesome work! I'll have a look at it as soon as I can!\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":"250006","messageId":"5429C47D.3050903@kdbg.org","threadId":"37641","inReplyTo":"1411910670-31285-13-git-send-email-marat@slonopotamus.org","subject":"Re: [PATCH 12/14] Fix pointer -> integer casts on IL32P64 systems","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-09-29T20:43:41Z","receivedAt":"2014-09-29T20:43:41Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 28.09.2014 um 15:24 schrieb Marat Radchenko:\n> This commit touches regcomp.c and poll.c from Gnulib,\n> both were fixed upstream in 2012 the same way.\n> \n> Wrt ShellExecute, see [1].\n> \n> [1]: http://blogs.msdn.com/b/oldnewthing/archive/2006/11/08/1035971.aspx\n\nPlease do not force readers to visit a web site; provide at least a summary.\n\n> \n> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>\n> ---\n\n> diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c\n> index 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>  \n\nThis breaks with\n\nIn file included from compat/regex/regex.c:77:\ncompat/regex/regcomp.c: In function 'parse_dup_op':\ncompat/regex/regcomp.c:2580: error: 'intptr_t' undeclared (first use in\nthis function)\n\nwhen compiled using the msysgit environment.\n\n-- Hannes\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":"250013","messageId":"20140930062947.GA17170@seldon","threadId":"37641","inReplyTo":"5429C47D.3050903@kdbg.org","subject":"Re: [PATCH 12/14] Fix pointer -> integer casts on IL32P64 systems","fromName":"Marat Radchenko","fromEmail":"marat@slonopotamus.org","sentAt":"2014-09-30T06:29:48Z","receivedAt":"2014-09-30T06:29:48Z","isPatch":true,"sender":{"key":"marat@slonopotamus.org","avatar":"https://avatars.githubusercontent.com/u/92637?v=4"},"body":"On Mon, Sep 29, 2014 at 10:43:41PM +0200, Johannes Sixt wrote:\n> Am 28.09.2014 um 15:24 schrieb Marat Radchenko:\n> > This commit touches regcomp.c and poll.c from Gnulib,\n> > both were fixed upstream in 2012 the same way.\n> > \n> > Wrt ShellExecute, see [1].\n> > \n> > [1]: http://blogs.msdn.com/b/oldnewthing/archive/2006/11/08/1035971.aspx\n> \n> Please do not force readers to visit a web site; provide at least a summary.\n\nNo problem, will expand commit message.\n\n> This breaks with\n> \n> In file included from compat/regex/regex.c:77:\n> compat/regex/regcomp.c: In function 'parse_dup_op':\n> compat/regex/regcomp.c:2580: error: 'intptr_t' undeclared (first use in\n> this function)\n> \n> when compiled using the msysgit environment.\n\nAargh! No idea how this slipped through. Will reroll.\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"}]}