summaryrefslogtreecommitdiff
path: root/src/net/win2linux.h
blob: 71737a58efa1bb8d76802a7ee4d2472cc0fe906b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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