/*****************************************************************************
 * $Id: gfx_win32.hh,v 1.8 2005/06/19 22:39:48 devel Exp $
 * @file
 * @author	Jim E. Brooks  http://www.jimbrooks.org
 * @brief	Win32 kludges.
 *//*
 * LEGAL:	COPYRIGHT (C) 2004 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE (GPL).
 *****************************************************************************/

#ifndef GFX_WIN32_HH
#define GFX_WIN32_HH 1

namespace gfx {

// -----------------------------------------------------------------
// This disables the warnings that VC++ 6.0 gives 
// regarding the truncation of identifiers in debug information.
//
// This often occurs as a result of nesting STL classes,
// for example, list<string> objects will cause it.
//
// A compiler bug prevents the pragma alone from being 
// sufficient, but a workaround is given on page 48 
// of the March 2002 issue of Windows Developer Magazine,
// volume 13, number 3. The code here is taken from that article.
//
// USAGE: Include this file in your source code. It should be
// included before any other header files that use STL.
#pragma warning(disable:4786)
class msVC6_4786WorkAround 
{
public:
	msVC6_4786WorkAround() {}
};
static msVC6_4786WorkAround 
WowIWonderWhatCrapCodeMustBeInTheCompilerToMakeThisWorkaroundWork;
// -----------------------------------------------------------------

#define snprintf _snprintf

// disable data conversion warnings
#pragma warning(disable : 4244)     // MIPS
#pragma warning(disable : 4136)     // X86
#pragma warning(disable : 4305)     // VC++ 6 truncation warning
#pragma warning(disable : 4051)     // ALPHA
#pragma warning(disable : 4800)		// bool vs. int
#pragma warning(disable : 4390)		// empty ';'

// FYI:
// Obtuse way to write a variadic macro in VC++.
// #define PrintStatus !verbose ? (void)0 : ::printf

} // namespace gfx

#endif // GFX_WIN32_HH
