// Use "#pragma once" instead of "ifndef MSCONFIG_H, define MSCONFIG_H,
// #endif" if you know you are using a Microsoft compiler, which we are
// if this file is being included. Using "pragma once" is much faster
// and less error prone.
#pragma once

// _MSC_VER == 1300 is the first release of Microsoft Visual C++ .NET.
// There are no known problems with this version of MSVC, so we skip all
// of these "workarounds" if .NET is being used.

#define VERSION @HIPPO_VERSION@

/** Define if QtScrollView::ensureVisible has effect of the
    application hanging when second display is added to canvas. */
#define ENSURE_DEFECT 1

#if _MSC_VER < 1300

/** MicroSoft Visual C++ required macros, pragmas, and functions.  The
    macros are defined so alternate code can be conditionally compiled
    to work around the defects.  The pragmas are used to turn off some
    frequently seen warning messages.  The functions defined are part
    of the standard of the standard C++ library, but are missing from
    the MicroSoft library.

    This file is included directly when autoconf/automake is not being used
    on a MicroSoft Windows platform.  If autoconf/automake is being
    used, then it is also included in config.h.

    $Id: MSconfig.h.in,v 1.4 2004/10/12 17:24:38 pfkeb Exp $

    Author: Paul_Kunz@slac.stanford.edu */

/* Turn off annoying warning. */

# pragma warning(disable:4244)  // conversion from double to float
# pragma warning(disable:4250)  // inherits via dominance
# pragma warning(disable:4251)  // exporting from dll
# pragma warning(disable:4273)  // incosistent dll linkage
# pragma warning(disable:4275)  // non dll-interface class
# pragma warning(disable:4786)  // '255' characters in the debug information


/** Define the value of pi and e which appears
    to be missing from Dev Studio. */
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

#ifndef M_E
#define	M_E 2.7182818284590452354
#endif

/** Define if bind2nd doesn't work calling member function that returns
   void. This works around the errror
       error C2562: '()' : 'void' function returning a value
   which results when compiling bind2nd template function.  */
#define BIND2ND_DEFECT 1

/** Define if a function in derived class overrides a function in a
    base class only by the return type, and the return type in the
    derived class only differs because it is a derived type of the one
    defined in the base class.  This works around the error
         error C2555:
    with MS VC++ 6.0 sp5 and earlier. */
#define CLONE_DEFECT 1

/** Define if vector<T>::iterator doesn't work unless using namespace
    std; statement is made or std:: is used in source code.  Also
    valid for list<>. */
#define ITERATOR_MEMBER_DEFECT 1

/** Define if mem_fun doesn't work. */
#define MEMFUN_DEFECT 1

/** Define if mem_fun doesn't always work when used to call member
    with one argument and the obsolete mem_fun1 must be used.. */
#define MEMFUN1_DEFECT 1

/** Define if STL transform function doesn't work with unary
    functions in cmath */
#define TRANSFORM_DEFECT 1

namespace std {

/** definition of standard C++ library max() function for compilers
    that don't supply it.  Note should do only less than comparison. */
#ifdef max
#undef max
#endif
template < class T >
inline const T& max ( const T & a, const T & b )
{
  // Break this into two lines to avoid an incorrect warning with
  // Cfront-based compilers.
  const T & retval = a < b ? b : a;

  return retval;
}

/** definition of standard C++ library min() function for compilers
    that don't supply it. Note should do only less than comparison. */
#ifdef min
#undef min
#endif
template < class T >
inline const T& min ( const T & a, const T & b)
{
  // Break this into two lines to avoid an incorrect warning with
  // Cfront-based compilers.
  const T & retval = b < a ? b : a;

  return retval;
}

/** definition of standard C++ library abs() function for compilers
    that don't supply it. */
template < class T >
inline const T & abs ( const T & a )
{
    const T & retval = a < 0 ? -a : a;

    return retval;
}

} //end namespace std::

#endif
