summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-08-17 12:41:46 -0700
committerElliott Hughes <enh@google.com>2015-08-17 12:41:46 -0700
commite17788ceff5c676f3783e5aa25d57a613e9f59db (patch)
tree5c02145f2500a7c1021415980ab28706b6a0bffb
parente3f0a881c20072a644317330ecf7409c81e96888 (diff)
Replace HAVE_MS_C_RUNTIME with _WIN32 in frameworks/base/tools.
Change-Id: Ideef62acbf53a442167c9b8038021affffef9e8a
-rw-r--r--tools/aapt/CacheUpdater.h4
-rw-r--r--tools/aapt/Resource.cpp2
-rw-r--r--tools/aapt/XMLNode.cpp2
-rw-r--r--tools/aidl/aidl.cpp6
-rw-r--r--tools/aidl/aidl_language.cpp2
-rw-r--r--tools/aidl/search_path.cpp4
6 files changed, 10 insertions, 10 deletions
diff --git a/tools/aapt/CacheUpdater.h b/tools/aapt/CacheUpdater.h
index fade53ac2629..10a1bbc2f4aa 100644
--- a/tools/aapt/CacheUpdater.h
+++ b/tools/aapt/CacheUpdater.h
@@ -12,7 +12,7 @@
#include <sys/stat.h>
#include <stdio.h>
#include "Images.h"
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
#include <direct.h>
#endif
@@ -81,7 +81,7 @@ public:
// Advance to the next segment of the path
existsPath.appendPath(toCreate.walkPath(&remains));
toCreate = remains;
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
_mkdir(existsPath.string());
#else
mkdir(existsPath.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP);
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index beb94fdbcfc5..aa7778f9114d 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -2682,7 +2682,7 @@ status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets,
if (s > last && (*s == '.' || *s == 0)) {
String8 part(last, s-last);
dest.appendPath(part);
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
_mkdir(dest.string());
#else
mkdir(dest.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP);
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index bf31bc137fa8..1860147dc2ee 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -12,7 +12,7 @@
#include <errno.h>
#include <string.h>
-#ifndef HAVE_MS_C_RUNTIME
+#ifndef _WIN32
#define O_BINARY 0
#endif
diff --git a/tools/aidl/aidl.cpp b/tools/aidl/aidl.cpp
index 368e73d05f18..438007f527d5 100644
--- a/tools/aidl/aidl.cpp
+++ b/tools/aidl/aidl.cpp
@@ -15,7 +15,7 @@
#include <string.h>
#include <map>
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
#include <io.h>
#include <direct.h>
#include <sys/stat.h>
@@ -754,7 +754,7 @@ check_outputFilePath(const string& path) {
if (path[i] == OS_PATH_SEPARATOR) {
string p = path.substr(0, i);
if (access(path.data(), F_OK) != 0) {
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
_mkdir(p.data());
#else
mkdir(p.data(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP);
@@ -1113,7 +1113,7 @@ preprocess_aidl(const Options& options)
// write preprocessed file
int fd = open( options.outputFileName.c_str(),
O_RDWR|O_CREAT|O_TRUNC|O_BINARY,
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
_S_IREAD|_S_IWRITE);
#else
S_IRUSR|S_IWUSR|S_IRGRP);
diff --git a/tools/aidl/aidl_language.cpp b/tools/aidl/aidl_language.cpp
index cd6a3bd5dfc1..5fab6c26431a 100644
--- a/tools/aidl/aidl_language.cpp
+++ b/tools/aidl/aidl_language.cpp
@@ -3,7 +3,7 @@
#include <string.h>
#include <stdlib.h>
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
int isatty(int fd)
{
return (fd == 0);
diff --git a/tools/aidl/search_path.cpp b/tools/aidl/search_path.cpp
index 29dbe260c4f1..029e216b0abd 100644
--- a/tools/aidl/search_path.cpp
+++ b/tools/aidl/search_path.cpp
@@ -4,7 +4,7 @@
#include "os.h"
#include <string.h>
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
#include <io.h>
#endif
@@ -42,7 +42,7 @@ find_import_file(const char* given)
}
f.append(expected);
-#ifdef HAVE_MS_C_RUNTIME
+#ifdef _WIN32
/* check that the file exists and is not write-only */
if (0 == _access(f.c_str(), 0) && /* mode 0=exist */
0 == _access(f.c_str(), 4) ) { /* mode 4=readable */