Free Electron
osheader.h
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 #ifndef __MESSAGE_OSHEADER_H__
6 #define __MESSAGE_OSHEADER_H__
7 
8 #include <stdio.h>
9 #include <string>
10 #include <cstring>
11 #include <memory>
12 #include <exception>
13 
14 #ifdef _WIN32
15 //#include <ws2tcpip.h>
16 #include <winsock2.h>
17 #include <wininet.h>
18 #include <Ws2tcpip.h>
19 #pragma comment(lib, "ws2_32")
20 #pragma comment(lib, "wininet")
21 #else
22 #include <sys/socket.h>
23 #include <netinet/in.h>
24 #include <netinet/ip.h>
25 #include <arpa/inet.h>
26 #include <unistd.h>
27 #include <errno.h>
28 typedef __int64_t SOCKET;
29 #define SOCKET_ERROR -1
30 #define SOCKADDR sockaddr
31 #define INVALID_SOCKET (SOCKET)(~0)
32 #define closesocket close
33 #endif
34 
35 #include "fe/plugin.h"
36 
37 #endif // __MESSAGE_OSHEADER_H__