1 #ifndef _LINUX_TYPES_H
2 #define _LINUX_TYPES_H
3 
4 #if _NT_TARGET_VERSION <= 0x500
5 #define _WIN2K_COMPAT_SLIST_USAGE
6 #endif
7 
8 #include <linux/config.h>
9 #include <ntifs.h>
10 #include <ntdddisk.h>
11 #include <windef.h>
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <stdarg.h>
15 #include <wchar.h>
16 
17 typedef unsigned __int8     __u8;
18 typedef signed   __int8     __s8;
19 
20 typedef	signed   __int16	__s16;
21 typedef	unsigned __int16	__u16;
22 
23 typedef	signed   __int32	__s32;
24 typedef	unsigned __int32	__u32;
25 
26 typedef	signed   __int64	__s64;
27 typedef	unsigned __int64	__u64;
28 
29 
30 #ifdef __REACTOS__
31 typedef __s8         s8;
32 typedef __u8         u8;
33 #endif
34 #if defined(_MSC_VER) || defined(__REACTOS__)
35 typedef __s16       s16;
36 typedef __u16       u16;
37 typedef __s32       s32;
38 typedef __u32       u32;
39 typedef __s64       s64;
40 typedef __u64       u64;
41 #endif
42 
43 #define __le16      u16
44 #define __le32      u32
45 #define __le64      u64
46 
47 #define bool        BOOLEAN
48 
49 //
50 // gcc special keyworks
51 //
52 #if defined(_MSC_VER) || !defined(__REACTOS__)
53 /* FIXME: Inspect why this is needed */
54 #define __attribute__(x)
55 #endif
56 #define __bitwise
57 #define __releases(x)
58 
59 #ifdef _MSC_VER
60 #define inline __inline
61 #endif
62 
63 #ifndef noinline
64 #define noinline
65 #endif
66 
67 typedef __u32 __bitwise __be32;
68 typedef __u16 __bitwise __be16;
69 
70 #define uid_t       u16
71 #define gid_t       u16
72 typedef int         pid_t;
73 typedef unsigned __bitwise gfp_t;
74 
75 typedef unsigned short umode_t; /* inode mode */
76 
77 /*
78  * The type used for indexing onto a disc or disc partition.
79  * If required, asm/types.h can override it and define
80  * HAVE_SECTOR_T
81  */
82 typedef unsigned __int64 sector_t;
83 typedef unsigned __int64 blkcnt_t;
84 typedef unsigned __int64 loff_t;
85 
86 #define BITS_PER_LONG  (32)
87 #define ORDER_PER_LONG (05)
88 
89 #if defined(_WIN64)
90 typedef __int64 long_ptr_t;
91 typedef unsigned __int64 ulong_ptr_t;
92 # define CFS_BITS_PER_LONG  (64)
93 # define CFS_ORDER_PER_LONG (06)
94 #else
95 typedef long long_ptr_t;
96 typedef unsigned long ulong_ptr_t;
97 # define CFS_BITS_PER_LONG  (32)
98 # define CFS_ORDER_PER_LONG (05)
99 #endif
100 
101 //
102 // bit spin lock
103 //
104 
105 #define __acquire(x)
106 #define __release(x)
107 
108 #define preempt_enable()
109 #define preempt_disable()
110 
111 //
112 // __FUNCTION__ issue
113 //
114 
115 #if _MSC_VER <= 1300
116 #define __FUNCTION__ ("jbd")
117 #endif
118 
119 #define BUG() do {DbgBreakPoint();} while(0)
120 
121 #endif /* LINUX_TYPES_H */
122