types: add a type for thread IDs and try to use it everywhere
[gem5.git] / src / base / time.cc
index cbc7256ee97944ea4c59a7c98516178dff45ecec..a1732773e026a0aa4bc066e1e0b788fde8598202 100644 (file)
@@ -28,9 +28,9 @@
  * Authors: Nathan Binkert
  */
 
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
+#include <cctype>
+#include <cstring>
+#include <ctime>
 #include <iostream>
 #include <string>
 
@@ -105,7 +105,11 @@ Time::date(string format) const
     char buf[256];
 
     if (format.empty()) {
+#ifdef __SUNPRO_CC
+        ctime_r(&sec, buf, 256);
+#else
         ctime_r(&sec, buf);
+#endif
         buf[24] = '\0';
         return buf;
     }