MinGW and WinXP support (issue #102) (#103)

* Add MinGW and WinXP support, remove Win SDK dep when using MinGW

Was meant to add MinGW support only, WinXP support was made by accident.
Changes:
* Remove Win SDK dependency when compiled with MinGW
* Remap the Win SDK-depended functions to string.h substitutes
* Remap missing WinAPI call RegSetKeyValueW to a substitute function

* Remove warnings by pragma when using MinGW
This commit is contained in:
Dmitry
2018-01-05 22:56:55 +04:00
committed by Ben Morse
parent 2d0661c906
commit b0e31a9e25
2 changed files with 48 additions and 13 deletions

View File

@ -2,6 +2,7 @@
#include <stdint.h>
#ifndef __MINGW32__
#pragma warning(push)
#pragma warning(disable : 4061) // enum is not explicitly handled by a case label
@ -9,12 +10,15 @@
#pragma warning(disable : 4464) // relative include path contains
#pragma warning(disable : 4668) // is not defined as a preprocessor macro
#pragma warning(disable : 6313) // Incorrect operator
#endif // __MINGW32__
#include "rapidjson/document.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
#ifndef __MINGW32__
#pragma warning(pop)
#endif // __MINGW32__
// if only there was a standard library function for this
template <size_t Len>