mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6800586: -XX:+PrintGCDateStamps is using mt-unsafe localtime function
Replaced localtime() with localtime_r() on Solaris and Linux. Reviewed-by: apetrusenko, dholmes, jmasa
This commit is contained in:
parent
4be1a50ed3
commit
0badccf962
5 changed files with 23 additions and 8 deletions
|
@ -120,7 +120,8 @@ class os: AllStatic {
|
|||
// Return current local time in a string (YYYY-MM-DD HH:MM:SS).
|
||||
// It is MT safe, but not async-safe, as reading time zone
|
||||
// information may require a lock on some platforms.
|
||||
static char* local_time_string(char *buf, size_t buflen);
|
||||
static char* local_time_string(char *buf, size_t buflen);
|
||||
static struct tm* localtime_pd (const time_t* clock, struct tm* res);
|
||||
// Fill in buffer with current local time as an ISO-8601 string.
|
||||
// E.g., YYYY-MM-DDThh:mm:ss.mmm+zzzz.
|
||||
// Returns buffer, or NULL if it failed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue