From liukang@bjpu.edu.cn  Sat Aug 30 20:51:16 2003
Return-Path: <liukang@bjpu.edu.cn>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0BED216A4BF
	for <freebsd-gnats-submit@freebsd.org>; Sat, 30 Aug 2003 20:51:16 -0700 (PDT)
Received: from bjpu.edu.cn (egw.bjpu.edu.cn [202.112.78.77])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B873143FB1
	for <freebsd-gnats-submit@freebsd.org>; Sat, 30 Aug 2003 20:51:14 -0700 (PDT)
	(envelope-from liukang@bjpu.edu.cn)
Received: (eyou gateway send program); Sun, 31 Aug 2003 11:52:26 +0800
Received: from unknown (HELO ssc) (unknown@211.150.182.194)
 by 202.112.78.77 with ; Sun, 31 Aug 2003 11:52:26 +0800
Message-Id: <000001c36f73$e86bd8d0$c2b696d3@ssc>
Date: Sun, 31 Aug 2003 11:56:48 +0800
From: "Kang Liu" <liukang@bjpu.edu.cn>
To: <FreeBSD-gnats-submit@freebsd.org>
Subject: [patch] Fix compiler error in www/php-screw

>Number:         56222
>Category:       ports
>Synopsis:       [patch] Fix compiler error in www/php-screw
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 30 21:00:30 PDT 2003
>Closed-Date:    Tue Nov 04 03:54:22 PST 2003
>Last-Modified:  Tue Nov 04 03:54:22 PST 2003
>Originator:     Kang Liu
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Beijing University of Technology
>Environment:
System: FreeBSD 5.1-CURRENT i386
>Description:
php-screw is not C99 compatible: the author use "exit()" while C99 forbid.
>How-To-Repeat:
Run make in ${PORTSDIR}/www/php-screw on a 5.1-current machine.
(bento)
>Fix:
diff -ruN php-screw.orig/Makefile php-screw/Makefile
--- php-screw.orig/Makefile	Sat Jun  7 03:04:58 2003
+++ php-screw/Makefile	Sun Aug 31 01:07:19 2003
@@ -7,6 +7,7 @@

 PORTNAME=	php-screw
 PORTVERSION=	1.2.1
+PORTREVISION=	1
 CATEGORIES=	www security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
diff -ruN php-screw.orig/files/patch-tools::screw.c php-screw/files/patch-tools::screw.c
--- php-screw.orig/files/patch-tools::screw.c	Thu Jan  1 08:00:00 1970
+++ php-screw/files/patch-tools::screw.c	Sun Aug 31 00:57:47 2003
@@ -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);


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Tue Nov 4 03:53:31 PST 2003 
State-Changed-Why:  
Commited, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56222 
>Unformatted:
