Fix flac_min/flac_max not defined with Emscripten.

When the compiler doesn't match the ones expected, flac_min/flac_max
aren't defined. There is a fallback to always define them, but MIN/MAX
were defined instead of flac_min/flac_max

This commit is the same as the one is the original FLAC project:
https://github.com/xiph/flac/blob/master/src/libFLAC/include/private/macros.h
pull/38/head
ArthurSonzogni 7 years ago
parent 7d2044f645
commit 12f60ab575

@ -61,12 +61,12 @@
#define flac_min(a,b) __min(a,b)
#endif
#ifndef MIN
#define MIN(x,y) ((x) <= (y) ? (x) : (y))
#ifndef flac_min
#define flac_min(x,y) ((x) <= (y) ? (x) : (y))
#endif
#ifndef MAX
#define MAX(x,y) ((x) >= (y) ? (x) : (y))
#ifndef flac_max
#define flac_max(x,y) ((x) >= (y) ? (x) : (y))
#endif
#endif

Loading…
Cancel
Save