Merge branch 'master' of github.com:cppformat/cppformat
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
// Fix MSVC warning about "unsafe" fopen.
|
||||
FILE *FOpen(const char *filename, const char *mode) {
|
||||
FILE *f = 0;
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
#include <stdexcept>
|
||||
#include <gtest/gtest-spi.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
# include <crtdbg.h> // for _CrtSetReportMode
|
||||
#endif // _WIN32
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
|
||||
// Suppresses Windows assertions on invalid file descriptors, making
|
||||
// POSIX functions return proper error codes instead of crashing on Windows.
|
||||
|
||||
@@ -43,7 +43,7 @@ using fmt::StringRef;
|
||||
|
||||
namespace {
|
||||
std::string GetSystemErrorMessage(int error_code) {
|
||||
#ifndef _WIN32
|
||||
#if defined(__MINGW32__) || !defined(_WIN32)
|
||||
return strerror(error_code);
|
||||
#else
|
||||
enum { BUFFER_SIZE = 200 };
|
||||
|
||||
Reference in New Issue
Block a user