fix for gcc4

This commit is contained in:
espie 2010-05-24 22:17:03 +00:00
parent d2e4e9943c
commit 67c7202b0b
8 changed files with 82 additions and 52 deletions

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-encode_c,v 1.3 2002/01/20 23:26:07 naddy Exp $
--- encode.c.orig Fri Oct 30 22:58:47 1998
+++ encode.c Fri Jun 8 22:23:38 2001
@@ -24,6 +24,7 @@ url_encode(char **code_map, unsigned cha
$OpenBSD: patch-encode_c,v 1.4 2010/05/24 22:17:03 espie Exp $
--- encode.c.orig Sat Oct 31 04:58:47 1998
+++ encode.c Sat May 22 16:47:47 2010
@@ -24,6 +24,7 @@ url_encode(char **code_map, unsigned char *s)
char *buf;
unsigned char c, *p;
char *m;
@ -9,7 +9,7 @@ $OpenBSD: patch-encode_c,v 1.3 2002/01/20 23:26:07 naddy Exp $
static int one_shot = 1;
@@ -43,17 +44,17 @@ url_encode(char **code_map, unsigned cha
@@ -43,17 +44,17 @@ url_encode(char **code_map, unsigned char *s)
cookie_code_map[' '] = "+";
@ -30,7 +30,7 @@ $OpenBSD: patch-encode_c,v 1.3 2002/01/20 23:26:07 naddy Exp $
url_code_map[i] = strdup(tmp);
}
}
@@ -78,14 +79,19 @@ url_encode(char **code_map, unsigned cha
@@ -78,14 +79,19 @@ url_encode(char **code_map, unsigned char *s)
}
/* each input char can expand to at most 6 chars */

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-filters_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
--- filters.c.orig Fri Oct 30 22:58:47 1998
+++ filters.c Fri Jun 8 22:24:01 2001
@@ -103,9 +103,12 @@ block_url(struct http_request *http, str
$OpenBSD: patch-filters_c,v 1.3 2010/05/24 22:17:03 espie Exp $
--- filters.c.orig Sat Oct 31 04:58:47 1998
+++ filters.c Sat May 22 16:47:47 2010
@@ -103,9 +103,12 @@ block_url(struct http_request *http, struct client_sta
n += strlen(path);
n += strlen(spec);
@ -16,7 +16,7 @@ $OpenBSD: patch-filters_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
hostport, path, spec);
freez(hostport);
@@ -174,9 +177,12 @@ trust_url(struct http_request *http, str
@@ -174,9 +177,12 @@ trust_url(struct http_request *http, struct client_sta
n += strlen(path);
n += strlen(referrer);
@ -58,7 +58,7 @@ $OpenBSD: patch-filters_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
}
return(*ret);
@@ -562,8 +574,11 @@ ij_blocked_url(struct http_request *http
@@ -562,8 +574,11 @@ ij_blocked_url(struct http_request *http, struct clien
n += strlen(path );
n += strlen(pattern );
@ -72,7 +72,7 @@ $OpenBSD: patch-filters_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
}
freez(hostport);
@@ -618,8 +633,11 @@ ij_untrusted_url(struct http_request *ht
@@ -618,8 +633,11 @@ ij_untrusted_url(struct http_request *http, struct cli
n += strlen(hostport);
n += strlen(path );
@ -86,7 +86,7 @@ $OpenBSD: patch-filters_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
}
freez(hostport);
@@ -632,25 +650,25 @@ ij_untrusted_url(struct http_request *ht
@@ -632,25 +650,25 @@ ij_untrusted_url(struct http_request *http, struct cli
p = strsav(p, "<h3>The following referrers are trusted</h3>\n");
for(tl = trust_list; (t = *tl) ; tl++) {

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-gnu_regex_c,v 1.3 2001/06/09 03:13:18 angelos Exp $
--- gnu_regex.c.orig Fri Oct 30 22:58:47 1998
+++ gnu_regex.c Fri Jun 8 23:11:28 2001
@@ -4909,15 +4909,7 @@ regerror (errcode, preg, errbuf, errbuf_
$OpenBSD: patch-gnu_regex_c,v 1.4 2010/05/24 22:17:03 espie Exp $
--- gnu_regex.c.orig Sat Oct 31 04:58:47 1998
+++ gnu_regex.c Sat May 22 16:47:47 2010
@@ -4909,15 +4909,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
msg_size = strlen (msg) + 1; /* Includes the null. */
if (errbuf_size != 0)

View File

@ -1,7 +1,21 @@
$OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
--- jcc.c.orig Fri Oct 30 22:58:47 1998
+++ jcc.c Sat Jun 9 00:16:47 2001
@@ -226,7 +226,7 @@ chat(struct client_state *csp)
$OpenBSD: patch-jcc_c,v 1.6 2010/05/24 22:17:03 espie Exp $
--- jcc.c.orig Sat Oct 31 04:58:47 1998
+++ jcc.c Tue May 25 00:15:28 2010
@@ -126,9 +126,10 @@ int add_forwarded = 0;
struct client_state clients[1];
struct file_list files[1];
-struct list wafer_list[1];
-struct list xtra_list[1];
-struct list trust_info[1];
+static struct list wafer_storage, xtra_storage, trust_storage;
+struct list *wafer_list = &wafer_storage;
+struct list *xtra_list = &xtra_storage;
+struct list *trust_info = &trust_storage;
struct url_spec * trust_list[64];
@@ -226,7 +227,7 @@ chat(struct client_state *csp)
}
if(http->cmd == NULL) {
@ -10,7 +24,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
write_socket(csp->cfd, buf, strlen(buf));
return;
}
@@ -369,12 +369,19 @@ chat(struct client_state *csp)
@@ -369,12 +370,19 @@ chat(struct client_state *csp)
}
if(errno == EINVAL) {
@ -34,7 +48,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
}
write_socket(csp->cfd, err, strlen(err));
@@ -406,8 +413,11 @@ chat(struct client_state *csp)
@@ -406,8 +414,11 @@ chat(struct client_state *csp)
}
eno = safe_strerror(errno);
@ -48,7 +62,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
write_socket(csp->cfd, err, strlen(err));
freez(err);
@@ -488,7 +498,7 @@ chat(struct client_state *csp)
@@ -488,7 +499,7 @@ chat(struct client_state *csp)
fperror(logfp, "");
eno = safe_strerror(errno);
@ -57,7 +71,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
freez(eno);
write_socket(csp->cfd, buf, strlen(buf));
return;
@@ -606,6 +616,14 @@ server_thread(void *data)
@@ -606,6 +617,14 @@ server_thread(void *data)
}
#endif
@ -72,7 +86,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
int
main(int argc, char *argv[])
{
@@ -661,7 +679,7 @@ main(int argc, char *argv[])
@@ -661,7 +680,7 @@ main(int argc, char *argv[])
line_num++;
@ -81,7 +95,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
if((p = strpbrk(tmp, "#\r\n"))) *p = '\0';
@@ -678,7 +696,7 @@ main(int argc, char *argv[])
@@ -678,7 +697,7 @@ main(int argc, char *argv[])
while(*p && ((*p == ' ') || (*p == '\t'))) p++;
@ -90,7 +104,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
p = arg + strlen(arg) - 1;
@@ -891,8 +909,12 @@ main(int argc, char *argv[])
@@ -891,8 +910,12 @@ main(int argc, char *argv[])
#ifndef _WIN32
signal(SIGPIPE, SIG_IGN);
@ -103,7 +117,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
#ifdef _WIN32
{
@@ -994,7 +1016,7 @@ main(int argc, char *argv[])
@@ -994,7 +1017,7 @@ main(int argc, char *argv[])
fprintf(logfp, "%s: can't fork: ", prog);
fperror(logfp, "");
@ -112,7 +126,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
prog, errno);
write_socket(csp->cfd, buf, strlen(buf));
@@ -1043,7 +1065,7 @@ safe_strerror(int err)
@@ -1043,7 +1066,7 @@ safe_strerror(int err)
#endif /* NOSTRERROR */
if(s == NULL) {

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-jcc_h,v 1.1 2010/05/24 22:17:03 espie Exp $
--- jcc.h.orig Tue May 25 00:13:09 2010
+++ jcc.h Tue May 25 00:14:30 2010
@@ -37,9 +37,9 @@ extern char *referrer;
extern char *uagent;
extern char *from;
-extern struct list wafer_list[];
-extern struct list xtra_list[];
-extern struct list trust_info[];
+extern struct list *wafer_list;
+extern struct list *xtra_list;
+extern struct list *trust_info;
extern struct url_spec * trust_list[];
extern int add_forwarded;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-loaders_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
--- loaders.c.orig Fri Oct 30 22:58:47 1998
+++ loaders.c Fri Jun 8 22:32:55 2001
@@ -8,7 +8,7 @@ char *loaders_rcs = "$Id: loaders.c,v 1.
$OpenBSD: patch-loaders_c,v 1.3 2010/05/24 22:17:03 espie Exp $
--- loaders.c.orig Sat Oct 31 04:58:47 1998
+++ loaders.c Sat May 22 16:47:47 2010
@@ -8,7 +8,7 @@ char *loaders_rcs = "$Id: loaders.c,v 1.24 1998/10/22
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
@ -28,7 +28,7 @@ $OpenBSD: patch-loaders_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
errcode = regcomp(b->url->preg, rebuf,
(REG_EXTENDED|REG_NOSUB|REG_ICASE));
@@ -399,7 +399,7 @@ load_cookiefile(struct client_state *csp
@@ -399,7 +399,7 @@ load_cookiefile(struct client_state *csp)
p = url_encode(html_code_map, cookiefile);
@ -37,7 +37,7 @@ $OpenBSD: patch-loaders_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
freez(p);
@@ -500,7 +500,7 @@ load_cookiefile(struct client_state *csp
@@ -500,7 +500,7 @@ load_cookiefile(struct client_state *csp)
int errcode;
char rebuf[BUFSIZ];
@ -64,7 +64,7 @@ $OpenBSD: patch-loaders_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
errcode = regcomp(b->url->preg, rebuf,
(REG_EXTENDED|REG_NOSUB|REG_ICASE));
@@ -816,7 +816,7 @@ load_forwardfile(struct client_state *cs
@@ -816,7 +816,7 @@ load_forwardfile(struct client_state *csp)
p = url_encode(html_code_map, forwardfile);
@ -73,7 +73,7 @@ $OpenBSD: patch-loaders_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
freez(p);
@@ -855,7 +855,7 @@ load_forwardfile(struct client_state *cs
@@ -855,7 +855,7 @@ load_forwardfile(struct client_state *csp)
continue;
}
@ -82,7 +82,7 @@ $OpenBSD: patch-loaders_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
reject = 1;
@@ -906,7 +906,7 @@ load_forwardfile(struct client_state *cs
@@ -906,7 +906,7 @@ load_forwardfile(struct client_state *csp)
int errcode;
char rebuf[BUFSIZ];

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-socks4_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
--- socks4.c.orig Fri Oct 30 22:58:47 1998
+++ socks4.c Fri Jun 8 22:19:00 2001
@@ -88,7 +88,7 @@ socks4_connect(struct gateway *gw, struc
$OpenBSD: patch-socks4_c,v 1.3 2010/05/24 22:17:03 espie Exp $
--- socks4.c.orig Sat Oct 31 04:58:47 1998
+++ socks4.c Sat May 22 16:47:48 2010
@@ -88,7 +88,7 @@ socks4_connect(struct gateway *gw, struct http_request
/* build a socks request for connection to the web server */
@ -10,7 +10,7 @@ $OpenBSD: patch-socks4_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
csiz = sizeof(*c) + sizeof(socks_userid) - 1;
@@ -103,7 +103,7 @@ socks4_connect(struct gateway *gw, struc
@@ -103,7 +103,7 @@ socks4_connect(struct gateway *gw, struct http_request
errno = EINVAL;
return(-1);
}
@ -19,7 +19,7 @@ $OpenBSD: patch-socks4_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
csiz = n;
break;
}
@@ -162,7 +162,7 @@ socks4_connect(struct gateway *gw, struc
@@ -162,7 +162,7 @@ socks4_connect(struct gateway *gw, struct http_request
default:
errstr = (char *) cbuf;
errno = ENOENT;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-ssplit_c,v 1.2 2001/06/09 02:36:49 angelos Exp $
--- ssplit.c.orig Fri Oct 30 22:58:47 1998
+++ ssplit.c Fri Jun 8 22:04:40 2001
@@ -18,6 +18,7 @@ char *ssplit_rcs = "$Id: ssplit.c,v 1.6
$OpenBSD: patch-ssplit_c,v 1.3 2010/05/24 22:17:03 espie Exp $
--- ssplit.c.orig Sat Oct 31 04:58:47 1998
+++ ssplit.c Sat May 22 16:47:48 2010
@@ -18,6 +18,7 @@ char *ssplit_rcs = "$Id: ssplit.c,v 1.6 1998/10/27 16:
* l = flag indicating whether to ignore leading field separators
*/
@ -9,7 +9,7 @@ $OpenBSD: patch-ssplit_c,v 1.2 2001/06/09 02:36:49 angelos Exp $
#include <string.h>
int ssplit(char *s, char *c, char *v[], int n, int m, int l)
@@ -58,7 +59,10 @@ int ssplit(char *s, char *c, char *v[],
@@ -58,7 +59,10 @@ int ssplit(char *s, char *c, char *v[], int n, int m,
xsize = 256;
@ -21,7 +21,7 @@ $OpenBSD: patch-ssplit_c,v 1.2 2001/06/09 02:36:49 angelos Exp $
x[xi++] = (char *) p; /* first pointer is the beginning of string */
@@ -73,6 +77,10 @@ int ssplit(char *s, char *c, char *v[],
@@ -73,6 +77,10 @@ int ssplit(char *s, char *c, char *v[], int n, int m,
char **new_x = (char **)
zalloc((new_xsize) * sizeof(char *));