V2: Use a single definition of MIN and MAX in sources
diff --git a/src/libFLAC/bitreader.c b/src/libFLAC/bitreader.c
index cd05a62..7e17fd8 100644
--- a/src/libFLAC/bitreader.c
+++ b/src/libFLAC/bitreader.c
@@ -38,6 +38,7 @@
#include "private/bitmath.h"
#include "private/bitreader.h"
#include "private/crc.h"
+#include "private/macros.h"
#include "FLAC/assert.h"
#include "share/endswap.h"
@@ -109,15 +110,6 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
-#ifdef min
-#undef min
-#endif
-#define min(x,y) ((x)<(y)?(x):(y))
-#ifdef max
-#undef max
-#endif
-#define max(x,y) ((x)>(y)?(x):(y))
-
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
#ifdef _MSC_VER
#define FLAC__U64L(x) x
@@ -547,7 +539,7 @@
FLAC__uint32 x;
if(n != 0) {
- m = min(8-n, bits);
+ m = flac_min(8-n, bits);
if(!FLAC__bitreader_read_raw_uint32(br, &x, m))
return false;
bits -= m;