mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 11:12:25 +00:00
add new platform headers to simplify including windows/posix headers
This commit is contained in:
parent
ab1edbf537
commit
360e01d824
@ -101,6 +101,12 @@ set(common_sources
|
|||||||
perl_eqdb.cpp
|
perl_eqdb.cpp
|
||||||
perl_eqdb_res.cpp
|
perl_eqdb_res.cpp
|
||||||
platform.cpp
|
platform.cpp
|
||||||
|
platform/inet.h
|
||||||
|
platform/platform.h
|
||||||
|
platform/posix/include_inet.h
|
||||||
|
platform/posix/include_pthreads.h
|
||||||
|
platform/win/include_windows.h
|
||||||
|
platform/win/include_winsock2.h
|
||||||
proc_launcher.cpp
|
proc_launcher.cpp
|
||||||
process.cpp
|
process.cpp
|
||||||
process/process.cpp
|
process/process.cpp
|
||||||
|
|||||||
4
common/platform/inet.h
Normal file
4
common/platform/inet.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "common/platform/posix/include_inet.h"
|
||||||
|
#include "common/platform/win/include_winsock2.h"
|
||||||
7
common/platform/platform.h
Normal file
7
common/platform/platform.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
#include "common/platform/win/include_windows.h"
|
||||||
|
#else
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
8
common/platform/posix/include_inet.h
Normal file
8
common/platform/posix/include_inet.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef _WINDOWS
|
||||||
|
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#endif // !_WINDOWS
|
||||||
8
common/platform/posix/include_pthreads.h
Normal file
8
common/platform/posix/include_pthreads.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef _WINDOWS
|
||||||
|
|
||||||
|
#include "common/unix.h"
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#endif // !_WINDOWS
|
||||||
23
common/platform/win/include_windows.h
Normal file
23
common/platform/win/include_windows.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
|
#ifndef NOMINMAX
|
||||||
|
#define NOMINMAX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
#ifdef GetCurrentTime
|
||||||
|
#undef GetCurrentTime
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GetClassName
|
||||||
|
#undef GetClassName
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // _WINDOWS
|
||||||
7
common/platform/win/include_winsock2.h
Normal file
7
common/platform/win/include_winsock2.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
|
#include <WinSock2.h>
|
||||||
|
|
||||||
|
#endif // _WINDOWS
|
||||||
Loading…
x
Reference in New Issue
Block a user