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