diff --git a/absl/base/config.h b/absl/base/config.h index 58077a2c58f..abaa29353bf 100644 --- a/absl/base/config.h +++ b/absl/base/config.h @@ -380,7 +380,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || defined(__asmjs__) || defined(__EMSCRIPTEN__) || defined(__Fuchsia__) || \ defined(__sun) || defined(__myriad2__) || defined(__HAIKU__) || \ defined(__OpenBSD__) || defined(__NetBSD__) || defined(__QNX__) || \ - defined(__VXWORKS__) || defined(__hexagon__) || defined(__XTENSA__) + defined(__VXWORKS__) || defined(__hexagon__) || defined(__XTENSA__) || \ + defined(__GNU__) #define ABSL_HAVE_MMAP 1 #endif diff --git a/absl/base/internal/raw_logging.cc b/absl/base/internal/raw_logging.cc index 35a08f0ac03..e332a90283c 100644 --- a/absl/base/internal/raw_logging.cc +++ b/absl/base/internal/raw_logging.cc @@ -44,7 +44,7 @@ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ defined(__hexagon__) || defined(__Fuchsia__) || \ defined(__native_client__) || defined(__OpenBSD__) || \ - defined(__EMSCRIPTEN__) || defined(__ASYLO__) + defined(__EMSCRIPTEN__) || defined(__ASYLO__) || defined(__GNU__) #include diff --git a/absl/base/internal/strerror_test.cc b/absl/base/internal/strerror_test.cc index e32d5b5c9be..2eccde7709c 100644 --- a/absl/base/internal/strerror_test.cc +++ b/absl/base/internal/strerror_test.cc @@ -39,7 +39,9 @@ TEST(StrErrorTest, ValidErrorCode) { TEST(StrErrorTest, InvalidErrorCode) { errno = ERANGE; EXPECT_THAT(absl::base_internal::StrError(-1), - AnyOf(Eq("No error information"), Eq("Unknown error -1"))); + AnyOf(Eq("No error information"), + Eq("Unknown error -1"), + Eq("Error in unknown error system: FFFFFFFF"))); EXPECT_THAT(errno, Eq(ERANGE)); } diff --git a/absl/debugging/internal/stack_consumption.h b/absl/debugging/internal/stack_consumption.h index f5ba5575d1b..3dac5207b64 100644 --- a/absl/debugging/internal/stack_consumption.h +++ b/absl/debugging/internal/stack_consumption.h @@ -25,7 +25,8 @@ #ifdef ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION #error ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION cannot be set directly #elif !defined(__APPLE__) && !defined(_WIN32) && !defined(__Fuchsia__) && \ - (defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || \ + !defined(__GNU__) && \ + (defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || \ defined(__aarch64__) || defined(__riscv)) #define ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION 1 diff --git a/absl/debugging/internal/symbolize.h b/absl/debugging/internal/symbolize.h index 5593fde6b4c..8e2d7c8eb05 100644 --- a/absl/debugging/internal/symbolize.h +++ b/absl/debugging/internal/symbolize.h @@ -29,7 +29,7 @@ #ifdef ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE #error ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE cannot be directly set #elif defined(__ELF__) && defined(__GLIBC__) && !defined(__native_client__) \ - && !defined(__asmjs__) && !defined(__wasm__) + && !defined(__asmjs__) && !defined(__wasm__) && !defined(__GNU__) #define ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE 1 #include diff --git a/absl/debugging/internal/vdso_support.h b/absl/debugging/internal/vdso_support.h index 6562c6c2350..cfca78d3540 100644 --- a/absl/debugging/internal/vdso_support.h +++ b/absl/debugging/internal/vdso_support.h @@ -48,7 +48,7 @@ #ifdef ABSL_HAVE_VDSO_SUPPORT #error ABSL_HAVE_VDSO_SUPPORT cannot be directly set -#else +#elif !defined(__GNU__) #define ABSL_HAVE_VDSO_SUPPORT 1 #endif diff --git a/absl/log/internal/test_helpers.cc b/absl/log/internal/test_helpers.cc index bfcc9679607..0f5640bbeef 100644 --- a/absl/log/internal/test_helpers.cc +++ b/absl/log/internal/test_helpers.cc @@ -18,6 +18,8 @@ #include #endif +#include + #include "gtest/gtest.h" #include "absl/base/config.h" #include "absl/base/log_severity.h" diff --git a/absl/log/log_modifier_methods_test.cc b/absl/log/log_modifier_methods_test.cc index fc98e1f679e..f945e837cea 100644 --- a/absl/log/log_modifier_methods_test.cc +++ b/absl/log/log_modifier_methods_test.cc @@ -181,13 +181,16 @@ TEST(TailCallsModifiesTest, WithPerror) { Send(AllOf( TextMessage(AnyOf(Eq("hello world: Bad file number [9]"), Eq("hello world: Bad file descriptor [9]"), - Eq("hello world: Bad file descriptor [8]"))), + Eq("hello world: Bad file descriptor [8]"), + Eq("hello world: Bad file descriptor [1073741833]"))), ENCODED_MESSAGE(HasValues(ElementsAre( ValueWithLiteral(Eq("hello world")), ValueWithLiteral(Eq(": ")), AnyOf(ValueWithStr(Eq("Bad file number")), ValueWithStr(Eq("Bad file descriptor"))), ValueWithLiteral(Eq(" [")), - AnyOf(ValueWithStr(Eq("8")), ValueWithStr(Eq("9"))), + AnyOf(ValueWithStr(Eq("8")), + ValueWithStr(Eq("9")), + ValueWithStr(Eq("1073741833"))), ValueWithLiteral(Eq("]")))))))); test_sink.StartCapturingLogs(); diff --git a/absl/log/stripping_test.cc b/absl/log/stripping_test.cc index 271fae1d8dc..20231b9fa6c 100644 --- a/absl/log/stripping_test.cc +++ b/absl/log/stripping_test.cc @@ -33,7 +33,7 @@ #include -#if defined(__MACH__) +#if defined(__APPLE__) #include #elif defined(_WIN32) #include @@ -191,7 +191,7 @@ class StrippingTest : public ::testing::Test { absl::FPrintF(stderr, "Failed to open /pkg/bin/: %s\n", err); } return fp; -#elif defined(__MACH__) +#elif defined(__APPLE__) uint32_t size = 0; int ret = _NSGetExecutablePath(nullptr, &size); if (ret != -1) {