From 12f60ab575e6e792d71efcbbc9d0403f833966c4 Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Tue, 30 Apr 2019 16:46:29 +0200 Subject: [PATCH] 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 --- third_party/FLAC/src/include/private/macros.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/third_party/FLAC/src/include/private/macros.h b/third_party/FLAC/src/include/private/macros.h index b72b69b..fcdfad1 100644 --- a/third_party/FLAC/src/include/private/macros.h +++ b/third_party/FLAC/src/include/private/macros.h @@ -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