Index: compat/win/time.cc |
diff --git a/test/thread.cc b/compat/win/time.cc |
similarity index 54% |
copy from test/thread.cc |
copy to compat/win/time.cc |
index baeeafa632152c4edd71aa04be6a4d32a0824d2e..e6738879a257bbd95bfbb9c612de79168cdd2b1e 100644 |
--- a/test/thread.cc |
+++ b/compat/win/time.cc |
@@ -12,19 +12,29 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#include "test/thread.h" |
+#include <time.h> |
-#include "gtest/gtest.h" |
+extern "C" { |
-namespace crashpad { |
-namespace test { |
+struct tm* gmtime_r(const time_t* timep, struct tm* result) { |
+ if (gmtime_s(result, timep) != 0) |
+ return nullptr; |
+ return result; |
+} |
+ |
+struct tm* localtime_r(const time_t* timep, struct tm* result) { |
+ if (localtime_s(result, timep) != 0) |
+ return nullptr; |
+ return result; |
+} |
-Thread::Thread() : platform_thread_(0) { |
+const char* strptime(const char* buf, const char* format, struct tm* tm) { |
+ // TODO(scottmg): strptime implementation. |
+ return nullptr; |
} |
-Thread::~Thread() { |
- EXPECT_FALSE(platform_thread_); |
+time_t timegm(struct tm* tm) { |
+ return _mkgmtime(tm); |
} |
-} // namespace test |
-} // namespace crashpad |
+} // extern "C" |