summaryrefslogtreecommitdiff
path: root/src/net/win2linux.h
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2004-09-26 13:08:46 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2004-09-26 13:08:46 +0000
commit92bbeab96bf61edf9b7caa125ed67e634258383e (patch)
treea95dd426590c8e6208445290fa8b9b47c1a57bcb /src/net/win2linux.h
parente46b2cdbf205d3d2e17266e3168fdbecd5f53222 (diff)
downloadmana-92bbeab96bf61edf9b7caa125ed67e634258383e.tar.gz
mana-92bbeab96bf61edf9b7caa125ed67e634258383e.tar.bz2
mana-92bbeab96bf61edf9b7caa125ed67e634258383e.tar.xz
mana-92bbeab96bf61edf9b7caa125ed67e634258383e.zip
*** empty log message ***
Diffstat (limited to 'src/net/win2linux.h')
-rw-r--r--src/net/win2linux.h54
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