From owner-svn-ports-head@freebsd.org Mon Apr 18 05:28:37 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 42253B125B6; Mon, 18 Apr 2016 05:28:37 +0000 (UTC) (envelope-from pi@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 0FA351761; Mon, 18 Apr 2016 05:28:36 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3I5SaB6021579; Mon, 18 Apr 2016 05:28:36 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3I5Sabj021578; Mon, 18 Apr 2016 05:28:36 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201604180528.u3I5Sabj021578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Mon, 18 Apr 2016 05:28:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r413549 - head/games/edge/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.21 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, 18 Apr 2016 05:28:37 -0000 Author: pi Date: Mon Apr 18 05:28:35 2016 New Revision: 413549 URL: https://svnweb.freebsd.org/changeset/ports/413549 Log: games/edge: Fix build with libc++ 3.8.0 - Replace abs() on unsigned arguments in games/edge PR: 208757 Submitted by: dim Added: head/games/edge/files/patch-epi__image_hq2x.cc (contents, props changed) Added: head/games/edge/files/patch-epi__image_hq2x.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/edge/files/patch-epi__image_hq2x.cc Mon Apr 18 05:28:35 2016 (r413549) @@ -0,0 +1,26 @@ +--- epi/image_hq2x.cc.orig 2009-10-18 12:33:23.000000000 +0200 ++++ epi/image_hq2x.cc 2016-04-12 22:06:00.628879000 +0200 +@@ -169,15 +169,20 @@ void Interp10(u8_t * dest, u32_t c1, u32 + #define PIXEL11_90 Interp9(dest+BpL+4, c[5], c[6], c[8]); + #define PIXEL11_100 Interp10(dest+BpL+4, c[5], c[6], c[8]); + ++static inline u32_t UDiff(u32_t u1, u32_t u2) ++{ ++ return (u1 >= u2) ? u1 - u2 : u2 - u1; ++} ++ + inline bool Diff(const u8_t p1, const u8_t p2) + { + u32_t YUV1 = PixelYUV[p1]; + u32_t YUV2 = PixelYUV[p2]; + + return (YUV1 & Amask) != (YUV2 & Amask) || +- (u32_t)abs((YUV1 & Ymask) - (YUV2 & Ymask)) > trY || +- (u32_t)abs((YUV1 & Umask) - (YUV2 & Umask)) > trU || +- (u32_t)abs((YUV1 & Vmask) - (YUV2 & Vmask)) > trV; ++ UDiff((YUV1 & Ymask), (YUV2 & Ymask)) > trY || ++ UDiff((YUV1 & Umask), (YUV2 & Umask)) > trU || ++ UDiff((YUV1 & Vmask), (YUV2 & Vmask)) > trV; + } + + void Setup(const u8_t *palette, int trans_pixel)