Skip to content
Snippets Groups Projects
winjunk.h 759 B
Newer Older
teuben's avatar
teuben committed
#ifdef WIN32

#define  htonl  htonl_hosed_by_win32
#define  ntohl  ntohl_hosed_by_win32
#define  WINDOWS_LEAN_AND_MEAN	1	/* ugh */
teuben's avatar
teuben committed
#include <windows.h>
#include <malloc.h>

#undef htonl
#undef ntohl
extern unsigned int htonl(unsigned int v);
#define ntohl(x)  htonl(x)

extern int strcasecmp(const char *s1, const char *s2);
extern int strncasecmp(const char *s1, const char *s2, int maxlen);

extern void srandom(int seed);
extern int random();

slevy's avatar
 
slevy committed
extern double rint(double);

#ifndef __cplusplus
#define sqrtf(_) sqrt(_)
#define sinf(_)  sin(_)
#define cosf(_)  cos(_)
#define atan2f(_,__) atan2(_,__)
#include <io.h>		/* for access() */
#define R_OK 004	/* No Windows include-file defines this?! */
teuben's avatar
teuben committed
#endif /*WIN32*/