osdepend.h

mud++0.33/src/win32/osdepend.h · 849 B

From the archive mud++0.33.tar.gz

Download the archive   « Back to the archive contents

// Hacks for WIN32 system

#ifndef _WIN32_OSDEPEND_H
#define _WIN32_OSDEPEND_H

#ifndef WIN32
#define WIN32
#endif

#include <winsock.h>
#include <sys/timeb.h>
#include <process.h>

#ifndef __BCPLUSPLUS__
#ifdef __SC__
typedef BOOL bool;
#define true TRUE
#define false FALSE
#else
typedef unsigned char bool;
const unsigned char true = 1;
const unsigned char false = 0;
#endif
#endif

inline void gettimeofday( struct timeval * t , int )
{
	struct timeb timebuffer;
	ftime (& timebuffer);
	t->tv_sec = timebuffer.time;
	t->tv_usec = timebuffer.millitm * 1000;
}

extern bool DOWN;
extern WSAData WinsockInfo;

inline void mudpp_exit( int ecode )
{
	WSACleanup();
	exit(ecode);
}


typedef unsigned char u8;
typedef unsigned short u16;
typedef	signed short s16;
typedef unsigned int u32;
typedef signed int s32;

#undef HAVE_TRAP_PROBLEMS
 

#endif

Site Stats

Snippets: 1791
Codebases: 571