mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-02 11:28:20 +00:00
Fix MinGW issues.
This commit is contained in:
parent
8321d0ecf9
commit
0ffcec0090
@ -301,12 +301,8 @@ int fmt::internal::StrError(
|
|||||||
if (message == buffer && strlen(buffer) == buffer_size - 1)
|
if (message == buffer && strlen(buffer) == buffer_size - 1)
|
||||||
result = ERANGE;
|
result = ERANGE;
|
||||||
buffer = message;
|
buffer = message;
|
||||||
#elif _WIN32
|
#elif defined(_WIN32) && !defined(__MINGW32__)
|
||||||
# ifdef __MINGW32__
|
|
||||||
strerror(result);
|
|
||||||
# else
|
|
||||||
result = strerror_s(buffer, buffer_size, error_code);
|
result = strerror_s(buffer, buffer_size, error_code);
|
||||||
# endif
|
|
||||||
// If the buffer is full then the message is probably truncated.
|
// If the buffer is full then the message is probably truncated.
|
||||||
if (result == 0 && std::strlen(buffer) == buffer_size - 1)
|
if (result == 0 && std::strlen(buffer) == buffer_size - 1)
|
||||||
result = ERANGE;
|
result = ERANGE;
|
||||||
|
Loading…
Reference in New Issue
Block a user