blob: ef9a000fb2436e296a65ab15dc170820b16a7068 [file] [log] [blame]
Mark Lobodzinskida6c23c2015-09-01 09:00:16 -06001//
2// File: vk_sdk_platform.h
3//
Mark Lobodzinskida6c23c2015-09-01 09:00:16 -06004/*
Karl Schultz37419ed2016-02-02 12:32:50 -07005 * Copyright (c) 2015-2016 The Khronos Group Inc.
6 * Copyright (c) 2015-2016 Valve Corporation
7 * Copyright (c) 2015-2016 LunarG, Inc.
8 *
Jon Ashburn3ebf1252016-04-19 11:30:31 -06009 * 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 Schultz37419ed2016-02-02 12:32:50 -070012 *
Jon Ashburn3ebf1252016-04-19 11:30:31 -060013 * http://www.apache.org/licenses/LICENSE-2.0
Karl Schultz37419ed2016-02-02 12:32:50 -070014 *
Jon Ashburn3ebf1252016-04-19 11:30:31 -060015 * 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 Schultz37419ed2016-02-02 12:32:50 -070020 */
Mark Lobodzinskida6c23c2015-09-01 09:00:16 -060021
22#ifndef VK_SDK_PLATFORM_H
23#define VK_SDK_PLATFORM_H
24
25#if defined(_WIN32)
Karl Schultz37419ed2016-02-02 12:32:50 -070026#define NOMINMAX
27#ifndef __cplusplus
28#undef inline
29#define inline __inline
30#endif // __cplusplus
Courtney Goeltzenleuchterfa395a92015-09-24 11:51:05 -060031
Mark Youngad779052016-01-06 14:26:04 -070032#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
Courtney Goeltzenleuchterfa395a92015-09-24 11:51:05 -060033// 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 Youngad779052016-01-06 14:26:04 -070038// NOTE: This is fixed in Visual Studio 2015.
Courtney Goeltzenleuchterfa395a92015-09-24 11:51:05 -060039#define snprintf _snprintf
Karl Schultz37419ed2016-02-02 12:32:50 -070040#endif
Mark Youngad779052016-01-06 14:26:04 -070041
Courtney Goeltzenleuchterfa395a92015-09-24 11:51:05 -060042#define strdup _strdup
43
Mark Lobodzinskida6c23c2015-09-01 09:00:16 -060044#endif // _WIN32
45
46#endif // VK_SDK_PLATFORM_H