]> code.delx.au - pulseaudio/commitdiff
Make gcc --std=c99 happy
authorMaarten Bosmans <mkbosmans@gmail.com>
Fri, 2 Sep 2011 12:11:52 +0000 (14:11 +0200)
committerColin Guthrie <colin@mageia.org>
Sat, 3 Sep 2011 10:17:28 +0000 (12:17 +0200)
We're now more or less C99 compliant

src/modules/echo-cancel/adrian-aec.c
src/modules/module-rygel-media-server.c
src/pulsecore/flist.c
src/pulsecore/macro.h
src/tests/alsa-time-test.c

index e969e8c56a677e1b7aac54e413524201fe070352..1476ee4f80568761761f06957b22c7fbe9c60ac2 100644 (file)
  * Version 0.4 Leaky Normalized LMS - pre whitening algorithm
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <math.h>
 #include <string.h>
 #include <stdint.h>
index 9af0cebbbce88a6f96c4a6a0ce9ece870c7ba113..94b2d689bd5ecb87d618404564cabede488fbbbc 100644 (file)
@@ -37,6 +37,7 @@
 #include <pulsecore/source.h>
 #include <pulsecore/core-util.h>
 #include <pulsecore/log.h>
+#include <pulsecore/macro.h>
 #include <pulsecore/modargs.h>
 #include <pulsecore/dbus-shared.h>
 #include <pulsecore/namereg.h>
index acdeff38451405680b353e1bbed72250f4d58629..d279271cb2fb8db076aae60658757185be299b0e 100644 (file)
@@ -53,7 +53,7 @@ struct pa_flist {
     pa_atomic_ptr_t stored;
     /* Stack that contains empty list elements */
     pa_atomic_ptr_t empty;
-    pa_flist_elem table[0];
+    pa_flist_elem table[];
 };
 
 /* Lock free pop from linked list stack */
index 1207a108215bb4be096d46718066f9268b30a7be..7459e6f191eaa5c9e2861f2de5f12cc7420d5429 100644 (file)
@@ -84,6 +84,10 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
     #define PA_DECLARE_ALIGNED(n,t,v)      t v
 #endif
 
+#ifdef __GNUC__
+#define typeof __typeof__
+#endif
+
 /* The users of PA_MIN and PA_MAX, PA_CLAMP, PA_ROUND_UP should be
  * aware that these macros on non-GCC executed code with side effects
  * twice. It is thus considered misuse to use code with side effects
index 1a572b30db128f30dd14da2de6ed3935cb582c89..ab194ee44b07308b690af768d77d7d8840271765 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <assert.h>
 #include <inttypes.h>
 #include <time.h>