1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

- Fix build errors and warnings on gcc 4

This commit is contained in:
Rong-En Fan 2007-02-04 12:15:56 +00:00
parent bfb674769c
commit 2d4154b86a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=184125
7 changed files with 129 additions and 13 deletions

View File

@ -0,0 +1,10 @@
--- base64.c.orig Sun Feb 4 20:11:49 2007
+++ base64.c Sun Feb 4 20:11:59 2007
@@ -40,6 +40,7 @@
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include "config.h"

View File

@ -1,6 +1,12 @@
--- cfg_functions.c.orig Tue Feb 12 23:29:15 2002
+++ cfg_functions.c Mon Jun 26 02:38:18 2006
@@ -29,10 +29,10 @@
--- cfg_functions.c.orig Tue Feb 12 22:29:15 2002
+++ cfg_functions.c Sun Feb 4 20:07:31 2007
@@ -25,14 +25,16 @@
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <fnmatch.h>
#include <regex.h>
#include <syslog.h>
#include <unistd.h>
@ -13,3 +19,20 @@
#include "y.tab.h"
#include "twhttpd.h"
@@ -588,14 +590,14 @@
// change forward destination
int cfg_set_forward(http_header *hd, void *value, void *value2, int property)
{
- (void *)hd->forward = (void *)value;
+ hd->forward = (struct sockaddr_in *)value;
return 1;
}
// change web or proxy mode
int cfg_set_forward_proxy(http_header *hd, void *value, void *value2, int property)
{
- (void *)hd->forward_proxy = (void *)value;
+ hd->forward_proxy = (int *)value;
return 1;
}

View File

@ -0,0 +1,13 @@
--- cfg_parser.l.orig Sun Feb 4 20:01:24 2007
+++ cfg_parser.l Sun Feb 4 20:11:01 2007
@@ -22,7 +22,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
-
+
+#include <string.h>
+
#include "y.tab.h"
int yylineno=1;

View File

@ -1,10 +1,12 @@
--- cfg_parser.y.orig Sat Aug 31 12:41:16 2002
+++ cfg_parser.y Mon Jun 26 02:40:51 2006
@@ -27,10 +27,10 @@
--- cfg_parser.y.orig Sat Aug 31 11:41:16 2002
+++ cfg_parser.y Sun Feb 4 20:06:36 2007
@@ -27,10 +27,12 @@
#include <regex.h>
#include <errno.h>
#include <stdio.h>
-#include <arpa/inet.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@ -12,3 +14,46 @@
#include "config.h"
#include "cfg_functions.h"
@@ -467,8 +469,8 @@
$$ = (decision_tree *)cf_malloc(sizeof(decision_tree));
init_dt($$);
$$->f = &cfg_numeric_test;
- (cfg_variable *)$$->value = $1;
- (int *)$$->value2 = (int *)cf_malloc(sizeof(int));
+ $$->value = $1;
+ $$->value2 = cf_malloc(sizeof(int));
*(int *)$$->value2 = $3;
$$->property = $2;
}
@@ -563,7 +565,7 @@
$$ = (decision_tree *)cf_malloc(sizeof(decision_tree));
init_dt($$);
$$->f = &cfg_set_location;
- (char *)$$->value = strdup($3);
+ $$->value = strdup($3);
}
;
@@ -623,19 +625,19 @@
num_var: PORT
{
- (cfg_variable *)$$ = (cfg_variable *)cf_malloc(sizeof(cfg_variable));
+ $$ = (cfg_variable *)cf_malloc(sizeof(cfg_variable));
$$->type = PORT;
$$->f = NULL;
}
| POST_LEN
{
- (cfg_variable *)$$ = (cfg_variable *)cf_malloc(sizeof(cfg_variable));
+ $$ = (cfg_variable *)cf_malloc(sizeof(cfg_variable));
$$->type = POST_LEN;
$$->f = NULL;
}
| STRLEN '(' str_var ')'
{
- (cfg_variable *)$$ = (cfg_variable *)cf_malloc(sizeof(cfg_variable));
+ $$ = (cfg_variable *)cf_malloc(sizeof(cfg_variable));
$$->type = $3;
$$->f = &cfg_strlen;
}

View File

@ -0,0 +1,10 @@
--- htpasswd.c.orig Sun Feb 4 20:13:04 2007
+++ htpasswd.c Sun Feb 4 20:12:32 2007
@@ -41,6 +41,7 @@
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include <string.h>
#include <pwd.h>
#define MAX_PASS 32

View File

@ -1,8 +1,10 @@
--- httplog.c.orig Sat Dec 8 23:15:44 2001
+++ httplog.c Mon Jun 26 02:36:09 2006
@@ -40,10 +40,11 @@
--- httplog.c.orig Sat Dec 8 22:15:44 2001
+++ httplog.c Sun Feb 4 20:10:16 2007
@@ -39,11 +39,13 @@
#include <time.h>
#include <stdio.h>
+#include <string.h>
#include <syslog.h>
+#include <sys/types.h>
+#include <sys/socket.h>
@ -14,3 +16,10 @@
#include "config.h"
#include "structs.h"
@@ -151,4 +153,4 @@
}
}
}
-}
\ No newline at end of file
+}

View File

@ -1,6 +1,12 @@
--- twhttpd.c.orig Tue Apr 1 13:06:08 2003
+++ twhttpd.c Mon Jun 26 02:47:58 2006
@@ -33,10 +33,11 @@
--- twhttpd.c.orig Tue Apr 1 12:06:08 2003
+++ twhttpd.c Sun Feb 4 20:07:02 2007
@@ -28,15 +28,17 @@
#include <netdb.h>
#include <regex.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <signal.h>
#include <time.h>
#include <unistd.h>
@ -15,7 +21,7 @@
#include <sys/stat.h>
#include <sys/time.h>
@@ -4014,7 +4015,7 @@
@@ -4014,7 +4016,7 @@
lz_flush(hd->fd, &hd->fd_lzb);
}
syslog(LOG_ERR, "Exiting Testing Server\n");