56 # error "64-bit Windows is required"
58 # define _KB_DLL_EXPORT __declspec(dllexport)
59 # define _KB_DLL_IMPORT __declspec(dllimport)
60 # define _KB_DLL_LOCAL
61 # define VA_LIST __builtin_va_list
62 # define VA_START va_start
63 # define VA_ARG va_arg
64 # define VA_END va_end
65 # define FORMAT_CHECK(fmt_index, arg_index)
67 # define DEBUG_BREAK __debugbreak()
71 # define _KB_DLL_EXPORT __attribute__((visibility("default")))
72 # define _KB_DLL_IMPORT __attribute__((visibility("default")))
73 # define _KB_DLL_LOCAL __attribute__((visibility("hidden")))
74 # define VA_LIST va_list
75 # define VA_START va_start
76 # define VA_ARG va_arg
77 # define VA_END va_end
78 # define FORMAT_CHECK(fmt_index, arg_index) __attribute__((__format__(__printf__, fmt_index, arg_index)))
79 # define DEBUG_BREAK __builtin_trap()
110 # define KB_API _KB_DLL_EXPORT
112 # define KB_API _KB_DLL_IMPORT
114 # define KB_LOCAL _KB_DLL_LOCAL
120 # define KB_STATIC_LIB
124 #ifndef __has_builtin
125 # define __has_builtin(x) 0
128 #if __has_builtin(__builtin_expect) \
129 || (defined(__GNUC__) && (__GNUC__ > 3) || (__GNUC__ == 3 && defined(__GNUC_MINOR__) && __GNUC_MINOR__ >= 1))
130 # define KB_LIKELY(x) __builtin_expect((x), 1)
131 # define KB_UNLIKELY(x) __builtin_expect((x), 0)
133 # define KB_LIKELY(x) x
134 # define KB_UNLIKELY(x) x