Mark Lobodzinski | da6c23c | 2015-09-01 09:00:16 -0600 | [diff] [blame] | 1 | // |
| 2 | // File: vk_sdk_platform.h |
| 3 | // |
Mark Lobodzinski | da6c23c | 2015-09-01 09:00:16 -0600 | [diff] [blame] | 4 | /* |
Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 5 | * Copyright (c) 2015-2016 The Khronos Group Inc. |
| 6 | * Copyright (c) 2015-2016 Valve Corporation |
| 7 | * Copyright (c) 2015-2016 LunarG, Inc. |
| 8 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 9 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 10 | * you may not use this file except in compliance with the License. |
| 11 | * You may obtain a copy of the License at |
Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 12 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 13 | * http://www.apache.org/licenses/LICENSE-2.0 |
Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 14 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 15 | * Unless required by applicable law or agreed to in writing, software |
| 16 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 | * See the License for the specific language governing permissions and |
| 19 | * limitations under the License. |
Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 20 | */ |
Mark Lobodzinski | da6c23c | 2015-09-01 09:00:16 -0600 | [diff] [blame] | 21 | |
| 22 | #ifndef VK_SDK_PLATFORM_H |
| 23 | #define VK_SDK_PLATFORM_H |
| 24 | |
| 25 | #if defined(_WIN32) |
Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 26 | #define NOMINMAX |
| 27 | #ifndef __cplusplus |
| 28 | #undef inline |
| 29 | #define inline __inline |
| 30 | #endif // __cplusplus |
Courtney Goeltzenleuchter | fa395a9 | 2015-09-24 11:51:05 -0600 | [diff] [blame] | 31 | |
Mark Young | ad77905 | 2016-01-06 14:26:04 -0700 | [diff] [blame] | 32 | #if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) |
Courtney Goeltzenleuchter | fa395a9 | 2015-09-24 11:51:05 -0600 | [diff] [blame] | 33 | // C99: |
| 34 | // Microsoft didn't implement C99 in Visual Studio; but started adding it with |
| 35 | // VS2013. However, VS2013 still didn't have snprintf(). The following is a |
| 36 | // work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the |
| 37 | // "CMakeLists.txt" file). |
Mark Young | ad77905 | 2016-01-06 14:26:04 -0700 | [diff] [blame] | 38 | // NOTE: This is fixed in Visual Studio 2015. |
Courtney Goeltzenleuchter | fa395a9 | 2015-09-24 11:51:05 -0600 | [diff] [blame] | 39 | #define snprintf _snprintf |
Karl Schultz | 37419ed | 2016-02-02 12:32:50 -0700 | [diff] [blame] | 40 | #endif |
Mark Young | ad77905 | 2016-01-06 14:26:04 -0700 | [diff] [blame] | 41 | |
Courtney Goeltzenleuchter | fa395a9 | 2015-09-24 11:51:05 -0600 | [diff] [blame] | 42 | #define strdup _strdup |
| 43 | |
Mark Lobodzinski | da6c23c | 2015-09-01 09:00:16 -0600 | [diff] [blame] | 44 | #endif // _WIN32 |
| 45 | |
| 46 | #endif // VK_SDK_PLATFORM_H |