// 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 .
// boinc_win.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#ifndef _BOINC_WIN_
#define _BOINC_WIN_
#ifndef __CYGWIN32__
// Windows C Runtime Library
#ifndef HAVE_STD_MAX
#define HAVE_STD_MAX 1
#endif
#ifndef HAVE_STD_MIN
#define HAVE_STD_MIN 1
#endif
#ifndef HAVE_STD_TRANSFORM
#define HAVE_STD_TRANSFORM 1
#endif
#ifndef HAVE_ALLOCA
#define HAVE_ALLOCA 1
#endif
#ifdef __MINGW32__
#define HAVE_STRCASECMP 1
#endif
#else
// Under CYGWIN we need to include config.h first.
#include "config.h"
#endif
// Windows System Libraries
//
// 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
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#endif
// 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
#include
#include
#include
#include
#include
#include
#include
#if !defined(__CYGWIN32__) || defined(USE_WINSOCK)
/* If we're not running under CYGWIN use windows networking */
#undef USE_WINSOCK
#define USE_WINSOCK 1
#include
#include
typedef size_t socklen_t;
#else
/* Under cygwin, curl was probably compiled to use */
#include
#include
#include
#include
#include
#include
#include
#define _WINSOCK_H
#define _WINSOCKAPI_
#define _WINSOCK2_H
#define _WININET_H
#define _WININETAPI_
#endif
#include
#if defined(__MINGW32__) || defined(__CYGWIN32__)
#include
#endif
#include
#include
#if defined(__MINGW32__)
#include
#include
#else
#include
#endif
#include
#include
#if !defined(__CYGWIN32__)
#include
#endif
#if !defined(__CYGWIN32__)
#include
#else
#ifndef _TCHAR_DEFINED
typedef char TCHAR, *PTCHAR;
typedef unsigned char TBYTE , *PTBYTE ;
#define _TCHAR_DEFINED
#endif /* !_TCHAR_DEFINED */
typedef LPSTR LPTCH, PTCH;
typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;
#define __TEXT(quote) quote
#endif
// All projects should be using std::min and std::max instead of the Windows
// version of the symbols.
#undef min
#undef max
// Standard Libraries
//
// C headers
#include
#include
#if !defined(__MINGW32__)
#include
#endif
#include
#if !defined(__MINGW32__) && !defined(__CYGWIN32__)
#include
#include
#endif
#ifdef __cplusplus
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#else
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#endif
// C++ headers
//
#ifdef __cplusplus
#include
#include
#include
#include
#include
#include
#include
#include
#include