diff options
author | Rahul P | 2020-07-16 21:43:55 +0530 |
---|---|---|
committer | GitHub | 2020-07-16 21:43:55 +0530 |
commit | 915f516628ff87be7b1c4ab41fc075e016ff9e4f (patch) | |
tree | 74996d765fb0ad3f03937f138863fa1ac8b13f95 /src/ghdlserver/ghdlserver.h | |
parent | cb798c842a17fa58520e6f0184b165728b41c5d4 (diff) | |
parent | 63c83e8a9649ef32009aa54059b8d98ba7ea6585 (diff) | |
download | nghdl-915f516628ff87be7b1c4ab41fc075e016ff9e4f.tar.gz nghdl-915f516628ff87be7b1c4ab41fc075e016ff9e4f.tar.bz2 nghdl-915f516628ff87be7b1c4ab41fc075e016ff9e4f.zip |
Merge pull request #2 from bladen-martin/master
All codes made OS independent.
Diffstat (limited to 'src/ghdlserver/ghdlserver.h')
-rw-r--r-- | src/ghdlserver/ghdlserver.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/ghdlserver/ghdlserver.h b/src/ghdlserver/ghdlserver.h index 9f23f0b..e04209b 100644 --- a/src/ghdlserver/ghdlserver.h +++ b/src/ghdlserver/ghdlserver.h @@ -1,13 +1,25 @@ /* 18.Mar.2017 - RM - Cleaned up.*/ +/* 20.June.2020 - BM - Added OS dependent includes*/ +#define _GNU_SOURCE +#include <stdio.h> #include <stdlib.h> #include <stdint.h> -#include <stdio.h> #include <unistd.h> #include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <netdb.h> +#include<string.h> + +#ifdef __linux__ + #include <sys/socket.h> + #include <netinet/in.h> + #include <netdb.h> +#elif _WIN32 + #include<ws2tcpip.h> + #include<winsock2.h> + #include<eventsys.h> + #include<windows.h> +#endif + // Should be enough.. #define MAX_BUF_SIZE 4096 |