mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-24 15:50:17 +00:00
b35527922c
Added FreeBSD in supported platforms in vk_loader_platform.h, and tests,
defined BSD_VISIBLE and included some necessary header files for
Vulkan-Loader to compile on FreeBSD.
v2: did the same in loader/loader.c (Charles Giessen)
v3: did the same in the tests (Charles Giessen)
v4: applied this downstream patch from Jan Beich because there's no /proc
on FreeBSD: 7caf52e37b/graphics/vulkan-loader/files/patch-loader_vk__loader__platform.h
(Jan Beich)
v4: rebased to master and modified tests/loader_regression_tests.cpp,
tests/loader_testing_main.cpp
v5: moved the definition of __BSD_VISIBLE 1 (required for alloca to
work) in CMakeLists.txt from header files (Charles Giessen)
v6: replaced ${CMAKE_SYSTEM_NAME} with CMAKE_SYSTEM_NAME in
loader/CMakeLists.txt to match the style of previous checks (Jan Beich)
v7: replaced add_compile_definitions with target_compile_definitions to
prevent the macro from being applied unnecessarily (Charles Giessen)
44 lines
1.5 KiB
C
44 lines
1.5 KiB
C
/*
|
|
*
|
|
* Copyright (c) 2014-2021 The Khronos Group Inc.
|
|
* Copyright (c) 2014-2021 Valve Corporation
|
|
* Copyright (c) 2014-2021 LunarG, Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
* Author: Jon Ashburn <jon@lunarg.com>
|
|
* Author: Courtney Goeltzenleuchter <courtney@LunarG.com>
|
|
* Author: Chia-I Wu <olvaffe@gmail.com>
|
|
* Author: Chia-I Wu <olv@lunarg.com>
|
|
* Author: Mark Lobodzinski <mark@LunarG.com>
|
|
* Author: Lenny Komow <lenny@lunarg.com>
|
|
* Author: Charles Giessen <charles@lunarg.com>
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "loader_common.h"
|
|
|
|
// Common functionality for accessing environemnt variables and whether the process is running in priviledged mode
|
|
|
|
char *loader_getenv(const char *name, const struct loader_instance *inst);
|
|
void loader_free_getenv(char *val, const struct loader_instance *inst);
|
|
|
|
#if defined(WIN32) || defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__)
|
|
|
|
bool is_high_integrity();
|
|
|
|
char *loader_secure_getenv(const char *name, const struct loader_instance *inst);
|
|
|
|
#endif |