projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b253451
)
llvm/lib/Support/Errno.cpp: [Win32] Fix usage of strerror_s().
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Sun, 24 Jun 2012 03:51:04 +0000
(
03:51
+0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Sun, 24 Jun 2012 03:51:04 +0000
(
03:51
+0000)
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
lib/Support/Errno.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/Errno.cpp
b/lib/Support/Errno.cpp
index 18c658173a7ab0fd4561e773ea588e80108a05ce..dd218f60990e5ef40f9767062acdc6a78e99e64c 100644
(file)
--- a/
lib/Support/Errno.cpp
+++ b/
lib/Support/Errno.cpp
@@
-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