ReactOS 0.4.15-dev-7889-g76290a6
compat.h
Go to the documentation of this file.
1#ifndef _LIBMACH_COMPAT_H_
2#define _LIBMACH_COMPAT_H_
3
4/* BSD like types */
5typedef signed char schar;
6typedef unsigned char uchar;
7typedef unsigned int uint;
8typedef unsigned long ulong;
9typedef unsigned long long uvlong;
10
11typedef unsigned short u16int;
12typedef short s16int;
13typedef unsigned int u32int;
14typedef int s32int;
15typedef unsigned long long u64int;
16typedef long long s64int;
17
18#ifndef _WIN32
19typedef ulong size_t;
20#endif
21
22#define offsetof(x,y) FIELD_OFFSET(x,y)
23#define nil (0)
24
25#define nelem(arr) (sizeof((arr)[0]) / sizeof((arr)))
26
27int readn(void *fd, char *buf, ulong len);
28int seek(void *fd, ulong off, int mode);
29
31void *RosSymRealloc(void *mem, ulong newsize);
32void xfree(void *v);
33
34#define werrstr(str, ...) DPRINT(str "\n" ,##__VA_ARGS__)
35#define malloc(x) RosSymAllocMem(x)
36#define mallocz(x,y) RosSymAllocMemZero(x,y)
37#define free(x) xfree(x)
38#define USED(x) (*((char *)&(x)) ^= 0)
39#define memset(x,y,z) RtlZeroMemory(x,z)
40
41#endif/*_LIBMACH_COMPAT_H_*/
unsigned long ulong
Definition: linux.h:275
const GLdouble * v
Definition: gl.h:2040
GLsizeiptr size
Definition: glext.h:5919
GLenum mode
Definition: glext.h:6217
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint GLuint num
Definition: glext.h:9618
GLenum GLsizei len
Definition: glext.h:6722
static int fd
Definition: io.c:51
int seek(void *fd, ulong off, int mode)
Definition: pe.c:51
signed char schar
Definition: compat.h:5
long long s64int
Definition: compat.h:16
void xfree(void *v)
Definition: uimain.c:758
unsigned long long uvlong
Definition: compat.h:9
int s32int
Definition: compat.h:14
void * RosSymAllocMemZero(ulong num, ulong size)
Definition: pe.c:97
unsigned char uchar
Definition: compat.h:6
ulong size_t
Definition: compat.h:19
void * RosSymRealloc(void *mem, ulong newsize)
unsigned long ulong
Definition: compat.h:8
unsigned short u16int
Definition: compat.h:11
unsigned int uint
Definition: compat.h:7
unsigned long long u64int
Definition: compat.h:15
short s16int
Definition: compat.h:12
unsigned int u32int
Definition: compat.h:13
int readn(void *fd, char *buf, ulong len)
Definition: pe.c:47
Definition: mem.c:156