Received: by mail.netbsd.org (Postfix, from userid 605) id D1F3084DA0; Thu, 27 Sep 2018 19:35:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D5E7E84CCE for ; Thu, 27 Sep 2018 19:35:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 42iUUcPpK-F2 for ; Thu, 27 Sep 2018 19:35:09 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 13BF784C8D for ; Thu, 27 Sep 2018 19:35:09 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 0D242FBEE; Thu, 27 Sep 2018 19:35:09 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1538076909218740" MIME-Version: 1.0 Date: Thu, 27 Sep 2018 19:35:09 +0000 From: =?UTF-8?B?RnLDqWTDqXJpYyBGYXViZXJ0ZWF1?= Subject: CVS commit: pkgsrc/audio/cdparanoia/patches To: pkgsrc-changes@NetBSD.org Reply-To: triaxx@netbsd.org X-Mailer: log_accum Message-Id: <20180927193509.0D242FBEE@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1538076909218740 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: triaxx Date: Thu Sep 27 19:35:08 UTC 2018 Added Files: pkgsrc/audio/cdparanoia/patches: patch-paranoia_overlap.c Log Message: cdparanoia: fix warnings with abs() on FreeBSD To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ pkgsrc/audio/cdparanoia/patches/patch-paranoia_overlap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1538076909218740 Content-Disposition: inline Content-Length: 1294 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Added files: Index: pkgsrc/audio/cdparanoia/patches/patch-paranoia_overlap.c diff -u /dev/null pkgsrc/audio/cdparanoia/patches/patch-paranoia_overlap.c:1.1 --- /dev/null Thu Sep 27 19:35:08 2018 +++ pkgsrc/audio/cdparanoia/patches/patch-paranoia_overlap.c Thu Sep 27 19:35:08 2018 @@ -0,0 +1,30 @@ +$NetBSD: patch-paranoia_overlap.c,v 1.1 2018/09/27 19:35:08 triaxx Exp $ + +Fix lossy conversion with abs() on FreeBSD. + +--- paranoia/overlap.c.orig 2008-08-06 18:27:41.000000000 +0000 ++++ paranoia/overlap.c +@@ -107,7 +107,11 @@ void offset_adjust_settings(cdrom_parano + sector, frob it. We just want a little hysteresis [sp?]*/ + long av=(p->stage2.offpoints?p->stage2.offaccum/p->stage2.offpoints:0); + ++#if defined(__FreeBSD__) ++ if(labs(av)>p->dynoverlap/4){ ++#else + if(abs(av)>p->dynoverlap/4){ ++#endif + av=(av/MIN_SECTOR_EPSILON)*MIN_SECTOR_EPSILON; + + if(callback)(*callback)(ce(p->root.vector),PARANOIA_CB_DRIFT); +@@ -207,7 +211,11 @@ void offset_add_value(cdrom_paranoia *p, + if(o->offpoints!=-1){ + + /* Track the average magnitude of jitter (in either direction) */ ++#if defined(__FreeBSD__) ++ o->offdiff+=labs(value); ++#else + o->offdiff+=abs(value); ++#endif + o->offpoints++; + o->newpoints++; + --_----------=_1538076909218740--