diff options
author | Yabin Cui <yabinc@google.com> | 2014-11-14 00:47:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-14 00:47:27 +0000 |
commit | 88749eec0a9e3606611b8753bce5a949bc15815b (patch) | |
tree | 59c726d3878abe277c7a78265f9a984df8c4513d | |
parent | 4ad65befd1fd525df4257f0e95e8b93f89ef0bff (diff) | |
parent | 5a8a016287db75c9599bc0b95a925364c6000025 (diff) | |
download | system_core-88749eec0a9e3606611b8753bce5a949bc15815b.zip system_core-88749eec0a9e3606611b8753bce5a949bc15815b.tar.gz system_core-88749eec0a9e3606611b8753bce5a949bc15815b.tar.bz2 |
am 5a8a0162: am 8f7fc8df: Merge "kill HAVE_LOCALTIME_R"
* commit '5a8a016287db75c9599bc0b95a925364c6000025':
kill HAVE_LOCALTIME_R
-rw-r--r-- | liblog/fake_log_device.c | 4 | ||||
-rw-r--r-- | liblog/log_time.cpp | 4 | ||||
-rw-r--r-- | liblog/logprint.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/liblog/fake_log_device.c b/liblog/fake_log_device.c index 136792d..b8d87bb 100644 --- a/liblog/fake_log_device.c +++ b/liblog/fake_log_device.c @@ -352,7 +352,7 @@ static ssize_t fake_writev(int fd, const struct iovec *iov, int iovcnt) { static void showLog(LogState *state, int logPrio, const char* tag, const char* msg) { -#if defined(HAVE_LOCALTIME_R) +#if !defined(_WIN32) struct tm tmBuf; #endif struct tm* ptm; @@ -377,7 +377,7 @@ static void showLog(LogState *state, * in the time stamp. Don't use forward slashes, parenthesis, * brackets, asterisks, or other special chars here. */ -#if defined(HAVE_LOCALTIME_R) +#if !defined(_WIN32) ptm = localtime_r(&when, &tmBuf); #else ptm = localtime(&when); diff --git a/liblog/log_time.cpp b/liblog/log_time.cpp index 755c2d9..209a9da 100644 --- a/liblog/log_time.cpp +++ b/liblog/log_time.cpp @@ -39,7 +39,7 @@ char *log_time::strptime(const char *s, const char *format) { #endif struct tm *ptm; -#if (defined(HAVE_LOCALTIME_R)) +#if !defined(_WIN32) struct tm tmBuf; ptm = localtime_r(&now, &tmBuf); #else @@ -78,7 +78,7 @@ char *log_time::strptime(const char *s, const char *format) { ++ret; } now = tv_sec; -#if (defined(HAVE_LOCALTIME_R)) +#if !defined(_WIN32) ptm = localtime_r(&now, &tmBuf); #else ptm = localtime(&now); diff --git a/liblog/logprint.c b/liblog/logprint.c index 244f723..9b5a543 100644 --- a/liblog/logprint.c +++ b/liblog/logprint.c @@ -726,7 +726,7 @@ char *android_log_formatLogLine ( const AndroidLogEntry *entry, size_t *p_outLength) { -#if defined(HAVE_LOCALTIME_R) +#if !defined(_WIN32) struct tm tmBuf; #endif struct tm* ptm; @@ -749,7 +749,7 @@ char *android_log_formatLogLine ( * in the time stamp. Don't use forward slashes, parenthesis, * brackets, asterisks, or other special chars here. */ -#if defined(HAVE_LOCALTIME_R) +#if !defined(_WIN32) ptm = localtime_r(&(entry->tv_sec), &tmBuf); #else ptm = localtime(&(entry->tv_sec)); |