summaryrefslogtreecommitdiff
path: root/example/common.h
blob: 9e6f7b9203e46919e09a536f31daa1c30ecdf0cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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))