From owner-svn-ports-head@freebsd.org Mon Nov 28 20:55:20 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 066E4C5979B; Mon, 28 Nov 2016 20:55:20 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B195F1576; Mon, 28 Nov 2016 20:55:19 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uASKtIGS066291; Mon, 28 Nov 2016 20:55:18 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uASKtIax066290; Mon, 28 Nov 2016 20:55:18 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201611282055.uASKtIax066290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Mon, 28 Nov 2016 20:55:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r427346 - head/net-im/kmess-kde4/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 20:55:20 -0000 Author: tcberner Date: Mon Nov 28 20:55:18 2016 New Revision: 427346 URL: https://svnweb.freebsd.org/changeset/ports/427346 Log: net-im/kmess-kde4 : fix 'abs is ambiguous' Work around the call to abs() being ambigous by simply calculating the absolute value in place. PR: 214632 Approved by: just fix it, rakuco (mentor) Added: head/net-im/kmess-kde4/files/patch-src_utils_xautolock.cpp (contents, props changed) Added: head/net-im/kmess-kde4/files/patch-src_utils_xautolock.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/kmess-kde4/files/patch-src_utils_xautolock.cpp Mon Nov 28 20:55:18 2016 (r427346) @@ -0,0 +1,27 @@ +/wrkdirs/usr/ports/net-im/kmess-kde4/work/kmess-2.0.6.2/src/utils/xautolock.cpp:110:7: error: call to 'abs' is ambiguous + if( abs( lastCheck_ - now ) > 120 ) + ^~~ +/usr/include/stdlib.h:83:6: note: candidate function +int abs(int) __pure2; + ^ +/usr/include/c++/v1/stdlib.h:115:44: note: candidate function +inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} + ^ +/usr/include/c++/v1/stdlib.h:117:44: note: candidate function +inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} + ^ + +--- src/utils/xautolock.cpp.orig 2012-02-17 20:16:31 UTC ++++ src/utils/xautolock.cpp +@@ -106,8 +106,9 @@ void XAutoLock::checkIdle() + unsigned long timeIdle; + + now = (uint)time( 0 ); +- +- if( abs( lastCheck_ - now ) > 120 ) ++ ++ unsigned int delta = (lastCheck_ > now ? lastCheck_ - now : now - lastCheck_); ++ if( delta > 120 ) + { + // Whoah, two minutes since we were last called? Something strange is happening... + resetTimer();