diff options
author | unknown <heikki@hundin.mysql.fi> | 2004-12-01 18:02:34 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2004-12-01 18:02:34 +0200 |
commit | 62446e4c1805392168e3d152dd7baabc1af8163e (patch) | |
tree | b8c0c43ac6f20d5c71990bc3ce8fa2598bf09525 /innobase/ut | |
parent | b72c899e65375c42f9d3943c8b0229dd15da8e63 (diff) | |
download | mariadb-git-62446e4c1805392168e3d152dd7baabc1af8163e.tar.gz |
configure.in:
Let MySQL check the existence of readdir_r with 3 arguments; Solaris seems to have just 2 args
Check the existence of readdir_r and localtime_r; even though MySQL does check these too, we need our own check for Hot Backup code
os0file.c:
Use re-entrant readdir_r where available
ut0ut.c:
Make a function to use thread-safe localtime_r where available; that particular function was not called from anywhere, though
innobase/ut/ut0ut.c:
Make a function to use thread-safe localtime_r where available; the function was not called from anywhere, though
innobase/os/os0file.c:
Use re-entrant readdir_r where available
innobase/configure.in:
Let MySQL check the existence of readdir_r with 3 arguments; Solaris seems to have just 2 args
Diffstat (limited to 'innobase/ut')
-rw-r--r-- | innobase/ut/ut0ut.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/innobase/ut/ut0ut.c b/innobase/ut/ut0ut.c index b67be77b29e..732380bcb1f 100644 --- a/innobase/ut/ut0ut.c +++ b/innobase/ut/ut0ut.c @@ -235,13 +235,18 @@ ut_get_year_month_day( *month = (ulint)cal_tm.wMonth; *day = (ulint)cal_tm.wDay; #else + struct tm cal_tm; struct tm* cal_tm_ptr; time_t tm; time(&tm); +#ifdef HAVE_LOCALTIME_R + localtime_r(&tm, &cal_tm); + cal_tm_ptr = &cal_tm; +#else cal_tm_ptr = localtime(&tm); - +#endif *year = (ulint)cal_tm_ptr->tm_year + 1900; *month = (ulint)cal_tm_ptr->tm_mon + 1; *day = (ulint)cal_tm_ptr->tm_mday; |