diff options
author | Tim Murray <timmurray@google.com> | 2013-05-23 13:44:08 -0700 |
---|---|---|
committer | Alex Ray <aray@google.com> | 2013-07-30 13:57:01 -0700 |
commit | 214c701ec6de8bd4b57f6aec8874fb343c79d874 (patch) | |
tree | eafe32af721dffacf5b2ce7d677ecad30f508f51 | |
parent | e45a9acd6390d68e902b1f0a25f90b96b8849a3c (diff) | |
download | system_core-214c701ec6de8bd4b57f6aec8874fb343c79d874.zip system_core-214c701ec6de8bd4b57f6aec8874fb343c79d874.tar.gz system_core-214c701ec6de8bd4b57f6aec8874fb343c79d874.tar.bz2 |
Make trace macros slightly more robust
Change-Id: I9544eb7b27fc1a971cabadd8d5b4b4b80678febf
-rw-r--r-- | include/utils/Trace.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/utils/Trace.h b/include/utils/Trace.h index 49578c4..6ee343d 100644 --- a/include/utils/Trace.h +++ b/include/utils/Trace.h @@ -17,6 +17,8 @@ #ifndef ANDROID_TRACE_H #define ANDROID_TRACE_H +#ifdef HAVE_ANDROID_OS + #include <fcntl.h> #include <stdint.h> #include <stdio.h> @@ -57,4 +59,11 @@ private: }; // namespace android +#else // HAVE_ANDROID_OS + +#define ATRACE_NAME(...) +#define ATRACE_CALL() + +#endif // HAVE_ANDROID_OS + #endif // ANDROID_TRACE_H |