From 945689663d870f36ffb072a9856b672a95811dc4 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Fri, 24 Mar 2000 00:38:52 +0000 Subject: [PATCH] Add NS_MIN and NS_MAX macros to hide inconsistencies with std::min and std::max. r=scc git-svn-id: svn://10.0.0.236/trunk@63954 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/base/nscore.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mozilla/xpcom/base/nscore.h b/mozilla/xpcom/base/nscore.h index 11b0855f17f..ffdd02e575f 100644 --- a/mozilla/xpcom/base/nscore.h +++ b/mozilla/xpcom/base/nscore.h @@ -159,6 +159,9 @@ typedef PRUint16 PRUnichar; Need to add an autoconf test for this. */ +#define NS_MIN min +#define NS_MAX max + /* under Metrowerks (Mac), we don't have autoconf yet */ #ifdef __MWERKS__ #define HAVE_CPP_SPECIALIZATION @@ -185,6 +188,13 @@ typedef PRUint16 PRUnichar; // VC++5.0 has an internal compiler error (sometimes) without this #undef HAVE_CPP_USING #endif + + /* VC++ is special and doesn't use naked min() and max() */ + #undef NS_MIN + #define NS_MIN _cpp_min + + #undef NS_MAX + #define NS_MAX _cpp_max #endif