- Merge some small changes from aicom-network-branch to fix potential memory corrupt...
[reactos.git] / reactos / lib / drivers / oskittcp / include / oskitfreebsd.h
1 #ifndef _OSKITFREEBSD_H
2 #define _OSKITFREEBSD_H
3
4 // Hacky? Yep
5 #undef PAGE_SIZE
6 #undef PAGE_SHIFT
7 #include <ntddk.h>
8
9 #ifdef linux
10 #include <netinet/in.h>
11 #endif
12
13 extern void oskittcp_die(const char *file, int line);
14
15 #define printf DbgPrint
16 #define vprintf DbgVPrint
17 #define ovbcopy(src,dst,n) memmove(dst,src,n)
18 #define bzero(x,y) memset(x,0,y)
19 #define bcopy(src,dst,n) memcpy(dst,src,n)
20 #ifdef _MSC_VER
21 static __inline void panic ( const char* fmt, ... )
22 {
23 va_list arg;
24 va_start(arg, fmt);
25 printf ( "oskit PANIC: " );
26 vprintf ( fmt, arg );
27 va_end(arg);
28 // TODO FIXME - print stack trace...
29 oskittcp_die("<unknown file>",-1);
30 }
31 #else//_MSC_VER
32 #define panic(...) do { printf(__VA_ARGS__); \
33 oskittcp_die(__FILE__,__LINE__); } while(0)
34 #endif//_MSC_VER
35 #define kmem_malloc(x,y,z) malloc(y,0,0)
36
37 #endif//_OSKITFREEBSD_H