From 43f63d6c0a2d053227e187781e33523be16404d7 Mon Sep 17 00:00:00 2001 From: Siddharth Chandrasekaran Date: Tue, 20 Feb 2024 01:45:19 +0100 Subject: [PATCH] Move more macros into _WIN guard Signed-off-by: Siddharth Chandrasekaran --- include/utils/utils.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/utils/utils.h b/include/utils/utils.h index 5ee309f..5ea7baf 100644 --- a/include/utils/utils.h +++ b/include/utils/utils.h @@ -127,13 +127,16 @@ extern "C" { #define PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop)) #endif -#undef __weak -#define __weak __attribute__((weak)) - #if (defined(_WIN32) || defined(_WIN64)) #define __format_printf(x, y) +#define __noreturn +#define __weak +#define __unreachable() #else -#define __format_printf(x, y) __attribute__((format(printf, x, y))) +#define __format_printf(x, y) __attribute__((format(printf, x, y))) +#define __noreturn __attribute__((noreturn)) +#define __weak __attribute__((weak)) +#define __unreachable() __builtin_unreachable() #endif /**