pivot-table: Use ctime_r() instead of ctime(), for thread safety.
[pspp] / src / output / pivot-table.c
index ba3d98c916ad3f798d8980f5a8562cee9e269f70..72a158baaad78a777935077475e529bf01285bb2 100644 (file)
@@ -1383,7 +1383,8 @@ pivot_table_dump (const struct pivot_table *table, int indentation)
   if (table->date)
     {
       indent (indentation);
-      printf ("date: %s", ctime (&table->date)); /* XXX thread unsafe */
+      char buf[26];
+      printf ("date: %s", ctime_r (&table->date, buf));
     }
 
   indent (indentation);