/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD 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 General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
*/
/** @file stdafx.h Definition of base types and functions in a cross-platform compatible way. */
#ifndef STDAFX_H
#define STDAFX_H
#if defined(_WIN32)
/* MinGW defaults to Windows 7 if none of these are set, and they must be set before any MinGW header is included */
# define NTDDI_VERSION NTDDI_WINXP // Windows XP
# define _WIN32_WINNT 0x501 // Windows XP
# define _WIN32_WINDOWS 0x501 // Windows XP
# define WINVER 0x0501 // Windows XP
# define _WIN32_IE_ 0x0600 // 6.0 (XP+)
#endif
#ifdef _MSC_VER
/* Stop Microsoft (and clang-cl) compilers from complaining about potentially-unsafe/potentially-non-standard functions */
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_SECURE_NO_WARNINGS
# define _CRT_NONSTDC_NO_WARNINGS
#endif
#if defined(__APPLE__)
# include "os/macosx/osx_stdafx.h"
#endif /* __APPLE__ */
#if defined(__HAIKU__)
# include
# include
# define _DEFAULT_SOURCE
# define _GNU_SOURCE
#endif
/* It seems that we need to include stdint.h before anything else
* We need INT64_MAX, which for most systems comes from stdint.h. However, MSVC
* does not have stdint.h.
* For OSX the inclusion is already done in osx_stdafx.h. */
#if !defined(__APPLE__) && (!defined(_MSC_VER) || _MSC_VER >= 1600)
# if defined(SUNOS)
/* SunOS/Solaris does not have stdint.h, but inttypes.h defines everything
* stdint.h defines and we need. */
# include
# else
# define __STDC_LIMIT_MACROS
# include
# endif
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include