Mon Dec 24 21:13:28 2012 UTC ()
Fix inline usage.


(joerg)
diff -r1.5 -r1.6 pkgsrc/ham/gmfsk/distinfo
diff -r1.1 -r1.2 pkgsrc/ham/gmfsk/patches/patch-aa
diff -r0 -r1.1 pkgsrc/ham/gmfsk/patches/patch-src_misc_cmplx.h
diff -r0 -r1.1 pkgsrc/ham/gmfsk/patches/patch-src_misc_filter-i386.h
diff -r0 -r1.1 pkgsrc/ham/gmfsk/patches/patch-src_misc_filter.h

cvs diff -r1.5 -r1.6 pkgsrc/ham/gmfsk/distinfo (expand / switch to unified diff)

--- pkgsrc/ham/gmfsk/distinfo 2006/12/28 11:54:47 1.5
+++ pkgsrc/ham/gmfsk/distinfo 2012/12/24 21:13:28 1.6
@@ -1,11 +1,14 @@ @@ -1,11 +1,14 @@
1$NetBSD: distinfo,v 1.5 2006/12/28 11:54:47 wulf Exp $ 1$NetBSD: distinfo,v 1.6 2012/12/24 21:13:28 joerg Exp $
2 2
3SHA1 (gmfsk-0.6.tar.gz) = 2738bc2b83eb8f2001ed2503c466123ce4b258a5 3SHA1 (gmfsk-0.6.tar.gz) = 2738bc2b83eb8f2001ed2503c466123ce4b258a5
4RMD160 (gmfsk-0.6.tar.gz) = 532d2454ccc7fab36e707002c6fda7f9e2ec14cd 4RMD160 (gmfsk-0.6.tar.gz) = 532d2454ccc7fab36e707002c6fda7f9e2ec14cd
5Size (gmfsk-0.6.tar.gz) = 540765 bytes 5Size (gmfsk-0.6.tar.gz) = 540765 bytes
6SHA1 (patch-aa) = 49720c6bb4689768ce14e76aae39fd155739ca31 6SHA1 (patch-aa) = 1a919f2ea16f9ed23d490e8f4654dabb19295882
7SHA1 (patch-ab) = a40132dddf93e88b166a4d9a5428e1e15dee3ccd 7SHA1 (patch-ab) = a40132dddf93e88b166a4d9a5428e1e15dee3ccd
8SHA1 (patch-ac) = a936811e68d84ddb286f568519006521c4c5be89 8SHA1 (patch-ac) = a936811e68d84ddb286f568519006521c4c5be89
9SHA1 (patch-ad) = dbdb75d3c1d617ead1903d6645dd83c930a37a7b 9SHA1 (patch-ad) = dbdb75d3c1d617ead1903d6645dd83c930a37a7b
10SHA1 (patch-ae) = 57048286392c811170f8519078e95fa89c06f3ee 10SHA1 (patch-ae) = 57048286392c811170f8519078e95fa89c06f3ee
11SHA1 (patch-af) = 5edcf28f17b4255d67d9df103eb70980e7f3e397 11SHA1 (patch-af) = 5edcf28f17b4255d67d9df103eb70980e7f3e397
 12SHA1 (patch-src_misc_cmplx.h) = b429594c6eb4d2821030fbea2ab1546aa9a01173
 13SHA1 (patch-src_misc_filter-i386.h) = 71c7e1092fc9b4680d2c89c0ecdf4d8933abaf14
 14SHA1 (patch-src_misc_filter.h) = 54acabd541e68e8363a5169f631a1966f8c850ba

cvs diff -r1.1 -r1.2 pkgsrc/ham/gmfsk/patches/patch-aa (expand / switch to unified diff)

--- pkgsrc/ham/gmfsk/patches/patch-aa 2006/04/26 01:52:18 1.1
+++ pkgsrc/ham/gmfsk/patches/patch-aa 2012/12/24 21:13:28 1.2
@@ -1,30 +1,146 @@ @@ -1,30 +1,146 @@
1$NetBSD: patch-aa,v 1.1 2006/04/26 01:52:18 wulf Exp $ 1$NetBSD: patch-aa,v 1.2 2012/12/24 21:13:28 joerg Exp $
2 2
3--- src/misc/misc.h.orig 2006-04-26 10:32:02.000000000 +0930 3--- src/misc/misc.h.orig 2004-04-13 12:45:19.000000000 +0000
4+++ src/misc/misc.h 2006-04-26 10:31:20.000000000 +0930 4+++ src/misc/misc.h
5@@ -104,25 +104,6 @@ 5@@ -32,7 +32,7 @@
 6 /*
 7 * Hamming weight (number of bits that are ones).
 8 */
 9-extern inline unsigned int hweight32(unsigned int w)
 10+__attribute__((gnu_inline)) extern inline unsigned int hweight32(unsigned int w)
 11 {
 12 w = (w & 0x55555555) + ((w >> 1) & 0x55555555);
 13 w = (w & 0x33333333) + ((w >> 2) & 0x33333333);
 14@@ -42,7 +42,7 @@ extern inline unsigned int hweight32(uns
 15 return w;
 16 }
 17
 18-extern inline unsigned int hweight16(unsigned short w)
 19+__attribute__((gnu_inline)) extern inline unsigned int hweight16(unsigned short w)
 20 {
 21 w = (w & 0x5555) + ((w >> 1) & 0x5555);
 22 w = (w & 0x3333) + ((w >> 2) & 0x3333);
 23@@ -51,7 +51,7 @@ extern inline unsigned int hweight16(uns
 24 return w;
 25 }
 26
 27-extern inline unsigned int hweight8(unsigned char w)
 28+__attribute__((gnu_inline)) extern inline unsigned int hweight8(unsigned char w)
 29 {
 30 w = (w & 0x55) + ((w >> 1) & 0x55);
 31 w = (w & 0x33) + ((w >> 2) & 0x33);
 32@@ -64,7 +64,7 @@ extern inline unsigned int hweight8(unsi
 33 /*
 34 * Parity function. Return one if `w' has odd number of ones, zero otherwise.
 35 */
 36-extern inline int parity(unsigned int w)
 37+__attribute__((gnu_inline)) extern inline int parity(unsigned int w)
 38 {
 39 return hweight32(w) & 1;
 40 }
 41@@ -74,7 +74,7 @@ extern inline int parity(unsigned int w)
 42 /*
 43 * Reverse order of bits.
 44 */
 45-extern inline unsigned int rbits32(unsigned int w)
 46+__attribute__((gnu_inline)) extern inline unsigned int rbits32(unsigned int w)
 47 {
 48 w = ((w >> 1) & 0x55555555) | ((w << 1) & 0xAAAAAAAA);
 49 w = ((w >> 2) & 0x33333333) | ((w << 2) & 0xCCCCCCCC);
 50@@ -84,7 +84,7 @@ extern inline unsigned int rbits32(unsig
 51 return w;
 52 }
 53
 54-extern inline unsigned short rbits16(unsigned short w)
 55+__attribute__((gnu_inline)) extern inline unsigned short rbits16(unsigned short w)
 56 {
 57 w = ((w >> 1) & 0x5555) | ((w << 1) & 0xAAAA);
 58 w = ((w >> 2) & 0x3333) | ((w << 2) & 0xCCCC);
 59@@ -93,7 +93,7 @@ extern inline unsigned short rbits16(uns
 60 return w;
 61 }
 62
 63-extern inline unsigned char rbits8(unsigned char w)
 64+__attribute__((gnu_inline)) extern inline unsigned char rbits8(unsigned char w)
 65 {
 66 w = ((w >> 1) & 0x55) | ((w << 1) & 0xFF);
 67 w = ((w >> 2) & 0x33) | ((w << 2) & 0xCC);
 68@@ -104,28 +104,9 @@ extern inline unsigned char rbits8(unsig
6 /* ---------------------------------------------------------------------- */ 69 /* ---------------------------------------------------------------------- */
7  70
8 /* 71 /*
9- * Integer base-2 logarithm 72- * Integer base-2 logarithm
10- */ 73- */
11-extern inline int log2(unsigned int x) 74-extern inline int log2(unsigned int x)
12-{ 75-{
13- int y = 0; 76- int y = 0;
14- 77-
15- x >>= 1; 78- x >>= 1;
16- 79-
17- while (x) { 80- while (x) {
18- x >>= 1; 81- x >>= 1;
19- y++; 82- y++;
20- } 83- }
21- 84-
22- return y; 85- return y;
23-} 86-}
24- 87-
25-/* ---------------------------------------------------------------------- */ 88-/* ---------------------------------------------------------------------- */
26- 89-
27-/* 90-/*
28 * Gray encoding and decoding (8 bit) 91 * Gray encoding and decoding (8 bit)
29 */ 92 */
30 extern inline unsigned char grayencode(unsigned char data) 93-extern inline unsigned char grayencode(unsigned char data)
 94+__attribute__((gnu_inline)) extern inline unsigned char grayencode(unsigned char data)
 95 {
 96 unsigned char bits = data;
 97
 98@@ -140,7 +121,7 @@ extern inline unsigned char grayencode(u
 99 return bits;
 100 }
 101
 102-extern inline unsigned char graydecode(unsigned char data)
 103+__attribute__((gnu_inline)) extern inline unsigned char graydecode(unsigned char data)
 104 {
 105 return data ^ (data >> 1);
 106 }
 107@@ -150,7 +131,7 @@ extern inline unsigned char graydecode(u
 108 /*
 109 * Hamming window function
 110 */
 111-extern inline double hamming(double x)
 112+__attribute__((gnu_inline)) extern inline double hamming(double x)
 113 {
 114 return 0.54 - 0.46 * cos(2 * M_PI * x);
 115 }
 116@@ -160,26 +141,26 @@ extern inline double hamming(double x)
 117 /*
 118 * Sinc etc...
 119 */
 120-extern inline double sinc(double x)
 121+__attribute__((gnu_inline)) extern inline double sinc(double x)
 122 {
 123 return (fabs(x) < 1e-10) ? 1.0 : (sin(M_PI * x) / (M_PI * x));
 124 }
 125
 126-extern inline double cosc(double x)
 127+__attribute__((gnu_inline)) extern inline double cosc(double x)
 128 {
 129 return (fabs(x) < 1e-10) ? 0.0 : ((1.0 - cos(M_PI * x)) / (M_PI * x));
 130 }
 131
 132 /* ---------------------------------------------------------------------- */
 133
 134-extern inline float clamp(float x, float min, float max)
 135+__attribute__((gnu_inline)) extern inline float clamp(float x, float min, float max)
 136 {
 137 return (x < min) ? min : ((x > max) ? max : x);
 138 }
 139
 140 /* ---------------------------------------------------------------------- */
 141
 142-extern inline float decayavg(float average, float input, float weight)
 143+__attribute__((gnu_inline)) extern inline float decayavg(float average, float input, float weight)
 144 {
 145 return input * (1.0 / weight) + average * (1.0 - (1.0 / weight));
 146 }

File Added: pkgsrc/ham/gmfsk/patches/patch-src_misc_cmplx.h
$NetBSD: patch-src_misc_cmplx.h,v 1.1 2012/12/24 21:13:28 joerg Exp $

--- src/misc/cmplx.h.orig	2012-12-23 17:55:27.000000000 +0000
+++ src/misc/cmplx.h
@@ -43,7 +43,7 @@ typedef fftw_complex complex;
 /*
  * Complex multiplication.
  */
-extern __inline__ complex cmul(complex x, complex y)
+__attribute__((gnu_inline)) extern __inline__ complex cmul(complex x, complex y)
 {
 	complex z;
 
@@ -56,7 +56,7 @@ extern __inline__ complex cmul(complex x
 /*
  * Complex addition.
  */
-extern __inline__ complex cadd(complex x, complex y)
+__attribute__((gnu_inline)) extern __inline__ complex cadd(complex x, complex y)
 {
 	complex z;
 
@@ -69,7 +69,7 @@ extern __inline__ complex cadd(complex x
 /*
  * Complex subtraction.
  */
-extern __inline__ complex csub(complex x, complex y)
+__attribute__((gnu_inline)) extern __inline__ complex csub(complex x, complex y)
 {
 	complex z;
 
@@ -82,7 +82,7 @@ extern __inline__ complex csub(complex x
 /*
  * Complex multiply-accumulate.
  */
-extern __inline__ complex cmac(complex *a, complex *b, int ptr, int len)
+__attribute__((gnu_inline)) extern __inline__ complex cmac(complex *a, complex *b, int ptr, int len)
 {
 	complex z;
 	int i;
@@ -104,7 +104,7 @@ extern __inline__ complex cmac(complex *
  * Complex ... yeah, what??? Returns a complex number that has the
  * properties: |z| = |x| * |y|  and  arg(z) = arg(y) - arg(x)
  */
-extern __inline__ complex ccor(complex x, complex y)
+__attribute__((gnu_inline)) extern __inline__ complex ccor(complex x, complex y)
 {
 	complex z;
 
@@ -117,7 +117,7 @@ extern __inline__ complex ccor(complex x
 /*
  * Real part of the complex ???
  */
-extern __inline__ double ccorI(complex x, complex y)
+__attribute__((gnu_inline)) extern __inline__ double ccorI(complex x, complex y)
 {
 	return c_re(x) * c_re(y) + c_im(x) * c_im(y);
 }
@@ -125,7 +125,7 @@ extern __inline__ double ccorI(complex x
 /*
  * Imaginary part of the complex ???
  */
-extern __inline__ double ccorQ(complex x, complex y)
+__attribute__((gnu_inline)) extern __inline__ double ccorQ(complex x, complex y)
 {
 	return c_re(x) * c_im(y) - c_im(x) * c_re(y);
 }
@@ -133,7 +133,7 @@ extern __inline__ double ccorQ(complex x
 /*
  * Modulo (absolute value) of a complex number.
  */
-extern __inline__ double cmod(complex x)
+__attribute__((gnu_inline)) extern __inline__ double cmod(complex x)
 {
 	return sqrt(c_re(x) * c_re(x) + c_im(x) * c_im(x));
 }
@@ -141,7 +141,7 @@ extern __inline__ double cmod(complex x)
 /*
  * Square of the absolute value (power).
  */
-extern __inline__ double cpwr(complex x)
+__attribute__((gnu_inline)) extern __inline__ double cpwr(complex x)
 {
 	return (c_re(x) * c_re(x) + c_im(x) * c_im(x));
 }
@@ -149,7 +149,7 @@ extern __inline__ double cpwr(complex x)
 /*
  * Argument of a complex number.
  */
-extern __inline__ double carg(complex x)
+__attribute__((gnu_inline)) extern __inline__ double carg(complex x)
 {
 	return atan2(c_im(x), c_re(x));
 }
@@ -157,7 +157,7 @@ extern __inline__ double carg(complex x)
 /*
  * Complex square root.
  */
-extern __inline__ complex csqrt(complex x)
+__attribute__((gnu_inline)) extern __inline__ complex csqrt(complex x)
 {
 	complex z;
 

File Added: pkgsrc/ham/gmfsk/patches/patch-src_misc_filter-i386.h
$NetBSD: patch-src_misc_filter-i386.h,v 1.1 2012/12/24 21:13:28 joerg Exp $

--- src/misc/filter-i386.h.orig	2012-12-23 17:57:26.000000000 +0000
+++ src/misc/filter-i386.h
@@ -32,7 +32,7 @@
 
 #include <stdio.h>
 
-extern inline float __mac_g(const float *a, const float *b, unsigned int size)
+__attribute__((gnu_inline)) extern inline float __mac_g(const float *a, const float *b, unsigned int size)
 {
 	float sum = 0;
 	unsigned int i;
@@ -42,7 +42,7 @@ extern inline float __mac_g(const float 
 	return sum;
 }
 
-extern inline float __mac_c(const float *a, const float *b, unsigned int size)
+__attribute__((gnu_inline)) extern inline float __mac_c(const float *a, const float *b, unsigned int size)
 {
 	float f;
 

File Added: pkgsrc/ham/gmfsk/patches/patch-src_misc_filter.h
$NetBSD: patch-src_misc_filter.h,v 1.1 2012/12/24 21:13:28 joerg Exp $

--- src/misc/filter.h.orig	2012-12-23 17:57:04.000000000 +0000
+++ src/misc/filter.h
@@ -39,7 +39,7 @@
 
 
 #ifndef __HAVE_ARCH_MAC
-extern __inline__ float mac(const float *a, const float *b, unsigned int size)
+__attribute__((gnu_inline)) extern __inline__ float mac(const float *a, const float *b, unsigned int size)
 {
 	float sum = 0;
 	unsigned int i;