Skip to content

Commit

Permalink
Move more macros into _WIN guard
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Feb 20, 2024
1 parent 5cfbd79 commit 43f63d6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions include/utils/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down

0 comments on commit 43f63d6

Please sign in to comment.