Bug 1119179 - Avoid gmtime_r duplication if it's provided by mingw. r=bsmith
authorJacek Caban <jacek@codeweavers.com>
Fri, 09 Jan 2015 11:41:15 +0100
changeset 248809 94b823b0d44500efe2f3aeb26068602d9ce8a791
parent 248808 a560b1139a5f5a36cf8120ce511425e779135172
child 248810 2675cfbcb5914a6e7aa4d20f0aa3b019d0d1afc2
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmith
bugs1119179
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1119179 - Avoid gmtime_r duplication if it's provided by mingw. r=bsmith
security/pkix/test/lib/pkixtestutil.cpp
--- a/security/pkix/test/lib/pkixtestutil.cpp
+++ b/security/pkix/test/lib/pkixtestutil.cpp
@@ -219,17 +219,17 @@ Integer(long value)
   ByteString encodedValue;
   encodedValue.push_back(static_cast<uint8_t>(value));
   return TLV(der::INTEGER, encodedValue);
 }
 
 enum TimeEncoding { UTCTime = 0, GeneralizedTime = 1 };
 
 // Windows doesn't provide gmtime_r, but it provides something very similar.
-#ifdef WIN32
+#if defined(WIN32) && !defined(_POSIX_THREAD_SAFE_FUNCTIONS)
 static tm*
 gmtime_r(const time_t* t, /*out*/ tm* exploded)
 {
   if (gmtime_s(exploded, t) != 0) {
     return nullptr;
   }
   return exploded;
 }