1 |
commit: ed8b5e2d63d7a295082b99d7fa4b702ecef7ee6c |
2 |
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Feb 15 16:53:55 2017 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 16 11:11:45 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed8b5e2d |
7 |
|
8 |
www-servers/pound: remove unused patch |
9 |
|
10 |
www-servers/pound/files/pound-2.5-openssl-1.patch | 289 ---------------------- |
11 |
1 file changed, 289 deletions(-) |
12 |
|
13 |
diff --git a/www-servers/pound/files/pound-2.5-openssl-1.patch b/www-servers/pound/files/pound-2.5-openssl-1.patch |
14 |
deleted file mode 100644 |
15 |
index 6491c0fdda..0000000000 |
16 |
--- a/www-servers/pound/files/pound-2.5-openssl-1.patch |
17 |
+++ /dev/null |
18 |
@@ -1,289 +0,0 @@ |
19 |
-http://bugs.gentoo.org/327721 |
20 |
- |
21 |
---- config.c |
22 |
-+++ config.c |
23 |
-@@ -431,14 +431,22 @@ t_hash(const TABNODE *e) |
24 |
- res = (res ^ *k++) * 16777619; |
25 |
- return res; |
26 |
- } |
27 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
28 |
-+static IMPLEMENT_LHASH_HASH_FN(t, TABNODE) |
29 |
-+#else |
30 |
- static IMPLEMENT_LHASH_HASH_FN(t_hash, const TABNODE *) |
31 |
-+#endif |
32 |
- |
33 |
- static int |
34 |
- t_cmp(const TABNODE *d1, const TABNODE *d2) |
35 |
- { |
36 |
- return strcmp(d1->key, d2->key); |
37 |
- } |
38 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
39 |
-+static IMPLEMENT_LHASH_COMP_FN(t, TABNODE) |
40 |
-+#else |
41 |
- static IMPLEMENT_LHASH_COMP_FN(t_cmp, const TABNODE *) |
42 |
-+#endif |
43 |
- |
44 |
- /* |
45 |
- * parse a service |
46 |
-@@ -460,7 +468,11 @@ parse_service(const char *svc_name) |
47 |
- pthread_mutex_init(&res->mut, NULL); |
48 |
- if(svc_name) |
49 |
- strncpy(res->name, svc_name, KEY_SIZE); |
50 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
51 |
-+ if((res->sessions = LHM_lh_new(TABNODE, t)) == NULL) |
52 |
-+#else |
53 |
- if((res->sessions = lh_new(LHASH_HASH_FN(t_hash), LHASH_COMP_FN(t_cmp))) == NULL) |
54 |
-+#endif |
55 |
- conf_err("lh_new failed - aborted"); |
56 |
- ign_case = ignore_case; |
57 |
- while(conf_fgets(lin, MAXBUF)) { |
58 |
---- pound.h |
59 |
-+++ pound.h |
60 |
-@@ -322,6 +322,10 @@ typedef struct _tn { |
61 |
- /* maximal session key size */ |
62 |
- #define KEY_SIZE 127 |
63 |
- |
64 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
65 |
-+DECLARE_LHASH_OF(TABNODE); |
66 |
-+#endif |
67 |
-+ |
68 |
- /* service definition */ |
69 |
- typedef struct _service { |
70 |
- char name[KEY_SIZE + 1]; /* symbolic name */ |
71 |
-@@ -337,7 +341,11 @@ typedef struct _service { |
72 |
- int sess_ttl; /* session time-to-live */ |
73 |
- regex_t sess_start; /* pattern to identify the session data */ |
74 |
- regex_t sess_pat; /* pattern to match the session data */ |
75 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
76 |
-+ LHASH_OF(TABNODE) *sessions; /* currently active sessions */ |
77 |
-+#else |
78 |
- LHASH *sessions; /* currently active sessions */ |
79 |
-+#endif |
80 |
- int dynscale; /* true if the back-ends should be dynamically rescaled */ |
81 |
- int disabled; /* true if the service is disabled */ |
82 |
- struct _service *next; |
83 |
---- svc.c |
84 |
-+++ svc.c |
85 |
-@@ -27,12 +27,17 @@ |
86 |
- |
87 |
- #include "pound.h" |
88 |
- |
89 |
-+#ifndef LHASH_OF |
90 |
-+#define LHASH_OF(x) LHASH |
91 |
-+#define CHECKED_LHASH_OF(type, h) h |
92 |
-+#endif |
93 |
-+ |
94 |
- /* |
95 |
- * Add a new key/content pair to a hash table |
96 |
- * the table should be already locked |
97 |
- */ |
98 |
- static void |
99 |
--t_add(LHASH *const tab, const char *key, const void *content, const size_t cont_len) |
100 |
-+t_add(LHASH_OF(TABNODE) *const tab, const char *key, const void *content, const size_t cont_len) |
101 |
- { |
102 |
- TABNODE *t, *old; |
103 |
- |
104 |
-@@ -53,7 +58,11 @@ t_add(LHASH *const tab, const char *key, |
105 |
- } |
106 |
- memcpy(t->content, content, cont_len); |
107 |
- t->last_acc = time(NULL); |
108 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
109 |
-+ if((old = LHM_lh_insert(TABNODE, tab, t)) != NULL) { |
110 |
-+#else |
111 |
- if((old = (TABNODE *)lh_insert(tab, t)) != NULL) { |
112 |
-+#endif |
113 |
- free(old->key); |
114 |
- free(old->content); |
115 |
- free(old); |
116 |
-@@ -68,12 +77,16 @@ t_add(LHASH *const tab, const char *key, |
117 |
- * side-effect: update the time of last access |
118 |
- */ |
119 |
- static void * |
120 |
--t_find(LHASH *const tab, char *const key) |
121 |
-+t_find(LHASH_OF(TABNODE) *const tab, char *const key) |
122 |
- { |
123 |
- TABNODE t, *res; |
124 |
- |
125 |
- t.key = key; |
126 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
127 |
-+ if((res = LHM_lh_retrieve(TABNODE, tab, &t)) != NULL) { |
128 |
-+#else |
129 |
- if((res = (TABNODE *)lh_retrieve(tab, &t)) != NULL) { |
130 |
-+#endif |
131 |
- res->last_acc = time(NULL); |
132 |
- return res->content; |
133 |
- } |
134 |
-@@ -84,12 +97,16 @@ t_find(LHASH *const tab, char *const key |
135 |
- * Delete a key |
136 |
- */ |
137 |
- static void |
138 |
--t_remove(LHASH *const tab, char *const key) |
139 |
-+t_remove(LHASH_OF(TABNODE) *const tab, char *const key) |
140 |
- { |
141 |
- TABNODE t, *res; |
142 |
- |
143 |
- t.key = key; |
144 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
145 |
-+ if((res = LHM_lh_delete(TABNODE, tab, &t)) != NULL) { |
146 |
-+#else |
147 |
- if((res = (TABNODE *)lh_delete(tab, &t)) != NULL) { |
148 |
-+#endif |
149 |
- free(res->key); |
150 |
- free(res->content); |
151 |
- free(res); |
152 |
-@@ -98,59 +115,75 @@ t_remove(LHASH *const tab, char *const k |
153 |
- } |
154 |
- |
155 |
- typedef struct { |
156 |
-- LHASH *tab; |
157 |
-+ LHASH_OF(TABNODE) *tab; |
158 |
- time_t lim; |
159 |
- void *content; |
160 |
- int cont_len; |
161 |
- } ALL_ARG; |
162 |
- |
163 |
- static void |
164 |
--t_old(TABNODE *t, void *arg) |
165 |
-+t_old_doall_arg(TABNODE *t, ALL_ARG *a) |
166 |
- { |
167 |
-- ALL_ARG *a; |
168 |
-- |
169 |
-- a = (ALL_ARG *)arg; |
170 |
- if(t->last_acc < a->lim) |
171 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
172 |
-+ LHM_lh_delete(TABNODE, a->tab, t); |
173 |
-+#else |
174 |
- lh_delete(a->tab, t); |
175 |
-+#endif |
176 |
- return; |
177 |
- } |
178 |
--IMPLEMENT_LHASH_DOALL_ARG_FN(t_old, TABNODE *, void *) |
179 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
180 |
-+IMPLEMENT_LHASH_DOALL_ARG_FN(t_old, TABNODE, ALL_ARG) |
181 |
-+#else |
182 |
-+#define t_old t_old_doall_arg |
183 |
-+IMPLEMENT_LHASH_DOALL_ARG_FN(t_old, TABNODE *, ALL_ARG *) |
184 |
-+#endif |
185 |
- |
186 |
- /* |
187 |
- * Expire all old nodes |
188 |
- */ |
189 |
- static void |
190 |
--t_expire(LHASH *const tab, const time_t lim) |
191 |
-+t_expire(LHASH_OF(TABNODE) *const tab, const time_t lim) |
192 |
- { |
193 |
- ALL_ARG a; |
194 |
- int down_load; |
195 |
- |
196 |
- a.tab = tab; |
197 |
- a.lim = lim; |
198 |
-- down_load = tab->down_load; |
199 |
-- tab->down_load = 0; |
200 |
-+ down_load = CHECKED_LHASH_OF(TABNODE, tab)->down_load; |
201 |
-+ CHECKED_LHASH_OF(TABNODE, tab)->down_load = 0; |
202 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
203 |
-+ LHM_lh_doall_arg(TABNODE, tab, LHASH_DOALL_ARG_FN(t_old), ALL_ARG, &a); |
204 |
-+#else |
205 |
- lh_doall_arg(tab, LHASH_DOALL_ARG_FN(t_old), &a); |
206 |
-- tab->down_load = down_load; |
207 |
-+#endif |
208 |
-+ CHECKED_LHASH_OF(TABNODE, tab)->down_load = down_load; |
209 |
- return; |
210 |
- } |
211 |
- |
212 |
- static void |
213 |
--t_cont(TABNODE *t, void *arg) |
214 |
-+t_cont_doall_arg(TABNODE *t, ALL_ARG *a) |
215 |
- { |
216 |
-- ALL_ARG *a; |
217 |
-- |
218 |
-- a = (ALL_ARG *)arg; |
219 |
- if(memcmp(t->content, a->content, a->cont_len) == 0) |
220 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
221 |
-+ LHM_lh_delete(TABNODE, a->tab, t); |
222 |
-+#else |
223 |
- lh_delete(a->tab, t); |
224 |
-+#endif |
225 |
- return; |
226 |
- } |
227 |
--IMPLEMENT_LHASH_DOALL_ARG_FN(t_cont, TABNODE *, void *) |
228 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
229 |
-+IMPLEMENT_LHASH_DOALL_ARG_FN(t_cont, TABNODE, ALL_ARG) |
230 |
-+#else |
231 |
-+#define t_cont t_cont_doall_arg |
232 |
-+IMPLEMENT_LHASH_DOALL_ARG_FN(t_cont, TABNODE *, ALL_ARG *) |
233 |
-+#endif |
234 |
- |
235 |
- /* |
236 |
- * Remove all nodes with the given content |
237 |
- */ |
238 |
- static void |
239 |
--t_clean(LHASH *const tab, void *const content, const size_t cont_len) |
240 |
-+t_clean(LHASH_OF(TABNODE) *const tab, void *const content, const size_t cont_len) |
241 |
- { |
242 |
- ALL_ARG a; |
243 |
- int down_load; |
244 |
-@@ -158,10 +191,14 @@ t_clean(LHASH *const tab, void *const co |
245 |
- a.tab = tab; |
246 |
- a.content = content; |
247 |
- a.cont_len = cont_len; |
248 |
-- down_load = tab->down_load; |
249 |
-- tab->down_load = 0; |
250 |
-+ down_load = CHECKED_LHASH_OF(TABNODE, tab)->down_load; |
251 |
-+ CHECKED_LHASH_OF(TABNODE, tab)->down_load = 0; |
252 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
253 |
-+ LHM_lh_doall_arg(TABNODE, tab, LHASH_DOALL_ARG_FN(t_cont), ALL_ARG, &a); |
254 |
-+#else |
255 |
- lh_doall_arg(tab, LHASH_DOALL_ARG_FN(t_cont), &a); |
256 |
-- tab->down_load = down_load; |
257 |
-+#endif |
258 |
-+ CHECKED_LHASH_OF(TABNODE, tab)->down_load = down_load; |
259 |
- return; |
260 |
- } |
261 |
- |
262 |
-@@ -1410,13 +1447,11 @@ typedef struct { |
263 |
- } DUMP_ARG; |
264 |
- |
265 |
- static void |
266 |
--t_dump(TABNODE *t, void *arg) |
267 |
-+t_dump_doall_arg(TABNODE *t, DUMP_ARG *a) |
268 |
- { |
269 |
-- DUMP_ARG *a; |
270 |
- BACKEND *be, *bep; |
271 |
- int n_be, sz; |
272 |
- |
273 |
-- a = (DUMP_ARG *)arg; |
274 |
- memcpy(&bep, t->content, sizeof(bep)); |
275 |
- for(n_be = 0, be = a->backends; be; be = be->next, n_be++) |
276 |
- if(be == bep) |
277 |
-@@ -1432,19 +1467,28 @@ t_dump(TABNODE *t, void *arg) |
278 |
- return; |
279 |
- } |
280 |
- |
281 |
--IMPLEMENT_LHASH_DOALL_ARG_FN(t_dump, TABNODE *, void *) |
282 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
283 |
-+IMPLEMENT_LHASH_DOALL_ARG_FN(t_dump, TABNODE, DUMP_ARG) |
284 |
-+#else |
285 |
-+#define t_dump t_dump_doall_arg |
286 |
-+IMPLEMENT_LHASH_DOALL_ARG_FN(t_dump, TABNODE *, DUMP_ARG *) |
287 |
-+#endif |
288 |
- |
289 |
- /* |
290 |
- * write sessions to the control socket |
291 |
- */ |
292 |
- static void |
293 |
--dump_sess(const int control_sock, LHASH *const sess, BACKEND *const backends) |
294 |
-+dump_sess(const int control_sock, LHASH_OF(TABNODE) *const sess, BACKEND *const backends) |
295 |
- { |
296 |
- DUMP_ARG a; |
297 |
- |
298 |
- a.control_sock = control_sock; |
299 |
- a.backends = backends; |
300 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10000000L |
301 |
-+ LHM_lh_doall_arg(TABNODE, sess, LHASH_DOALL_ARG_FN(t_dump), DUMP_ARG, &a); |
302 |
-+#else |
303 |
- lh_doall_arg(sess, LHASH_DOALL_ARG_FN(t_dump), &a); |
304 |
-+#endif |
305 |
- return; |
306 |
- } |
307 |
- |