X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a452689b23cf8366caba853ce26b7ad5a4fc269e..2364556be3ab7c26cc23a74a67aeb1c7019a51f5:/include/wx/datetime.h diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 53da88e61d..962d0396b3 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -56,16 +56,22 @@ class WXDLLIMPEXP_BASE wxDateSpan; #ifdef HAVE_LOCALTIME_R #define wxLocaltime_r localtime_r #else -struct tm *wxLocaltime_r(const time_t*, struct tm*) +struct tm *wxLocaltime_r(const time_t*, struct tm*); +#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__) + // On Windows, localtime _is_ threadsafe! #warning using pseudo thread-safe wrapper for localtime to emulate localtime_r #endif +#endif #ifdef HAVE_GMTIME_R #define wxGmtime_r gmtime_r #else -struct tm *wxGmtime_r(const time_t*, struct tm*) +struct tm *wxGmtime_r(const time_t*, struct tm*); +#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__) + // On Windows, gmtime _is_ threadsafe! #warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r #endif +#endif /* The three (main) classes declared in this header represent: