[llvm-commits] CVS: llvm/lib/System/Unix/TimeValue.inc
Reid Spencer
reid at x10sys.com
Thu Jan 13 16:51:01 PST 2005
Changes in directory llvm/lib/System/Unix:
TimeValue.inc updated: 1.6 -> 1.7
---
Log message:
Make asctime_r work for HP/UX.
---
Diffs of the changes: (+4 -0)
Index: llvm/lib/System/Unix/TimeValue.inc
diff -u llvm/lib/System/Unix/TimeValue.inc:1.6 llvm/lib/System/Unix/TimeValue.inc:1.7
--- llvm/lib/System/Unix/TimeValue.inc:1.6 Mon Dec 27 00:17:39 2004
+++ llvm/lib/System/Unix/TimeValue.inc Thu Jan 13 18:50:50 2005
@@ -25,7 +25,11 @@
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);
More information about the llvm-commits
mailing list