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 $ $OpenBSD: patch-encode_c,v 1.4 2010/05/24 22:17:03 espie Exp $
--- encode.c.orig Fri Oct 30 22:58:47 1998 --- encode.c.orig Sat Oct 31 04:58:47 1998
+++ encode.c Fri Jun 8 22:23:38 2001 +++ encode.c Sat May 22 16:47:47 2010
@@ -24,6 +24,7 @@ url_encode(char **code_map, unsigned cha @@ -24,6 +24,7 @@ url_encode(char **code_map, unsigned char *s)
char *buf; char *buf;
unsigned char c, *p; unsigned char c, *p;
char *m; 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; 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[' '] = "+"; 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); 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 */ /* 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 $ $OpenBSD: patch-filters_c,v 1.3 2010/05/24 22:17:03 espie Exp $
--- filters.c.orig Fri Oct 30 22:58:47 1998 --- filters.c.orig Sat Oct 31 04:58:47 1998
+++ filters.c Fri Jun 8 22:24:01 2001 +++ filters.c Sat May 22 16:47:47 2010
@@ -103,9 +103,12 @@ block_url(struct http_request *http, str @@ -103,9 +103,12 @@ block_url(struct http_request *http, struct client_sta
n += strlen(path); n += strlen(path);
n += strlen(spec); 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); hostport, path, spec);
freez(hostport); 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(path);
n += strlen(referrer); n += strlen(referrer);
@ -58,7 +58,7 @@ $OpenBSD: patch-filters_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
} }
return(*ret); 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(path );
n += strlen(pattern ); n += strlen(pattern );
@ -72,7 +72,7 @@ $OpenBSD: patch-filters_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
} }
freez(hostport); 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(hostport);
n += strlen(path ); n += strlen(path );
@ -86,7 +86,7 @@ $OpenBSD: patch-filters_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
} }
freez(hostport); 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"); p = strsav(p, "<h3>The following referrers are trusted</h3>\n");
for(tl = trust_list; (t = *tl) ; tl++) { 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 $ $OpenBSD: patch-gnu_regex_c,v 1.4 2010/05/24 22:17:03 espie Exp $
--- gnu_regex.c.orig Fri Oct 30 22:58:47 1998 --- gnu_regex.c.orig Sat Oct 31 04:58:47 1998
+++ gnu_regex.c Fri Jun 8 23:11:28 2001 +++ gnu_regex.c Sat May 22 16:47:47 2010
@@ -4909,15 +4909,7 @@ regerror (errcode, preg, errbuf, errbuf_ @@ -4909,15 +4909,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
msg_size = strlen (msg) + 1; /* Includes the null. */ msg_size = strlen (msg) + 1; /* Includes the null. */
if (errbuf_size != 0) 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 $ $OpenBSD: patch-jcc_c,v 1.6 2010/05/24 22:17:03 espie Exp $
--- jcc.c.orig Fri Oct 30 22:58:47 1998 --- jcc.c.orig Sat Oct 31 04:58:47 1998
+++ jcc.c Sat Jun 9 00:16:47 2001 +++ jcc.c Tue May 25 00:15:28 2010
@@ -226,7 +226,7 @@ chat(struct client_state *csp) @@ -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) { 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)); write_socket(csp->cfd, buf, strlen(buf));
return; return;
} }
@@ -369,12 +369,19 @@ chat(struct client_state *csp) @@ -369,12 +370,19 @@ chat(struct client_state *csp)
} }
if(errno == EINVAL) { 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)); 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); 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)); write_socket(csp->cfd, err, strlen(err));
freez(err); freez(err);
@@ -488,7 +498,7 @@ chat(struct client_state *csp) @@ -488,7 +499,7 @@ chat(struct client_state *csp)
fperror(logfp, ""); fperror(logfp, "");
eno = safe_strerror(errno); 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); freez(eno);
write_socket(csp->cfd, buf, strlen(buf)); write_socket(csp->cfd, buf, strlen(buf));
return; return;
@@ -606,6 +616,14 @@ server_thread(void *data) @@ -606,6 +617,14 @@ server_thread(void *data)
} }
#endif #endif
@ -72,7 +86,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
int int
main(int argc, char *argv[]) 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++; 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'; 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++; 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; 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 #ifndef _WIN32
signal(SIGPIPE, SIG_IGN); 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 #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); fprintf(logfp, "%s: can't fork: ", prog);
fperror(logfp, ""); fperror(logfp, "");
@ -112,7 +126,7 @@ $OpenBSD: patch-jcc_c,v 1.5 2005/11/14 17:23:36 pvalchev Exp $
prog, errno); prog, errno);
write_socket(csp->cfd, buf, strlen(buf)); 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 */ #endif /* NOSTRERROR */
if(s == NULL) { 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 $ $OpenBSD: patch-loaders_c,v 1.3 2010/05/24 22:17:03 espie Exp $
--- loaders.c.orig Fri Oct 30 22:58:47 1998 --- loaders.c.orig Sat Oct 31 04:58:47 1998
+++ loaders.c Fri Jun 8 22:32:55 2001 +++ loaders.c Sat May 22 16:47:47 2010
@@ -8,7 +8,7 @@ char *loaders_rcs = "$Id: loaders.c,v 1. @@ -8,7 +8,7 @@ char *loaders_rcs = "$Id: loaders.c,v 1.24 1998/10/22
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <string.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, errcode = regcomp(b->url->preg, rebuf,
(REG_EXTENDED|REG_NOSUB|REG_ICASE)); (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); 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); freez(p);
@@ -500,7 +500,7 @@ load_cookiefile(struct client_state *csp @@ -500,7 +500,7 @@ load_cookiefile(struct client_state *csp)
int errcode; int errcode;
char rebuf[BUFSIZ]; 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, errcode = regcomp(b->url->preg, rebuf,
(REG_EXTENDED|REG_NOSUB|REG_ICASE)); (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); 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); freez(p);
@@ -855,7 +855,7 @@ load_forwardfile(struct client_state *cs @@ -855,7 +855,7 @@ load_forwardfile(struct client_state *csp)
continue; continue;
} }
@ -82,7 +82,7 @@ $OpenBSD: patch-loaders_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
reject = 1; reject = 1;
@@ -906,7 +906,7 @@ load_forwardfile(struct client_state *cs @@ -906,7 +906,7 @@ load_forwardfile(struct client_state *csp)
int errcode; int errcode;
char rebuf[BUFSIZ]; char rebuf[BUFSIZ];

View File

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

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-ssplit_c,v 1.2 2001/06/09 02:36:49 angelos Exp $ $OpenBSD: patch-ssplit_c,v 1.3 2010/05/24 22:17:03 espie Exp $
--- ssplit.c.orig Fri Oct 30 22:58:47 1998 --- ssplit.c.orig Sat Oct 31 04:58:47 1998
+++ ssplit.c Fri Jun 8 22:04:40 2001 +++ ssplit.c Sat May 22 16:47:48 2010
@@ -18,6 +18,7 @@ char *ssplit_rcs = "$Id: ssplit.c,v 1.6 @@ -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 * 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> #include <string.h>
int ssplit(char *s, char *c, char *v[], int n, int m, int l) 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; 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 */ 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 **) char **new_x = (char **)
zalloc((new_xsize) * sizeof(char *)); zalloc((new_xsize) * sizeof(char *));