src: include windows headers in a central location
This commit is contained in:
parent
0c20d49e2f
commit
e910b2bc72
@ -1,9 +1,8 @@
|
|||||||
#ifndef EPOLL_AFD_H_
|
#ifndef EPOLL_AFD_H_
|
||||||
#define EPOLL_AFD_H_
|
#define EPOLL_AFD_H_
|
||||||
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
#include "nt.h"
|
#include "nt.h"
|
||||||
|
#include "win.h"
|
||||||
|
|
||||||
#ifndef SIO_BASE_HANDLE
|
#ifndef SIO_BASE_HANDLE
|
||||||
#define SIO_BASE_HANDLE 0x48000022
|
#define SIO_BASE_HANDLE 0x48000022
|
||||||
|
|||||||
@ -1,7 +1,3 @@
|
|||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <WinSock2.h>
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -11,6 +7,7 @@
|
|||||||
#include "epoll.h"
|
#include "epoll.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
|
#include "win.h"
|
||||||
|
|
||||||
#ifndef _SSIZE_T_DEFINED
|
#ifndef _SSIZE_T_DEFINED
|
||||||
#define SSIZE_T_DEFINED
|
#define SSIZE_T_DEFINED
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <WinSock2.h>
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "error-map.h"
|
#include "error-map.h"
|
||||||
|
#include "win.h"
|
||||||
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4127) /* "conditional expression is constant" */
|
#pragma warning(disable : 4127) /* "conditional expression is constant" */
|
||||||
|
|||||||
2
src/nt.h
2
src/nt.h
@ -1,7 +1,7 @@
|
|||||||
#ifndef EPOLL_NT_H_
|
#ifndef EPOLL_NT_H_
|
||||||
#define EPOLL_NT_H_
|
#define EPOLL_NT_H_
|
||||||
|
|
||||||
#include <Windows.h>
|
#include "win.h"
|
||||||
|
|
||||||
#ifndef _NTDEF_
|
#ifndef _NTDEF_
|
||||||
typedef LONG NTSTATUS;
|
typedef LONG NTSTATUS;
|
||||||
|
|||||||
12
src/win.h
Normal file
12
src/win.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef EPOLL_WIN_H_
|
||||||
|
#define EPOLL_WIN_H_
|
||||||
|
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <WS2tcpip.h>
|
||||||
|
#include <WinSock2.h>
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -1,10 +1,7 @@
|
|||||||
#include <WS2tcpip.h>
|
|
||||||
#include <WinSock2.h>
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "win.h"
|
||||||
#include "epoll.h"
|
#include "epoll.h"
|
||||||
|
|
||||||
static const char PING[] = "PING";
|
static const char PING[] = "PING";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user