MobilityDB 1.3
Loading...
Searching...
No Matches
win32.h
Go to the documentation of this file.
1/* src/include/port/win32.h */
2
3/*
4 * We always rely on the WIN32 macro being set by our build system,
5 * but _WIN32 is the compiler pre-defined macro. So make sure we define
6 * WIN32 whenever _WIN32 is set, to facilitate standalone building.
7 */
8#if defined(_WIN32) && !defined(WIN32)
9#define WIN32
10#endif
11
12/*
13 * Make sure _WIN32_WINNT has the minimum required value.
14 * Leave a higher value in place. When building with at least Visual
15 * Studio 2015 the minimum requirement is Windows Vista (0x0600) to
16 * get support for GetLocaleInfoEx() with locales. For everything else
17 * the minimum version is Windows XP (0x0501).
18 */
19#if defined(_MSC_VER) && _MSC_VER >= 1900
20#define MIN_WINNT 0x0600
21#else
22#define MIN_WINNT 0x0501
23#endif
24
25#if defined(_WIN32_WINNT) && _WIN32_WINNT < MIN_WINNT
26#undef _WIN32_WINNT
27#endif
28
29#ifndef _WIN32_WINNT
30#define _WIN32_WINNT MIN_WINNT
31#endif
32
33/*
34 * We need to prevent <crtdefs.h> from defining a symbol conflicting with
35 * our errcode() function. Since it's likely to get included by standard
36 * system headers, pre-emptively include it now.
37 */
38#if defined(_MSC_VER) || defined(HAVE_CRTDEFS_H)
39#define errcode __msvc_errcode
40#include <crtdefs.h>
41#undef errcode
42#endif
43
44/*
45 * defines for dynamic linking on Win32 platform
46 */
47
48#ifdef BUILDING_DLL
49#define PGDLLIMPORT __declspec (dllexport)
50#else
51#define PGDLLIMPORT __declspec (dllimport)
52#endif
53
54#ifdef _MSC_VER
55#define PGDLLEXPORT __declspec (dllexport)
56#else
57#define PGDLLEXPORT
58#endif
59
60/*
61 * Windows headers don't define this structure, but you can define it yourself
62 * to use the functionality.
63 */
65{
66 unsigned short sun_family;
67 char sun_path[108];
68};
69#define HAVE_STRUCT_SOCKADDR_UN 1
char sun_path[108]
Definition: win32.h:67
unsigned short sun_family
Definition: win32.h:66
Definition: win32.h:65