Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port abseil to GNU/Hurd. #1829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion absl/base/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion absl/base/internal/raw_logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <unistd.h>

Expand Down
4 changes: 3 additions & 1 deletion absl/base/internal/strerror_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
3 changes: 2 additions & 1 deletion absl/debugging/internal/stack_consumption.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion absl/debugging/internal/symbolize.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <elf.h>
Expand Down
2 changes: 1 addition & 1 deletion absl/debugging/internal/vdso_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions absl/log/internal/test_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <zircon/syscalls.h>
#endif

#include <signal.h>

#include "gtest/gtest.h"
#include "absl/base/config.h"
#include "absl/base/log_severity.h"
Expand Down
7 changes: 5 additions & 2 deletions absl/log/log_modifier_methods_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions absl/log/stripping_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include <stdio.h>

#if defined(__MACH__)
#if defined(__APPLE__)
#include <mach-o/dyld.h>
#elif defined(_WIN32)
#include <Windows.h>
Expand Down Expand Up @@ -191,7 +191,7 @@ class StrippingTest : public ::testing::Test {
absl::FPrintF(stderr, "Failed to open /pkg/bin/<binary name>: %s\n", err);
}
return fp;
#elif defined(__MACH__)
#elif defined(__APPLE__)
uint32_t size = 0;
int ret = _NSGetExecutablePath(nullptr, &size);
if (ret != -1) {
Expand Down