# HG changeset patch # User André Sintzoff # Date 2018-01-21 14:39:48 # Node ID 440e8fce29e77bb51f614f1ae5d99c0847d6f5e0 # Parent 854a7315603e75636a7a74779656a88e949aa16e cext: define MIN macro only if it is not yet defined MIN macro is defined in on macOS Sierra. Therefore as HAVE_BSD_STATFS is defined in osutil.c, 'MIN' macro redefined warning is emitted. diff --git a/mercurial/cext/util.h b/mercurial/cext/util.h --- a/mercurial/cext/util.h +++ b/mercurial/cext/util.h @@ -27,7 +27,9 @@ typedef struct { extern PyTypeObject dirstateTupleType; #define dirstate_tuple_check(op) (Py_TYPE(op) == &dirstateTupleType) +#ifndef MIN #define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif /* VC9 doesn't include bool and lacks stdbool.h based on my searching */ #if defined(_MSC_VER) || __STDC_VERSION__ < 199901L #define true 1