mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 09:31:53 +03:00
Updated included headers to support compilation on Windows (using Visual C++)
- most of posix related functions and constants in unistd.h can be found in io.h in Visual C++ - introduced src/compat/msvc.h to adjust for compiler differences (and avoid updating code with #ifdef blocks for Windows support) - removed some included headers that are not needed (both on Unix and Windows builds)
This commit is contained in:
@@ -13,10 +13,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
@@ -15,10 +15,14 @@
|
||||
|
||||
#include "src/utils/ip_tree.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
@@ -15,9 +15,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include "src/compat/msvc.h"
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#include "src/utils/msc_tree.h"
|
||||
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#ifdef __OpenBSD__
|
||||
#include <glob.h>
|
||||
#else
|
||||
#include <wordexp.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user