commit: 2f998dd244558835f881691535d179d692a72db8
parent 739c12ce49f7767e20292d8b2bd08fe8f88c7ef0
Author: Michael Forney <mforney@mforney.org>
Date: Sat, 15 Jun 2019 21:04:31 -0700
the_silver_searcher: Fix a few portability issues
Diffstat:
4 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/.gitmodules b/.gitmodules
@@ -224,6 +224,7 @@
[submodule "pkg/the_silver_searcher/src"]
path = pkg/the_silver_searcher/src
url = https://github.com/ggreer/the_silver_searcher
+ ignore = all
[submodule "pkg/tz/src"]
path = pkg/tz/src
url = https://github.com/eggert/tz
diff --git a/pkg/the_silver_searcher/patch/0001-Remove-after-function-definition.patch b/pkg/the_silver_searcher/patch/0001-Remove-after-function-definition.patch
@@ -0,0 +1,25 @@
+From 76adb32c89184406278fd51a3fe138314b134a12 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Sat, 15 Jun 2019 20:58:00 -0700
+Subject: [PATCH] Remove `;` after function definition
+
+---
+ src/ignore.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ignore.c b/src/ignore.c
+index fa41889..bdb03b4 100644
+--- a/src/ignore.c
++++ b/src/ignore.c
+@@ -39,7 +39,7 @@ const char *ignore_pattern_files[] = {
+
+ int is_empty(ignores *ig) {
+ return (ig->extensions_len + ig->names_len + ig->slash_names_len + ig->regexes_len + ig->slash_regexes_len == 0);
+-};
++}
+
+ ignores *init_ignore(ignores *parent, const char *dirname, const size_t dirname_len) {
+ ignores *ig = ag_malloc(sizeof(ignores));
+--
+2.20.1
+
diff --git a/pkg/the_silver_searcher/patch/0002-Use-inline-function-for-min-instead-of-statement-exp.patch b/pkg/the_silver_searcher/patch/0002-Use-inline-function-for-min-instead-of-statement-exp.patch
@@ -0,0 +1,32 @@
+From dc1be161f9155e92367714b38f6a45d05d4f90cd Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Sat, 15 Jun 2019 20:58:46 -0700
+Subject: [PATCH] Use inline function for min instead of statement expression
+
+---
+ src/zfile.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/zfile.c b/src/zfile.c
+index e4b7566..29fbb07 100644
+--- a/src/zfile.c
++++ b/src/zfile.c
+@@ -33,10 +33,11 @@ typedef _off64_t off64_t;
+
+ #if HAVE_FOPENCOOKIE
+
+-#define min(a, b) ({ \
+- __typeof (a) _a = (a); \
+- __typeof (b) _b = (b); \
+- _a < _b ? _a : _b; })
++static inline size_t
++min(size_t a, size_t b)
++{
++ return a < b ? a : b;
++}
+
+ static cookie_read_function_t zfile_read;
+ static cookie_seek_function_t zfile_seek;
+--
+2.20.1
+
diff --git a/pkg/the_silver_searcher/ver b/pkg/the_silver_searcher/ver
@@ -1 +1 @@
-2.2.0 r0
+2.2.0 r1