move windows.h include into its own header (to define LEAN_AND_MEAN and NOMINMAX in all places)
This commit is contained in:
parent
62d7836f32
commit
0580638905
|
@ -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>
|
||||
|
|
17
ostd/internal/win32.hh
Normal file
17
ostd/internal/win32.hh
Normal 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
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue