Skip to content
Snippets Groups Projects
Commit 440e8fce authored by André Sintzoff's avatar André Sintzoff
Browse files

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.
parent 854a7315
No related branches found
No related tags found
No related merge requests found
...@@ -27,4 +27,5 @@ ...@@ -27,4 +27,5 @@
extern PyTypeObject dirstateTupleType; extern PyTypeObject dirstateTupleType;
#define dirstate_tuple_check(op) (Py_TYPE(op) == &dirstateTupleType) #define dirstate_tuple_check(op) (Py_TYPE(op) == &dirstateTupleType)
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MIN(a, b) (((a) < (b)) ? (a) : (b))
...@@ -30,4 +31,5 @@ ...@@ -30,4 +31,5 @@
#define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
/* VC9 doesn't include bool and lacks stdbool.h based on my searching */ /* VC9 doesn't include bool and lacks stdbool.h based on my searching */
#if defined(_MSC_VER) || __STDC_VERSION__ < 199901L #if defined(_MSC_VER) || __STDC_VERSION__ < 199901L
#define true 1 #define true 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment