[llvm-commits] [llvm] r167191 - /llvm/trunk/lib/Support/Errno.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Wed Oct 31 17:34:09 PDT 2012
Author: mspencer
Date: Wed Oct 31 19:34:09 2012
New Revision: 167191
URL: http://llvm.org/viewvc/llvm-project?rev=167191&view=rev
Log:
[Support] Fix StrError on Windows to actually return the error string...
Modified:
llvm/trunk/lib/Support/Errno.cpp
Modified: llvm/trunk/lib/Support/Errno.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Errno.cpp?rev=167191&r1=167190&r2=167191&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Errno.cpp (original)
+++ llvm/trunk/lib/Support/Errno.cpp Wed Oct 31 19:34:09 2012
@@ -53,8 +53,10 @@
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
More information about the llvm-commits
mailing list