2010-09-20 22:08:53 +02:00
|
|
|
/* src/include/port/win32.h */
|
2006-10-03 05:59:22 +02:00
|
|
|
|
2017-11-16 16:36:18 +01:00
|
|
|
/*
|
|
|
|
* We always rely on the WIN32 macro being set by our build system,
|
|
|
|
* but _WIN32 is the compiler pre-defined macro. So make sure we define
|
|
|
|
* WIN32 whenever _WIN32 is set, to facilitate standalone building.
|
|
|
|
*/
|
|
|
|
#if defined(_WIN32) && !defined(WIN32)
|
|
|
|
#define WIN32
|
|
|
|
#endif
|
|
|
|
|
2011-04-10 17:42:00 +02:00
|
|
|
/*
|
2012-04-24 04:43:09 +02:00
|
|
|
* Make sure _WIN32_WINNT has the minimum required value.
|
2016-04-29 13:59:47 +02:00
|
|
|
* Leave a higher value in place. When building with at least Visual
|
|
|
|
* Studio 2015 the minimum requirement is Windows Vista (0x0600) to
|
|
|
|
* get support for GetLocaleInfoEx() with locales. For everything else
|
2016-06-03 16:13:36 +02:00
|
|
|
* the minimum version is Windows XP (0x0501).
|
2016-04-29 13:59:47 +02:00
|
|
|
*/
|
|
|
|
#if defined(_MSC_VER) && _MSC_VER >= 1900
|
|
|
|
#define MIN_WINNT 0x0600
|
|
|
|
#else
|
|
|
|
#define MIN_WINNT 0x0501
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(_WIN32_WINNT) && _WIN32_WINNT < MIN_WINNT
|
2011-01-31 02:34:05 +01:00
|
|
|
#undef _WIN32_WINNT
|
2011-01-31 01:56:46 +01:00
|
|
|
#endif
|
2016-04-29 13:59:47 +02:00
|
|
|
|
2011-01-31 01:56:46 +01:00
|
|
|
#ifndef _WIN32_WINNT
|
2016-04-29 13:59:47 +02:00
|
|
|
#define _WIN32_WINNT MIN_WINNT
|
2011-01-31 01:56:46 +01:00
|
|
|
#endif
|
2016-04-29 13:59:47 +02:00
|
|
|
|
2007-07-24 11:00:27 +02:00
|
|
|
/*
|
2017-11-16 16:36:18 +01:00
|
|
|
* We need to prevent <crtdefs.h> from defining a symbol conflicting with
|
|
|
|
* our errcode() function. Since it's likely to get included by standard
|
|
|
|
* system headers, pre-emptively include it now.
|
2007-07-24 11:00:27 +02:00
|
|
|
*/
|
2019-10-08 10:27:30 +02:00
|
|
|
#if defined(_MSC_VER) || defined(HAVE_CRTDEFS_H)
|
2017-11-16 16:36:18 +01:00
|
|
|
#define errcode __msvc_errcode
|
|
|
|
#include <crtdefs.h>
|
|
|
|
#undef errcode
|
2011-01-31 01:56:46 +01:00
|
|
|
#endif
|
2010-12-09 02:01:09 +01:00
|
|
|
|
2005-06-16 19:53:54 +02:00
|
|
|
/*
|
2017-11-16 16:36:18 +01:00
|
|
|
* defines for dynamic linking on Win32 platform
|
2012-11-07 21:01:18 +01:00
|
|
|
*/
|
2013-05-29 22:58:43 +02:00
|
|
|
|
2002-01-22 20:02:40 +01:00
|
|
|
#ifdef BUILDING_DLL
|
2007-07-25 14:22:54 +02:00
|
|
|
#define PGDLLIMPORT __declspec (dllexport)
|
2017-11-16 16:36:18 +01:00
|
|
|
#else
|
2007-07-25 14:22:54 +02:00
|
|
|
#define PGDLLIMPORT __declspec (dllimport)
|
2002-01-22 20:02:40 +01:00
|
|
|
#endif
|
|
|
|
|
2010-05-28 18:34:15 +02:00
|
|
|
#ifdef _MSC_VER
|
2010-05-27 09:59:48 +02:00
|
|
|
#define PGDLLEXPORT __declspec (dllexport)
|
2010-05-28 18:34:15 +02:00
|
|
|
#else
|
2010-11-10 04:17:43 +01:00
|
|
|
#define PGDLLEXPORT
|
2010-05-28 18:34:15 +02:00
|
|
|
#endif
|