summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2019-05-09 16:26:08 -0700
committer Treehugger Robot <treehugger-gerrit@google.com> 2019-05-15 18:37:25 +0000
commit2388ae520a1d0904b4def15a8b77cef39429c883 (patch)
tree12a2173a8351e4c672b427c53fd47798381d6fc8
parent2f7a55c0370583954239c8b36bf1beb2665d8379 (diff)
ART: Place conditionally needed include in #ifdef
Mingw's wchar.h has some broken macros that are bypassed when stdio is included. However, in general the stdio include is superfluous and a huge transitive dependency. Test: mmma art Change-Id: I07c95e2085f5b70a60fee0c2cafa72b30aca4d15
-rw-r--r--libartbase/base/time_utils.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libartbase/base/time_utils.h b/libartbase/base/time_utils.h
index 15805f3f63..69c867cfaf 100644
--- a/libartbase/base/time_utils.h
+++ b/libartbase/base/time_utils.h
@@ -17,14 +17,15 @@
#ifndef ART_LIBARTBASE_BASE_TIME_UTILS_H_
#define ART_LIBARTBASE_BASE_TIME_UTILS_H_
-#include <stdint.h>
-#include <stdio.h> // Needed for correct _WIN32 build.
+#ifdef _WIN32
+#include <stdio.h> // Needed for correct macro definitions.
+#endif
+
#include <time.h>
+#include <cstdint>
#include <string>
-#include "macros.h"
-
namespace art {
enum TimeUnit {