]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
__aligned is already defined on NetBSD.
authorAndre Noll <maan@systemlinux.org>
Mon, 21 Dec 2009 18:21:13 +0000 (19:21 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 21 Dec 2009 18:21:13 +0000 (19:21 +0100)
Use __a_aligned in analogy to __a_unused which was introduced since __unused is
already defined on MacOS. This fixes the warning

gcc-compat.h:5:1: warning: "__aligned" redefined
In file included from /usr/include/regex.h:77,
 from daemon.c:9:
/usr/include/sys/cdefs.h:202:1: warning: this is the location of the previous definition

on NetBSD and has the additional advantage that it keeps working even if the
NetBSD people decide to redefine __aligned.

gcc-compat.h
imdct.c
wmadec_filter.c

index 7367173aac419e9abd6232408d446a01cbf35d33..ffd714f7c7c36a085e24d20e2ecd0a680af0406a 100644 (file)
@@ -2,7 +2,7 @@
 #define __noreturn __attribute__ ((noreturn))
 #define __malloc __attribute__ ((malloc))
 #define __a_unused __attribute__ ((unused))
-#define __aligned(alignment) __attribute__((__aligned__(alignment)))
+#define __a_aligned(alignment) __attribute__((__aligned__(alignment)))
 
 /*
  * p is the number of the "format string" parameter, and q is
diff --git a/imdct.c b/imdct.c
index 3495e61181b1074a5223955d6d66d90381436fbe..5f48ba44c11b1186f6ebea4d5cec33b34e622bcc 100644 (file)
--- a/imdct.c
+++ b/imdct.c
@@ -59,7 +59,7 @@ struct mdct_context {
 };
 
 /** cos(2 * pi * x / n) for 0 <= x <= n / 4, followed by its reverse */
-#define COSINE_TAB(n) fftsample_t cos_ ## n[n / 2] __aligned(16)
+#define COSINE_TAB(n) fftsample_t cos_ ## n[n / 2] __a_aligned(16)
 
 COSINE_TAB(16);
 COSINE_TAB(32);
index 1a4dc5e75bf136e138dd98220a6b838485b91d42..b78d762792511890531c891a5027dee563cda195 100644 (file)
@@ -148,7 +148,7 @@ struct private_wmadec_data {
 #define VLCBITS 9
 #define VLCMAX ((22 + VLCBITS - 1) / VLCBITS)
 
-#define SINE_WINDOW(x) float sine_ ## x[x] __aligned(16)
+#define SINE_WINDOW(x) float sine_ ## x[x] __a_aligned(16)
 
 SINE_WINDOW(128);
 SINE_WINDOW(256);