Mark Lobodzinski | eccbb37 | 2015-09-01 09:00:16 -0600 | [diff] [blame] | 1 | // |
| 2 | // File: vk_sdk_platform.h |
| 3 | // |
| 4 | |
| 5 | /* |
| 6 | ** Copyright (c) 2015 The Khronos Group Inc. |
| 7 | ** |
| 8 | ** Permission is hereby granted, free of charge, to any person obtaining a |
| 9 | ** copy of this software and/or associated documentation files (the |
| 10 | ** "Materials"), to deal in the Materials without restriction, including |
| 11 | ** without limitation the rights to use, copy, modify, merge, publish, |
| 12 | ** distribute, sublicense, and/or sell copies of the Materials, and to |
| 13 | ** permit persons to whom the Materials are furnished to do so, subject to |
| 14 | ** the following conditions: |
| 15 | ** |
| 16 | ** The above copyright notice and this permission notice shall be included |
| 17 | ** in all copies or substantial portions of the Materials. |
| 18 | ** |
| 19 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 20 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 21 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 22 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 23 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 24 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 25 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
| 26 | */ |
| 27 | |
| 28 | #ifndef VK_SDK_PLATFORM_H |
| 29 | #define VK_SDK_PLATFORM_H |
| 30 | |
| 31 | #if defined(_WIN32) |
| 32 | # define NOMINMAX |
| 33 | # ifndef __cplusplus |
| 34 | # undef inline |
| 35 | # define inline __inline |
| 36 | # endif // __cplusplus |
Courtney Goeltzenleuchter | c3f3742 | 2015-09-24 11:51:05 -0600 | [diff] [blame] | 37 | |
| 38 | // C99: |
| 39 | // Microsoft didn't implement C99 in Visual Studio; but started adding it with |
| 40 | // VS2013. However, VS2013 still didn't have snprintf(). The following is a |
| 41 | // work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the |
| 42 | // "CMakeLists.txt" file). |
| 43 | #define snprintf _snprintf |
| 44 | #define strdup _strdup |
| 45 | |
Mark Lobodzinski | eccbb37 | 2015-09-01 09:00:16 -0600 | [diff] [blame] | 46 | #endif // _WIN32 |
| 47 | |
| 48 | #endif // VK_SDK_PLATFORM_H |