aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-24 04:21:15 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-24 04:21:15 +0000
commit0417e7fc6f89c60a0f7278d36531698404ce2377 (patch)
tree6fbb95e902d9d5da457ad9a0d26b35ca9a96ddab
parent6a961cb1d1ae7cba70f1cbe4166376b5cce9ffee (diff)
parent933309c29443dd01f2731e63799db0fcb52d6065 (diff)
downloadgoogletest-0417e7fc6f89c60a0f7278d36531698404ce2377.tar.gz
Don't override GTEST_CUSTOM_TEMPDIR_FUNCTION_ for Windows. am: 9de92567ac am: c311f01bec am: 933309c294
Change-Id: Ib310c0b8a60fe19123cb414e52bb1212a8151a3d
-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_