changeset 54485:06862c019f3f

8215976: Fix gmtime_r declaration conflicts in zip.cpp with linux header files Reviewed-by: dholmes, rriggs Contributed-by: patrick@os.amperecomputing.com
author rriggs
date Thu, 03 Jan 2019 17:39:39 +0800
parents 2190f45140b1
children 6f02e036630e
files src/jdk.pack/share/native/common-unpack/zip.cpp
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.pack/share/native/common-unpack/zip.cpp	Tue Jan 22 21:18:45 2019 +0800
+++ b/src/jdk.pack/share/native/common-unpack/zip.cpp	Thu Jan 03 17:39:39 2019 +0800
@@ -416,9 +416,11 @@
     ((uLong)h << 11) | ((uLong)m << 5) | ((uLong)s >> 1);
 }
 
-#ifdef _REENTRANT // solaris
-extern "C" struct tm *gmtime_r(const time_t *, struct tm *);
-#else
+/*
+ * For thread-safe reasons, non-Windows platforms need gmtime_r
+ * while Windows can directly use gmtime that is already thread-safe.
+ */
+#ifdef _MSC_VER
 #define gmtime_r(t, s) gmtime(t)
 #endif
 /*