mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-16 00:45:48 +08:00
commit
129781fd17
@ -375,7 +375,7 @@ inline std::string errno_str(int err_num)
|
|||||||
if(strerror_s(buf, buf_size, err_num) == 0)
|
if(strerror_s(buf, buf_size, err_num) == 0)
|
||||||
return std::string(buf);
|
return std::string(buf);
|
||||||
else
|
else
|
||||||
return "Unkown error";
|
return "Unknown error";
|
||||||
|
|
||||||
#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || defined(__SUNPRO_CC) || \
|
#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || defined(__SUNPRO_CC) || \
|
||||||
((_POSIX_C_SOURCE >= 200112L) && ! defined(_GNU_SOURCE)) // posix version
|
((_POSIX_C_SOURCE >= 200112L) && ! defined(_GNU_SOURCE)) // posix version
|
||||||
@ -383,7 +383,7 @@ inline std::string errno_str(int err_num)
|
|||||||
if (strerror_r(err_num, buf, buf_size) == 0)
|
if (strerror_r(err_num, buf, buf_size) == 0)
|
||||||
return std::string(buf);
|
return std::string(buf);
|
||||||
else
|
else
|
||||||
return "Unkown error";
|
return "Unknown error";
|
||||||
|
|
||||||
#else // gnu version (might not use the given buf, so its retval pointer must be used)
|
#else // gnu version (might not use the given buf, so its retval pointer must be used)
|
||||||
return std::string(strerror_r(err_num, buf, buf_size));
|
return std::string(strerror_r(err_num, buf, buf_size));
|
||||||
|
Loading…
Reference in New Issue
Block a user