Enrico Forestieri wrote:
On Tue, Oct 03, 2006 at 10:19:41AM +0200, Abdelrazak Younes wrote:
#if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING))
#include "windows.h"
+#ifdef __CYGWIN__
+#undef max
+#undef min
Hum... why not
#ifdef max
#undef max
#endif
#ifdef max
#undef min
#endif
This looks cleaner to me as some other compilers might do the same.
Yes, you are right. Most probably mingw needs this, too.
I'll do the change.
thanks.
Maybe we could use std::max() and std::min() as well to avoid the ambiguity.
Will not work, as max and min are C macros.
I know. I mean that, in addition, we should make sure that these C Macro
are not use anywhere by using only std::max() and std::min(). But this
is not related to your patch.
Abdel.