Newer
Older
#ifdef WIN32
#define htonl htonl_hosed_by_win32
#define ntohl ntohl_hosed_by_win32
#define WINDOWS_LEAN_AND_MEAN 1 /* ugh */
#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();
#ifndef __cplusplus
#define sqrtf(_) sqrt(_)
#define sinf(_) sin(_)
#define cosf(_) cos(_)
#define atan2f(_,__) atan2(_,__)
#define hypotf(_,__) hypot(_,__)
#endif
#include <io.h> /* for access() */
#define R_OK 004 /* No Windows include-file defines this?! */