1 // 2 // File: vk_sdk_platform.h 3 // 4 /* 5 * Copyright (c) 2015-2016 The Khronos Group Inc. 6 * Copyright (c) 2015-2016 Valve Corporation 7 * Copyright (c) 2015-2016 LunarG, Inc. 8 * 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 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 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. 20 */ 21 22 #ifndef VK_SDK_PLATFORM_H 23 #define VK_SDK_PLATFORM_H 24 25 #if defined(_WIN32) 26 #define NOMINMAX 27 #ifndef __cplusplus 28 #undef inline 29 #define inline __inline 30 #endif // __cplusplus 31 32 #if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) 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). 38 // NOTE: This is fixed in Visual Studio 2015. 39 #define snprintf _snprintf 40 #endif 41 42 #define strdup _strdup 43 44 #endif // _WIN32 45 46 #endif // VK_SDK_PLATFORM_H 47