mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-06 20:37:05 +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];
|
char buffer[32];
|
||||||
|
|
||||||
time_t ourTime = time_t(this->toEpochTime());
|
time_t ourTime = time_t(this->toEpochTime());
|
||||||
|
#ifdef __hpux
|
||||||
|
asctime_r(localtime(&ourTime), buffer);
|
||||||
|
#else
|
||||||
::asctime_r(::localtime(&ourTime), buffer);
|
::asctime_r(::localtime(&ourTime), buffer);
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string result(buffer);
|
std::string result(buffer);
|
||||||
return result.substr(0,24);
|
return result.substr(0,24);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user