mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 23:30:04 +02:00
* vulkan: bump to 1.3.206 * vulkan: bump to 1.3.206 * Delete vulkan-1.2.203.patchset * Delete vulkan-1.2.203.recipe * vulkan: bump to 1.3.238 * Delete vulkan-1.3.206.patchset * vulkan: bump to 1.3.238 * Delete vulkan-1.3.206.recipe
136 lines
5.7 KiB
Plaintext
136 lines
5.7 KiB
Plaintext
From 0a5bf8341bc6b925464df05d021aa097271c1929 Mon Sep 17 00:00:00 2001
|
|
From: X512 <danger_mail@list.ru>
|
|
Date: Sun, 9 Jan 2022 06:34:23 +0900
|
|
Subject: basic fixes for haiku
|
|
|
|
|
|
diff --git a/loader/loader.c b/loader/loader.c
|
|
index e6bf8bd..8919447 100644
|
|
--- a/loader/loader.c
|
|
+++ b/loader/loader.c
|
|
@@ -2852,6 +2852,17 @@ static VkResult read_data_files_in_search_paths(const struct loader_instance *in
|
|
#if defined(_WIN32)
|
|
char *package_path = NULL;
|
|
#else
|
|
+
|
|
+#if defined(__HAIKU__)
|
|
+ char *xdg_config_home = NULL;
|
|
+ char *xdg_config_dirs = NULL;
|
|
+ char *xdg_data_home = NULL;
|
|
+ char *xdg_data_dirs =
|
|
+ "/boot/home/config/non-packaged/add-ons:"
|
|
+ "/boot/home/config/add-ons:"
|
|
+ "/boot/system/non-packaged/add-ons:"
|
|
+ "/boot/system/add-ons";
|
|
+#else
|
|
// Determine how much space is needed to generate the full search path
|
|
// for the current manifest files.
|
|
char *xdg_config_home = loader_secure_getenv("XDG_CONFIG_HOME", inst);
|
|
@@ -2870,6 +2881,8 @@ static VkResult read_data_files_in_search_paths(const struct loader_instance *in
|
|
if (NULL == xdg_data_dirs || '\0' == xdg_data_dirs[0]) {
|
|
xdg_data_dirs = FALLBACK_DATA_DIRS;
|
|
}
|
|
+#endif
|
|
+
|
|
#endif
|
|
|
|
char *home = NULL;
|
|
diff --git a/loader/loader_environment.c b/loader/loader_environment.c
|
|
index f4205f4..c8299f6 100644
|
|
--- a/loader/loader_environment.c
|
|
+++ b/loader/loader_environment.c
|
|
@@ -36,7 +36,7 @@
|
|
|
|
// Environment variables
|
|
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
|
|
- defined(__OpenBSD__)
|
|
+ defined(__OpenBSD__) || defined(__HAIKU__)
|
|
|
|
bool is_high_integrity() { return geteuid() != getuid() || getegid() != getgid(); }
|
|
|
|
@@ -48,7 +48,7 @@ char *loader_getenv(const char *name, const struct loader_instance *inst) {
|
|
}
|
|
|
|
char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
|
|
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
|
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
|
// Apple does not appear to have a secure getenv implementation.
|
|
// The main difference between secure getenv and getenv is that secure getenv
|
|
// returns NULL if the process is being run with elevated privileges by a normal user.
|
|
diff --git a/loader/loader_environment.h b/loader/loader_environment.h
|
|
index 2eb61d5..eb03fa0 100644
|
|
--- a/loader/loader_environment.h
|
|
+++ b/loader/loader_environment.h
|
|
@@ -36,7 +36,7 @@ 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__) || defined(__OpenBSD__)
|
|
+ defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
|
|
|
bool is_high_integrity();
|
|
|
|
@@ -54,4 +54,4 @@ VkResult loader_add_environment_layers(struct loader_instance *inst, const enum
|
|
const struct loader_envvar_filter *enable_filter,
|
|
const struct loader_envvar_disable_layers_filter *disable_filter,
|
|
struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list,
|
|
- const struct loader_layer_list *source_list);
|
|
\ No newline at end of file
|
|
+ const struct loader_layer_list *source_list);
|
|
diff --git a/loader/stack_allocation.h b/loader/stack_allocation.h
|
|
index d1958fb..693955c 100644
|
|
--- a/loader/stack_allocation.h
|
|
+++ b/loader/stack_allocation.h
|
|
@@ -36,7 +36,7 @@
|
|
#include <stdlib.h>
|
|
#endif
|
|
|
|
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
|
+#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
|
#define loader_stack_alloc(size) alloca(size)
|
|
#elif defined(_WIN32)
|
|
#define loader_stack_alloc(size) _alloca(size)
|
|
diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h
|
|
index 44120f2..adc2359 100644
|
|
--- a/loader/vk_loader_platform.h
|
|
+++ b/loader/vk_loader_platform.h
|
|
@@ -44,7 +44,7 @@
|
|
#endif // defined(__Fuchsia__)
|
|
|
|
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
|
|
- defined(__OpenBSD__)
|
|
+ defined(__OpenBSD__) || defined(__HAIKU__)
|
|
#include <unistd.h>
|
|
// Note: The following file is for dynamic loading:
|
|
#include <dlfcn.h>
|
|
@@ -111,7 +111,7 @@
|
|
#define ENABLED_LAYERS_ENV "VK_INSTANCE_LAYERS"
|
|
|
|
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
|
|
- defined(__OpenBSD__)
|
|
+ defined(__OpenBSD__) || defined(__HAIKU__)
|
|
/* Linux-specific common code: */
|
|
|
|
// VK Library Filenames, Paths, etc.:
|
|
@@ -233,7 +233,7 @@ static inline void loader_platform_thread_once_fn(pthread_once_t *ctl, void (*fu
|
|
#endif
|
|
|
|
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
|
|
- defined(__OpenBSD__)
|
|
+ defined(__OpenBSD__) || defined(__HAIKU__)
|
|
|
|
// File IO
|
|
static inline bool loader_platform_file_exists(const char *path) {
|
|
@@ -294,7 +294,7 @@ static inline char *loader_platform_executable_path(char *buffer, size_t size) {
|
|
|
|
return buffer;
|
|
}
|
|
-#elif defined(__Fuchsia__) || defined(__OpenBSD__)
|
|
+#elif defined(__Fuchsia__) || defined(__OpenBSD__) || defined(__HAIKU__)
|
|
static inline char *loader_platform_executable_path(char *buffer, size_t size) { return NULL; }
|
|
#elif defined(__QNXNTO__)
|
|
|
|
--
|
|
2.37.3
|
|
|