am eba23aaa: Merge "Replace HAVE_MS_C_RUNTIME with _WIN32 in frameworks/base/tools."

* commit 'eba23aaa765822c5ed8a152af00da1998d61409e':
  Replace HAVE_MS_C_RUNTIME with _WIN32 in frameworks/base/tools.
This commit is contained in:
Elliott Hughes
2015-08-17 21:01:59 +00:00
committed by Android Git Automerger
6 changed files with 10 additions and 10 deletions

View File

@@ -12,7 +12,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#include "Images.h" #include "Images.h"
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
#include <direct.h> #include <direct.h>
#endif #endif
@@ -81,7 +81,7 @@ public:
// Advance to the next segment of the path // Advance to the next segment of the path
existsPath.appendPath(toCreate.walkPath(&remains)); existsPath.appendPath(toCreate.walkPath(&remains));
toCreate = remains; toCreate = remains;
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
_mkdir(existsPath.string()); _mkdir(existsPath.string());
#else #else
mkdir(existsPath.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); mkdir(existsPath.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP);

View File

@@ -2682,7 +2682,7 @@ status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets,
if (s > last && (*s == '.' || *s == 0)) { if (s > last && (*s == '.' || *s == 0)) {
String8 part(last, s-last); String8 part(last, s-last);
dest.appendPath(part); dest.appendPath(part);
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
_mkdir(dest.string()); _mkdir(dest.string());
#else #else
mkdir(dest.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); mkdir(dest.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP);

View File

@@ -12,7 +12,7 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#ifndef HAVE_MS_C_RUNTIME #ifndef _WIN32
#define O_BINARY 0 #define O_BINARY 0
#endif #endif

View File

@@ -15,7 +15,7 @@
#include <string.h> #include <string.h>
#include <map> #include <map>
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
#include <io.h> #include <io.h>
#include <direct.h> #include <direct.h>
#include <sys/stat.h> #include <sys/stat.h>
@@ -754,7 +754,7 @@ check_outputFilePath(const string& path) {
if (path[i] == OS_PATH_SEPARATOR) { if (path[i] == OS_PATH_SEPARATOR) {
string p = path.substr(0, i); string p = path.substr(0, i);
if (access(path.data(), F_OK) != 0) { if (access(path.data(), F_OK) != 0) {
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
_mkdir(p.data()); _mkdir(p.data());
#else #else
mkdir(p.data(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); 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 // write preprocessed file
int fd = open( options.outputFileName.c_str(), int fd = open( options.outputFileName.c_str(),
O_RDWR|O_CREAT|O_TRUNC|O_BINARY, O_RDWR|O_CREAT|O_TRUNC|O_BINARY,
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
_S_IREAD|_S_IWRITE); _S_IREAD|_S_IWRITE);
#else #else
S_IRUSR|S_IWUSR|S_IRGRP); S_IRUSR|S_IWUSR|S_IRGRP);

View File

@@ -3,7 +3,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
int isatty(int fd) int isatty(int fd)
{ {
return (fd == 0); return (fd == 0);

View File

@@ -4,7 +4,7 @@
#include "os.h" #include "os.h"
#include <string.h> #include <string.h>
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
#include <io.h> #include <io.h>
#endif #endif
@@ -42,7 +42,7 @@ find_import_file(const char* given)
} }
f.append(expected); f.append(expected);
#ifdef HAVE_MS_C_RUNTIME #ifdef _WIN32
/* check that the file exists and is not write-only */ /* check that the file exists and is not write-only */
if (0 == _access(f.c_str(), 0) && /* mode 0=exist */ if (0 == _access(f.c_str(), 0) && /* mode 0=exist */
0 == _access(f.c_str(), 4) ) { /* mode 4=readable */ 0 == _access(f.c_str(), 4) ) { /* mode 4=readable */