2002-07-20 07:43:31 +02:00
|
|
|
#ifndef __win32_h_included
|
|
|
|
#define __win32_h_included
|
1998-07-03 06:24:16 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* strcasecmp() is not in Windows, stricmp is, though
|
|
|
|
*/
|
|
|
|
#define strcasecmp(a,b) stricmp(a,b)
|
2000-02-24 16:53:12 +01:00
|
|
|
#define strncasecmp(a,b,c) _strnicmp(a,b,c)
|
1998-07-03 06:24:16 +02:00
|
|
|
|
|
|
|
/*
|
2001-08-04 00:11:39 +02:00
|
|
|
* Some other compat functions
|
1998-07-03 06:24:16 +02:00
|
|
|
*/
|
2002-12-30 22:07:26 +01:00
|
|
|
#ifdef __BORLANDC__
|
|
|
|
#define _timeb timeb
|
|
|
|
#define _ftime(a) ftime(a)
|
|
|
|
#define _strnicmp(a,b,c) strnicmp(a,b,c)
|
|
|
|
#define _errno errno
|
|
|
|
#else
|
1998-07-03 06:24:16 +02:00
|
|
|
#define open(a,b,c) _open(a,b,c)
|
2000-02-08 00:10:11 +01:00
|
|
|
#define close(a) _close(a)
|
1998-07-03 06:24:16 +02:00
|
|
|
#define read(a,b,c) _read(a,b,c)
|
|
|
|
#define write(a,b,c) _write(a,b,c)
|
2002-12-30 22:07:26 +01:00
|
|
|
#endif
|
|
|
|
|
2000-02-08 00:10:11 +01:00
|
|
|
#define popen(a,b) _popen(a,b)
|
|
|
|
#define pclose(a) _pclose(a)
|
2000-02-24 16:53:12 +01:00
|
|
|
#define vsnprintf(a,b,c,d) _vsnprintf(a,b,c,d)
|
2001-07-21 06:32:42 +02:00
|
|
|
#define snprintf _snprintf
|
1998-07-03 06:24:16 +02:00
|
|
|
|
2001-10-25 07:50:21 +02:00
|
|
|
#undef EAGAIN /* doesn't apply on sockets */
|
2001-08-04 00:11:39 +02:00
|
|
|
#undef EINTR
|
2001-07-20 19:45:06 +02:00
|
|
|
#define EINTR WSAEINTR
|
|
|
|
#define EWOULDBLOCK WSAEWOULDBLOCK
|
|
|
|
#define ECONNRESET WSAECONNRESET
|
|
|
|
#define EINPROGRESS WSAEINPROGRESS
|
2001-08-21 22:39:54 +02:00
|
|
|
|
|
|
|
/*
|
2001-11-28 20:40:29 +01:00
|
|
|
* support for handling Windows Socket errors
|
2001-08-21 22:39:54 +02:00
|
|
|
*/
|
2001-11-28 20:40:29 +01:00
|
|
|
extern const char *winsock_strerror(int eno);
|
2002-07-20 07:43:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|