mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 18:29:45 +00:00
[Support] Fix StrError on Windows to actually return the error string...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad0b3b21e3
commit
08e712b9ff
@ -53,8 +53,10 @@ std::string StrError(int errnum) {
|
|||||||
str = buffer;
|
str = buffer;
|
||||||
# endif
|
# endif
|
||||||
#elif HAVE_DECL_STRERROR_S // "Windows Secure API"
|
#elif HAVE_DECL_STRERROR_S // "Windows Secure API"
|
||||||
if (errnum)
|
if (errnum) {
|
||||||
strerror_s(buffer, MaxErrStrLen - 1, errnum);
|
strerror_s(buffer, MaxErrStrLen - 1, errnum);
|
||||||
|
str = buffer;
|
||||||
|
}
|
||||||
#elif defined(HAVE_STRERROR)
|
#elif defined(HAVE_STRERROR)
|
||||||
// Copy the thread un-safe result of strerror into
|
// Copy the thread un-safe result of strerror into
|
||||||
// the buffer as fast as possible to minimize impact
|
// the buffer as fast as possible to minimize impact
|
||||||
|
Loading…
Reference in New Issue
Block a user