1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-27 10:03:20 +00:00

[patch] Fix compiler error in www/php-screw

php-screw is not C99 compatible: the author use "exit()"
	while C99 forbid.

PR:		56222
Submitted by:	"Kang Liu" <liukang@bjpu.edu.cn>
Approved by:	Alex Dupre <sysadmin@alexdupre.com>
This commit is contained in:
Edwin Groothuis 2003-11-04 11:54:17 +00:00
parent d1957b145f
commit d0778a9033
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=93056
2 changed files with 42 additions and 4 deletions

View File

@ -27,10 +27,6 @@ CONFIGURE_ARGS+=--enable-php_screw=shared
.include <bsd.port.pre.mk>
.include "${.CURDIR}/../../lang/php4/bsd.php.mk"
.if ${OSVERSION} >= 501000
BROKEN= "Does not compile"
.endif
pre-everything::
@${ECHO} ""
@${ECHO} "To achieve real security, define your own encryption"

View File

@ -0,0 +1,42 @@
--- tools/screw.c.orig Sun Aug 31 00:55:45 2003
+++ tools/screw.c Sun Aug 31 00:56:14 2003
@@ -18,12 +18,12 @@
if (argc != 2) {
fprintf(stderr, "Usage: filename.\n");
- exit();
+ exit(1);
}
fp = fopen(argv[1], "r");
if (fp == NULL) {
fprintf(stderr, "File not found(%s)\n", argv[1]);
- exit();
+ exit(1);
}
fstat(fileno(fp), &stat_buf);
@@ -36,13 +36,13 @@
if (memcmp(datap, PM9SCREW, PM9SCREW_LEN) == 0) {
fprintf(stderr, "Already Crypted(%s)\n", argv[1]);
- exit();
+ exit(1);
}
fp = fopen(oldfilename, "w");
if (fp == NULL) {
fprintf(stderr, "Can not create backup file(%s)\n", oldfilename);
- exit();
+ exit(1);
}
fwrite(datap, datalen, 1, fp);
fclose(fp);
@@ -56,7 +56,7 @@
fp = fopen(argv[1], "w");
if (fp == NULL) {
fprintf(stderr, "Can not create crypt file(%s)\n", oldfilename);
- exit();
+ exit(1);
}
fwrite(PM9SCREW, PM9SCREW_LEN, 1, fp);
fwrite(newdatap, newdatalen, 1, fp);