aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal
diff options
context:
space:
mode:
authorChris Johnson <chrisjohnsonmail@gmail.com>2019-08-29 12:34:26 -0500
committerChris Johnson <chrisjohnsonmail@gmail.com>2019-10-11 11:47:49 -0500
commitc2206b05aa0f2fbdf5b353b32cd565b0e89d3fa6 (patch)
tree9174a533f344d2a13ab1802767a86be0ffcbb7e0 /googletest/include/gtest/internal
parent40a6b9662199890b20ccbac3b964ce04713d8ede (diff)
downloadgoogletest-c2206b05aa0f2fbdf5b353b32cd565b0e89d3fa6.tar.gz
googletest-c2206b05aa0f2fbdf5b353b32cd565b0e89d3fa6.tar.bz2
googletest-c2206b05aa0f2fbdf5b353b32cd565b0e89d3fa6.zip
Add ESP8266 configs to PlatformIO build
Added various conditional compliations for ESP8266 to stub out missing functionality.
Diffstat (limited to 'googletest/include/gtest/internal')
-rw-r--r--googletest/include/gtest/internal/gtest-port.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index f6433c58..f24afe7e 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -1984,6 +1984,22 @@ inline bool IsDir(const StatStruct& st) {
}
# endif // GTEST_OS_WINDOWS_MOBILE
+#elif GTEST_OS_ESP8266
+typedef struct stat StatStruct;
+
+inline int FileNo(FILE* file) { return fileno(file); }
+inline int IsATTY(int fd) { return isatty(fd); }
+inline int Stat(const char* path, StatStruct* buf) {
+ // stat function not implemented on ESP8266
+ return 0;
+ }
+inline int StrCaseCmp(const char* s1, const char* s2) {
+ return strcasecmp(s1, s2);
+}
+inline char* StrDup(const char* src) { return strdup(src); }
+inline int RmDir(const char* dir) { return rmdir(dir); }
+inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
+
#else
typedef struct stat StatStruct;