Discussion:
[PATCH v4] MinGW(-W64) compilation
Marat Radchenko
2014-09-30 07:02:29 UTC
Permalink
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).

*Compilation* tested on:
- MSVC
- msysGit environment (twice)
- Linux cross-toolchain i686-pc-mingw32
- Linux cross-toolchain i686-w64-mingw32
- Linux cross-toolchain x86_64-w64-mingw32

Attention: in order to build on MinGW-W64, you need to use 'v1.x', 'v2.x' or 'sf/v3.x'
branches from MinGW-W64 repo because MinGW-W64 releases do not yet have a fix
for https://sourceforge.net/p/mingw-w64/bugs/397
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:30 UTC
Permalink
Unlike MinGW, MinGW-W64 has lseek already properly defined in io.h.

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
Acked-by: Eric Faye-Lund <***@gmail.com>
---
compat/mingw.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/compat/mingw.h b/compat/mingw.h
index df0e320..ed79368 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -281,7 +281,9 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
* Use mingw specific stat()/lstat()/fstat() implementations on Windows.
*/
#define off_t off64_t
+#ifndef lseek
#define lseek _lseeki64
+#endif

/* use struct stat with 64 bit st_size */
#ifdef stat
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:31 UTC
Permalink
-D__USE_MINGW_ACCESS only affects MinGW and does nothing when
MSVC is used.

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
Acked-by: Eric Faye-Lund <***@gmail.com>
---
config.mak.uname | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.mak.uname b/config.mak.uname
index a2f380f..20cbdcf 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -368,7 +368,7 @@ ifeq ($(uname_S),Windows)
COMPAT_OBJS = compat/msvc.o compat/winansi.o \
compat/win32/pthread.o compat/win32/syslog.o \
compat/win32/dirent.o
- COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
+ COMPAT_CFLAGS = -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE
EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj
PTHREAD_LIBS =
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:32 UTC
Permalink
fork() is not used in MinGW builds but causes a compiler warning
on x86_64 MinGW-W64: conflicting types for built-in function 'fork'

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
Acked-by: Eric Faye-Lund <***@gmail.com>
---
compat/mingw.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/compat/mingw.h b/compat/mingw.h
index ed79368..948a174 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -93,8 +93,6 @@ static inline int symlink(const char *oldpath, const char *newpath)
{ errno = ENOSYS; return -1; }
static inline int fchmod(int fildes, mode_t mode)
{ errno = ENOSYS; return -1; }
-static inline pid_t fork(void)
-{ errno = ENOSYS; return -1; }
static inline unsigned int alarm(unsigned int seconds)
{ return 0; }
static inline int fsync(int fd)
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:33 UTC
Permalink
pid_t is available in sys/types.h on both MinGW and MinGW-W64

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
Acked-by: Eric Faye-Lund <***@gmail.com>
---
compat/mingw.h | 1 -
compat/msvc.h | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/compat/mingw.h b/compat/mingw.h
index 948a174..d113b19 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -5,7 +5,6 @@
* things that are not available in header files
*/

-typedef int pid_t;
typedef int uid_t;
typedef int socklen_t;
#define hstrerror strerror
diff --git a/compat/msvc.h b/compat/msvc.h
index 580bb55..a63d878 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -15,6 +15,8 @@
#define strtoull _strtoui64
#define strtoll _strtoi64

+typedef int pid_t;
+
static __inline int strcasecmp (const char *s1, const char *s2)
{
int size1 = strlen(s1);
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:34 UTC
Permalink
Is it absolutely valid and possible to have cURL in generic
MinGW environment. Building Git without cURL is still possible
by passing NO_CURL=1

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
Acked-by: Eric Faye-Lund <***@gmail.com>
---
config.mak.uname | 2 --
1 file changed, 2 deletions(-)

diff --git a/config.mak.uname b/config.mak.uname
index 20cbdcf..324a7fc 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -531,8 +531,6 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
INTERNAL_QSORT = YesPlease
HAVE_LIBCHARSET_H = YesPlease
NO_GETTEXT = YesPlease
-else
- NO_CURL = YesPlease
endif
endif
ifeq ($(uname_S),QNX)
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:35 UTC
Permalink
Unlike MinGW, MinGW-W64 has CONSOLE_FONT_INFOEX already properly defined
in wincon.h.

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
compat/winansi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compat/winansi.c b/compat/winansi.c
index efc5bb3..0ac3297 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -22,7 +22,7 @@ static int non_ascii_used = 0;
static HANDLE hthread, hread, hwrite;
static HANDLE hconsole1, hconsole2;

-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
typedef struct _CONSOLE_FONT_INFOEX {
ULONG cbSize;
DWORD nFont;
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:38 UTC
Permalink
HAVE_LIBCHARSET_H and NO_R_TO_GCC_LINKER are not specific to
msysGit, they're general MinGW settings.

Logic behind HAVE_LIBCHARSET_H: if user is on MinGW and has iconv,
we expect him to have libcharset.h. If user doesn't have iconv,
he has to explicitly say so via NO_ICONV=1 regardless of this
commit.

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
config.mak.uname | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config.mak.uname b/config.mak.uname
index c7aaa1c..f79c0e0 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -532,11 +532,11 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
prefix =
INSTALL = /bin/install
EXTLIBS += /mingw/lib/libz.a
- NO_R_TO_GCC_LINKER = YesPlease
INTERNAL_QSORT = YesPlease
- HAVE_LIBCHARSET_H = YesPlease
NO_GETTEXT = YesPlease
endif
+ HAVE_LIBCHARSET_H = YesPlease
+ NO_R_TO_GCC_LINKER = YesPlease
endif
ifeq ($(uname_S),QNX)
COMPAT_CFLAGS += -DSA_RESTART=0
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:37 UTC
Permalink
All MinGW flavors have inttypes.h, so just include it.

However, we need to pass -D__USE_MINGW_ANSI_STDIO=1 to select
GNU-compatible macro definitions on MinGW-W64:
http://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/

As a side-effect, Git no longer builds with MSVC < 2010 due to
its lack of stdint.h but hopefully that is not a problem.

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
compat/mingw.h | 2 --
compat/msvc.h | 3 +++
config.mak.uname | 3 ++-
git-compat-util.h | 11 ++++++-----
4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/compat/mingw.h b/compat/mingw.h
index d113b19..4bae842 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -353,8 +353,6 @@ static inline char *mingw_find_last_dir_sep(const char *path)
int mingw_offset_1st_component(const char *path);
#define offset_1st_component mingw_offset_1st_component
#define PATH_SEP ';'
-#define PRIuMAX "I64u"
-#define PRId64 "I64d"

void mingw_open_html(const char *path);
#define open_html mingw_open_html
diff --git a/compat/msvc.h b/compat/msvc.h
index a63d878..84a03f9 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -17,6 +17,9 @@

typedef int pid_t;

+#define PRIuMAX "I64u"
+#define PRId64 "I64d"
+
static __inline int strcasecmp (const char *s1, const char *s2)
{
int size1 = strlen(s1);
diff --git a/config.mak.uname b/config.mak.uname
index 4470a928..c7aaa1c 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -328,6 +328,7 @@ ifeq ($(uname_S),Windows)
NO_PREAD = YesPlease
NEEDS_CRYPTO_WITH_SSL = YesPlease
NO_LIBGEN_H = YesPlease
+ NO_INTTYPES_H = UnfortunatelyYes
NO_POLL = YesPlease
NO_SYMLINK_HEAD = YesPlease
NO_IPV6 = YesPlease
@@ -510,7 +511,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_POSIX_GOODIES = UnfortunatelyYes
DEFAULT_HELP_FORMAT = html
NO_D_INO_IN_DIRENT = YesPlease
- COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
+ COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D__USE_MINGW_ANSI_STDIO=1 -DNOGDI -Icompat -Icompat/win32
ifneq (,$(findstring i686,$(CC_MACH)))
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
BASIC_LDFLAGS += -Wl,--large-address-aware
diff --git a/git-compat-util.h b/git-compat-util.h
index 0c4e663..9d2d5ab 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -96,6 +96,12 @@
#define GIT_WINDOWS_NATIVE
#endif

+#ifndef NO_INTTYPES_H
+#include <inttypes.h>
+#else
+#include <stdint.h>
+#endif
+
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
@@ -147,11 +153,6 @@
#include <netdb.h>
#include <pwd.h>
#include <sys/un.h>
-#ifndef NO_INTTYPES_H
-#include <inttypes.h>
-#else
-#include <stdint.h>
-#endif
#ifdef NO_INTPTR_T
/*
* On I16LP32, ILP32 and LP64 "long" is the save bet, however
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:36 UTC
Permalink
From: Ray Donnelly <***@gmail.com>

Signed-off-by: Ray Donnelly <***@gmail.com>
Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
config.mak.uname | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/config.mak.uname b/config.mak.uname
index 324a7fc..4470a928 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -6,6 +6,7 @@ uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
+CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')

ifdef MSVC
# avoid the MingW and Cygwin configuration sections
@@ -509,12 +510,15 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_POSIX_GOODIES = UnfortunatelyYes
DEFAULT_HELP_FORMAT = html
NO_D_INO_IN_DIRENT = YesPlease
- COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32
+ COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
+ ifneq (,$(findstring i686,$(CC_MACH)))
+ COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
+ BASIC_LDFLAGS += -Wl,--large-address-aware
+ endif
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
compat/win32/pthread.o compat/win32/syslog.o \
compat/win32/dirent.o
- BASIC_LDFLAGS += -Wl,--large-address-aware
EXTLIBS += -lws2_32
GITLIBS += git.res
PTHREAD_LIBS =
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:43 UTC
Permalink
When crosscompiling, one cannot rely on `uname` from host system.

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
config.mak.uname | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/config.mak.uname b/config.mak.uname
index 9f7037e..182da50 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -14,6 +14,11 @@ ifdef MSVC
uname_O := Windows
endif

+ifneq (,$(findstring mingw,$(CC_MACH)))
+ uname_S := MINGW
+ uname_O := MINGW
+endif
+
# We choose to avoid "if .. else if .. else .. endif endif"
# because maintaining the nesting to match is a pain. If
# we had "elif" things would have been much nicer...
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:40 UTC
Permalink
1. Unlike MinGW, MinGW-W64 already provides _ReadWriteBarrier macro,
so don't try to redefine it.

2. MinGW-W64 has a strange definition FORCEINLINE as
extern __inline__ __attribute__((__always_inline__,__gnu_inline__))

'extern' doesn't work together with 'static', so #undef MinGW-W64
version of FORCEINLINE.

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
compat/nedmalloc/malloc.c.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h
index f216a2a..a6c8cac 100644
--- a/compat/nedmalloc/malloc.c.h
+++ b/compat/nedmalloc/malloc.c.h
@@ -715,6 +715,10 @@ struct mallinfo {
#endif /* HAVE_USR_INCLUDE_MALLOC_H */
#endif /* NO_MALLINFO */

+#ifdef __MINGW64_VERSION_MAJOR
+ #undef FORCEINLINE
+#endif
+
/*
Try to persuade compilers to inline. The most critical functions for
inlining are defined as macros, so these aren't used for them.
@@ -1382,7 +1386,9 @@ LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);

/*** Atomic operations ***/
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- #define _ReadWriteBarrier() __sync_synchronize()
+ #ifndef _ReadWriteBarrier
+ #define _ReadWriteBarrier() __sync_synchronize()
+ #endif
#else
static __inline__ __attribute__((always_inline)) long __sync_lock_test_and_set(volatile long * const Target, const long Value)
{
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:42 UTC
Permalink
Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
git-compat-util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-compat-util.h b/git-compat-util.h
index 9d2d5ab..5f6659c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);
#endif

#define DEFAULT_PACKED_GIT_LIMIT \
- ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
+ ((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))

#ifdef NO_PREAD
#define pread git_pread
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:41 UTC
Permalink
This commit touches regcomp.c and poll.c from Gnulib,
both were fixed upstream in 2012 the same way.

Also, this commit touches regex_internal.h from Gnulib,
which was fixed upstream in 2005.

Wrt ShellExecute in winansi.c, quoting [1]:

MSDN says you can cast the result to an integer and compare the result
against 32... You could cast in the other direction, comparing the return
value against (HINSTANCE)32... Or you could cast the result to an INT_PTR
and compare the result against 32.

We use the third option: cast HINSTANCE to intptr_t.

[1]: http://blogs.msdn.com/b/oldnewthing/archive/2006/11/08/1035971.aspx

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
compat/mingw.c | 8 ++++----
compat/poll/poll.c | 2 +-
compat/regex/regcomp.c | 4 ++--
compat/regex/regex_internal.h | 1 +
compat/win32/pthread.h | 2 +-
compat/winansi.c | 2 +-
pack-revindex.c | 2 +-
sha1_file.c | 8 ++++----
8 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/compat/mingw.c b/compat/mingw.c
index c5c37e5..27925d9 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -674,13 +674,13 @@ int pipe(int filedes[2])
errno = err_win_to_posix(GetLastError());
return -1;
}
- filedes[0] = _open_osfhandle((int)h[0], O_NOINHERIT);
+ filedes[0] = _open_osfhandle((intptr_t)h[0], O_NOINHERIT);
if (filedes[0] < 0) {
CloseHandle(h[0]);
CloseHandle(h[1]);
return -1;
}
- filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
+ filedes[1] = _open_osfhandle((intptr_t)h[1], O_NOINHERIT);
if (filedes[0] < 0) {
close(filedes[0]);
CloseHandle(h[1]);
@@ -1819,7 +1819,7 @@ void mingw_open_html(const char *unixpath)
const char *, const char *, const char *, INT);
T ShellExecute;
HMODULE shell32;
- int r;
+ intptr_t r;

shell32 = LoadLibrary("shell32.dll");
if (!shell32)
@@ -1829,7 +1829,7 @@ void mingw_open_html(const char *unixpath)
die("cannot run browser");

printf("Launching default browser to display HTML ...\n");
- r = (int)ShellExecute(NULL, "open", htmlpath, NULL, "\\", SW_SHOWNORMAL);
+ r = (intptr_t)ShellExecute(NULL, "open", htmlpath, NULL, "\\", SW_SHOWNORMAL);
FreeLibrary(shell32);
/* see the MSDN documentation referring to the result codes here */
if (r <= 32) {
diff --git a/compat/poll/poll.c b/compat/poll/poll.c
index a9b41d8..8941249 100644
--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -76,7 +76,7 @@

#ifdef WIN32_NATIVE

-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)

static BOOL
IsSocketHandle (HANDLE h)
diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c
index 06f3088..d8bde06 100644
--- a/compat/regex/regcomp.c
+++ b/compat/regex/regcomp.c
@@ -2577,7 +2577,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
old_tree = NULL;

if (elem->token.type == SUBEXP)
- postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+ postorder (elem, mark_opt_subexp, (void *) (intptr_t) elem->token.opr.idx);

tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
if (BE (tree == NULL, 0))
@@ -3806,7 +3806,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
static reg_errcode_t
mark_opt_subexp (void *extra, bin_tree_t *node)
{
- int idx = (int) (long) extra;
+ int idx = (int) (intptr_t) extra;
if (node->token.type == SUBEXP && node->token.opr.idx == idx)
node->token.opt_subexp = 1;

diff --git a/compat/regex/regex_internal.h b/compat/regex/regex_internal.h
index 4184d7f..da12670 100644
--- a/compat/regex/regex_internal.h
+++ b/compat/regex/regex_internal.h
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>

#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
# include <langinfo.h>
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
index 8ad1873..6ccfb7b 100644
--- a/compat/win32/pthread.h
+++ b/compat/win32/pthread.h
@@ -77,7 +77,7 @@ extern pthread_t pthread_self(void);

static inline int pthread_exit(void *ret)
{
- ExitThread((DWORD)ret);
+ ExitThread((DWORD)(uintptr_t)ret);
}

typedef DWORD pthread_key_t;
diff --git a/compat/winansi.c b/compat/winansi.c
index 0ac3297..ca4c295 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -452,7 +452,7 @@ static HANDLE duplicate_handle(HANDLE hnd)
HANDLE hresult, hproc = GetCurrentProcess();
if (!DuplicateHandle(hproc, hnd, hproc, &hresult, 0, TRUE,
DUPLICATE_SAME_ACCESS))
- die_lasterr("DuplicateHandle(%li) failed", (long) hnd);
+ die_lasterr("DuplicateHandle(%p) failed", hnd);
return hresult;
}

diff --git a/pack-revindex.c b/pack-revindex.c
index 5c8376e..df02e9f 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -21,7 +21,7 @@ static int pack_revindex_hashsz;

static int pack_revindex_ix(struct packed_git *p)
{
- unsigned long ui = (unsigned long)p;
+ uintptr_t ui = (uintptr_t)p;
int i;

ui = ui ^ (ui >> 16); /* defeat structure alignment */
diff --git a/sha1_file.c b/sha1_file.c
index c08c0cb..a534fda 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1966,11 +1966,11 @@ static struct delta_base_cache_entry {
enum object_type type;
} delta_base_cache[MAX_DELTA_CACHE];

-static unsigned long pack_entry_hash(struct packed_git *p, off_t base_offset)
+static uintptr_t pack_entry_hash(struct packed_git *p, off_t base_offset)
{
- unsigned long hash;
+ uintptr_t hash;

- hash = (unsigned long)p + (unsigned long)base_offset;
+ hash = (uintptr_t)p + base_offset;
hash += (hash >> 8) + (hash >> 16);
return hash % MAX_DELTA_CACHE;
}
@@ -1978,7 +1978,7 @@ static unsigned long pack_entry_hash(struct packed_git *p, off_t base_offset)
static struct delta_base_cache_entry *
get_delta_base_cache_entry(struct packed_git *p, off_t base_offset)
{
- unsigned long hash = pack_entry_hash(p, base_offset);
+ uintptr_t hash = pack_entry_hash(p, base_offset);
return delta_base_cache + hash;
}
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-09-30 07:02:39 UTC
Permalink
To ease cross-compilation process, introduce a single variable
with the prefix to all compiler-related executables.

Define CROSS_COMPILE=foo- if your compiler and binary utilities
are foo-cc, foo-ar, foo-strip, etc. More specific variables
override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-
then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.

Signed-off-by: Marat Radchenko <***@slonopotamus.org>
---
Makefile | 19 +++++++++++++------
config.mak.uname | 2 +-
2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index f34a2d4..c412996 100644
--- a/Makefile
+++ b/Makefile
@@ -339,6 +339,11 @@ all::
# return NULL when it receives a bogus time_t.
#
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.
+#
+# Define CROSS_COMPILE=foo- if your compiler and binary utilities
+# are foo-cc, foo-ar, foo-strip, etc. More specific variables
+# override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-
+# then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.

GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -350,7 +355,6 @@ CFLAGS = -g -O2 -Wall
LDFLAGS =
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
-STRIP ?= strip

# Among the variables below, these:
# gitexecdir
@@ -390,8 +394,12 @@ htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))

export prefix bindir sharedir sysconfdir gitwebdir localedir

-CC = cc
-AR = ar
+AR = $(CROSS_COMPILE)ar
+CC = $(CROSS_COMPILE)cc
+GCOV = $(CROSS_COMPILE)gcov
+RC = $(CROSS_COMPILE)windres
+STRIP = $(CROSS_COMPILE)strip
+
RM = rm -f
DIFF = diff
TAR = tar
@@ -404,13 +412,12 @@ XGETTEXT = xgettext
MSGFMT = msgfmt
PTHREAD_LIBS = -lpthread
PTHREAD_CFLAGS =
-GCOV = gcov

export TCL_PATH TCLTK_PATH

SPARSE_FLAGS =

-
+RCFLAGS =

### --- END CONFIGURATION SECTION ---

@@ -1669,7 +1676,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
mv $@+ $@

git.res: git.rc GIT-VERSION-FILE
- $(QUIET_RC)$(RC) \
+ $(QUIET_RC)$(RC) $(RCFLAGS) \
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@

diff --git a/config.mak.uname b/config.mak.uname
index f79c0e0..9f7037e 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -523,7 +523,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
EXTLIBS += -lws2_32
GITLIBS += git.res
PTHREAD_LIBS =
- RC = windres -O coff
+ RCFLAGS += -O coff
NATIVE_CRLF = YesPlease
X = .exe
SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Duy Nguyen
2014-09-30 10:10:03 UTC
Permalink
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).
- MSVC
- msysGit environment (twice)
- Linux cross-toolchain i686-pc-mingw32
Thanks. I always wanted to do this but never got around to clean up
and submit. There's a problem with include order in Makefile. I don't
want to specify CROSS_COMPILE or CC=mingw32-gcc from command line any
time I make a build, so I put all those in config.mak. But because
this file is included after config.mak.uname, all the default settings
for MINGW is ignored.

I'm not sure if we can move config.mak up before config.mak.uname. If
we can't I'm ok with including a new file (config.mak.pre or
something) before config.mak.uname. That would make "make" (no
arguments) work for me.
--
Duy
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-10-06 05:17:07 UTC
Permalink
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).
Junio, ping?
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Sixt
2014-10-06 18:50:02 UTC
Permalink
Post by Marat Radchenko
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).
Junio, ping?
Sorry, I forgot to report that this updated series works now for me.

The patches all look reasonable. I don't have an opinion on the
restriction that MSVC < 2010 can't be used anymore (path 08/14).

-- Hannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Junio C Hamano
2014-10-07 19:01:55 UTC
Permalink
Post by Johannes Sixt
Post by Marat Radchenko
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).
Junio, ping?
Sorry, I forgot to report that this updated series works now for me.
The patches all look reasonable. I don't have an opinion on the
restriction that MSVC < 2010 can't be used anymore (path 08/14).
So, is that an Ack, or would you prefer to cook this first in
msysgit tree and then feed the result as part of "This series is to
shrink the difference between the mainline and msysgit" later?
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Sixt
2014-10-07 19:57:45 UTC
Permalink
Post by Junio C Hamano
Post by Johannes Sixt
Post by Marat Radchenko
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).
Junio, ping?
Sorry, I forgot to report that this updated series works now for me.
The patches all look reasonable. I don't have an opinion on the
restriction that MSVC < 2010 can't be used anymore (path 08/14).
So, is that an Ack, or would you prefer to cook this first in
msysgit tree and then feed the result as part of "This series is to
shrink the difference between the mainline and msysgit" later?
At this time, it's really just a "works for me" report, because I didn't
look carefully at each patch. I may do that at some time later.

If someone from the msysgit crew (I don't count myself to it) could
report "works for us, too", then the series could go into your tree
right away, in my opinion.

-- Hannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thomas Braun
2014-10-07 23:09:20 UTC
Permalink
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).
- MSVC
- msysGit environment (twice)
Hi Marat,

I wanted to verify that on msysgit but some patches fail to apply
cleanly. Did you also had to tweak the patches?
If yes, are these tweaked patches still available somewhere?

Thomas
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-10-08 04:53:30 UTC
Permalink
Post by Thomas Braun
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).
- MSVC
- msysGit environment (twice)
Hi Marat,
I wanted to verify that on msysgit but some patches fail to apply
cleanly. Did you also had to tweak the patches?
If yes, are these tweaked patches still available somewhere?
msysgit != git-for-windows, as msysgit folks say. msysgit is a development
environment for git-for-windows.

I tested my patches by applying them to git.git/master and building
inside msysgit.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Schindelin
2014-10-08 08:59:57 UTC
Permalink
Hi Marat,
Post by Marat Radchenko
Post by Thomas Braun
I wanted to verify that on msysgit but some patches fail to apply
cleanly. Did you also had to tweak the patches?
If yes, are these tweaked patches still available somewhere?
msysgit != git-for-windows, as msysgit folks say.
That's not what msysgit folks say (they say that msysgit is the
development environment to build Git for Windows [*1*]), and Thomas is
well aware of the situation because he is a busy contributor on the
Windows side.
Post by Marat Radchenko
I tested my patches by applying them to git.git/master and building
inside msysgit.
So the idea would be to rebase from git/git/master onto
msysgit/git/master. Did you do that yet?

Ciao,
Johannes

Footnote *1*: msysgit is about to be phased out. As soon as
https://github.com/git-for-windows/sdk is able to produce a Git for
Windows installer (it already able to build Git and pass the test suite),
we will switch to the new development environment and mark msysgit as
obsolete, keeping it around only for reference.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-10-08 09:32:58 UTC
Permalink
Post by Thomas Braun
Hi Marat,
That's not what msysgit folks say (they say that msysgit is the
development environment to build Git for Windows [*1*]).
Aaargh! msys != msysgit != Git for Windows SDK != Git for Windows != mingwGitDevEnv
and possibly != git-for-windows.

Oh, there's also mingw-w64-git from msys2 [1].
Post by Thomas Braun
Post by Marat Radchenko
I tested my patches by applying them to git.git/master and building
inside msysgit.
So the idea would be to rebase from git/git/master onto
msysgit/git/master. Did you do that yet?
No, what for? Windows flavors of Git are already fragmented too much,
my patchset is deliberately targeted at Git upstream.

[1] https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-git
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Schindelin
2014-10-08 10:52:41 UTC
Permalink
Hi Marat,
Post by Marat Radchenko
Post by Johannes Schindelin
So the idea would be to rebase from git/git/master onto
msysgit/git/master. Did you do that yet?
No, what for?
To work together?

If you are not interested in working together to make Git on 64-bit
Windows kick-ass, just say so.

Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thomas Braun
2014-10-08 10:43:16 UTC
Permalink
Post by Marat Radchenko
Post by Thomas Braun
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64!).
- MSVC
- msysGit environment (twice)
Hi Marat,
I wanted to verify that on msysgit but some patches fail to apply
cleanly. Did you also had to tweak the patches?
If yes, are these tweaked patches still available somewhere?
msysgit != git-for-windows, as msysgit folks say. msysgit is a development
environment for git-for-windows.
I surely know that!
Post by Marat Radchenko
I tested my patches by applying them to git.git/master and building
inside msysgit.
Fine, but then please explicitly state that. Compiling "git.git/master
in msysgit" and "msysgit.git/master in msysgit" are two different things.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Schindelin
2014-10-08 09:35:11 UTC
Permalink
Hi Thomas,
Post by Thomas Braun
I wanted to verify that on msysgit but some patches fail to apply
cleanly. Did you also had to tweak the patches?
I applied the patches to git-for-windows/git's master, manually fixing
three of them, and pushed the result to the 'w64' branch in my fork.
Please find them here:

https://github.com/dscho/git/compare/git-for-windows:master...w64

and rebased onto msysgit's master:

https://github.com/dscho/git/compare/msysgit:master...w64-msysgit

Ciao,
Dscho
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Schindelin
2014-10-08 09:40:17 UTC
Permalink
Hi all,
Post by Marat Radchenko
This patch series fixes building on modern MinGW and MinGW-W64
(including x86_64!).
To make it easier to review and substantially easier to work on this patch
series with Git, I opened a pull request on GitHub:

https://github.com/msysgit/git/pull/264

Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marat Radchenko
2014-10-08 10:59:01 UTC
Permalink
Post by Johannes Schindelin
To make it easier to review and substantially easier to work on this patch
https://github.com/msysgit/git/pull/264
1. I fail to see how using a tool that doesn't send emails about review
comments is *easier* than just sending emails.

2. Please, do not hijack patchset discussion by moving it from git@ ML to
GitHub comments.

3. And I repeat, my goal is to push this stuff in git.git,
not in msysgit.git, not in git-for-windows.git, not in msys2.git, not in other
4k+ forks on GitHub.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
msysgit+***@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Schindelin
2014-10-08 13:58:17 UTC
Permalink
Hi Marat,
Post by Marat Radchenko
Post by Johannes Schindelin
To make it easier to review and substantially easier to work on this patch
https://github.com/msysgit/git/pull/264
1. I fail to see how using a tool that doesn't send emails about review
comments is *easier* than just sending emails.
You probably missed how I commented on exact lines without you having to
guess from the quoted context what part of your patches I am talking
about.

You probably also missed the fact that comments on rewritten commits
automatically drop out of sight, decluttering the set of comments and
making it obvious which comments have not been addressed yet.

And finally, you probably also missed the fact that the official Git fork
for Windows was asked to review your patches because Junio defers
Windows-specific stuff to us. And as you refused to work against our
integration branches (yes, we have two, because we are working towards
switching to a more sustainable development environment, something you
already mocked successfully), we had to rebase your work onto two
branches, which is also substantially easier to do using GitHub rather
than via mails.

But I get it: you want to roll your own thing and not help us review it
let alone make use of it. That's fine, we'll manage.
Post by Marat Radchenko
GitHub comments.
I mistook your work on Git and the fact that you have an account on GitHub
for your willingness to collaborate on this effectively. My mistake, I
apologize!
Post by Marat Radchenko
3. And I repeat, my goal is to push this stuff in git.git,
not in msysgit.git, not in git-for-windows.git, not in msys2.git, not in other
4k+ forks on GitHub.
Yes, your objection is noted.

Junio, we'll take it from here, don't worry.

Ciao,
Johannes

Continue reading on narkive:
Search results for '[PATCH v4] MinGW(-W64) compilation' (Questions and Answers)
4
replies
Where do i found turbo c Compiler Free of cost?
started 2007-05-03 04:59:54 UTC
programming & design
Loading...