ReactOS 0.4.15-dev-7670-g69b08be
types.h
Go to the documentation of this file.
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
17typedef unsigned __int8 __u8;
18typedef signed __int8 __s8;
19
20typedef signed __int16 __s16;
21typedef unsigned __int16 __u16;
22
23typedef signed __int32 __s32;
24typedef unsigned __int32 __u32;
25
26typedef signed __int64 __s64;
27typedef unsigned __int64 __u64;
28
29
30#ifdef __REACTOS__
31typedef __s8 s8;
32typedef __u8 u8;
33#endif
34#if defined(_MSC_VER) || defined(__REACTOS__)
35typedef __s16 s16;
36typedef __u16 u16;
37typedef __s32 s32;
38typedef __u32 u32;
39typedef __s64 s64;
40typedef __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
69
70#define uid_t u16
71#define gid_t u16
72typedef int pid_t;
73typedef unsigned __bitwise gfp_t;
74
75typedef 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 */
82typedef unsigned __int64 sector_t;
83typedef unsigned __int64 blkcnt_t;
84typedef unsigned __int64 loff_t;
85
86#define BITS_PER_LONG (32)
87#define ORDER_PER_LONG (05)
88
89#if defined(_WIN64)
90typedef __int64 long_ptr_t;
91typedef unsigned __int64 ulong_ptr_t;
92# define CFS_BITS_PER_LONG (64)
93# define CFS_ORDER_PER_LONG (06)
94#else
95typedef long long_ptr_t;
96typedef 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 */
#define __int8
Definition: basetyps.h:25
#define __int16
Definition: basetyps.h:22
#define __int64
Definition: basetyps.h:16
#define __int32
Definition: basetyps.h:19
u16 __u16
Definition: btrfs.h:18
u8 __u8
Definition: btrfs.h:17
u32 __u32
Definition: btrfs.h:19
u64 __u64
Definition: btrfs.h:20
DWORD pid_t
Definition: types.h:91
unsigned __int16 __u16
Definition: types.h:21
#define __bitwise
Definition: types.h:56
unsigned __int8 __u8
Definition: types.h:17
unsigned __int64 sector_t
Definition: types.h:82
unsigned __bitwise gfp_t
Definition: types.h:73
__u32 __bitwise __be32
Definition: types.h:67
__u16 __bitwise __be16
Definition: types.h:68
unsigned long ulong_ptr_t
Definition: types.h:96
unsigned __int64 blkcnt_t
Definition: types.h:83
unsigned __int32 __u32
Definition: types.h:24
signed __int16 __s16
Definition: types.h:20
unsigned __int64 __u64
Definition: types.h:27
unsigned short umode_t
Definition: types.h:75
signed __int32 __s32
Definition: types.h:23
signed __int8 __s8
Definition: types.h:18
unsigned __int64 loff_t
Definition: types.h:84
signed __int64 __s64
Definition: types.h:26
long long_ptr_t
Definition: types.h:95
signed int s32
Definition: linux.h:57
signed char s8
Definition: linux.h:51
signed long long s64
Definition: linux.h:60
signed short s16
Definition: linux.h:54
#define u16
Definition: types.h:8
#define u32
Definition: types.h:9
#define u64
Definition: types.h:10
#define u8
Definition: types.h:7