From: Paul Brossier Date: Thu, 20 Dec 2018 16:16:27 +0000 (+0100) Subject: [lib] add AUBIO_STRERROR macro X-Git-Tag: 0.4.9~70 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=b2e17402f895d4383d3fb0da3387a5d1417ad244;p=aubio.git [lib] add AUBIO_STRERROR macro --- diff --git a/src/aubio_priv.h b/src/aubio_priv.h index c26b1f4a..fa59571e 100644 --- a/src/aubio_priv.h +++ b/src/aubio_priv.h @@ -324,6 +324,12 @@ uint_t aubio_log(sint_t level, const char_t *fmt, ...); #define isnan _isnan #endif +#if !defined(_MSC_VER) +#define AUBIO_STRERROR(errno,buf,len) strerror_r(errno, buf, len) +#else +#define AUBIO_STRERROR(errno,buf,len) strerror_s(buf, len, errno) +#endif + /* handy shortcuts */ #define DB2LIN(g) (POW(10.0,(g)*0.05f)) #define LIN2DB(v) (20.0*LOG10(v))