src: include windows headers in a central location

This commit is contained in:
Bert Belder 2017-09-03 19:17:41 +02:00
parent 0c20d49e2f
commit e910b2bc72
6 changed files with 17 additions and 15 deletions

View File

@ -1,9 +1,8 @@
#ifndef EPOLL_AFD_H_
#define EPOLL_AFD_H_
#include <Windows.h>
#include "nt.h"
#include "win.h"
#ifndef SIO_BASE_HANDLE
#define SIO_BASE_HANDLE 0x48000022

View File

@ -1,7 +1,3 @@
#define WIN32_LEAN_AND_MEAN
#include <WinSock2.h>
#include <Windows.h>
#include <assert.h>
#include <malloc.h>
#include <stdint.h>
@ -11,6 +7,7 @@
#include "epoll.h"
#include "error.h"
#include "tree.h"
#include "win.h"
#ifndef _SSIZE_T_DEFINED
#define SSIZE_T_DEFINED

View File

@ -1,10 +1,7 @@
#define WIN32_LEAN_AND_MEAN
#include <WinSock2.h>
#include <Windows.h>
#include <errno.h>
#include "error-map.h"
#include "win.h"
#pragma warning(push)
#pragma warning(disable : 4127) /* "conditional expression is constant" */

View File

@ -1,7 +1,7 @@
#ifndef EPOLL_NT_H_
#define EPOLL_NT_H_
#include <Windows.h>
#include "win.h"
#ifndef _NTDEF_
typedef LONG NTSTATUS;

12
src/win.h Normal file
View 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

View File

@ -1,10 +1,7 @@
#include <WS2tcpip.h>
#include <WinSock2.h>
#include <Windows.h>
#include <assert.h>
#include <stdio.h>
#include "win.h"
#include "epoll.h"
static const char PING[] = "PING";