2003-01-03 19:12:40 +08:00
|
|
|
|
2005-07-28 17:40:50 +08:00
|
|
|
#define closesocket close
|
|
|
|
#define LPCSTR char *
|
|
|
|
#define LPSTR char*
|
|
|
|
#define FAR
|
2003-01-03 19:12:40 +08:00
|
|
|
#ifdef USE_WINSOCK
|
|
|
|
#include <novsock2.h>
|
|
|
|
#else
|
|
|
|
#include <sys/socket.h> /* For struct sockaddr, 'PF_INET' and 'AF_INET' */
|
2005-02-25 14:31:06 +08:00
|
|
|
#include <netinet/in.h> /* For struct sockaddr_in */
|
2003-01-03 19:12:40 +08:00
|
|
|
#include <netdb.h> /* For struct hostent */
|
|
|
|
#endif /* USE_WINSOCK */
|
|
|
|
|
|
|
|
typedef int SOCKET; /* Borrowed from winsock\novsock2.h */
|
|
|
|
typedef struct sockaddr_in SOCKADDR_IN;
|
|
|
|
typedef struct sockaddr * LPSOCKADDR;
|
|
|
|
typedef struct hostent * LPHOSTENT;
|
|
|
|
|
|
|
|
#define INVALID_SOCKET (SOCKET)(~0) /* Borrowed from winsock\novsock2.h */
|