From: Paul Brossier Date: Fri, 13 May 2016 12:25:59 +0000 (+0200) Subject: src/aubio_priv.h: if compiling with -std=c99, use defines for strnlen and floorf X-Git-Tag: 0.4.4~300^2~60 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=023aa3209a1edcb68c5cacaa5c041d744a5bc2bd;p=aubio.git src/aubio_priv.h: if compiling with -std=c99, use defines for strnlen and floorf --- diff --git a/src/aubio_priv.h b/src/aubio_priv.h index 90853b99..982b5fc0 100644 --- a/src/aubio_priv.h +++ b/src/aubio_priv.h @@ -289,4 +289,12 @@ typedef enum { #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 */