src/aubio_priv.h: if compiling with -std=c99, use defines for strnlen and floorf
authorPaul Brossier <piem@piem.org>
Fri, 13 May 2016 12:25:59 +0000 (14:25 +0200)
committerPaul Brossier <piem@piem.org>
Fri, 13 May 2016 12:25:59 +0000 (14:25 +0200)
src/aubio_priv.h

index 90853b9..982b5fc 100644 (file)
@@ -289,4 +289,12 @@ typedef enum {
 #define UNUSED
 #endif
 
 #define UNUSED
 #endif
 
+/* are we using gcc -std=c99 ? */
+#if defined(__STRICT_ANSI__)
+#define strnlen(a,b) MIN(strlen(a),b)
+#if !HAVE_AUBIO_DOUBLE
+#define floorf floor
+#endif
+#endif /* __STRICT_ANSI__ */
+
 #endif /* AUBIO_PRIV_H */
 #endif /* AUBIO_PRIV_H */