ciabatta/include/cia-def.h

29 lines
708 B
C
Raw Normal View History

2023-07-22 14:30:04 +00:00
#pragma once
2023-07-28 08:53:06 +00:00
// Since we're re-defining noreturn below, this would mess
// with __declspec(noreturn) in windows headers, which
// is hidden behind a define. Good thing, because now we
// can override that define over here.
#if defined(_CIA_OS_WINDOWS)
#define DECLSPEC_NORETURN __declspec("noreturn")
#endif
2023-07-22 16:28:16 +00:00
// Pre-C23 keyword macros and stddef
2023-07-22 14:30:04 +00:00
#define static_assert _Static_assert
2023-07-22 16:28:16 +00:00
#define NULL ((void *)0)
2023-07-22 14:30:04 +00:00
// Assert commonly-accepted platform-invariant sizes
2023-07-28 13:15:38 +00:00
#include <stdint.h>
#include <stdbool.h>
2023-07-23 15:33:12 +00:00
2023-07-22 14:30:04 +00:00
// Short type definitions
typedef int8_t i8;
typedef uint8_t u8;
typedef int16_t i16;
typedef uint16_t u16;
typedef int32_t i32;
typedef uint32_t u32;
typedef int64_t i64;
typedef uint64_t u64;