1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* src/include/port/win32.h */
/*
* 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.
*/
/*
* Make sure _WIN32_WINNT has the minimum required value.
* Leave a higher value in place. The minimum requirement is Windows 10.
*/
/*
* 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.
*/
/*
* defines for dynamic linking on Win32 platform
*/
/*
* Variables declared in the core backend and referenced by loadable
* modules need to be marked "dllimport" in the core build, but
* "dllexport" when the declaration is read in a loadable module.
* No special markings should be used when compiling frontend code.
*/
/*
* Functions exported by a loadable module must be marked "dllexport".
*
* While mingw would otherwise fall back to
* __attribute__((visibility("default"))), that appears to only work as long
* as no symbols are declared with __declspec(dllexport). But we can end up
* with some, e.g. plpython's Py_Init.
*/