From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jun 4 09:10:05 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 434AE16A41F for ; Mon, 4 Jun 2007 09:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 2347D13C480 for ; Mon, 4 Jun 2007 09:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l549A4LS023601 for ; Mon, 4 Jun 2007 09:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l549A42O023600; Mon, 4 Jun 2007 09:10:04 GMT (envelope-from gnats) Resent-Date: Mon, 4 Jun 2007 09:10:04 GMT Resent-Message-Id: <200706040910.l549A42O023600@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, NAKAJI Hiroyuki Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98BEF16A469 for ; Mon, 4 Jun 2007 09:09:10 +0000 (UTC) (envelope-from nakaji@kankyo-u.ac.jp) Received: from d4407.kankyo-u.ac.jp (d4407.kankyo-u.ac.jp [202.216.78.81]) by mx1.freebsd.org (Postfix) with ESMTP id 3670A13C46A for ; Mon, 4 Jun 2007 09:09:09 +0000 (UTC) (envelope-from nakaji@kankyo-u.ac.jp) Received: from roddy.4407.kankyo-u.ac.jp (localhost [127.0.0.1]) by d4407.kankyo-u.ac.jp (8.14.1/8.13.8) with ESMTP id l54990ch047842; Mon, 4 Jun 2007 18:09:00 +0900 (JST) (envelope-from nakaji@roddy.4407.kankyo-u.ac.jp) Received: (from nakaji@localhost) by roddy.4407.kankyo-u.ac.jp (8.14.1/8.14.1/Submit) id l54990vi047838; Mon, 4 Jun 2007 18:09:00 +0900 (JST) (envelope-from nakaji) Message-Id: <200706040909.l54990vi047838@roddy.4407.kankyo-u.ac.jp> Date: Mon, 4 Jun 2007 18:09:00 +0900 (JST) From: NAKAJI Hiroyuki To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: mita@FreeBSD.org Subject: ports/113318: japanese/vflib cannot compile with gcc 4.2 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: NAKAJI Hiroyuki List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2007 09:10:05 -0000 >Number: 113318 >Category: ports >Synopsis: japanese/vflib cannot compile with gcc 4.2 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jun 04 09:10:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: NAKAJI Hiroyuki >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: System: FreeBSD roddy.4407.kankyo-u.ac.jp 7.0-CURRENT FreeBSD 7.0-CURRENT #82: Tue May 29 13:50:01 JST 2007 root@roddy.4407.kankyo-u.ac.jp:/usr/obj/usr/src/sys/RODDY i386 >Description: Gcc 4.2 cannot compile some files in VFlib. The order of function's prototypes is the problem, I think. >How-To-Repeat: Update your system to the latest 7.0-current, or install lang/gcc42 and set CC to gcc42. cd /usr/ports/japanese/vflib make all >Fix: Here is a diff from ports-current. Two files, files/VF_FNTWV.c and files/patch-fman.c, are added. diff -urN -x CVS -x work /usr/ports/japanese/vflib/Makefile ./Makefile --- /usr/ports/japanese/vflib/Makefile Sun May 20 08:23:06 2007 +++ ./Makefile Mon Jun 4 18:01:31 2007 @@ -7,7 +7,7 @@ PORTNAME= vflib PORTVERSION= ${VFLIB_VERSION} -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= japanese print MASTER_SITES= ftp://gull.se.hiroshima-u.ac.jp/pub/TypeHack/ DISTNAME= VFlib2-${PORTVERSION} diff -urN -x CVS -x work /usr/ports/japanese/vflib/files/patch-VF_FNTWV.c ./files/patch-VF_FNTWV.c --- /usr/ports/japanese/vflib/files/patch-VF_FNTWV.c Thu Jan 1 09:00:00 1970 +++ ./files/patch-VF_FNTWV.c Mon Jun 4 16:12:38 2007 @@ -0,0 +1,42 @@ +--- src/VF_FNTWV.c.orig Wed May 30 13:03:47 2001 ++++ src/VF_FNTWV.c Mon Jun 4 16:11:58 2007 +@@ -177,13 +177,13 @@ + + + ++Private int ReadCapa(); + Public FontObj* + CreateFont_FontWave(ent) + char *ent; + { + Font *font; + FontObj *fobj; +- Private int ReadCapa(); + + if ((font = (Font*) malloc(sizeof(Font))) == NULL){ + printf("in CreateFont malloc() Error!\n"); +@@ -217,22 +217,20 @@ + } + + ++Private int FNTWVOpenFont(); + Private int + OpenFont(obj) + FontObj *obj; + { +- Private int FNTWVOpenFont(); +- + return FNTWVOpenFont((Font*) obj->Locals); + } + + ++Private int FNTWVCloseFont(); + Private int + CloseFont(obj) + FontObj *obj; + { +- Private int FNTWVCloseFont(); +- + return FNTWVCloseFont((Font*) obj->Locals); + } + diff -urN -x CVS -x work /usr/ports/japanese/vflib/files/patch-fman.c ./files/patch-fman.c --- /usr/ports/japanese/vflib/files/patch-fman.c Thu Jan 1 09:00:00 1970 +++ ./files/patch-fman.c Mon Jun 4 16:09:49 2007 @@ -0,0 +1,115 @@ +--- src/fman.c.orig Mon May 10 17:05:20 1999 ++++ src/fman.c Mon Jun 4 16:08:50 2007 +@@ -471,6 +471,14 @@ + } + + ++Private void ++ReturnCache(cptr) ++ CACHE *cptr; ++{ ++ CDR_FREE_LIST(cptr) = FREE_LIST(); ++ FREE_LIST() = cptr; ++} ++ + /* + * CacheIt() --- cache it. The cache slot is moved into + * the head of the LRU list. +@@ -480,7 +488,6 @@ + int port; + { + CACHE *cptr; +- Private void ReturnCache(); + + if ((cptr = RequireCache()) == (CACHE*)NULL){ + fprintf(stderr, "VFlib: CacheIt() - error\n"); +@@ -521,19 +528,36 @@ + return cptr; + } + +-Private void +-ReturnCache(cptr) +- CACHE *cptr; +-{ +- CDR_FREE_LIST(cptr) = FREE_LIST(); +- FREE_LIST() = cptr; +-} +- + + /** + ** LRU LIST + **/ + ++Private int ++LRUPutTop2(cptr, f) ++ CACHE *cptr; ++ int f; ++{ ++ CACHE *cptr_f; ++ FILE_Port port; ++ int val; ++ ++ cptr_f = CacheLRUList.l_forw; ++ cptr->l_forw = cptr_f; ++ cptr_f->l_back = cptr; ++ cptr->l_back = &CacheLRUList; ++ CacheLRUList.l_forw = cptr; ++ ++ val = 0; ++ if (f == TRUE){ ++ port = cptr->port; ++ if (VFFM_Internal_Open(port) < 0) ++ val = -1; ++ } ++ ++ return val; ++} ++ + /* LRUMoveTop() - moves a cache block into the top of LRU list. + * THE CACHE *MUST* BE IN LRU LIST. + */ +@@ -542,7 +566,6 @@ + CACHE *cptr; + { + CACHE *cptr_b, *cptr_f; +- Private int LRUPutTop2(); + + cptr_b = cptr->l_back; + cptr_f = cptr->l_forw; +@@ -558,36 +581,9 @@ + LRUPutTop(cptr) + CACHE *cptr; + { +- Private int LRUPutTop2(); +- + return LRUPutTop2(cptr, TRUE); + } + +-Private int +-LRUPutTop2(cptr, f) +- CACHE *cptr; +- int f; +-{ +- CACHE *cptr_f; +- FILE_Port port; +- int val; +- +- cptr_f = CacheLRUList.l_forw; +- cptr->l_forw = cptr_f; +- cptr_f->l_back = cptr; +- cptr->l_back = &CacheLRUList; +- CacheLRUList.l_forw = cptr; +- +- val = 0; +- if (f == TRUE){ +- port = cptr->port; +- if (VFFM_Internal_Open(port) < 0) +- val = -1; +- } +- +- return val; +-} +- + + Private int + LRUDeleteTail() >Release-Note: >Audit-Trail: >Unformatted: