blob: 015fef26d3badc2a24350b7a9e581efa8aea4ff2 (
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
|
// Copyright 2008-2010 Segher Boessenkool <segher@kernel.crashing.org>
// Licensed under the terms of the GNU GPL, version 2
// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
#ifndef _TYPES_H
#define _TYPES_H
#include <stddef.h>
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef signed short s16;
typedef signed int s32;
#define ARRAY_SIZE(x) (sizeof x / sizeof x[0])
#define subtype(_type, _base, _field) \
(void *)((u8 *)(_base) - offsetof(_type, _field))
#endif
|