src/aubio_priv.h: define PI if M_PI isnt
[aubio.git] / src / aubio_priv.h
index 197edf1..b19520b 100644 (file)
@@ -128,8 +128,12 @@ typedef enum {
 #define AUBIO_QUIT(_s)               exit(_s)
 #define AUBIO_SPRINTF                sprintf
 
-/* Libc shortcuts */
+/* pi and 2*pi */
+#ifndef M_PI
+#define PI         (3.14159265358979323846)
+#else
 #define PI         (M_PI)
+#endif
 #define TWO_PI     (PI*2.)
 
 /* aliases to math.h functions */