--- trunk/src/antlr/config.hpp 2005/12/02 15:38:03 770 +++ branches/development/src/antlr/config.hpp 2011/09/15 13:39:36 1633 @@ -5,7 +5,7 @@ * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * - * $Id: config.hpp,v 1.1 2005-12-02 15:38:02 tim Exp $ + * $Id$ */ /* @@ -43,6 +43,12 @@ // _MSC_VER == 1300 for Microsoft Visual C++ 7.0 #if defined(_MSC_VER) +# if _MSC_VER < 1300 +# define NOMINMAX +# pragma warning(disable : 4786) +# define min _cpp_min +# endif + // This warning really gets on my nerves. // It's the one about symbol longer than 256 chars, and it happens // all the time with STL. @@ -73,24 +79,29 @@ # define ANTLR_API __declspec(dllimport) # endif +# if ( _MSC_VER < 1200 ) +// supposedly only for MSVC5 and before... +// Using vector requires operator<(X,X) to be defined +# define NEEDS_OPERATOR_LESS_THAN +# endif + // VC6 # if ( _MSC_VER == 1200 ) # undef ANTLR_ATOI_IN_STD # endif -// These should be verified for newer MSVC's +# if ( _MSC_VER < 1310 ) +// Supposedly only for MSVC7 and before... // Not allowed to put 'static const int XXX=20;' in a class definition -# define NO_STATIC_CONSTS -// Using vector requires operator<(X,X) to be defined -# define NEEDS_OPERATOR_LESS_THAN +# define NO_STATIC_CONSTS +# define NO_TEMPLATE_PARTS +# endif + // No strcasecmp in the C library (so use stricmp instead) // - Anyone know which is in which standard? # define NO_STRCASECMP # undef ANTLR_CCTYPE_NEEDS_STD - -// needed for CharScannerLiteralsLess -# define NO_TEMPLATE_PARTS - +# define NO_STATIC_CONSTS #endif // End of Microsoft Visual C++ /*}}}*/ @@ -173,8 +184,12 @@ // No strcasecmp in the C library (so use stricmp instead) // - Anyone know which is in which standard? +#if (defined(_AIX) && (__IBMCPP__ >= 600)) +# define NO_STATIC_CONSTS +#else # define NO_STRCASECMP # undef ANTLR_CCTYPE_NEEDS_STD +#endif #endif // end IBM VisualAge C++ /*}}}*/ @@ -251,14 +266,14 @@ /*}}}*/ /*****************************************************************************/ #ifdef __BORLANDC__ -#if __BORLANDC__ >= 560 -#include -#include -#define ANTLR_CCTYPE_NEEDS_STD -#else -#error "sorry, compiler is too old - consider an update." +# if __BORLANDC__ >= 560 +# include +# include +# define ANTLR_CCTYPE_NEEDS_STD +# else +# error "sorry, compiler is too old - consider an update." +# endif #endif -#endif // Redefine these for backwards compatability.. #undef ANTLR_BEGIN_NAMESPACE