|
24 | 24 | #include "Poco/UnWindows.h" |
25 | 25 |
|
26 | 26 |
|
27 | | -// Determine the real version. |
28 | | -// This setting can be forced from UnWindows.h |
29 | | -#if defined (_WIN32_WINNT_WINBLUE) |
30 | | - //Windows 8.1 _WIN32_WINNT_WINBLUE (0x0602) |
31 | | - #ifdef _WIN32_WINNT |
32 | | - #undef _WIN32_WINNT |
33 | | - #endif |
34 | | - #define _WIN32_WINNT _WIN32_WINNT_WINBLUE |
35 | | - #ifdef NTDDI_VERSION |
36 | | - #undef NTDDI_VERSION |
37 | | - #endif |
38 | | - #define NTDDI_VERSION NTDDI_WINBLUE |
39 | | -#elif defined (_WIN32_WINNT_WIN8) |
40 | | - //Windows 8 _WIN32_WINNT_WIN8 (0x0602) |
41 | | - #ifdef _WIN32_WINNT |
42 | | - #undef _WIN32_WINNT |
43 | | - #endif |
44 | | - #define _WIN32_WINNT _WIN32_WINNT_WIN8 |
45 | | - #ifdef NTDDI_VERSION |
46 | | - #undef NTDDI_VERSION |
47 | | - #endif |
48 | | - #define NTDDI_VERSION NTDDI_WIN8 |
49 | | -#elif defined (_WIN32_WINNT_WIN7) |
50 | | - //Windows 7 _WIN32_WINNT_WIN7 (0x0601) |
51 | | - #ifdef _WIN32_WINNT |
52 | | - #undef _WIN32_WINNT |
53 | | - #endif |
54 | | - #define _WIN32_WINNT _WIN32_WINNT_WIN7 |
55 | | - #ifdef NTDDI_VERSION |
56 | | - #undef NTDDI_VERSION |
57 | | - #endif |
58 | | - #define NTDDI_VERSION NTDDI_WIN7 |
59 | | -#elif defined (_WIN32_WINNT_WS08) |
60 | | - //Windows Server 2008 _WIN32_WINNT_WS08 (0x0600) |
61 | | - #ifdef _WIN32_WINNT |
62 | | - #undef _WIN32_WINNT |
63 | | - #endif |
64 | | - #define _WIN32_WINNT _WIN32_WINNT_WS08 |
65 | | - #ifdef NTDDI_VERSION |
66 | | - #undef NTDDI_VERSION |
67 | | - #endif |
68 | | - #define NTDDI_VERSION NTDDI_WS08 |
69 | | -#elif defined (_WIN32_WINNT_VISTA) |
70 | | - //Windows Vista _WIN32_WINNT_VISTA (0x0600) |
71 | | - #ifdef _WIN32_WINNT |
72 | | - #undef _WIN32_WINNT |
73 | | - #endif |
74 | | - #define _WIN32_WINNT _WIN32_WINNT_VISTA |
75 | | - #ifdef NTDDI_VERSION |
76 | | - #undef NTDDI_VERSION |
77 | | - #endif |
78 | | - #define NTDDI_VERSION NTDDI_VISTA |
79 | | -#elif defined (_WIN32_WINNT_LONGHORN) |
80 | | - //Windows Vista and server 2008 Development _WIN32_WINNT_LONGHORN (0x0600) |
81 | | - #ifdef _WIN32_WINNT |
82 | | - #undef _WIN32_WINNT |
83 | | - #endif |
84 | | - #define _WIN32_WINNT _WIN32_WINNT_LONGHORN |
85 | | - #ifdef NTDDI_VERSION |
86 | | - #undef NTDDI_VERSION |
87 | | - #endif |
88 | | - #define NTDDI_VERSION 0x06000000 // hardcoded, VS90 can't find NTDDI_* macros |
89 | | -#elif defined (_WIN32_WINNT_WS03) |
90 | | - //Windows Server 2003 with SP1, |
91 | | - //Windows XP with SP2 _WIN32_WINNT_WS03 (0x0502) |
92 | | - #ifdef _WIN32_WINNT |
93 | | - #undef _WIN32_WINNT |
94 | | - #endif |
95 | | - #define _WIN32_WINNT _WIN32_WINNT_WS03 |
96 | | - #ifdef NTDDI_VERSION |
97 | | - #undef NTDDI_VERSION |
98 | | - #endif |
99 | | - #define NTDDI_VERSION NTDDI_WS03 |
100 | | -#elif defined (_WIN32_WINNT_WINXP) |
101 | | - //Windows Server 2003, Windows XP _WIN32_WINNT_WINXP (0x0501) |
102 | | - #ifdef _WIN32_WINNT |
103 | | - #undef _WIN32_WINNT |
104 | | - #endif |
105 | | - #define _WIN32_WINNT _WIN32_WINNT_WINXP |
106 | | - #ifdef NTDDI_VERSION |
107 | | - #undef NTDDI_VERSION |
108 | | - #endif |
109 | | - #define NTDDI_VERSION NTDDI_WINXP |
110 | | -#elif defined (_WIN32_WINNT_WIN2K) |
111 | | - //Windows 2000 _WIN32_WINNT_WIN2K (0x0500) |
112 | | - #ifdef _WIN32_WINNT |
113 | | - #undef _WIN32_WINNT |
114 | | - #endif |
115 | | - #define _WIN32_WINNT _WIN32_WINNT_WIN2K |
116 | | -#elif defined (WINVER) |
117 | | - // fail back on WINVER |
118 | | - #ifdef _WIN32_WINNT |
119 | | - #undef _WIN32_WINNT |
120 | | - #endif |
121 | | - #define _WIN32_WINNT WINVER |
122 | | -#elif !defined(_WIN32_WINNT) |
123 | | - // last resort = Win XP, SP1 is minimum supported |
124 | | - #define _WIN32_WINNT 0x0501 |
125 | | - #ifdef NTDDI_VERSION |
126 | | - #undef NTDDI_VERSION |
127 | | - #endif |
128 | | - #define NTDDI_VERSION 0x05010100 |
129 | | -#endif |
130 | | - |
| 27 | +#ifndef POCO_FORCE_MIN_WINDOWS_OS_SUPPORT |
| 28 | + // Determine the real version. |
| 29 | + // This setting can be forced from UnWindows.h |
| 30 | + #if defined (_WIN32_WINNT_WINBLUE) |
| 31 | + //Windows 8.1 _WIN32_WINNT_WINBLUE (0x0602) |
| 32 | + #ifdef _WIN32_WINNT |
| 33 | + #undef _WIN32_WINNT |
| 34 | + #endif |
| 35 | + #define _WIN32_WINNT _WIN32_WINNT_WINBLUE |
| 36 | + #ifdef NTDDI_VERSION |
| 37 | + #undef NTDDI_VERSION |
| 38 | + #endif |
| 39 | + #define NTDDI_VERSION NTDDI_WINBLUE |
| 40 | + #elif defined (_WIN32_WINNT_WIN8) |
| 41 | + //Windows 8 _WIN32_WINNT_WIN8 (0x0602) |
| 42 | + #ifdef _WIN32_WINNT |
| 43 | + #undef _WIN32_WINNT |
| 44 | + #endif |
| 45 | + #define _WIN32_WINNT _WIN32_WINNT_WIN8 |
| 46 | + #ifdef NTDDI_VERSION |
| 47 | + #undef NTDDI_VERSION |
| 48 | + #endif |
| 49 | + #define NTDDI_VERSION NTDDI_WIN8 |
| 50 | + #elif defined (_WIN32_WINNT_WIN7) |
| 51 | + //Windows 7 _WIN32_WINNT_WIN7 (0x0601) |
| 52 | + #ifdef _WIN32_WINNT |
| 53 | + #undef _WIN32_WINNT |
| 54 | + #endif |
| 55 | + #define _WIN32_WINNT _WIN32_WINNT_WIN7 |
| 56 | + #ifdef NTDDI_VERSION |
| 57 | + #undef NTDDI_VERSION |
| 58 | + #endif |
| 59 | + #define NTDDI_VERSION NTDDI_WIN7 |
| 60 | + #elif defined (_WIN32_WINNT_WS08) |
| 61 | + //Windows Server 2008 _WIN32_WINNT_WS08 (0x0600) |
| 62 | + #ifdef _WIN32_WINNT |
| 63 | + #undef _WIN32_WINNT |
| 64 | + #endif |
| 65 | + #define _WIN32_WINNT _WIN32_WINNT_WS08 |
| 66 | + #ifdef NTDDI_VERSION |
| 67 | + #undef NTDDI_VERSION |
| 68 | + #endif |
| 69 | + #define NTDDI_VERSION NTDDI_WS08 |
| 70 | + #elif defined (_WIN32_WINNT_VISTA) |
| 71 | + //Windows Vista _WIN32_WINNT_VISTA (0x0600) |
| 72 | + #ifdef _WIN32_WINNT |
| 73 | + #undef _WIN32_WINNT |
| 74 | + #endif |
| 75 | + #define _WIN32_WINNT _WIN32_WINNT_VISTA |
| 76 | + #ifdef NTDDI_VERSION |
| 77 | + #undef NTDDI_VERSION |
| 78 | + #endif |
| 79 | + #define NTDDI_VERSION NTDDI_VISTA |
| 80 | + #elif defined (_WIN32_WINNT_LONGHORN) |
| 81 | + //Windows Vista and server 2008 Development _WIN32_WINNT_LONGHORN (0x0600) |
| 82 | + #ifdef _WIN32_WINNT |
| 83 | + #undef _WIN32_WINNT |
| 84 | + #endif |
| 85 | + #define _WIN32_WINNT _WIN32_WINNT_LONGHORN |
| 86 | + #ifdef NTDDI_VERSION |
| 87 | + #undef NTDDI_VERSION |
| 88 | + #endif |
| 89 | + #define NTDDI_VERSION 0x06000000 // hardcoded, VS90 can't find NTDDI_* macros |
| 90 | + #elif defined (_WIN32_WINNT_WS03) |
| 91 | + //Windows Server 2003 with SP1, |
| 92 | + //Windows XP with SP2 _WIN32_WINNT_WS03 (0x0502) |
| 93 | + #ifdef _WIN32_WINNT |
| 94 | + #undef _WIN32_WINNT |
| 95 | + #endif |
| 96 | + #define _WIN32_WINNT _WIN32_WINNT_WS03 |
| 97 | + #ifdef NTDDI_VERSION |
| 98 | + #undef NTDDI_VERSION |
| 99 | + #endif |
| 100 | + #define NTDDI_VERSION NTDDI_WS03 |
| 101 | + #elif defined (_WIN32_WINNT_WINXP) |
| 102 | + //Windows Server 2003, Windows XP _WIN32_WINNT_WINXP (0x0501) |
| 103 | + #ifdef _WIN32_WINNT |
| 104 | + #undef _WIN32_WINNT |
| 105 | + #endif |
| 106 | + #define _WIN32_WINNT _WIN32_WINNT_WINXP |
| 107 | + #ifdef NTDDI_VERSION |
| 108 | + #undef NTDDI_VERSION |
| 109 | + #endif |
| 110 | + #define NTDDI_VERSION NTDDI_WINXP |
| 111 | + #elif defined (_WIN32_WINNT_WIN2K) |
| 112 | + //Windows 2000 _WIN32_WINNT_WIN2K (0x0500) |
| 113 | + #ifdef _WIN32_WINNT |
| 114 | + #undef _WIN32_WINNT |
| 115 | + #endif |
| 116 | + #define _WIN32_WINNT _WIN32_WINNT_WIN2K |
| 117 | + #elif defined (WINVER) |
| 118 | + // fail back on WINVER |
| 119 | + #ifdef _WIN32_WINNT |
| 120 | + #undef _WIN32_WINNT |
| 121 | + #endif |
| 122 | + #define _WIN32_WINNT WINVER |
| 123 | + #elif !defined(_WIN32_WINNT) |
| 124 | + // last resort = Win XP, SP1 is minimum supported |
| 125 | + #define _WIN32_WINNT 0x0501 |
| 126 | + #ifdef NTDDI_VERSION |
| 127 | + #undef NTDDI_VERSION |
| 128 | + #endif |
| 129 | + #define NTDDI_VERSION 0x05010100 |
| 130 | + #endif |
| 131 | +#endif // POCO_FORCE_MIN_WINDOWS_OS_SUPPORT |
131 | 132 |
|
132 | 133 | #if defined(_MSC_VER) && !defined(POCO_MSVC_SECURE_WARNINGS) && !defined(_CRT_SECURE_NO_DEPRECATE) |
133 | 134 | #define _CRT_SECURE_NO_DEPRECATE |
|
0 commit comments