// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
#ifndef __STDWX_H__
#define __STDWX_H__
#ifdef _WIN32
// Target Windows 2000 or better with Internet Explorer 5.01 or better
#ifndef WINVER
#define WINVER 0x0500
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0500
#endif
#ifndef _WIN32_IE
#define _WIN32_IE 0x0501
#endif
#endif
#ifdef __APPLE__
#include
// Use localtime_r and fmtime_r in wxWidgets and eliminate compiler warnings
#define HAVE_LOCALTIME_R 1
#define HAVE_GMTIME_R 1
#endif
#include
#include // configuration support
#include // diagnostics support
#include // logging support
#include // accelerator support
#include // regular expression support
#include // command line support
#include // system settings support
#include // internationalization support
#include // timer support
#include // filesystem support
#include // bitmap modification support
#include // toolbars support
#include // list control support
#include // messagebox dialog support
#include // panel support
#include // notebook support
#include // static line support
#include // static bitmap support
#include // static text support
#include // clipboard support
#include // date/time support
#include // taskbar support
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef _WIN32
// Visual Studio 2005 has extended the C Run-Time Library by including "secure"
// runtime functions and deprecating the previous function prototypes. Since
// we need to use the previous prototypes to maintain compatibility with other
// platforms we are going to disable the deprecation warnings if we are compiling
// on Visual Studio 2005
#if _MSC_VER >= 1400
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif
#endif
// Windows Headers
//
#include
#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
#include
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#if wxUSE_ACCESSIBILITY
#include
#else
#pragma message("")
#pragma message("wxUSE_ACCESSIBILITY is not defined in setup.h for the wxWidgets library.")
#pragma message("***** Accessibility features are disabled *****")
#pragma message("")
#endif // wxUSE_ACCESSIBILITY
#include "wx/msw/ole/oleutils.h"
#include "wx/msw/winundef.h"
#ifndef OBJID_CLIENT
#define OBJID_CLIENT 0xFFFFFFFC
#endif
#endif
// Standard Libraries
//
#ifndef __APPLE__
#include
#endif
// C headers
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
// C++ headers
#if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
#include
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef _WIN32
#define vsnprintf _vsnprintf
#define snprintf _snprintf
#define stprintf _stprintf
#define stricmp _stricmp
#define strdup _strdup
#define fdopen _fdopen
#define dup _dup
#define unlink _unlink
#define read _read
#define stat _stat
#define chdir _chdir
#define finite _finite
#define strdate _strdate
#define strtime _strtime
#define getcwd _getcwd
#endif
#ifndef __GNUC__
#define __attribute__(x)
#endif
// On the Win32 platform include file and line number information for each
// memory allocation/deallocation
#if (defined(__WIN32__) && defined(__VISUALC__) && !defined(__AFX_H__))
#ifdef _DEBUG
#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__)
#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
#define free(p) _free_dbg(p, _NORMAL_BLOCK)
#define _msize(p) _msize_dbg(p, _NORMAL_BLOCK)
#define _aligned_malloc(s, a) _aligned_malloc_dbg(s, a, __FILE__, __LINE__)
#define _aligned_realloc(p, s, a) _aligned_realloc_dbg(p, s, a, __FILE__, __LINE__)
#define _aligned_offset_malloc(s, a, o) _aligned_offset_malloc_dbg(s, a, o, __FILE__, __LINE__)
#define _aligned_offset_realloc(p, s, a, o) _aligned_offset_realloc_dbg(p, s, a, o, __FILE__, __LINE__)
#define _aligned_free(p) _aligned_free_dbg(p)
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
// The following macros set and clear, respectively, given bits
// of the C runtime library debug flag, as specified by a bitmask.
#define SET_CRT_DEBUG_FIELD(a) _CrtSetDbgFlag((a) | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
#define CLEAR_CRT_DEBUG_FIELD(a) _CrtSetDbgFlag(~(a) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
#else //_DEBUG
#define DEBUG_NEW new
#define SET_CRT_DEBUG_FIELD(a) ((void) 0)
#define CLEAR_CRT_DEBUG_FIELD(a) ((void) 0)
#endif //_DEBUG
#define new DEBUG_NEW
#endif //__WIN32__ && __VISUALC && !__AFX_H__
#endif //__STDWX_H__