-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathheaders.h
More file actions
32 lines (30 loc) · 723 Bytes
/
headers.h
File metadata and controls
32 lines (30 loc) · 723 Bytes
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
/** Headers
There's a bunch of stuff in here that's used so I can compile this under Windows.
You can safely ignore it.
**/
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <thread>
#include <iostream>
using namespace std;
#ifdef _WIN32
#include <winsock2.h>
#include <Ws2tcpip.h>
#define close closesocket
#define inet_pton InetPtonA
#define inet_ntop InetNtopA
#define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*)d, e)
#pragma comment(lib, "Ws2_32.lib")
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#endif