From 2a1c2c92a4e115a6e7def497c149c0ff33933e87 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 22 Jul 2014 01:27:30 +0100 Subject: [PATCH] git: WIP, not far from linking --- ...fine-_ReadWriteBarrier-in-malloc.c.h.patch | 27 +++++++ ...RCEINLINE-on-MinGW-w64-in-malloc.c.h.patch | 32 +++++++++ ...S-and-COMPAT_CFLAGS-for-64bit-MinGW-.patch | 42 +++++++++++ .../0003-fix-autoconf-socklen-mingw64.patch | 33 --------- ...sock2.h-for-sockaddr_storage-and-loo.patch | 72 +++++++++++++++++++ .../0004-fix-mingw64-32bit-time-temp.patch | 26 ------- ...k-in-winsock2.h-for-sockaddr_storage.patch | 55 -------------- ...efine-some-things-MinGW-w64-provides.patch | 53 ++++++++++++++ ...on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch | 27 +++++++ ...sock2.h-and-not-netdb.h-on-MinGW-w64.patch | 27 +++++++ ...> 0008-fix-mingw64-compat-wide-char.patch} | 6 +- ....patch => 0009-fix-fork-for-mingw64.patch} | 6 +- mingw-w64-git-git/PKGBUILD | 49 +++++++++---- 13 files changed, 320 insertions(+), 135 deletions(-) create mode 100644 mingw-w64-git-git/0001-Don-t-redefine-_ReadWriteBarrier-in-malloc.c.h.patch create mode 100644 mingw-w64-git-git/0002-Undefine-FORCEINLINE-on-MinGW-w64-in-malloc.c.h.patch create mode 100644 mingw-w64-git-git/0003-Fix-BASIC_LDFLAGS-and-COMPAT_CFLAGS-for-64bit-MinGW-.patch delete mode 100644 mingw-w64-git-git/0003-fix-autoconf-socklen-mingw64.patch create mode 100644 mingw-w64-git-git/0004-Also-look-in-winsock2.h-for-sockaddr_storage-and-loo.patch delete mode 100644 mingw-w64-git-git/0004-fix-mingw64-32bit-time-temp.patch delete mode 100644 mingw-w64-git-git/0005-Also-look-in-winsock2.h-for-sockaddr_storage.patch create mode 100644 mingw-w64-git-git/0005-Don-t-redefine-some-things-MinGW-w64-provides.patch create mode 100644 mingw-w64-git-git/0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch create mode 100644 mingw-w64-git-git/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch rename mingw-w64-git-git/{0001-fix-mingw64-compat-wide-char.patch => 0008-fix-mingw64-compat-wide-char.patch} (81%) rename mingw-w64-git-git/{0002-fix-fork-for-mingw64.patch => 0009-fix-fork-for-mingw64.patch} (82%) diff --git a/mingw-w64-git-git/0001-Don-t-redefine-_ReadWriteBarrier-in-malloc.c.h.patch b/mingw-w64-git-git/0001-Don-t-redefine-_ReadWriteBarrier-in-malloc.c.h.patch new file mode 100644 index 0000000000..a733762583 --- /dev/null +++ b/mingw-w64-git-git/0001-Don-t-redefine-_ReadWriteBarrier-in-malloc.c.h.patch @@ -0,0 +1,27 @@ +From 9ecc2bb24c412b98775639af51aba533386a1a61 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 22 Jul 2014 00:58:19 +0100 +Subject: [PATCH 1/9] Don't redefine _ReadWriteBarrier in malloc.c.h + +--- + compat/nedmalloc/malloc.c.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h +index f216a2a..6aeac26 100644 +--- a/compat/nedmalloc/malloc.c.h ++++ b/compat/nedmalloc/malloc.c.h +@@ -1382,7 +1382,9 @@ LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value); + + /*** Atomic operations ***/ + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 +- #define _ReadWriteBarrier() __sync_synchronize() ++ #if !defined(_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.0.1 + diff --git a/mingw-w64-git-git/0002-Undefine-FORCEINLINE-on-MinGW-w64-in-malloc.c.h.patch b/mingw-w64-git-git/0002-Undefine-FORCEINLINE-on-MinGW-w64-in-malloc.c.h.patch new file mode 100644 index 0000000000..327d392850 --- /dev/null +++ b/mingw-w64-git-git/0002-Undefine-FORCEINLINE-on-MinGW-w64-in-malloc.c.h.patch @@ -0,0 +1,32 @@ +From 99833f66b88f43047182084b97233c3dbefdb48e Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 22 Jul 2014 00:56:51 +0100 +Subject: [PATCH 2/9] Undefine FORCEINLINE on MinGW-w64 in malloc.c.h + +.. it contains extern and when combined with static leads to +'multiple storage classes in declaration specifiers' +--- + compat/nedmalloc/malloc.c.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h +index 6aeac26..22f3496 100644 +--- a/compat/nedmalloc/malloc.c.h ++++ b/compat/nedmalloc/malloc.c.h +@@ -720,6 +720,13 @@ struct mallinfo { + inlining are defined as macros, so these aren't used for them. + */ + ++/* MinGW-w64 defines FORCEINLINE with extern, and when combined with ++ static, there's multiple storage classes in declaration specifiers. ++*/ ++#if defined(__MINGW64_VERSION_MAJOR) && defined(FORCEINLINE) ++ #undef FORCEINLINE ++#endif ++ + #ifndef FORCEINLINE + #if defined(__GNUC__) + #define FORCEINLINE __inline __attribute__ ((always_inline)) +-- +2.0.1 + diff --git a/mingw-w64-git-git/0003-Fix-BASIC_LDFLAGS-and-COMPAT_CFLAGS-for-64bit-MinGW-.patch b/mingw-w64-git-git/0003-Fix-BASIC_LDFLAGS-and-COMPAT_CFLAGS-for-64bit-MinGW-.patch new file mode 100644 index 0000000000..2673bc43f2 --- /dev/null +++ b/mingw-w64-git-git/0003-Fix-BASIC_LDFLAGS-and-COMPAT_CFLAGS-for-64bit-MinGW-.patch @@ -0,0 +1,42 @@ +From 0059e15a1a5133f6406d51e13a6ea03d3b95f132 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 22 Jul 2014 00:20:01 +0100 +Subject: [PATCH 3/9] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64 + +--- + config.mak.uname | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/config.mak.uname b/config.mak.uname +index bb4ddab..d5132bb 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 +@@ -497,12 +498,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 compat/win32/fscache.o +- BASIC_LDFLAGS += -Wl,--large-address-aware + EXTLIBS += -lws2_32 + GITLIBS += git.res + PTHREAD_LIBS = +-- +2.0.1 + diff --git a/mingw-w64-git-git/0003-fix-autoconf-socklen-mingw64.patch b/mingw-w64-git-git/0003-fix-autoconf-socklen-mingw64.patch deleted file mode 100644 index 476f2f68f4..0000000000 --- a/mingw-w64-git-git/0003-fix-autoconf-socklen-mingw64.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f300fb83c1bbcef7bd81d67f93e88b7f8b063b10 Mon Sep 17 00:00:00 2001 -From: martell -Date: Mon, 21 Jul 2014 21:11:30 +0100 -Subject: [PATCH 3/5] fix autoconf socklen mingw64 - ---- - configure.ac | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5a3d531..faf9296 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -742,11 +742,11 @@ GIT_CONF_SUBST([OLD_ICONV]) - ## Checks for typedefs, structures, and compiler characteristics. - AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics]) - # --TYPE_SOCKLEN_T --case $ac_cv_type_socklen_t in -- yes) SOCKLEN_T='';; -- *) SOCKLEN_T=$git_cv_socklen_t_equiv;; --esac -+#TYPE_SOCKLEN_T -+#case $ac_cv_type_socklen_t in -+SOCKLEN_T='size_t' -+# *) SOCKLEN_T=$git_cv_socklen_t_equiv;; -+#esac - GIT_CONF_SUBST([SOCKLEN_T]) - - # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent. --- -2.0.1 - diff --git a/mingw-w64-git-git/0004-Also-look-in-winsock2.h-for-sockaddr_storage-and-loo.patch b/mingw-w64-git-git/0004-Also-look-in-winsock2.h-for-sockaddr_storage-and-loo.patch new file mode 100644 index 0000000000..d77a961882 --- /dev/null +++ b/mingw-w64-git-git/0004-Also-look-in-winsock2.h-for-sockaddr_storage-and-loo.patch @@ -0,0 +1,72 @@ +From 928f3337474b34c306d847c6bf283352a9f1d963 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 21 Jul 2014 21:33:08 +0100 +Subject: [PATCH 4/9] Also look in winsock2.h for sockaddr_storage and look in + ws2tcpip.h for socklen_t + +--- + aclocal.m4 | 7 ++++++- + configure.ac | 15 +++++++++++++++ + 2 files changed, 21 insertions(+), 1 deletion(-) + +diff --git a/aclocal.m4 b/aclocal.m4 +index f11bc7e..91322f1 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -36,5 +36,10 @@ AC_DEFUN([TYPE_SOCKLEN_T], + AC_DEFINE_UNQUOTED(socklen_t, $git_cv_socklen_t_equiv, + [type to use in place of socklen_t if not defined])], + [#include +-#include ]) ++ #ifdef HAVE_SYS_SOCKET_H ++ #include ++ #endif ++ #ifdef HAVE_WS2TCPIP_H ++ #include ++ #endif]) + ]) +diff --git a/configure.ac b/configure.ac +index 5a3d531..752db3d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -382,6 +382,11 @@ AS_HELP_STRING([],[Tcl/Tk interpreter will be found in a system.]), + GIT_PARSE_WITH(tcltk)) + # + ++AC_LANG_PUSH([C]) ++AC_CHECK_HEADERS([sys/socket.h]) ++AC_CHECK_HEADERS([winsock2.h]) ++AC_CHECK_HEADERS([ws2tcpip.h]) ++AC_LANG_POP([C]) + + ## Checks for programs. + AC_MSG_NOTICE([CHECKS for programs]) +@@ -778,7 +783,12 @@ AC_CHECK_TYPE(struct sockaddr_storage, + [NO_SOCKADDR_STORAGE=], + [NO_SOCKADDR_STORAGE=YesPlease],[ + #include ++#ifdef HAVE_SYS_SOCKET_H + #include ++#endif ++#ifdef HAVE_WINSOCK2_H ++#include ++#endif + ]) + GIT_CONF_SUBST([NO_SOCKADDR_STORAGE]) + # +@@ -789,7 +799,12 @@ AC_CHECK_TYPE([struct addrinfo],[ + [NO_IPV6=YesPlease]) + ],[NO_IPV6=YesPlease],[ + #include ++#ifdef HAVE_SYS_SOCKET_H + #include ++#endif ++#ifdef HAVE_WINSOCK2_H ++#include ++#endif + #include + ]) + GIT_CONF_SUBST([NO_IPV6]) +-- +2.0.1 + diff --git a/mingw-w64-git-git/0004-fix-mingw64-32bit-time-temp.patch b/mingw-w64-git-git/0004-fix-mingw64-32bit-time-temp.patch deleted file mode 100644 index fd898cded8..0000000000 --- a/mingw-w64-git-git/0004-fix-mingw64-32bit-time-temp.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 4a7840f43a8e05e592794c1eb358623bc86b4d4e Mon Sep 17 00:00:00 2001 -From: martell -Date: Mon, 21 Jul 2014 21:11:52 +0100 -Subject: [PATCH 4/5] fix mingw64 32bit time temp - ---- - git-compat-util.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/git-compat-util.h b/git-compat-util.h -index e0f258c..670c5e3 100644 ---- a/git-compat-util.h -+++ b/git-compat-util.h -@@ -100,6 +100,9 @@ enum git_target_type { - # define _WIN32_WINNT 0x0502 - # endif - #define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ -+# ifdef __MINGW64__ -+# undef _USE_32BIT_TIME_T -+# endif - #include - #include - #define GIT_WINDOWS_NATIVE --- -2.0.1 - diff --git a/mingw-w64-git-git/0005-Also-look-in-winsock2.h-for-sockaddr_storage.patch b/mingw-w64-git-git/0005-Also-look-in-winsock2.h-for-sockaddr_storage.patch deleted file mode 100644 index 6f1bc7d4c2..0000000000 --- a/mingw-w64-git-git/0005-Also-look-in-winsock2.h-for-sockaddr_storage.patch +++ /dev/null @@ -1,55 +0,0 @@ -From f49c52ac2a36acebbd28cb363108ef1268bc6925 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Mon, 21 Jul 2014 21:33:08 +0100 -Subject: [PATCH 5/5] Also look in winsock2.h for sockaddr_storage - ---- - configure.ac | 30 ++++++++++++++++++++++++------ - 1 file changed, 24 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index faf9296..5283fe7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -772,14 +772,32 @@ AC_CHECK_MEMBER(struct passwd.pw_gecos, - [#include ]) - GIT_CONF_SUBST([NO_GECOS_IN_PWENT]) - # -+# Find Berkeley sockets headers, Windows uses winsock2.h -+# while others use sys/types.h and sys/socket.h -+POSIX_SOCKET_HEADERS=yes -+AC_CHECK_HEADERS([sys/types.h sys/socket.h], -+ [], [POSIX_SOCKET_HEADERS=no]) -+WINDOWS_SOCKET_HEADERS=yes -+AC_CHECK_HEADERS([winsock2.h], -+ [], [WINDOWS_SOCKET_HEADERS=no]) -+ -+# - # Define NO_SOCKADDR_STORAGE if your platform does not have struct - # sockaddr_storage. --AC_CHECK_TYPE(struct sockaddr_storage, --[NO_SOCKADDR_STORAGE=], --[NO_SOCKADDR_STORAGE=YesPlease],[ --#include --#include --]) -+AS_IF([test "x$POSIX_SOCKET_HEADERS" = "xyes"], -+ [AC_CHECK_TYPE(struct sockaddr_storage, -+ [NO_SOCKADDR_STORAGE=], -+ [NO_SOCKADDR_STORAGE=YesPlease],[ -+ #include -+ #include -+ ])], -+ [AS_IF([test "x$WINDOWS_SOCKET_HEADERS" = "xyes"], -+ [AC_CHECK_TYPE(struct sockaddr_storage, -+ [NO_SOCKADDR_STORAGE=], -+ [NO_SOCKADDR_STORAGE=YesPlease],[ -+ #include -+ ])])] -+) - GIT_CONF_SUBST([NO_SOCKADDR_STORAGE]) - # - # Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). --- -2.0.1 - diff --git a/mingw-w64-git-git/0005-Don-t-redefine-some-things-MinGW-w64-provides.patch b/mingw-w64-git-git/0005-Don-t-redefine-some-things-MinGW-w64-provides.patch new file mode 100644 index 0000000000..618da1e098 --- /dev/null +++ b/mingw-w64-git-git/0005-Don-t-redefine-some-things-MinGW-w64-provides.patch @@ -0,0 +1,53 @@ +From 61d878435f94365c28676eb9e97e192823e11c15 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 21 Jul 2014 23:39:44 +0100 +Subject: [PATCH 5/9] Don't redefine some things MinGW-w64 provides + +off64_t, _lseeki64, _CONSOLE_FONT_INFOEX +and (probably incorrectly, unsetenv) +--- + compat/mingw.h | 4 ++++ + compat/winansi.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/compat/mingw.h b/compat/mingw.h +index 9dbba85..2dd1279 100644 +--- a/compat/mingw.h ++++ b/compat/mingw.h +@@ -212,7 +212,9 @@ char *mingw_getenv(const char *name); + #define getenv mingw_getenv + int mingw_putenv(const char *namevalue); + #define putenv mingw_putenv ++#ifndef __MINGW64_VERSION_MAJOR + #define unsetenv mingw_putenv ++#endif + + int mingw_gethostname(char *host, int namelen); + #define gethostname mingw_gethostname +@@ -296,8 +298,10 @@ static inline time_t filetime_to_time_t(const FILETIME *ft) + /* + * Use mingw specific stat()/lstat()/fstat() implementations on Windows. + */ ++#ifndef __MINGW64_VERSION_MAJOR + #define off_t off64_t + #define lseek _lseeki64 ++#endif + + /* use struct stat with 64 bit st_size */ + #ifdef stat +diff --git a/compat/winansi.c b/compat/winansi.c +index 13bc28d..5682af1 100644 +--- a/compat/winansi.c ++++ b/compat/winansi.c +@@ -23,7 +23,7 @@ static HANDLE hthread, hread, hwrite; + static HANDLE hwrite1 = INVALID_HANDLE_VALUE, hwrite2 = INVALID_HANDLE_VALUE; + static HANDLE hconsole1, hconsole2; + +-#ifdef __MINGW32__ ++#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) + typedef struct _CONSOLE_FONT_INFOEX { + ULONG cbSize; + DWORD nFont; +-- +2.0.1 + diff --git a/mingw-w64-git-git/0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch b/mingw-w64-git-git/0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch new file mode 100644 index 0000000000..4e88aefdf5 --- /dev/null +++ b/mingw-w64-git-git/0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch @@ -0,0 +1,27 @@ +From 7f0c748560d3d66e6dab5ddaee40fecb406a504d Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 21 Jul 2014 23:52:34 +0100 +Subject: [PATCH 6/9] Include ntdef.h on MinGW-w64 for REPARSE_DATA_BUFFER + +--- + compat/mingw.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/compat/mingw.c b/compat/mingw.c +index 69f3c39..69ea532 100644 +--- a/compat/mingw.c ++++ b/compat/mingw.c +@@ -7,6 +7,10 @@ + #include "../run-command.h" + #include "../cache.h" + ++#ifdef __MINGW64_VERSION_MAJOR ++#include ++#endif ++ + static const int delay[] = { 0, 1, 10, 20, 40 }; + unsigned int _CRT_fmode = _O_BINARY; + +-- +2.0.1 + diff --git a/mingw-w64-git-git/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch b/mingw-w64-git-git/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch new file mode 100644 index 0000000000..54566600de --- /dev/null +++ b/mingw-w64-git-git/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch @@ -0,0 +1,27 @@ +From 490968b0f21ad2aa110180dda540409f5b9942d4 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Tue, 22 Jul 2014 00:29:15 +0100 +Subject: [PATCH 7/9] Include winsock2.h and not netdb.h on MinGW-w64 + +--- + compat/hstrerror.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/compat/hstrerror.c b/compat/hstrerror.c +index 069c555..d37ad25 100644 +--- a/compat/hstrerror.c ++++ b/compat/hstrerror.c +@@ -1,6 +1,10 @@ + #include + #include ++#ifdef __MINGW64_VERSION_MAJOR ++#include ++#else + #include ++#endif + + const char *githstrerror(int err) + { +-- +2.0.1 + diff --git a/mingw-w64-git-git/0001-fix-mingw64-compat-wide-char.patch b/mingw-w64-git-git/0008-fix-mingw64-compat-wide-char.patch similarity index 81% rename from mingw-w64-git-git/0001-fix-mingw64-compat-wide-char.patch rename to mingw-w64-git-git/0008-fix-mingw64-compat-wide-char.patch index 5e57c7aa1e..2c00c0e7b8 100644 --- a/mingw-w64-git-git/0001-fix-mingw64-compat-wide-char.patch +++ b/mingw-w64-git-git/0008-fix-mingw64-compat-wide-char.patch @@ -1,14 +1,14 @@ -From ce23bff8ed290a76c4c224ad6f64f1e8cfb43d71 Mon Sep 17 00:00:00 2001 +From 6614d3e004096a8ae99424476a2a91e3db46f960 Mon Sep 17 00:00:00 2001 From: martell Date: Mon, 21 Jul 2014 21:10:25 +0100 -Subject: [PATCH 1/5] fix mingw64 compat wide char +Subject: [PATCH 8/9] fix mingw64 compat wide char --- compat/mingw.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compat/mingw.h b/compat/mingw.h -index 9dbba85..65e9348 100644 +index 2dd1279..1b07f17 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -1,14 +1,13 @@ diff --git a/mingw-w64-git-git/0002-fix-fork-for-mingw64.patch b/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch similarity index 82% rename from mingw-w64-git-git/0002-fix-fork-for-mingw64.patch rename to mingw-w64-git-git/0009-fix-fork-for-mingw64.patch index b7f4489bd9..297f68dbbc 100644 --- a/mingw-w64-git-git/0002-fix-fork-for-mingw64.patch +++ b/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch @@ -1,14 +1,14 @@ -From ff1aad8adb3679294d2bd7993de076964b66e723 Mon Sep 17 00:00:00 2001 +From 991c718c4309c0e2ada2ccd5803abf0b25267bf2 Mon Sep 17 00:00:00 2001 From: martell Date: Mon, 21 Jul 2014 21:11:03 +0100 -Subject: [PATCH 2/5] fix fork for mingw64 +Subject: [PATCH 9/9] fix fork for mingw64 --- compat/mingw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/mingw.h b/compat/mingw.h -index 65e9348..28090d2 100644 +index 1b07f17..1f9b4ef 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -85,8 +85,8 @@ struct itimerval { diff --git a/mingw-w64-git-git/PKGBUILD b/mingw-w64-git-git/PKGBUILD index 674f72cc11..a62f75ca01 100644 --- a/mingw-w64-git-git/PKGBUILD +++ b/mingw-w64-git-git/PKGBUILD @@ -1,4 +1,5 @@ # Maintainer: Martell Malone +# Maintainer: Ray Donnelly _realname=git @@ -16,18 +17,26 @@ depends=("${MINGW_PACKAGE_PREFIX}-libiconv") options=(!libtool strip staticlibs) source=("${_realname}"::"git+http://github.com/msysgit/git.git" - "0001-fix-mingw64-compat-wide-char.patch" - "0002-fix-fork-for-mingw64.patch" - "0003-fix-autoconf-socklen-mingw64.patch" - "0004-fix-mingw64-32bit-time-temp.patch" - "0005-Also-look-in-winsock2.h-for-sockaddr_storage.patch") + "0001-Don-t-redefine-_ReadWriteBarrier-in-malloc.c.h.patch" + "0002-Undefine-FORCEINLINE-on-MinGW-w64-in-malloc.c.h.patch" + "0003-Fix-BASIC_LDFLAGS-and-COMPAT_CFLAGS-for-64bit-MinGW-.patch" + "0004-Also-look-in-winsock2.h-for-sockaddr_storage-and-loo.patch" + "0005-Don-t-redefine-some-things-MinGW-w64-provides.patch" + "0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch" + "0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch" + "0008-fix-mingw64-compat-wide-char.patch" + "0009-fix-fork-for-mingw64.patch") md5sums=('SKIP' - 'a433d3a32a210d83a6c86d193fa4fefb' - 'bf230d8bb9528938e894aa052fd5f599' - 'b795b7c04019b28e8a7c5b0d7623e26b' - 'd0bbc5add2b3e3b04b493c0f46d2f9bf' - 'ca345e2e3ebbff3d9dc1a631d26c21da') + 'c34c63b5c08d309e641daeea6ec2d95b' + '51ed5b9e80b790975c2e9df5c90b39bc' + '876acef8a5fe156fc6be33e4eb45c0a7' + '41be411c3cca60660c06f6094e79a521' + '2a3e57970a56a0b554a997bd36776168' + '65cdcfe68eeacbbf56d184dd9330a498' + '22f51b519538454ee3d3086b296bb505' + '74e5ff3dc965e1dddcdfdc1fb060b783' + '2b0648efeccde7e8f9892a65d2111501') pkgver() { cd "$srcdir/$_realname" @@ -37,11 +46,16 @@ pkgver() { prepare() { export PYTHON_PATH='/usr/bin/python2' cd "$srcdir/$_realname" - git am $srcdir/0001-fix-mingw64-compat-wide-char.patch - git am $srcdir/0002-fix-fork-for-mingw64.patch - git am $srcdir/0003-fix-autoconf-socklen-mingw64.patch - git am $srcdir/0004-fix-mingw64-32bit-time-temp.patch - git am $srcdir/0005-Also-look-in-winsock2.h-for-sockaddr_storage.patch + + git am "${srcdir}"/0001-Don-t-redefine-_ReadWriteBarrier-in-malloc.c.h.patch + git am "${srcdir}"/0002-Undefine-FORCEINLINE-on-MinGW-w64-in-malloc.c.h.patch + git am "${srcdir}"/0003-Fix-BASIC_LDFLAGS-and-COMPAT_CFLAGS-for-64bit-MinGW-.patch + git am "${srcdir}"/0004-Also-look-in-winsock2.h-for-sockaddr_storage-and-loo.patch + git am "${srcdir}"/0005-Don-t-redefine-some-things-MinGW-w64-provides.patch + git am "${srcdir}"/0006-Include-ntdef.h-on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch + git am "${srcdir}"/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch + git am "${srcdir}"/0008-fix-mingw64-compat-wide-char.patch + git am "${srcdir}"/0009-fix-fork-for-mingw64.patch autoreconf -fi } @@ -69,3 +83,8 @@ package() { cd "$srcdir/$_realname" make INSTALLDIRS=vendor DESTDIR="$pkgdir" install } + +# // 35 "E:/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h" 3 +# __extension__ typedef unsigned long long size_t; +# // 258 "E:/msys64/mingw64/x86_64-w64-mingw32/include/ws2tcpip.h" 3 +# typedef int size_t;