diff options
Diffstat (limited to '')
-rw-r--r-- | example/common.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/example/common.h b/example/common.h new file mode 100644 index 0000000..9e6f7b9 --- /dev/null +++ b/example/common.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 dwlr <dweller@cabin.digital> + * + * BSD 3-Clause License (BSD-3-Clause) + * See LICENSE for details + */ + +#pragma once +#pragma GCC diagnostic ignored "-Wlong-long" + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; /* XXX: GCC extension */ +typedef signed char s8; +typedef signed short s16; +typedef signed int s32; +typedef signed long long s64; /* XXX: GCC extension */ + +typedef s8 bool; + +typedef u64 usize; +typedef s64 ssize; + +#define true 1 +#define false 0 + +#define packed __attribute__((packed)) + |