From: Reid Spencer Date: Fri, 14 Jan 2005 00:50:50 +0000 (+0000) Subject: Make asctime_r work for HP/UX. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=62582720e61988b2fcee171f1a7cfecf415ed4f3;p=oota-llvm.git Make asctime_r work for HP/UX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19544 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/System/Unix/TimeValue.inc b/lib/System/Unix/TimeValue.inc index 8f0ad38d8ef..83d76d202c5 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);