aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/apf/xlnk-sysdef.h
blob: b6334be3b9c45e06f3a4ad84c85a7803837df662 (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
30
31
32
33
34
#ifndef XLNK_SYSDEF_H
#define XLNK_SYSDEF_H

#if __SIZEOF_POINTER__  == 4
	#define XLNK_SYS_BIT_WIDTH 32
#elif __SIZEOF_POINTER__  == 8
	#define XLNK_SYS_BIT_WIDTH 64
#endif

#include <linux/types.h>

#if XLNK_SYS_BIT_WIDTH == 32

	typedef u32 xlnk_intptr_type;
	typedef s32 xlnk_int_type;
	typedef u32 xlnk_uint_type;
	typedef u8 xlnk_byte_type;
	typedef s8 xlnk_char_type;
	#define xlnk_enum_type s32

#elif XLNK_SYS_BIT_WIDTH == 64

	typedef u64 xlnk_intptr_type;
	typedef s32 xlnk_int_type;
	typedef u32 xlnk_uint_type;
	typedef u8 xlnk_byte_type;
	typedef s8 xlnk_char_type;
	#define xlnk_enum_type s32

#else
	#error "Please define application bit width and system bit width"
#endif

#endif