1 // Basic type definitions for X86 cpus.
3 // Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
5 // This file may be distributed under the terms of the GNU GPLv3 license.
9 typedef unsigned char u8;
10 typedef signed char s8;
11 typedef unsigned short u16;
12 typedef signed short s16;
13 typedef unsigned int u32;
14 typedef signed int s32;
17 #define VISIBLE __attribute__((externally_visible))
19 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
20 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
22 #define NULL ((void *)0)