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:
Reid Spencer 2005-01-14 00:50:50 +00:00
parent 68f6b8cba8
commit 62582720e6

View File

@ -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);