summaryrefslogtreecommitdiff
path: root/stage3/def.h
blob: 0f47f513fa56718a638286629b2be9fc9093700e (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
#ifndef _DEF_H_
#define _DEF_H_

#define nil ((void *) 0x0)

typedef unsigned char u8;
typedef signed char i8;

typedef unsigned short u16;
typedef short i16;

typedef unsigned int u32;
typedef int i32;

typedef unsigned long u64;
typedef long i64;

typedef u64 usize;
typedef i64 isize;

typedef u8 bool;
#define false ((bool) 0)
#define true ((bool) 1)

#define BITCAST(expr, from, to) (((union { from f; to t; }) { .f = expr }).t)

#endif