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 e969e8c..1476ee4 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 9af0ceb..94b2d68 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 acdeff3..d279271 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 1207a10..7459e6f 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 1a572b3..ab194ee 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <assert.h>
 #include <inttypes.h>
 #include <time.h>