summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-05-08 18:54:18 +0200
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-11-14 12:55:48 +0100
commitdd0273625cb4d299e55e55c2b37a008523de7daf (patch)
tree8af633b08c4f62533e4458923f84736d6b7b8e52
parente1394aed11148937aaa428e95c18b190ac381a46 (diff)
downloadcore-dd0273625cb4d299e55e55c2b37a008523de7daf.tar.gz
core: Fix build in ISO C++11 mode
Fix compatibility with ISO C++11 compilers Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Change-Id: I8f9aa775b5681d4d8c5202a1a1935acb4efa4171
-rw-r--r--include/cutils/jstring.h2
-rw-r--r--logcat/logcat.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/include/cutils/jstring.h b/include/cutils/jstring.h
index ee0018fcc..bf7297315 100644
--- a/include/cutils/jstring.h
+++ b/include/cutils/jstring.h
@@ -24,7 +24,9 @@
extern "C" {
#endif
+#if __cplusplus < 201103L && !defined(__GXX_EXPERIMENTAL_CXX0X__)
typedef uint16_t char16_t;
+#endif
extern char * strndup16to8 (const char16_t* s, size_t n);
extern size_t strnlen16to8 (const char16_t* s, size_t n);
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index d3b5ed0b9..a70b6f2fd 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -659,14 +659,14 @@ int main(int argc, char **argv)
}
if (!devices) {
- devices = new log_device_t(strdup("/dev/"LOGGER_LOG_MAIN), false, 'm');
+ devices = new log_device_t(strdup("/dev/" LOGGER_LOG_MAIN), false, 'm');
android::g_devCount = 1;
int accessmode =
(mode & O_RDONLY) ? R_OK : 0
| (mode & O_WRONLY) ? W_OK : 0;
// only add this if it's available
- if (0 == access("/dev/"LOGGER_LOG_SYSTEM, accessmode)) {
- devices->next = new log_device_t(strdup("/dev/"LOGGER_LOG_SYSTEM), false, 's');
+ if (0 == access("/dev/" LOGGER_LOG_SYSTEM, accessmode)) {
+ devices->next = new log_device_t(strdup("/dev/" LOGGER_LOG_SYSTEM), false, 's');
android::g_devCount++;
}
}