protect max/min macro for C++. fix build failure with gcc 6.1.1. Index: x11/compiler.h =================================================================== --- x11/compiler.h +++ x11/compiler.h @@ -117,6 +117,7 @@ #define MAX_PATH MAXPATHLEN #endif +#ifndef __cplusplus #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) #endif @@ -123,6 +124,7 @@ #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif +#endif /* !__cplusplus */ #ifndef ZeroMemory #define ZeroMemory(d,n) memset((d), 0, (n))