projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
366bd86
)
[Support] Fix StrError on Windows to actually return the error string...
author
Michael J. Spencer
<bigcheesegs@gmail.com>
Thu, 1 Nov 2012 00:34:09 +0000
(
00:34
+0000)
committer
Michael J. Spencer
<bigcheesegs@gmail.com>
Thu, 1 Nov 2012 00:34:09 +0000
(
00:34
+0000)
llvm-svn: 167191
llvm/lib/Support/Errno.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/Errno.cpp
b/llvm/lib/Support/Errno.cpp
index
00be43b
..
730220f
100644
(file)
--- a/
llvm/lib/Support/Errno.cpp
+++ b/
llvm/lib/Support/Errno.cpp
@@
-53,8
+53,10
@@
std::string StrError(int errnum) {
str = buffer;
# endif
#elif HAVE_DECL_STRERROR_S // "Windows Secure API"
- if (errnum)
+ if (errnum)
{
strerror_s(buffer, MaxErrStrLen - 1, errnum);
+ str = buffer;
+ }
#elif defined(HAVE_STRERROR)
// Copy the thread un-safe result of strerror into
// the buffer as fast as possible to minimize impact