Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cext/util.h @ 35775:440e8fce29e7
cext: define MIN macro only if it is not yet defined
MIN macro is defined in <sys/param.h> on macOS Sierra. Therefore as
HAVE_BSD_STATFS is defined in osutil.c, 'MIN' macro redefined warning is
emitted.
author | Andr? Sintzoff <andre.sintzoff@gmail.com> |
---|---|
date | Sun, 21 Jan 2018 15:39:48 +0100 |
parents | 3455e2e2ce9b |
children | 9a639a33ad1f |
line wrap: on
line diff
--- a/mercurial/cext/util.h Sun Jan 21 14:47:45 2018 +0800 +++ b/mercurial/cext/util.h Sun Jan 21 15:39:48 2018 +0100 @@ -27,7 +27,9 @@ 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