Do not assume that sys/param.h defines MIN and MAX

One such example is sys/param.h from MinGW.
This commit is contained in:
sezero 2019-08-05 02:00:40 +03:00 committed by Erik de Castro Lopo
parent 8dda876b23
commit 4a43f2bd4d
1 changed files with 2 additions and 0 deletions

View File

@ -51,8 +51,10 @@
/* Whatever other unix that has sys/param.h */
#elif defined(HAVE_SYS_PARAM_H)
#include <sys/param.h>
#if defined(MIN) && defined(MAX)
#define flac_max(a,b) MAX(a,b)
#define flac_min(a,b) MIN(a,b)
#endif
/* Windows VS has them in stdlib.h.. XXX:Untested */
#elif defined(_MSC_VER)