diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-01-14 00:50:50 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-01-14 00:50:50 +0000 |
commit | 62582720e61988b2fcee171f1a7cfecf415ed4f3 (patch) | |
tree | 7ea73b5ab2bb60559c16b55f1b390553b2785daa /lib/System | |
parent | 68f6b8cba875f3ebe4ea9eb980b2781b3dd0272d (diff) | |
download | external_llvm-62582720e61988b2fcee171f1a7cfecf415ed4f3.zip external_llvm-62582720e61988b2fcee171f1a7cfecf415ed4f3.tar.gz external_llvm-62582720e61988b2fcee171f1a7cfecf415ed4f3.tar.bz2 |
Make asctime_r work for HP/UX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/Unix/TimeValue.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/System/Unix/TimeValue.inc b/lib/System/Unix/TimeValue.inc index 8f0ad38..83d76d2 100644 --- a/lib/System/Unix/TimeValue.inc +++ b/lib/System/Unix/TimeValue.inc @@ -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); |