pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/cdparanoia/patches



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.

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++;
+ 



Home | Main Index | Thread Index | Old Index