#ifndef _OS_H_
#define _OS_H_

#ifdef MEMWATCH
#include <dclib/memwatch.h>
#endif

#ifndef WIN32
typedef  unsigned long long ULONGLONG;
#define ulonglong ULONGLONG
#endif

#ifdef WIN32
#include <windows.h>
#include <winsock.h>
#endif

#ifndef SOCKET 
#define SOCKET          int 
#endif 
#ifndef INVALID_SOCKET 
#define INVALID_SOCKET  -1 
#endif 
#ifndef SOCKET_ERROR 
#define SOCKET_ERROR    -1 
#endif

#ifdef WIN32
#include <wtypes.h>
#include <io.h>
#include <direct.h>
#include <sys/types.h>
#include <sys/stat.h>

#define ulonglong ULONGLONG
#define F_OK 0
#define R_OK 4
#define W_OK 2
#define RW_OK 6

#define VERSION "0.1beta11-win32"

#define socklen_t int

//export macros
#define DLL_EXPORT __declspec(dllexport) 
//import macro
#define DLL_IMPORT __declspec(dllimport)

#else
#define DLL_EXPORT
#define DLL_IMPORT
#endif

#ifdef WIN32
#define DIRSEPARATOR '\\'
#else
#define DIRSEPARATOR '/'
#endif

#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif

#endif
