From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Dec 31 04:00:01 2012 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5C1DB39 for ; Mon, 31 Dec 2012 04:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 9DDF88FC12 for ; Mon, 31 Dec 2012 04:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBV4011n050456 for ; Mon, 31 Dec 2012 04:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBV401EZ050455; Mon, 31 Dec 2012 04:00:01 GMT (envelope-from gnats) Resent-Date: Mon, 31 Dec 2012 04:00:01 GMT Resent-Message-Id: <201212310400.qBV401EZ050455@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, Michael Gmelin Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D402AD4 for ; Mon, 31 Dec 2012 03:49:59 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id A26488FC08 for ; Mon, 31 Dec 2012 03:49:58 +0000 (UTC) Received: (qmail 62356 invoked by uid 0); 31 Dec 2012 03:49:51 -0000 Message-Id: <20121231034951.62355.qmail@mail.grem.de> Date: 31 Dec 2012 03:49:51 -0000 From: Michael Gmelin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/174852: [PATCH] devel/zthread: Patch to make zthread work with Clang and recent gcc Cc: glarkin@FreeBSD.org X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 04:00:01 -0000 >Number: 174852 >Category: ports >Synopsis: [PATCH] devel/zthread: Patch to make zthread work with Clang and recent gcc >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 31 04:00:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Michael Gmelin >Release: FreeBSD 9.0-RELEASE amd64 >Organization: Grem Equity GmbH >Environment: System: FreeBSD bsd64.grem.de 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC >Description: Scoping issue, won't compile on amd64 using clang. Also a return type specification issue clang is picky about. ../include/zthread/Guard.h:117:9: error: void function 'createScope' should not return a value [-Wreturn-type] return false; ^ ~~~~~ ../include/zthread/Guard.h:121:5: error: void function 'createScope' should not return a value [-Wreturn-type] return true; ../include/zthread/Guard.h:431:38: error: use of undeclared identifier 'extract' LockingPolicy::shareScope(*this, extract(g)); ^ ./ConditionImpl.h:235:40: note: in instantiation of function template specialization 'ZThread::Guard::Guard' requested here Guard g2(g1); ^ Condition.cxx:52:12: note: in instantiation of member function 'ZThread::ConditionImpl::wait' requested here _impl->wait(); ^ ../include/zthread/Guard.h:82:22: note: must qualify identifier to find this declaration in dependent base class static LockHolder& extract(T& t) { Port maintainer (glarkin@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix) >How-To-Repeat: Build using clang or gcc46/gcc47 >Fix: Apply the attached patch to specify the correct scope. --- zthread-2.3.2_2.patch begins here --- diff -ruN --exclude=CVS ../zthread.orig/Makefile ./Makefile --- ../zthread.orig/Makefile 2012-12-31 04:26:47.126767001 +0100 +++ ./Makefile 2012-12-31 04:29:27.803847188 +0100 @@ -1,13 +1,9 @@ -# New ports collection makefile for: ZThread -# Date created: 23 May 2001 -# Whom: pvh@egenetics.com -# -# $FreeBSD: ports/devel/zthread/Makefile,v 1.29 2012/11/17 05:57:07 svnexp Exp $ -# +# Created by: pvh@egenetics.com +# $FreeBSD: $ PORTNAME= zthread PORTVERSION= 2.3.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= SF/${PORTNAME}/ZThread/${PORTVERSION} DISTNAME= ZThread-${PORTVERSION} diff -ruN --exclude=CVS ../zthread.orig/files/patch-include__zthread__Guard.h ./files/patch-include__zthread__Guard.h --- ../zthread.orig/files/patch-include__zthread__Guard.h 2012-12-31 04:26:47.103633055 +0100 +++ ./files/patch-include__zthread__Guard.h 2012-12-31 04:42:24.083650068 +0100 @@ -1,5 +1,32 @@ ---- ./include/zthread/Guard.h.orig 2005-03-12 21:10:09.000000000 -0500 -+++ ./include/zthread/Guard.h 2009-04-23 15:03:09.000000000 -0400 +--- ./include/zthread/Guard.h.orig 2005-03-13 03:10:09.000000000 +0100 ++++ ./include/zthread/Guard.h 2012-12-31 04:25:54.167937596 +0100 +@@ -108,7 +108,7 @@ + } + + template +- static void createScope(LockHolder& l, unsigned long ms) { ++ static bool createScope(LockHolder& l, unsigned long ms) { + + if(Scope1::createScope(l, ms)) + if(!Scope2::createScope(l, ms)) { +@@ -428,7 +428,7 @@ + template + Guard(Guard& g) : LockHolder(g) { + +- LockingPolicy::shareScope(*this, extract(g)); ++ LockingPolicy::shareScope(*this, this->extract(g)); + + } + +@@ -458,7 +458,7 @@ + template + Guard(Guard& g, LockType& lock) : LockHolder(lock) { + +- LockingPolicy::transferScope(*this, extract(g)); ++ LockingPolicy::transferScope(*this, this->extract(g)); + + } + @@ -491,7 +491,7 @@ try { --- zthread-2.3.2_2.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: