mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-30 08:24:12 +00:00
Make asctime_r work for HP/UX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
68f6b8cba8
commit
62582720e6
@ -25,7 +25,11 @@ std::string TimeValue::toString() const {
|
||||
char buffer[32];
|
||||
|
||||
time_t ourTime = time_t(this->toEpochTime());
|
||||
#ifdef __hpux
|
||||
asctime_r(localtime(&ourTime), buffer);
|
||||
#else
|
||||
::asctime_r(::localtime(&ourTime), buffer);
|
||||
#endif
|
||||
|
||||
std::string result(buffer);
|
||||
return result.substr(0,24);
|
||||
|
Loading…
Reference in New Issue
Block a user