summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/12575.patch
blob: 46f6000b4f3df7661490f880fb84820e7a542a46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
From 51230c2eeb53a752b652a727c041dc82b0e95ac8 Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Thu, 22 Jun 2023 08:55:47 +0200
Subject: [PATCH 1/9] if_perl.xs: define version for a workaround

---
 src/if_perl.xs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/if_perl.xs b/src/if_perl.xs
index c69ed9ef1fb9..a86fda4d6c0f 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -40,7 +40,7 @@
 /* Work around for perl-5.18.
  * Don't include "perl\lib\CORE\inline.h" for now,
  * include it after Perl_sv_free2 is defined. */
-#ifdef DYNAMIC_PERL
+#if (PERL_REVISION == 5) && (PERL_VERSION == 18)
 # define PERL_NO_INLINE_FUNCTIONS
 #endif
 

From c363deb7bf404c5c3ea8f4cb41ab8234b3e0626b Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Thu, 22 Jun 2023 09:49:54 +0200
Subject: [PATCH 2/9] fixup: more build errors with Perl 5.37.x

---
 src/if_perl.xs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/if_perl.xs b/src/if_perl.xs
index a86fda4d6c0f..7200e8a0b362 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -56,6 +56,7 @@
 #ifdef __GNUC__
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wunused-variable"
+# pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
 #endif
 
 #include <EXTERN.h>
@@ -710,7 +711,7 @@ S_POPMARK(pTHX)
 # endif
 
 /* perl-5.34 needs Perl_SvTRUE_common; used in SvTRUE_nomg_NN */
-# if (PERL_REVISION == 5) && (PERL_VERSION >= 34)
+# if (PERL_REVISION == 5) && (PERL_VERSION == 34)
 PERL_STATIC_INLINE bool
 Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback)
 {
@@ -737,7 +738,7 @@ Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback)
 # endif
 
 /* perl-5.32 needs Perl_SvTRUE */
-# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
+# if (PERL_REVISION == 5) && (PERL_VERSION == 32)
 PERL_STATIC_INLINE bool
 Perl_SvTRUE(pTHX_ SV *sv) {
     if (!LIKELY(sv))

From e8329c517704e3bb5cc8c4c5d4907f710a45a897 Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Thu, 22 Jun 2023 10:14:00 +0200
Subject: [PATCH 3/9] CI: use latest Perl provided by homebrew

---
 .github/workflows/ci.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4e6f23ba80c1..cdef7127c1e5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -275,7 +275,6 @@ jobs:
         run: |
           brew install lua
           echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
-          brew uninstall perl
 
       - name: Set up environment
         run: |

From 59a5820047bf2ea98caf28337d8496914dfe1ece Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Thu, 22 Jun 2023 10:20:30 +0200
Subject: [PATCH 4/9] use --enable-perlinterp=dynamic

It's needed on newer Perl Versions, static not working
---
 .github/workflows/ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cdef7127c1e5..a8e4afeba6dc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -288,7 +288,7 @@ jobs:
           normal)
             ;;
           huge)
-            echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
+            echo "CONFOPT=--enable-perlinterp=dynamic --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
             ;;
           esac
           ) >> $GITHUB_ENV

From 6db6bed75f48c016d0346edf90ac539a57d5cc5c Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Thu, 22 Jun 2023 10:30:03 +0200
Subject: [PATCH 5/9] avoid "-Werror" and "-Wshadow" on macOS

---
 src/if_perl.xs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/if_perl.xs b/src/if_perl.xs
index 7200e8a0b362..6ed41e9d797b 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -57,6 +57,8 @@
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wunused-variable"
 # pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
+# pragma GCC diagnostic ignored "-Werror"
+# pragma GCC diagnostic ignored "-Wshadow"
 #endif
 
 #include <EXTERN.h>

From c76e323263a9b5c7ca807c18bf026d2ca2af81aa Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Thu, 22 Jun 2023 10:36:01 +0200
Subject: [PATCH 6/9] Remove unknown "pragma GCC diagnostic ignored"

---
 src/if_perl.xs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/if_perl.xs b/src/if_perl.xs
index 6ed41e9d797b..57ea34aaf7cd 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -57,7 +57,6 @@
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wunused-variable"
 # pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
-# pragma GCC diagnostic ignored "-Werror"
 # pragma GCC diagnostic ignored "-Wshadow"
 #endif
 

From 9551bbfe3c1cdfad115c00a6e35585a2684e328e Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Thu, 22 Jun 2023 10:42:29 +0200
Subject: [PATCH 7/9] use --enable-perlinterp again

should work now
---
 .github/workflows/ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a8e4afeba6dc..cdef7127c1e5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -288,7 +288,7 @@ jobs:
           normal)
             ;;
           huge)
-            echo "CONFOPT=--enable-perlinterp=dynamic --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
+            echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
             ;;
           esac
           ) >> $GITHUB_ENV

From 6abf8cdab0bf03ea05cec19d538d4387d730a933 Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Fri, 23 Jun 2023 08:22:23 +0000
Subject: [PATCH 8/9] fixup: move to right place PERL_CFLAGS; workaround for
 perl-5.18 and later.

---
 ci/config.mk.sed | 2 +-
 src/if_perl.xs   | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/ci/config.mk.sed b/ci/config.mk.sed
index 51e7ec903d99..d27a03bee7c5 100644
--- a/ci/config.mk.sed
+++ b/ci/config.mk.sed
@@ -1,3 +1,3 @@
 /^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/
-/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function/
+/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wincompatible-pointer-types -Wshadow/
 /^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/
diff --git a/src/if_perl.xs b/src/if_perl.xs
index 57ea34aaf7cd..804531a2adb3 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -40,7 +40,7 @@
 /* Work around for perl-5.18.
  * Don't include "perl\lib\CORE\inline.h" for now,
  * include it after Perl_sv_free2 is defined. */
-#if (PERL_REVISION == 5) && (PERL_VERSION == 18)
+#if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
 # define PERL_NO_INLINE_FUNCTIONS
 #endif
 
@@ -56,8 +56,6 @@
 #ifdef __GNUC__
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wunused-variable"
-# pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
-# pragma GCC diagnostic ignored "-Wshadow"
 #endif
 
 #include <EXTERN.h>

From 9e9e45a9cb8245d06add5bfa3179821e8c8a0c00 Mon Sep 17 00:00:00 2001
From: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Fri, 23 Jun 2023 10:28:33 +0200
Subject: [PATCH 9/9] config.mk.sed: use -Wno-shadow

---
 ci/config.mk.sed | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci/config.mk.sed b/ci/config.mk.sed
index d27a03bee7c5..f672edd9e438 100644
--- a/ci/config.mk.sed
+++ b/ci/config.mk.sed
@@ -1,3 +1,3 @@
 /^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/
-/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wincompatible-pointer-types -Wshadow/
+/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
 /^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/