2020-11-19 01:50:51 +00:00
|
|
|
#if __STDC_VERSION__ >= 199901L
|
|
|
|
#include <stdbool.h>
|
|
|
|
#else
|
|
|
|
#define bool unsigned char
|
|
|
|
#define true 1
|
|
|
|
#define false 0
|
|
|
|
#endif
|
|
|
|
|
2020-07-08 03:57:34 +01:00
|
|
|
#if __STDC_VERSION__ >= 201112L
|
2020-08-09 22:21:40 +01:00
|
|
|
#define zig_noreturn _Noreturn
|
2020-08-09 20:41:43 +01:00
|
|
|
#elif __GNUC__
|
2020-08-09 22:21:40 +01:00
|
|
|
#define zig_noreturn __attribute__ ((noreturn))
|
2020-08-09 20:41:43 +01:00
|
|
|
#elif _MSC_VER
|
2020-08-09 22:21:40 +01:00
|
|
|
#define zig_noreturn __declspec(noreturn)
|
2020-07-08 03:57:34 +01:00
|
|
|
#else
|
2020-08-09 22:21:40 +01:00
|
|
|
#define zig_noreturn
|
2020-07-08 03:57:34 +01:00
|
|
|
#endif
|
|
|
|
|
2020-12-29 01:43:01 +00:00
|
|
|
#if defined(__GNUC__)
|
2020-08-09 23:52:32 +01:00
|
|
|
#define zig_unreachable() __builtin_unreachable()
|
|
|
|
#else
|
|
|
|
#define zig_unreachable()
|
|
|
|
#endif
|
2020-11-19 01:51:26 +00:00
|
|
|
|
2021-01-05 20:59:33 +00:00
|
|
|
#if __STDC_VERSION__ >= 199901L
|
|
|
|
#define zig_restrict restrict
|
|
|
|
#elif defined(__GNUC__)
|
|
|
|
#define zig_restrict __restrict
|
2020-12-29 01:43:01 +00:00
|
|
|
#else
|
2021-01-05 20:59:33 +00:00
|
|
|
#define zig_restrict
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#define zig_breakpoint() __debugbreak()
|
|
|
|
#elif defined(__MINGW32__) || defined(__MINGW64__)
|
|
|
|
#define zig_breakpoint() __debugbreak()
|
2020-12-29 01:43:01 +00:00
|
|
|
#elif defined(__clang__)
|
2021-01-05 20:59:33 +00:00
|
|
|
#define zig_breakpoint() __builtin_debugtrap()
|
2020-12-29 01:43:01 +00:00
|
|
|
#elif defined(__GNUC__)
|
2021-01-05 20:59:33 +00:00
|
|
|
#define zig_breakpoint() __builtin_trap()
|
2020-12-29 01:43:01 +00:00
|
|
|
#elif defined(__i386__) || defined(__x86_64__)
|
2021-01-05 20:59:33 +00:00
|
|
|
#define zig_breakpoint() __asm__ volatile("int $0x03");
|
2020-12-29 01:43:01 +00:00
|
|
|
#else
|
2021-01-05 20:59:33 +00:00
|
|
|
#define zig_breakpoint() raise(SIGTRAP)
|
2020-12-29 01:43:01 +00:00
|
|
|
#endif
|
|
|
|
|
2020-12-29 00:15:29 +00:00
|
|
|
#include <stdint.h>
|
2021-01-05 20:59:33 +00:00
|
|
|
#include <stddef.h>
|
2020-12-29 00:15:29 +00:00
|
|
|
#define int128_t __int128
|
|
|
|
#define uint128_t unsigned __int128
|
2021-01-05 20:59:33 +00:00
|
|
|
void *memcpy (void *zig_restrict, const void *zig_restrict, size_t);
|
2021-01-05 18:08:34 +00:00
|
|
|
|