Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Unified Diff: compat/win/time.cc

Issue 1119783005: win: get tools/crashpad_database_util mostly working (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compat/win/time.h ('k') | third_party/getopt/LICENSE » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
« no previous file with comments | « compat/win/time.h ('k') | third_party/getopt/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698