diff options
author | joerg <joerg> | 2012-12-24 21:13:28 +0000 |
---|---|---|
committer | joerg <joerg> | 2012-12-24 21:13:28 +0000 |
commit | 1a801325525afe843236705894c3e94f1ecd4948 (patch) | |
tree | bb3048ad35fdc9c526a5b09a30005ad3a4a24d3e /ham | |
parent | a43148cb806eef97cbdfe9cd848a9a0380cc6241 (diff) | |
download | pkgsrc-1a801325525afe843236705894c3e94f1ecd4948.tar.gz |
Fix inline usage.
Diffstat (limited to 'ham')
-rw-r--r-- | ham/gmfsk/distinfo | 7 | ||||
-rw-r--r-- | ham/gmfsk/patches/patch-aa | 126 | ||||
-rw-r--r-- | ham/gmfsk/patches/patch-src_misc_cmplx.h | 103 | ||||
-rw-r--r-- | ham/gmfsk/patches/patch-src_misc_filter-i386.h | 22 | ||||
-rw-r--r-- | ham/gmfsk/patches/patch-src_misc_filter.h | 13 |
5 files changed, 264 insertions, 7 deletions
diff --git a/ham/gmfsk/distinfo b/ham/gmfsk/distinfo index 51d54edc6f2..ff3a598299e 100644 --- a/ham/gmfsk/distinfo +++ b/ham/gmfsk/distinfo @@ -1,11 +1,14 @@ -$NetBSD: distinfo,v 1.5 2006/12/28 11:54:47 wulf Exp $ +$NetBSD: distinfo,v 1.6 2012/12/24 21:13:28 joerg Exp $ SHA1 (gmfsk-0.6.tar.gz) = 2738bc2b83eb8f2001ed2503c466123ce4b258a5 RMD160 (gmfsk-0.6.tar.gz) = 532d2454ccc7fab36e707002c6fda7f9e2ec14cd Size (gmfsk-0.6.tar.gz) = 540765 bytes -SHA1 (patch-aa) = 49720c6bb4689768ce14e76aae39fd155739ca31 +SHA1 (patch-aa) = 1a919f2ea16f9ed23d490e8f4654dabb19295882 SHA1 (patch-ab) = a40132dddf93e88b166a4d9a5428e1e15dee3ccd SHA1 (patch-ac) = a936811e68d84ddb286f568519006521c4c5be89 SHA1 (patch-ad) = dbdb75d3c1d617ead1903d6645dd83c930a37a7b SHA1 (patch-ae) = 57048286392c811170f8519078e95fa89c06f3ee SHA1 (patch-af) = 5edcf28f17b4255d67d9df103eb70980e7f3e397 +SHA1 (patch-src_misc_cmplx.h) = b429594c6eb4d2821030fbea2ab1546aa9a01173 +SHA1 (patch-src_misc_filter-i386.h) = 71c7e1092fc9b4680d2c89c0ecdf4d8933abaf14 +SHA1 (patch-src_misc_filter.h) = 54acabd541e68e8363a5169f631a1966f8c850ba diff --git a/ham/gmfsk/patches/patch-aa b/ham/gmfsk/patches/patch-aa index aefd1db523b..f81f2e14f2d 100644 --- a/ham/gmfsk/patches/patch-aa +++ b/ham/gmfsk/patches/patch-aa @@ -1,8 +1,71 @@ -$NetBSD: patch-aa,v 1.1 2006/04/26 01:52:18 wulf Exp $ +$NetBSD: patch-aa,v 1.2 2012/12/24 21:13:28 joerg Exp $ ---- src/misc/misc.h.orig 2006-04-26 10:32:02.000000000 +0930 -+++ src/misc/misc.h 2006-04-26 10:31:20.000000000 +0930 -@@ -104,25 +104,6 @@ +--- src/misc/misc.h.orig 2004-04-13 12:45:19.000000000 +0000 ++++ src/misc/misc.h +@@ -32,7 +32,7 @@ + /* + * Hamming weight (number of bits that are ones). + */ +-extern inline unsigned int hweight32(unsigned int w) ++__attribute__((gnu_inline)) extern inline unsigned int hweight32(unsigned int w) + { + w = (w & 0x55555555) + ((w >> 1) & 0x55555555); + w = (w & 0x33333333) + ((w >> 2) & 0x33333333); +@@ -42,7 +42,7 @@ extern inline unsigned int hweight32(uns + return w; + } + +-extern inline unsigned int hweight16(unsigned short w) ++__attribute__((gnu_inline)) extern inline unsigned int hweight16(unsigned short w) + { + w = (w & 0x5555) + ((w >> 1) & 0x5555); + w = (w & 0x3333) + ((w >> 2) & 0x3333); +@@ -51,7 +51,7 @@ extern inline unsigned int hweight16(uns + return w; + } + +-extern inline unsigned int hweight8(unsigned char w) ++__attribute__((gnu_inline)) extern inline unsigned int hweight8(unsigned char w) + { + w = (w & 0x55) + ((w >> 1) & 0x55); + w = (w & 0x33) + ((w >> 2) & 0x33); +@@ -64,7 +64,7 @@ extern inline unsigned int hweight8(unsi + /* + * Parity function. Return one if `w' has odd number of ones, zero otherwise. + */ +-extern inline int parity(unsigned int w) ++__attribute__((gnu_inline)) extern inline int parity(unsigned int w) + { + return hweight32(w) & 1; + } +@@ -74,7 +74,7 @@ extern inline int parity(unsigned int w) + /* + * Reverse order of bits. + */ +-extern inline unsigned int rbits32(unsigned int w) ++__attribute__((gnu_inline)) extern inline unsigned int rbits32(unsigned int w) + { + w = ((w >> 1) & 0x55555555) | ((w << 1) & 0xAAAAAAAA); + w = ((w >> 2) & 0x33333333) | ((w << 2) & 0xCCCCCCCC); +@@ -84,7 +84,7 @@ extern inline unsigned int rbits32(unsig + return w; + } + +-extern inline unsigned short rbits16(unsigned short w) ++__attribute__((gnu_inline)) extern inline unsigned short rbits16(unsigned short w) + { + w = ((w >> 1) & 0x5555) | ((w << 1) & 0xAAAA); + w = ((w >> 2) & 0x3333) | ((w << 2) & 0xCCCC); +@@ -93,7 +93,7 @@ extern inline unsigned short rbits16(uns + return w; + } + +-extern inline unsigned char rbits8(unsigned char w) ++__attribute__((gnu_inline)) extern inline unsigned char rbits8(unsigned char w) + { + w = ((w >> 1) & 0x55) | ((w << 1) & 0xFF); + w = ((w >> 2) & 0x33) | ((w << 2) & 0xCC); +@@ -104,28 +104,9 @@ extern inline unsigned char rbits8(unsig /* ---------------------------------------------------------------------- */ /* @@ -27,4 +90,57 @@ $NetBSD: patch-aa,v 1.1 2006/04/26 01:52:18 wulf Exp $ -/* * Gray encoding and decoding (8 bit) */ - extern inline unsigned char grayencode(unsigned char data) +-extern inline unsigned char grayencode(unsigned char data) ++__attribute__((gnu_inline)) extern inline unsigned char grayencode(unsigned char data) + { + unsigned char bits = data; + +@@ -140,7 +121,7 @@ extern inline unsigned char grayencode(u + return bits; + } + +-extern inline unsigned char graydecode(unsigned char data) ++__attribute__((gnu_inline)) extern inline unsigned char graydecode(unsigned char data) + { + return data ^ (data >> 1); + } +@@ -150,7 +131,7 @@ extern inline unsigned char graydecode(u + /* + * Hamming window function + */ +-extern inline double hamming(double x) ++__attribute__((gnu_inline)) extern inline double hamming(double x) + { + return 0.54 - 0.46 * cos(2 * M_PI * x); + } +@@ -160,26 +141,26 @@ extern inline double hamming(double x) + /* + * Sinc etc... + */ +-extern inline double sinc(double x) ++__attribute__((gnu_inline)) extern inline double sinc(double x) + { + return (fabs(x) < 1e-10) ? 1.0 : (sin(M_PI * x) / (M_PI * x)); + } + +-extern inline double cosc(double x) ++__attribute__((gnu_inline)) extern inline double cosc(double x) + { + return (fabs(x) < 1e-10) ? 0.0 : ((1.0 - cos(M_PI * x)) / (M_PI * x)); + } + + /* ---------------------------------------------------------------------- */ + +-extern inline float clamp(float x, float min, float max) ++__attribute__((gnu_inline)) extern inline float clamp(float x, float min, float max) + { + return (x < min) ? min : ((x > max) ? max : x); + } + + /* ---------------------------------------------------------------------- */ + +-extern inline float decayavg(float average, float input, float weight) ++__attribute__((gnu_inline)) extern inline float decayavg(float average, float input, float weight) + { + return input * (1.0 / weight) + average * (1.0 - (1.0 / weight)); + } diff --git a/ham/gmfsk/patches/patch-src_misc_cmplx.h b/ham/gmfsk/patches/patch-src_misc_cmplx.h new file mode 100644 index 00000000000..fc61782703d --- /dev/null +++ b/ham/gmfsk/patches/patch-src_misc_cmplx.h @@ -0,0 +1,103 @@ +$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; + diff --git a/ham/gmfsk/patches/patch-src_misc_filter-i386.h b/ham/gmfsk/patches/patch-src_misc_filter-i386.h new file mode 100644 index 00000000000..fc353fad29b --- /dev/null +++ b/ham/gmfsk/patches/patch-src_misc_filter-i386.h @@ -0,0 +1,22 @@ +$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; + diff --git a/ham/gmfsk/patches/patch-src_misc_filter.h b/ham/gmfsk/patches/patch-src_misc_filter.h new file mode 100644 index 00000000000..ff98f0fa5e8 --- /dev/null +++ b/ham/gmfsk/patches/patch-src_misc_filter.h @@ -0,0 +1,13 @@ +$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; |