move windows.h include into its own header (to define LEAN_AND_MEAN and NOMINMAX in all places)

master
Daniel Kolesa 2016-01-27 19:34:45 +00:00
parent 62d7836f32
commit 0580638905
3 changed files with 23 additions and 11 deletions

View File

@ -7,12 +7,9 @@
#define OSTD_FILESYSTEM_HH
#include "ostd/platform.hh"
#include "ostd/internal/win32.hh"
#ifdef OSTD_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>
#else
#ifdef OSTD_PLATFORM_POSIX
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>

View File

@ -0,0 +1,17 @@
/* Windows includes.
*
* This file is part of OctaSTD. See COPYING.md for futher information.
*/
#ifndef OSTD_INTERNAL_WIN32_HH
#define OSTD_INTERNAL_WIN32_HH
#include "ostd/platform.hh"
#ifdef OSTD_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>
#endif
#endif

View File

@ -9,16 +9,14 @@
#include <stdlib.h>
#include <pthread.h>
#ifndef OSTD_PLATFORM_WIN32
#include "ostd/platform.hh"
#include "ostd/internal/win32.hh"
#ifdef OSTD_PLATFORM_POSIX
#include <unistd.h>
#else
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>
#endif
#include "ostd/memory.hh"
#include "ostd/platform.hh"
#include "ostd/type_traits.hh"
#include "ostd/tuple.hh"