From f0d93b15ae2bf3f001c5f31c9ffad72b29ffcb70 Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 22 May 2007 12:55:18 +0000 Subject: [PATCH] Let's not declare the max/min macros in C++ to avoid breaking the already existing system in there git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3535 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/xbt/misc.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 2a8e02ea41..24ea9c680b 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -140,13 +140,10 @@ # define XBT_PUBLIC_DATA #endif - - - -#ifndef max +#if !defined (max) && !defined(__cplusplus) # define max(a,b) (((a) > (b)) ? (a) : (b)) #endif -#ifndef min +#if !defined (min) && !defined(__cplusplus) # define min(a,b) (((a) < (b)) ? (a) : (b)) #endif @@ -163,7 +160,6 @@ # endif #endif -/*! C++ users need love */ #ifndef SG_END_DECL # ifdef __cplusplus # define SG_END_DECL() } -- 2.20.1