ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

compat.h
Go to the documentation of this file.
00001 #ifndef _LIBMACH_COMPAT_H_
00002 #define _LIBMACH_COMPAT_H_
00003 
00004 /* BSD like types */
00005 typedef signed char schar;
00006 typedef unsigned char uchar;
00007 typedef unsigned int uint;
00008 typedef unsigned long ulong;
00009 typedef unsigned long long uvlong;
00010 
00011 typedef unsigned short u16int;
00012 typedef short s16int;
00013 typedef unsigned int u32int;
00014 typedef int s32int;
00015 typedef unsigned long long u64int;
00016 typedef long long s64int;
00017 
00018 #ifndef _WIN32
00019 typedef ulong size_t;
00020 #endif
00021 
00022 DECLSPEC_NORETURN
00023 NTSYSAPI
00024 VOID
00025 NTAPI
00026 RtlRaiseStatus(IN NTSTATUS Status);
00027 
00028 #undef assert
00029 #define assert(x) do { \
00030     if (!(x)) { \
00031         werrstr("(%s:%d) assertion " #x " failed\n", __FILE__, __LINE__); \
00032         RtlRaiseStatus(STATUS_ASSERTION_FAILURE); \
00033     } \
00034     } while (0)
00035 #define offsetof(x,y) FIELD_OFFSET(x,y)
00036 #define nil (0)
00037 
00038 #define nelem(arr) (sizeof((arr)[0]) / sizeof((arr)))
00039 
00040 int readn(void *fd, char *buf, ulong len);
00041 int seek(void *fd, ulong off, int mode);
00042 
00043 void *RosSymAllocMemZero(ulong num, ulong size);
00044 void *RosSymRealloc(void *mem, ulong newsize);
00045 void xfree(void *v);
00046 
00047 #define werrstr(str, ...) DPRINT(str "\n" ,##__VA_ARGS__)
00048 #if 0
00049 #ifdef NDEBUG
00050 #define werrstr(x, ...)
00051 #else
00052 #define werrstr(x, ...) printf("(%s:%d) " x "\n",__FILE__,__LINE__,##__VA_ARGS__)
00053 #endif
00054 #endif
00055 
00056 #define malloc(x) RosSymAllocMem(x)
00057 #define mallocz(x,y) RosSymAllocMemZero(x,y)
00058 #define free(x) xfree(x)
00059 #define USED(x) (*((char *)&(x)) ^= 0)
00060 #define memset(x,y,z) RtlZeroMemory(x,z)
00061 
00062 #endif/*_LIBMACH_COMPAT_H_*/

Generated on Wed May 23 2012 04:17:05 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.