From fcb068d4ee55538287d9f3dcfe61e133b2db6640 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 26 Oct 2014 22:24:29 +0000 Subject: [PATCH] git-git: Make it build again, be more sypathetic to mingw --- ...00-Add-SEARCH_LIBS-to-GIT_CHECK_FUNC.patch | 114 ++++++++++++++++++ ...fine-_ReadWriteBarrier-in-malloc.c.h.patch | 4 +- ...RCEINLINE-on-MinGW-w64-in-malloc.c.h.patch | 4 +- ...S-and-COMPAT_CFLAGS-for-64bit-MinGW-.patch | 4 +- ...sock2.h-for-sockaddr_storage-and-loo.patch | 6 +- ...efine-some-things-MinGW-w64-provides.patch | 4 +- ...on-MinGW-w64-for-REPARSE_DATA_BUFFER.patch | 4 +- ...sock2.h-and-not-netdb.h-on-MinGW-w64.patch | 4 +- .../0008-fix-mingw64-compat-wide-char.patch | 4 +- .../0009-fix-fork-for-mingw64.patch | 4 +- ...T_CHECK_FUNC-for-socket-and-basename.patch | 6 +- ...Use-GIT_CHECK_FUNC-for-regcomp-regex.patch | 6 +- ...012-Use-system-dirent.h-on-MinGW-w64.patch | 4 +- ...-Make-pthread-wrapper-only-for-mingw.patch | 4 +- ...014-Do-not-compile-dirent-on-mingw64.patch | 4 +- .../0015-Alter-fscache-for-mingw64.patch | 4 +- ...me.h-versions-of-gmtime-localtime-_r.patch | 63 ++++++++++ mingw-w64-git-git/PKGBUILD | 39 +++--- 18 files changed, 232 insertions(+), 50 deletions(-) create mode 100644 mingw-w64-git-git/0000-Add-SEARCH_LIBS-to-GIT_CHECK_FUNC.patch create mode 100644 mingw-w64-git-git/0016-Use-time.h-versions-of-gmtime-localtime-_r.patch diff --git a/mingw-w64-git-git/0000-Add-SEARCH_LIBS-to-GIT_CHECK_FUNC.patch b/mingw-w64-git-git/0000-Add-SEARCH_LIBS-to-GIT_CHECK_FUNC.patch new file mode 100644 index 0000000000..1e02e31e8b --- /dev/null +++ b/mingw-w64-git-git/0000-Add-SEARCH_LIBS-to-GIT_CHECK_FUNC.patch @@ -0,0 +1,114 @@ +From 92d28470606977c4e3957e7812e11c3d93a893af Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 26 Oct 2014 21:30:08 +0000 +Subject: [PATCH 00/16] Add SEARCH_LIBS to GIT_CHECK_FUNC + +--- + configure.ac | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 890ef61..3270740 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -103,16 +103,16 @@ AC_DEFUN([GIT_PARSE_WITH_SET_MAKE_VAR], + fi)])# GIT_PARSE_WITH_SET_MAKE_VAR + + # +-# GIT_CHECK_FUNC(FUNCTION, IFTRUE, IFFALSE) +-# ----------------------------------------- ++# GIT_CHECK_FUNC(FUNCTION, SEARCH_LIBS, IFTRUE, IFFALSE) ++# ------------------------------------------------------ + # Similar to AC_CHECK_FUNC, but on systems that do not generate + # warnings for missing prototypes (e.g. FreeBSD when compiling without + # -Wall), it does not work. By looking for function definition in + # libraries, this problem can be worked around. + AC_DEFUN([GIT_CHECK_FUNC],[AC_CHECK_FUNC([$1],[ +- AC_SEARCH_LIBS([$1],, +- [$2],[$3]) +-],[$3])]) ++ AC_SEARCH_LIBS([$1],[$2], ++ [$3],[$4]) ++],[$4])]) + + # + # GIT_STASH_FLAGS(BASEPATH_VAR) +@@ -792,7 +792,7 @@ GIT_CONF_SUBST([NO_SOCKADDR_STORAGE]) + # + # Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). + AC_CHECK_TYPE([struct addrinfo],[ +- GIT_CHECK_FUNC([getaddrinfo], ++ GIT_CHECK_FUNC([getaddrinfo],, + [NO_IPV6=], + [NO_IPV6=YesPlease]) + ],[NO_IPV6=YesPlease],[ +@@ -915,19 +915,19 @@ AC_CHECK_LIB([iconv], [locale_charset], + GIT_CONF_SUBST([CHARSET_LIB]) + # + # Define NO_STRCASESTR if you don't have strcasestr. +-GIT_CHECK_FUNC(strcasestr, ++GIT_CHECK_FUNC(strcasestr,, + [NO_STRCASESTR=], + [NO_STRCASESTR=YesPlease]) + GIT_CONF_SUBST([NO_STRCASESTR]) + # + # Define NO_MEMMEM if you don't have memmem. +-GIT_CHECK_FUNC(memmem, ++GIT_CHECK_FUNC(memmem,, + [NO_MEMMEM=], + [NO_MEMMEM=YesPlease]) + GIT_CONF_SUBST([NO_MEMMEM]) + # + # Define NO_STRLCPY if you don't have strlcpy. +-GIT_CHECK_FUNC(strlcpy, ++GIT_CHECK_FUNC(strlcpy,, + [NO_STRLCPY=], + [NO_STRLCPY=YesPlease]) + GIT_CONF_SUBST([NO_STRLCPY]) +@@ -941,37 +941,37 @@ AC_CHECK_TYPE(uintmax_t, + GIT_CONF_SUBST([NO_UINTMAX_T]) + # + # Define NO_STRTOUMAX if you don't have strtoumax in the C library. +-GIT_CHECK_FUNC(strtoumax, ++GIT_CHECK_FUNC(strtoumax,, + [NO_STRTOUMAX=], + [NO_STRTOUMAX=YesPlease]) + GIT_CONF_SUBST([NO_STRTOUMAX]) + # + # Define NO_SETENV if you don't have setenv in the C library. +-GIT_CHECK_FUNC(setenv, ++GIT_CHECK_FUNC(setenv,, + [NO_SETENV=], + [NO_SETENV=YesPlease]) + GIT_CONF_SUBST([NO_SETENV]) + # + # Define NO_UNSETENV if you don't have unsetenv in the C library. +-GIT_CHECK_FUNC(unsetenv, ++GIT_CHECK_FUNC(unsetenv,, + [NO_UNSETENV=], + [NO_UNSETENV=YesPlease]) + GIT_CONF_SUBST([NO_UNSETENV]) + # + # Define NO_MKDTEMP if you don't have mkdtemp in the C library. +-GIT_CHECK_FUNC(mkdtemp, ++GIT_CHECK_FUNC(mkdtemp,, + [NO_MKDTEMP=], + [NO_MKDTEMP=YesPlease]) + GIT_CONF_SUBST([NO_MKDTEMP]) + # + # Define NO_MKSTEMPS if you don't have mkstemps in the C library. +-GIT_CHECK_FUNC(mkstemps, ++GIT_CHECK_FUNC(mkstemps,, + [NO_MKSTEMPS=], + [NO_MKSTEMPS=YesPlease]) + GIT_CONF_SUBST([NO_MKSTEMPS]) + # + # Define NO_INITGROUPS if you don't have initgroups in the C library. +-GIT_CHECK_FUNC(initgroups, ++GIT_CHECK_FUNC(initgroups,, + [NO_INITGROUPS=], + [NO_INITGROUPS=YesPlease]) + GIT_CONF_SUBST([NO_INITGROUPS]) +-- +2.1.2 + 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 index eeb39669a2..a1b774c3dc 100644 --- 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 @@ -1,7 +1,7 @@ -From 4130dfaa94901612a4721385643e82e55e650947 Mon Sep 17 00:00:00 2001 +From db7d89068e976a97b2067e9d3ceaa4672f003ea3 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 22 Jul 2014 00:58:19 +0100 -Subject: [PATCH 01/15] Don't redefine _ReadWriteBarrier in malloc.c.h +Subject: [PATCH 01/16] Don't redefine _ReadWriteBarrier in malloc.c.h --- compat/nedmalloc/malloc.c.h | 4 +++- 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 index d6c4658b16..88a5ddf1e2 100644 --- 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 @@ -1,7 +1,7 @@ -From b6f82f76b7e313d850fb135abb69e50d4df27fa4 Mon Sep 17 00:00:00 2001 +From c2abd6ee5cdc848d8dfba33b6aa244289fc36a8a Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 22 Jul 2014 00:56:51 +0100 -Subject: [PATCH 02/15] Undefine FORCEINLINE on MinGW-w64 in malloc.c.h +Subject: [PATCH 02/16] 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' 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 index 5dbcd0adbf..ae4adfe450 100644 --- 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 @@ -1,7 +1,7 @@ -From 2429ff1d64e93477777fe9e96e6e75e164fab17b Mon Sep 17 00:00:00 2001 +From b1e5c184ea68aaa7a0ac21b126b58ebf78e88ba6 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 22 Jul 2014 00:20:01 +0100 -Subject: [PATCH 03/15] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64 +Subject: [PATCH 03/16] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64 --- config.mak.uname | 8 ++++++-- 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 index d27c6a84ab..7e488f772e 100644 --- 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 @@ -1,7 +1,7 @@ -From 53b6b2c7c5f2152bed45890dbb7d25c4523de467 Mon Sep 17 00:00:00 2001 +From 6dcebcfb912e2d009be8fbacff7715aa1a8eca5a Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 21 Jul 2014 21:33:08 +0100 -Subject: [PATCH 04/15] Also look in winsock2.h for sockaddr_storage and look +Subject: [PATCH 04/16] Also look in winsock2.h for sockaddr_storage and look in ws2tcpip.h for socklen_t --- @@ -26,7 +26,7 @@ index f11bc7e..91322f1 100644 + #endif]) ]) diff --git a/configure.ac b/configure.ac -index 890ef61..ee9efb8 100644 +index 3270740..dc5623e 100644 --- a/configure.ac +++ b/configure.ac @@ -390,6 +390,11 @@ AS_HELP_STRING([],[Tcl/Tk interpreter will be found in a system.]), 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 index 267a811777..1c54ad4548 100644 --- 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 @@ -1,7 +1,7 @@ -From 24e1a400a5c1397d181e7fb119d3f4804e22c082 Mon Sep 17 00:00:00 2001 +From ae0e79c615d528263be674e5a24ccfe1ba7ca116 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Thu, 9 Oct 2014 23:59:15 +0100 -Subject: [PATCH 05/15] Don't redefine some things MinGW-w64 provides +Subject: [PATCH 05/16] Don't redefine some things MinGW-w64 provides off64_t, _lseeki64, _CONSOLE_FONT_INFOEX and (probably incorrectly, unsetenv) 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 index 9147da343a..f740776eef 100644 --- 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 @@ -1,7 +1,7 @@ -From e57de5a9e842e90d092692a6cc24a7ea4e13028e Mon Sep 17 00:00:00 2001 +From 7841c243d2b382fd24076f669abaab5224e5c9e3 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 21 Jul 2014 23:52:34 +0100 -Subject: [PATCH 06/15] Include ntdef.h on MinGW-w64 for REPARSE_DATA_BUFFER +Subject: [PATCH 06/16] Include ntdef.h on MinGW-w64 for REPARSE_DATA_BUFFER --- compat/mingw.c | 4 ++++ 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 index b9bfb024fc..d2822e22b3 100644 --- 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 @@ -1,7 +1,7 @@ -From 1effe1cd8db62e1e08c542c6ef98b585821ad076 Mon Sep 17 00:00:00 2001 +From f74603dd6d319f2a8a035055091833a68c26ac97 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 22 Jul 2014 00:29:15 +0100 -Subject: [PATCH 07/15] Include winsock2.h and not netdb.h on MinGW-w64 +Subject: [PATCH 07/16] Include winsock2.h and not netdb.h on MinGW-w64 --- compat/hstrerror.c | 4 ++++ diff --git a/mingw-w64-git-git/0008-fix-mingw64-compat-wide-char.patch b/mingw-w64-git-git/0008-fix-mingw64-compat-wide-char.patch index 119bf29db7..5a191fd1be 100644 --- a/mingw-w64-git-git/0008-fix-mingw64-compat-wide-char.patch +++ b/mingw-w64-git-git/0008-fix-mingw64-compat-wide-char.patch @@ -1,7 +1,7 @@ -From 0191a65162d9e8c64103307e1b039e1abd3e2852 Mon Sep 17 00:00:00 2001 +From 5a0eda23ec0737ce962ef740cad9d6f51814fd1a Mon Sep 17 00:00:00 2001 From: martell Date: Mon, 21 Jul 2014 21:10:25 +0100 -Subject: [PATCH 08/15] fix mingw64 compat wide char +Subject: [PATCH 08/16] fix mingw64 compat wide char --- compat/mingw.h | 5 ++--- diff --git a/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch b/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch index a9d921fc7b..2d746aacab 100644 --- a/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch +++ b/mingw-w64-git-git/0009-fix-fork-for-mingw64.patch @@ -1,7 +1,7 @@ -From d34e1b4ce713ccf2e441bfc5af741505cd85d339 Mon Sep 17 00:00:00 2001 +From b8ea7da2f0fcb28a27fedda5dd2fa0cd3005cd73 Mon Sep 17 00:00:00 2001 From: martell Date: Mon, 21 Jul 2014 21:11:03 +0100 -Subject: [PATCH 09/15] fix fork for mingw64 +Subject: [PATCH 09/16] fix fork for mingw64 --- compat/mingw.h | 4 ++-- diff --git a/mingw-w64-git-git/0010-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch b/mingw-w64-git-git/0010-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch index aef49169e6..60028ad878 100644 --- a/mingw-w64-git-git/0010-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch +++ b/mingw-w64-git-git/0010-Use-GIT_CHECK_FUNC-for-socket-and-basename.patch @@ -1,7 +1,7 @@ -From 24570f5e8bb5ca543e59e094819e69db39c08cf3 Mon Sep 17 00:00:00 2001 +From 514fcdb1740f53b42ab6027172fbaa6b23df62a9 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 10 Oct 2014 00:05:28 +0100 -Subject: [PATCH 10/15] Use GIT_CHECK_FUNC for socket and basename +Subject: [PATCH 10/16] Use GIT_CHECK_FUNC for socket and basename .. and look in c, socket, ws2_32 and c, gen respectively. --- @@ -131,7 +131,7 @@ index c311eb3..95a092e 100644 NO_ICONV = YesPlease NO_MEMMEM = YesPlease diff --git a/configure.ac b/configure.ac -index ee9efb8..f1c1dfc 100644 +index dc5623e..4881bbe 100644 --- a/configure.ac +++ b/configure.ac @@ -630,13 +630,11 @@ GIT_UNSTASH_FLAGS($ZLIB_PATH) diff --git a/mingw-w64-git-git/0011-Use-GIT_CHECK_FUNC-for-regcomp-regex.patch b/mingw-w64-git-git/0011-Use-GIT_CHECK_FUNC-for-regcomp-regex.patch index 22039c9048..f02821da87 100644 --- a/mingw-w64-git-git/0011-Use-GIT_CHECK_FUNC-for-regcomp-regex.patch +++ b/mingw-w64-git-git/0011-Use-GIT_CHECK_FUNC-for-regcomp-regex.patch @@ -1,7 +1,7 @@ -From 04ca3d7086be601ab3f5b8db021bbc53cb9eff20 Mon Sep 17 00:00:00 2001 +From 803533fc133221721abce9439586cc422d63f5f2 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 10 Oct 2014 00:08:31 +0100 -Subject: [PATCH 11/15] Use GIT_CHECK_FUNC for regcomp (regex) +Subject: [PATCH 11/16] Use GIT_CHECK_FUNC for regcomp (regex) --- Makefile | 3 +++ @@ -23,7 +23,7 @@ index d3666c6..2eb1b46 100644 BASIC_CFLAGS += -DNATIVE_CRLF endif diff --git a/configure.ac b/configure.ac -index f1c1dfc..fedbe41 100644 +index 4881bbe..06af6b6 100644 --- a/configure.ac +++ b/configure.ac @@ -827,11 +827,13 @@ yippeeyeswehaveit diff --git a/mingw-w64-git-git/0012-Use-system-dirent.h-on-MinGW-w64.patch b/mingw-w64-git-git/0012-Use-system-dirent.h-on-MinGW-w64.patch index 46fe280abb..c7de20a1d9 100644 --- a/mingw-w64-git-git/0012-Use-system-dirent.h-on-MinGW-w64.patch +++ b/mingw-w64-git-git/0012-Use-system-dirent.h-on-MinGW-w64.patch @@ -1,7 +1,7 @@ -From 062281e9a354ea1df8eb8126693649abe739c832 Mon Sep 17 00:00:00 2001 +From a3e728c192f5dc34c9626fdcaf461e2bb0b26680 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 23 Jul 2014 22:46:32 +0100 -Subject: [PATCH 12/15] Use system dirent.h on MinGW-w64 +Subject: [PATCH 12/16] Use system dirent.h on MinGW-w64 .. and rename the mingw one to dirent-mingw.h --- diff --git a/mingw-w64-git-git/0013-Make-pthread-wrapper-only-for-mingw.patch b/mingw-w64-git-git/0013-Make-pthread-wrapper-only-for-mingw.patch index a79119b052..d3a076f661 100644 --- a/mingw-w64-git-git/0013-Make-pthread-wrapper-only-for-mingw.patch +++ b/mingw-w64-git-git/0013-Make-pthread-wrapper-only-for-mingw.patch @@ -1,7 +1,7 @@ -From 4e165cd03901b66af1d98525e477a4137d209476 Mon Sep 17 00:00:00 2001 +From e803d17e70f4e750b840dc921bda29d531406553 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 26 Oct 2014 21:19:12 +0000 -Subject: [PATCH 13/15] Make pthread wrapper only for mingw +Subject: [PATCH 13/16] Make pthread wrapper only for mingw Requires renaming pthread.h to pthread-mingw.h and only building pthread.o for mingw. This is because diff --git a/mingw-w64-git-git/0014-Do-not-compile-dirent-on-mingw64.patch b/mingw-w64-git-git/0014-Do-not-compile-dirent-on-mingw64.patch index 7f986b58d0..5f6b61e312 100644 --- a/mingw-w64-git-git/0014-Do-not-compile-dirent-on-mingw64.patch +++ b/mingw-w64-git-git/0014-Do-not-compile-dirent-on-mingw64.patch @@ -1,7 +1,7 @@ -From c750a1af4cd05d1d2c1b5987da6b4b51672b0c14 Mon Sep 17 00:00:00 2001 +From 026c6f2f760ed005c964e23367735f228e524fc7 Mon Sep 17 00:00:00 2001 From: martell Date: Thu, 24 Jul 2014 00:15:28 +0100 -Subject: [PATCH 14/15] Do not compile dirent on mingw64 +Subject: [PATCH 14/16] Do not compile dirent on mingw64 --- config.mak.uname | 3 +-- diff --git a/mingw-w64-git-git/0015-Alter-fscache-for-mingw64.patch b/mingw-w64-git-git/0015-Alter-fscache-for-mingw64.patch index 45cc3c1220..7680a8f2a1 100644 --- a/mingw-w64-git-git/0015-Alter-fscache-for-mingw64.patch +++ b/mingw-w64-git-git/0015-Alter-fscache-for-mingw64.patch @@ -1,7 +1,7 @@ -From 51c810325fc7025b166d72ef4e4637f763521d3b Mon Sep 17 00:00:00 2001 +From eeef2688054a3cb464f513339855a4e9ca6ca836 Mon Sep 17 00:00:00 2001 From: martell Date: Thu, 24 Jul 2014 01:04:02 +0100 -Subject: [PATCH 15/15] Alter fscache for mingw64 +Subject: [PATCH 15/16] Alter fscache for mingw64 --- compat/win32/fscache.c | 26 +++++++++++++++++++++++--- diff --git a/mingw-w64-git-git/0016-Use-time.h-versions-of-gmtime-localtime-_r.patch b/mingw-w64-git-git/0016-Use-time.h-versions-of-gmtime-localtime-_r.patch new file mode 100644 index 0000000000..d27897140c --- /dev/null +++ b/mingw-w64-git-git/0016-Use-time.h-versions-of-gmtime-localtime-_r.patch @@ -0,0 +1,63 @@ +From f63cebb478da79d4b347a86892cb9e27601b7460 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 26 Oct 2014 22:13:39 +0000 +Subject: [PATCH 16/16] Use time.h versions of {gmtime,localtime}_r + +.. by defining _POSIX and not reimplementing them. +--- + compat/mingw.c | 2 ++ + compat/mingw.h | 2 ++ + config.mak.uname | 2 +- + 3 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/compat/mingw.c b/compat/mingw.c +index 0604c62..bd4f311 100644 +--- a/compat/mingw.c ++++ b/compat/mingw.c +@@ -745,6 +745,7 @@ int pipe(int filedes[2]) + return 0; + } + ++#ifndef __MINGW64_VERSION_MAJOR + struct tm *gmtime_r(const time_t *timep, struct tm *result) + { + /* gmtime() in MSVCRT.DLL is thread-safe, but not reentrant */ +@@ -758,6 +759,7 @@ struct tm *localtime_r(const time_t *timep, struct tm *result) + memcpy(result, localtime(timep), sizeof(struct tm)); + return result; + } ++#endif + + char *mingw_getcwd(char *pointer, int len) + { +diff --git a/compat/mingw.h b/compat/mingw.h +index 2a626c6..e3cfeb7 100644 +--- a/compat/mingw.h ++++ b/compat/mingw.h +@@ -158,8 +158,10 @@ int pipe(int filedes[2]); + unsigned int sleep (unsigned int seconds); + int mkstemp(char *template); + int gettimeofday(struct timeval *tv, void *tz); ++#ifndef __MINGW64_VERSION_MAJOR + struct tm *gmtime_r(const time_t *timep, struct tm *result); + struct tm *localtime_r(const time_t *timep, struct tm *result); ++#endif + int getpagesize(void); /* defined in MinGW's libgcc.a */ + struct passwd *getpwuid(uid_t uid); + int setitimer(int type, struct itimerval *in, struct itimerval *out); +diff --git a/config.mak.uname b/config.mak.uname +index 3285490..1b7c0e9 100644 +--- a/config.mak.uname ++++ b/config.mak.uname +@@ -505,7 +505,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_POSIX -DNOGDI -Icompat -Icompat/win32 + ifneq (,$(findstring i686,$(CC_MACH))) + COMPAT_CFLAGS += -D_USE_32BIT_TIME_T + BASIC_LDFLAGS += -Wl,--large-address-aware +-- +2.1.2 + diff --git a/mingw-w64-git-git/PKGBUILD b/mingw-w64-git-git/PKGBUILD index b316960e7a..27540c9b4b 100644 --- a/mingw-w64-git-git/PKGBUILD +++ b/mingw-w64-git-git/PKGBUILD @@ -30,6 +30,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-libiconv") options=(!libtool strip staticlibs) source=(${GIT_URL} + "0000-Add-SEARCH_LIBS-to-GIT_CHECK_FUNC.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" @@ -46,26 +47,29 @@ source=(${GIT_URL} "0012-Use-system-dirent.h-on-MinGW-w64.patch" "0013-Make-pthread-wrapper-only-for-mingw.patch" "0014-Do-not-compile-dirent-on-mingw64.patch" - "0015-Alter-fscache-for-mingw64.patch") + "0015-Alter-fscache-for-mingw64.patch" + "0016-Use-time.h-versions-of-gmtime-localtime-_r.patch") md5sums=('SKIP' - '613bff9cf5829bb19ff75f7f170be070' - 'd9ecacd550c5cbad3c15b3d17f798d18' - '7c6cd4f6e00911916eaeb8f630bc65b2' - '1c1bb553f33e04f6832bb1143168dee5' - '12d349c1bc17cb641c4f920a105b152b' - 'd2fbdd6138adf6cb825ff98d8f881f43' - '57ac589e09886d216492be142648078e' - '92b8b2afaa7aa981fdb00eee29604cdc' - '85dcef036a6d1d284b8433360b3f5dda' - '78e76badb6f31338815f3c4aefd02a65' + '42b49294979328c5c77a0a5be75d8fe7' + '935115ccc81149587d476ac2856e84c8' + '4abd3f4440937544dde9a82feb1df73e' + '8c9433879cae5efc4c17c83011e2033f' + 'fdab5aafeaf78185017918783796f8d6' + 'bb72be60632272314be2ef8985e60783' + '9eb74690d5b718b0f7a8859a6848890b' + 'fceb0b5804e916de2568e5740eaec316' + '668368e7b1f1993280315d9b390a9c66' + '0262e62a499d0a4f72c3c17e22a61c58' + '7eb3d700b4b8f6fa44f2afae3db99222' '69af98595eeabd892289de06d0cd009f' - 'a0e988d63bb370e0fc0503b283cf5a30' + 'c078ad47d7f3c561223d55315509a7e1' '6e59f1619c2a9d8575c53ca8a8ab7f6b' - 'cf741745d6cd1990299dd36a3bcd0716' - 'bb3c00ce3d7cf371ded7a10f4b4841a2' - '5c24e2511d9b620df54fc15909ee8ebc' - '9c6739820154856e587004178162ad8c') + '81a5bf8fc2a1a23e3f8dab8dbf12d626' + '15cfd7061e919b6e947c3a6ccbb91917' + '4fad79b5951f69e0520bdd5a24f1714a' + '890fb66794ad458e424098b376ad0f94' + 'ba18be3d01bacbf170d2e79a8891ed18') pkgver() { cd "${srcdir}"/${SRC_DIR} @@ -76,6 +80,7 @@ prepare() { export PYTHON_PATH='/usr/bin/python2' cd "${srcdir}"/${SRC_DIR} + git am "${srcdir}"/0000-Add-SEARCH_LIBS-to-GIT_CHECK_FUNC.patch if [ "${_based_on_dscho_w64_msysgit}" = "no" ]; then 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 @@ -104,7 +109,7 @@ prepare() { git am "${srcdir}"/0014-Do-not-compile-dirent-on-mingw64.patch git am "${srcdir}"/0015-Alter-fscache-for-mingw64.patch fi - + git am "${srcdir}"/0016-Use-time.h-versions-of-gmtime-localtime-_r.patch autoreconf -fi }