aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-24 03:55:16 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-24 03:55:16 +0000
commitc311f01becd5e7329379157c838f2e1ddb74af22 (patch)
tree6fbb95e902d9d5da457ad9a0d26b35ca9a96ddab
parentb58a1a4b46ae0ec1f3e8c4bd671523dd6f80b176 (diff)
parent9de92567acd0fa0a81804c7686a05cd04538da88 (diff)
downloadgoogletest-c311f01becd5e7329379157c838f2e1ddb74af22.tar.gz
Don't override GTEST_CUSTOM_TEMPDIR_FUNCTION_ for Windows. am: 9de92567ac
Change-Id: I63b78841930457a0250bb97ab4c4c1bac0faf4e5
-rw-r--r--googletest/include/gtest/internal/custom/gtest.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/googletest/include/gtest/internal/custom/gtest.h b/googletest/include/gtest/internal/custom/gtest.h
index 4dd2d1fd..b134fc76 100644
--- a/googletest/include/gtest/internal/custom/gtest.h
+++ b/googletest/include/gtest/internal/custom/gtest.h
@@ -34,7 +34,9 @@
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
-#define GTEST_CUSTOM_TEMPDIR_FUNCTION_ GetAndroidTempDir
+#if !GTEST_OS_WINDOWS
+# define GTEST_CUSTOM_TEMPDIR_FUNCTION_ GetAndroidTempDir
+# include <unistd.h>
static inline std::string GetAndroidTempDir() {
// Android doesn't have /tmp, and /sdcard is no longer accessible from
// an app context starting from Android O. On Android, /data/local/tmp
@@ -52,5 +54,6 @@ static inline std::string GetAndroidTempDir() {
}
return result;
}
+#endif //GTEST_OS_WINDOWS
#endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_