diff options
Diffstat (limited to 'src/net/win2linux.h')
-rw-r--r-- | src/net/win2linux.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/net/win2linux.h b/src/net/win2linux.h new file mode 100644 index 00000000..71737a58 --- /dev/null +++ b/src/net/win2linux.h @@ -0,0 +1,54 @@ +#include <stdio.h> +#include <stdlib.h> +#ifndef MACOSX +#include <malloc.h> +#endif +#include <string.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <stdio.h> +#include <unistd.h> +#include <arpa/inet.h> +#include <netdb.h> + +typedef unsigned char BYTE; +typedef unsigned short WORD; +#define MAKEWORD(low,high) \ + ((WORD)(((BYTE)(low)) | ((WORD)((BYTE)(high))) << 8)) +#define closesocket(a) close(a) +#define SOCKET int +#define SOCKET_ERROR -1 +#define SOCKADDR_IN struct sockaddr_in +typedef struct sockaddr SOCKADDR; +typedef SOCKADDR * LPSOCKADDR; +#define WSACleanup() ; + + + +typedef unsigned short WORD; +typedef unsigned long int LWORD; +typedef unsigned char BYTE; +#define LOBYTE(w) ((BYTE) (w) ) +#define HIBYTE(w) ((BYTE) (((WORD)(w)) >> 8) ) +#define LOWORD(l) ((WORD) (l) ) +#define HIWORD(l) ((WORD) (((LWORD)(l)) >> 16) ) +#define HANDLE int +#define HANDLE int +#define PHANDLE int +#define SMALL_RECT int +//#define WORD int +#define DWORD int +#define PDWORD int +#define BOOL int +#define LPBOOL int +#define LPSTR int +#define LPTSTR int +#define LPCTSTR int +#define LPDWORD int +#define LPVOID int +#define WINAPI + +#define LOBYTE(w) ((BYTE) (w) ) +#define HIBYTE(w) ((BYTE) (((WORD)(w)) >> 8) ) +#define LPTHREAD_START_ROUTINE void *(*)(void *) +#define CloseHandle close |