From: Stefan Neis Date: Sat, 31 Dec 2005 18:56:32 +0000 (+0000) Subject: No obnoxious warnings if threading is disabled. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5b52a6842651f8705d5b8cf2bfa069ee8026ec91 No obnoxious warnings if threading is disabled. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 2f331299ad..8c1e262147 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -57,7 +57,7 @@ class WXDLLIMPEXP_BASE wxDateSpan; #define wxLocaltime_r localtime_r #else struct tm *wxLocaltime_r(const time_t*, struct tm*); -#if !defined(__WINDOWS__) +#if wxUSE_THREADS && !defined(__WINDOWS__) // On Windows, localtime _is_ threadsafe! #warning using pseudo thread-safe wrapper for localtime to emulate localtime_r #endif @@ -67,7 +67,7 @@ struct tm *wxLocaltime_r(const time_t*, struct tm*); #define wxGmtime_r gmtime_r #else struct tm *wxGmtime_r(const time_t*, struct tm*); -#if !defined(__WINDOWS__) +#if wxUSE_THREADS && !defined(__WINDOWS__) // On Windows, gmtime _is_ threadsafe! #warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r #endif diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 009149c105..c797fc0144 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -169,7 +169,7 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter , wxFromStringCon #endif #endif // !WX_TIMEZONE && !WX_GMTOFF_IN_TM -#if wxUSE_THREADS +#if (!defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)) && wxUSE_THREADS && !defined(__WINDOWS__) static wxMutex timeLock; #endif