mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
llvm/lib/Support/Errno.cpp: [Win32] Fix usage of strerror_s().
FYI, two arguments of strerror_s() is provided in C++ on msvc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159103 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b253451b82
commit
33f2139585
@ -52,7 +52,7 @@ std::string StrError(int errnum) {
|
||||
# endif
|
||||
#elif HAVE_DECL_STRERROR_S // "Windows Secure API"
|
||||
if (errnum)
|
||||
strerror_s(buffer, errnum);
|
||||
strerror_s(buffer, MaxErrStrLen - 1, errnum);
|
||||
#elif defined(HAVE_STRERROR)
|
||||
// Copy the thread un-safe result of strerror into
|
||||
// the buffer as fast as possible to minimize impact
|
||||
|
Loading…
x
Reference in New Issue
Block a user