зеркало из https://github.com/mozilla/gecko-dev.git
65 строки
2.1 KiB
Diff
65 строки
2.1 KiB
Diff
Mozilla changes to upstream googletest.
|
|
|
|
diff --git a/gtest/include/gtest/internal/gtest-port.h b/gtest/include/gtest/internal/gtest-port.h
|
|
--- a/gtest/include/gtest/internal/gtest-port.h
|
|
+++ b/gtest/include/gtest/internal/gtest-port.h
|
|
@@ -982,8 +982,9 @@ typedef struct _RTL_CRITICAL_SECTION GTE
|
|
// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in
|
|
// gtest/internal/custom/gtest-port.h
|
|
#ifndef GTEST_API_
|
|
|
|
+/*
|
|
#ifdef _MSC_VER
|
|
# if GTEST_LINKED_AS_SHARED_LIBRARY
|
|
# define GTEST_API_ __declspec(dllimport)
|
|
# elif GTEST_CREATE_SHARED_LIBRARY
|
|
@@ -991,8 +992,9 @@ typedef struct _RTL_CRITICAL_SECTION GTE
|
|
# endif
|
|
#elif __GNUC__ >= 4 || defined(__clang__)
|
|
# define GTEST_API_ __attribute__((visibility ("default")))
|
|
#endif // _MSC_VER
|
|
+*/
|
|
|
|
#endif // GTEST_API_
|
|
|
|
#ifndef GTEST_API_
|
|
diff --git a/gtest/src/gtest-death-test.cc b/gtest/src/gtest-death-test.cc
|
|
--- a/gtest/src/gtest-death-test.cc
|
|
+++ b/gtest/src/gtest-death-test.cc
|
|
@@ -1161,9 +1161,9 @@ inline char** GetEnviron() {
|
|
}
|
|
# else
|
|
// Some POSIX platforms expect you to declare environ. extern "C" makes
|
|
// it reside in the global namespace.
|
|
-extern "C" char** environ;
|
|
+extern "C" __attribute__ ((visibility ("default"))) char** environ;
|
|
inline char** GetEnviron() { return environ; }
|
|
# endif // GTEST_OS_MAC
|
|
|
|
# if !GTEST_OS_QNX
|
|
diff --git a/gtest/src/gtest.cc b/gtest/src/gtest.cc
|
|
--- a/gtest/src/gtest.cc
|
|
+++ b/gtest/src/gtest.cc
|
|
@@ -33,8 +33,10 @@
|
|
#include "gtest/gtest.h"
|
|
#include "gtest/internal/custom/gtest.h"
|
|
#include "gtest/gtest-spi.h"
|
|
|
|
+#include "mozilla/Unused.h"
|
|
+
|
|
#include <ctype.h>
|
|
#include <math.h>
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
@@ -4384,9 +4386,9 @@ class ScopedPrematureExitFile {
|
|
// create the file with a single "0" character in it. I/O
|
|
// errors are ignored as there's nothing better we can do and we
|
|
// don't want to fail the test because of this.
|
|
FILE* pfile = posix::FOpen(premature_exit_filepath, "w");
|
|
- fwrite("0", 1, 1, pfile);
|
|
+ mozilla::Unused << fwrite("0", 1, 1, pfile);
|
|
fclose(pfile);
|
|
}
|
|
}
|
|
|