1 | // |
---|
2 | // Platform_WIN32.h |
---|
3 | // |
---|
4 | // $Id: //poco/1.3/Foundation/include/Poco/Platform_WIN32.h#5 $ |
---|
5 | // |
---|
6 | // Library: Foundation |
---|
7 | // Package: Core |
---|
8 | // Module: Platform |
---|
9 | // |
---|
10 | // Platform and architecture identification macros |
---|
11 | // and platform-specific definitions for Windows. |
---|
12 | // |
---|
13 | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. |
---|
14 | // and Contributors. |
---|
15 | // |
---|
16 | // Permission is hereby granted, free of charge, to any person or organization |
---|
17 | // obtaining a copy of the software and accompanying documentation covered by |
---|
18 | // this license (the "Software") to use, reproduce, display, distribute, |
---|
19 | // execute, and transmit the Software, and to prepare derivative works of the |
---|
20 | // Software, and to permit third-parties to whom the Software is furnished to |
---|
21 | // do so, all subject to the following: |
---|
22 | // |
---|
23 | // The copyright notices in the Software and this entire statement, including |
---|
24 | // the above license grant, this restriction and the following disclaimer, |
---|
25 | // must be included in all copies of the Software, in whole or in part, and |
---|
26 | // all derivative works of the Software, unless such copies or derivative |
---|
27 | // works are solely in the form of machine-executable object code generated by |
---|
28 | // a source language processor. |
---|
29 | // |
---|
30 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
---|
31 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
---|
32 | // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT |
---|
33 | // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE |
---|
34 | // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, |
---|
35 | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
---|
36 | // DEALINGS IN THE SOFTWARE. |
---|
37 | // |
---|
38 | |
---|
39 | |
---|
40 | #ifndef Foundation_Platform_WIN32_INCLUDED |
---|
41 | #define Foundation_Platform_WIN32_INCLUDED |
---|
42 | |
---|
43 | |
---|
44 | // Verify that we're built with the multithreaded |
---|
45 | // versions of the runtime libraries |
---|
46 | #if defined(_MSC_VER) && !defined(_MT) |
---|
47 | #error Must compile with /MD, /MDd, /MT or /MTd |
---|
48 | #endif |
---|
49 | |
---|
50 | |
---|
51 | // Check debug/release settings consistency |
---|
52 | #if defined(NDEBUG) && defined(_DEBUG) |
---|
53 | #error Inconsistent build settings (check for /MD[d]) |
---|
54 | #endif |
---|
55 | |
---|
56 | |
---|
57 | // Reduce bloat imported by "Poco/UnWindows.h" |
---|
58 | #if defined(_WIN32) |
---|
59 | #if !defined(_WIN32_WINNT) |
---|
60 | #define _WIN32_WINNT 0x0500 |
---|
61 | #endif |
---|
62 | #if !defined(WIN32_LEAN_AND_MEAN) && !defined(POCO_BLOATED_WIN32) |
---|
63 | #define WIN32_LEAN_AND_MEAN |
---|
64 | #endif |
---|
65 | #endif |
---|
66 | |
---|
67 | |
---|
68 | // Unicode Support |
---|
69 | #if defined(UNICODE) && !defined(POCO_WIN32_UTF8) |
---|
70 | #define POCO_WIN32_UTF8 |
---|
71 | #endif |
---|
72 | |
---|
73 | |
---|
74 | // Turn off some annoying warnings |
---|
75 | #if defined(_MSC_VER) |
---|
76 | #pragma warning(disable:4018) // signed/unsigned comparison |
---|
77 | #pragma warning(disable:4251) // ... needs to have dll-interface warning |
---|
78 | #pragma warning(disable:4355) // 'this' : used in base member initializer list |
---|
79 | #pragma warning(disable:4996) // VC++ 8.0 deprecation warnings |
---|
80 | #pragma warning(disable:4351) // new behavior: elements of array '...' will be default initialized |
---|
81 | #pragma warning(disable:4675) // resolved overload was found by argument-dependent lookup |
---|
82 | #endif |
---|
83 | |
---|
84 | |
---|
85 | #if defined(__INTEL_COMPILER) |
---|
86 | #pragma warning(disable:1738) // base class dllexport/dllimport specification differs from that of the derived class |
---|
87 | #pragma warning(disable:1478) // function ... was declared "deprecated" |
---|
88 | #pragma warning(disable:1744) // field of class type without a DLL interface used in a class with a DLL interface |
---|
89 | #endif |
---|
90 | |
---|
91 | |
---|
92 | #endif // Foundation_Platform_WIN32_INCLUDED |
---|