Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
properly protect our definitions of MIN/MAX (w/o using undef to please sonar)
[simgrid.git] / src / xbt / mmalloc / mmprivate.h
index d545fcc..95d52c1 100644 (file)
 #include <pthread.h>
 #include <stdint.h>
 
-#ifdef MIN
-#undef MIN
-#endif
+#ifndef MIN
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
-#ifdef MAX
-#undef MAX
 #endif
+#ifndef MAX
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif
 
 #ifdef HAVE_LIMITS_H
 #  include <limits.h>