]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/datetime.h
disable (some) features that are not available in DirectFB
[wxWidgets.git] / include / wx / datetime.h
index 8d994290ab337c1e9828496219cc6e736710547e..c65e1f64d80f0cff877581bb1c68a6c5498c8b8d 100644 (file)
@@ -56,7 +56,7 @@ class WXDLLIMPEXP_BASE wxDateSpan;
 #ifdef HAVE_LOCALTIME_R
 #define wxLocaltime_r localtime_r
 #else
-struct tm *wxLocaltime_r(const time_t*, struct tm*);
+WXDLLIMPEXP_BASE 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
@@ -66,7 +66,7 @@ struct tm *wxLocaltime_r(const time_t*, struct tm*);
 #ifdef HAVE_GMTIME_R
 #define wxGmtime_r gmtime_r
 #else
-struct tm *wxGmtime_r(const time_t*, struct tm*);
+WXDLLIMPEXP_BASE 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
@@ -1928,7 +1928,9 @@ inline wxLongLong wxTimeSpan::GetSeconds() const
 
 inline int wxTimeSpan::GetMinutes() const
 {
-    return (GetSeconds() / 60l).GetLo();
+    // explicit cast to int suppresses a warning with CodeWarrior and possibly
+    // others (changing the return type to long from int is impossible in 2.8)
+    return (int)((GetSeconds() / 60l).GetLo());
 }
 
 inline int wxTimeSpan::GetHours() const