From b81216715bcb0095843c4543db18b5ed68f7f0c6 Mon Sep 17 00:00:00 2001 From: Cocoa <i@uwucocoa.moe> Date: Sun, 3 Mar 2024 23:48:02 +0800 Subject: [PATCH] add support for Solaris (#71) --- README.md | 2 +- ruapu.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fee184e..37aec55 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ int main() ``` </td></tr> -<tr><td>OS</td><td>✅ Windows<br/>✅ Linux<br/>✅ macOS<br/>✅ Android<br/>✅ iOS<br/>✅ FreeBSD<br/>✅ NetBSD<br/>✅ OpenBSD<br/>✅ DragonflyBSD<br/>✅ SyterKit</td></tr> +<tr><td>OS</td><td>✅ Windows<br/>✅ Linux<br/>✅ macOS<br/>✅ Android<br/>✅ iOS<br/>✅ FreeBSD<br/>✅ NetBSD<br/>✅ OpenBSD<br/>✅ DragonflyBSD<br/>✅ Solaris<br/>✅ SyterKit</td></tr> <tr><td>Compiler</td><td>✅ GCC<br/>✅ Clang<br/>✅ MSVC<br/>✅ MinGW</td></tr> </table> diff --git a/ruapu.h b/ruapu.h index 9981f07..2160b06 100644 --- a/ruapu.h +++ b/ruapu.h @@ -71,7 +71,7 @@ static int ruapu_detect_isa(const void* some_inst) } #endif // WINAPI_FAMILY == WINAPI_FAMILY_APP -#elif defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__ +#elif defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__ || defined __sun__ #include <signal.h> #include <setjmp.h> #include <string.h> @@ -131,7 +131,7 @@ static int ruapu_detect_isa(ruapu_some_inst some_inst) return g_ruapu_sigill_caught ? 0 : 1; } -#endif // defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__ || defined __SYTERKIT__ +#endif // defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__ || defined __sun__ || defined __SYTERKIT__ #if defined _WIN32 @@ -433,7 +433,7 @@ static void ruapu_detect_openrisc_isa() void ruapu_init() { -#if defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__ || defined __SYTERKIT__ +#if defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__ || defined __sun__ || defined __SYTERKIT__ size_t j = 0; for (size_t i = 0; i < sizeof(g_ruapu_isa_map) / sizeof(g_ruapu_isa_map[0]); i++) {