2004-05-29 00:16:39 +00:00
|
|
|
#ifndef _OSKITFREEBSD_H
|
|
|
|
#define _OSKITFREEBSD_H
|
|
|
|
|
2008-12-23 18:18:23 +00:00
|
|
|
// Hacky? Yep
|
2008-12-23 18:16:48 +00:00
|
|
|
#undef PAGE_SIZE
|
|
|
|
#undef PAGE_SHIFT
|
2005-12-01 21:37:19 +00:00
|
|
|
#include <ntddk.h>
|
2005-06-20 13:17:21 +00:00
|
|
|
|
2004-11-07 20:37:21 +00:00
|
|
|
#ifdef linux
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
|
2004-05-29 00:16:39 +00:00
|
|
|
extern void oskittcp_die(const char *file, int line);
|
|
|
|
|
|
|
|
#define printf DbgPrint
|
2007-10-19 23:21:45 +00:00
|
|
|
#define vprintf DbgVPrint
|
2010-01-31 02:07:23 +00:00
|
|
|
#define ovbcopy(src,dst,n) memmove(dst,src,n)
|
2004-05-29 00:16:39 +00:00
|
|
|
#define bzero(x,y) memset(x,0,y)
|
2004-09-21 04:00:14 +00:00
|
|
|
#define bcopy(src,dst,n) memcpy(dst,src,n)
|
2004-09-23 03:02:29 +00:00
|
|
|
#ifdef _MSC_VER
|
2005-11-28 23:35:35 +00:00
|
|
|
static __inline void panic ( const char* fmt, ... )
|
2004-09-23 03:02:29 +00:00
|
|
|
{
|
|
|
|
va_list arg;
|
|
|
|
va_start(arg, fmt);
|
2005-06-20 13:17:21 +00:00
|
|
|
printf ( "oskit PANIC: " );
|
|
|
|
vprintf ( fmt, arg );
|
2004-09-23 03:02:29 +00:00
|
|
|
va_end(arg);
|
|
|
|
// TODO FIXME - print stack trace...
|
|
|
|
oskittcp_die("<unknown file>",-1);
|
|
|
|
}
|
|
|
|
#else//_MSC_VER
|
2005-06-20 13:17:21 +00:00
|
|
|
#define panic(...) do { printf(__VA_ARGS__); \
|
2004-09-23 03:02:29 +00:00
|
|
|
oskittcp_die(__FILE__,__LINE__); } while(0)
|
|
|
|
#endif//_MSC_VER
|
2006-01-01 11:48:11 +00:00
|
|
|
#define kmem_malloc(x,y,z) malloc(y,0,0)
|
2004-05-29 00:16:39 +00:00
|
|
|
|
|
|
|
#endif//_OSKITFREEBSD_H
|