Mercurial > hg-stable
changeset 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 | 854a7315603e |
children | 75bae69747f0 |
files | mercurial/cext/util.h |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
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