Reviewed by Maciej Stachowiak.
With Windows compilers older then MSVC 2005, the functions
gmtime_s and localtime_s don't exist. The gmtime and localtime are
on Windows always thread safe. So use them in the cases where
gmtime_s and localtime_s are not present.
* loader/FTPDirectoryDocument.cpp:
* loader/FTPDirectoryParser.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44130
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-05-25 Fridrich Strba <fridrich.strba@bluewin.ch>
+
+ Reviewed by Maciej Stachowiak.
+
+ With Windows compilers older then MSVC 2005, the functions
+ gmtime_s and localtime_s don't exist. The gmtime and localtime are
+ on Windows always thread safe. So use them in the cases where
+ gmtime_s and localtime_s are not present.
+
+ * loader/FTPDirectoryDocument.cpp:
+ * loader/FTPDirectoryParser.cpp:
+
2009-05-25 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon Hausmann.
#define localtime_r(x, y) localTimeQt(x, y)
#elif PLATFORM(WIN_OS) && !defined(localtime_r)
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
#define localtime_r(x, y) localtime_s((y), (x))
+#else /* !_MSC_VER */
+#define localtime_r(x,y) (localtime(x)?(*(y)=*localtime(x),(y)):0)
+#endif
#endif
static String processFileDateString(const FTPTime& fileTime)
#define gmtime_r(x, y) gmtimeQt(x, y)
#elif PLATFORM(WIN_OS) && !defined(gmtime_r)
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
#define gmtime_r(x, y) gmtime_s((y), (x))
+#else /* !_MSC_VER */
+#define gmtime_r(x,y) (gmtime(x)?(*(y)=*gmtime(x),(y)):0)
+#endif
#endif
FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& result)