| Chris@63 | 1 // Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors | 
| Chris@63 | 2 // Licensed under the MIT License: | 
| Chris@63 | 3 // | 
| Chris@63 | 4 // Permission is hereby granted, free of charge, to any person obtaining a copy | 
| Chris@63 | 5 // of this software and associated documentation files (the "Software"), to deal | 
| Chris@63 | 6 // in the Software without restriction, including without limitation the rights | 
| Chris@63 | 7 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 
| Chris@63 | 8 // copies of the Software, and to permit persons to whom the Software is | 
| Chris@63 | 9 // furnished to do so, subject to the following conditions: | 
| Chris@63 | 10 // | 
| Chris@63 | 11 // The above copyright notice and this permission notice shall be included in | 
| Chris@63 | 12 // all copies or substantial portions of the Software. | 
| Chris@63 | 13 // | 
| Chris@63 | 14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 
| Chris@63 | 15 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 
| Chris@63 | 16 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 
| Chris@63 | 17 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 
| Chris@63 | 18 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | 
| Chris@63 | 19 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 
| Chris@63 | 20 // THE SOFTWARE. | 
| Chris@63 | 21 | 
| Chris@63 | 22 #ifndef KJ_WINDOWS_SANITY_H_ | 
| Chris@63 | 23 #define KJ_WINDOWS_SANITY_H_ | 
| Chris@63 | 24 | 
| Chris@63 | 25 #if defined(__GNUC__) && !KJ_HEADER_WARNINGS | 
| Chris@63 | 26 #pragma GCC system_header | 
| Chris@63 | 27 #endif | 
| Chris@63 | 28 | 
| Chris@63 | 29 #ifndef _INC_WINDOWS | 
| Chris@63 | 30 #error "windows.h needs to be included before kj/windows-sanity.h (or perhaps you don't need either?)" | 
| Chris@63 | 31 #endif | 
| Chris@63 | 32 | 
| Chris@63 | 33 namespace win32 { | 
| Chris@63 | 34   const auto ERROR_ = ERROR; | 
| Chris@63 | 35 #undef ERROR | 
| Chris@63 | 36   const auto ERROR = ERROR_; | 
| Chris@63 | 37 } | 
| Chris@63 | 38 | 
| Chris@63 | 39 using win32::ERROR; | 
| Chris@63 | 40 | 
| Chris@63 | 41 #endif  // KJ_WINDOWS_SANITY_H_ |