From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Apr 18 16:20:21 2006 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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C05A316A409 for ; Tue, 18 Apr 2006 16:20:21 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D30B443D5E for ; Tue, 18 Apr 2006 16:20:16 +0000 (GMT) (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 k3IGKGYh061852 for ; Tue, 18 Apr 2006 16:20:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k3IGKGgk061845; Tue, 18 Apr 2006 16:20:16 GMT (envelope-from gnats) Resent-Date: Tue, 18 Apr 2006 16:20:16 GMT Resent-Message-Id: <200604181620.k3IGKGgk061845@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, Gabor Kovesdan Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C33C116A403 for ; Tue, 18 Apr 2006 16:17:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id D79BD43D91 for ; Tue, 18 Apr 2006 16:17:06 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k3IGH6CS060093 for ; Tue, 18 Apr 2006 16:17:06 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k3IGH5Qm060092; Tue, 18 Apr 2006 16:17:05 GMT (envelope-from nobody) Message-Id: <200604181617.k3IGH5Qm060092@www.freebsd.org> Date: Tue, 18 Apr 2006 16:17:05 GMT From: Gabor Kovesdan To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/96013: [maintainer update] textproc/gsed: fix build on 4.X X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 16:20:22 -0000 >Number: 96013 >Category: ports >Synopsis: [maintainer update] textproc/gsed: fix build on 4.X >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Apr 18 16:20:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Gabor Kovesdan >Release: >Organization: n/a >Environment: >Description: The build error is caused by a 'bool' datatype introduced in gsed 4.1.5. GCC 2.95 is pre-C99 and doesn't handle the 'bool' datatype properly. The attached patch fixes the problem on FreeBSD 4.x Patch by: Rainer Alves >How-To-Repeat: >Fix: diff -ruN textproc/gsed.orig/Makefile textproc/gsed/Makefile --- textproc/gsed.orig/Makefile Sat Apr 15 20:41:25 2006 +++ textproc/gsed/Makefile Sat Apr 15 21:25:47 2006 @@ -32,6 +32,14 @@ PORTDOCS= AUTHORS BUGS COPYING COPYING.DOC NEWS README THANKS DOCSDIR= ${PREFIX}/share/doc/${PKGBASE} +.include + +# Required for gcc 2.95 since it is pre-C99 +# and doesn't handle the 'bool' datatype properly. +.if ${OSVERSION} < 500000 +EXTRA_PATCHES= ${FILESDIR}/extrapatch-lib-regexec.c +.endif + post-patch: @${REINPLACE_CMD} -e 's,^\* sed:,* CNU sed:,' \ ${WRKSRC}/doc/config.texi @@ -59,4 +67,4 @@ test: @cd ${WRKSRC}/testsuite; ${MAKE} check -.include +.include diff -ruN textproc/gsed.orig/files/extrapatch-lib-regexec.c textproc/gsed/files/extrapatch-lib-regexec.c --- textproc/gsed.orig/files/extrapatch-lib-regexec.c Wed Dec 31 21:00:00 1969 +++ textproc/gsed/files/extrapatch-lib-regexec.c Sat Apr 15 21:19:56 2006 @@ -0,0 +1,43 @@ +# +# Required for gcc 2.95 since it is pre-C99 +# and doesn't handle the 'bool' datatype properly. +# +--- lib/regexec.c.orig Sat Apr 15 20:53:36 2006 ++++ lib/regexec.c Sat Apr 15 21:17:03 2006 +@@ -3296,8 +3296,7 @@ + reg_errcode_t err; + int i, j, ch, need_word_trtable = 0; + bitset_word_t elem, mask; +- bool dests_node_malloced = false; +- bool dest_states_malloced = false; ++ int dests_node_malloced = 0, dest_states_malloced = 0; + int ndests; /* Number of the destination states from `state'. */ + re_dfastate_t **trtable; + re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; +@@ -3322,7 +3321,7 @@ + dests_alloc = re_malloc (struct dests_alloc, 1); + if (BE (dests_alloc == NULL, 0)) + return 0; +- dests_node_malloced = true; ++ dests_node_malloced = 1; + } + dests_node = dests_alloc->dests_node; + dests_ch = dests_alloc->dests_ch; +@@ -3371,7 +3370,7 @@ + free (dests_alloc); + return 0; + } +- dest_states_malloced = true; ++ dest_states_malloced = 1; + } + dest_states_word = dest_states + ndests; + dest_states_nl = dest_states_word + ndests; +@@ -3576,7 +3575,7 @@ + { + if (constraint & NEXT_NEWLINE_CONSTRAINT) + { +- bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); ++ int accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); + bitset_empty (accepts); + if (accepts_newline) + bitset_set (accepts, NEWLINE_CHAR); >Release-Note: >Audit-Trail: >Unformatted: