Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Recognize OpenBSD, NetBSD and DragonflyBSD as UNIX #701

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -78,6 +78,8 @@ if (test)
if (EMSCRIPTEN)
set(CMAKE_EXE_LINKER_FLAGS "-O2 -s TOTAL_MEMORY=134217728")
endif()
set(CMAKE_CXX_FLAGS "-O0 -g -lpthread -I /home/user/src/bitmonero/tests/gtest/include")
set(CMAKE_EXE_LINKER_FLAGS "-O0 -g -lpthread -L /home/user/src/bitmonero/build/debug/tests/gtest")

add_executable(easyloggingpp-unit-tests
src/easylogging++.cc
19 changes: 17 additions & 2 deletions src/easylogging++.h
Original file line number Diff line number Diff line change
@@ -99,6 +99,16 @@
#else
# define ELPP_OS_FREEBSD 0
#endif
#if (defined(__OpenBSD__))
# define ELPP_OS_OPENBSD 1
#else
# define ELPP_OS_OPENBSD 0
#endif
#if (defined(__NetBSD__))
# define ELPP_OS_NETBSD 1
#else
# define ELPP_OS_NETBSD 0
#endif
#if (defined(__sun))
# define ELPP_OS_SOLARIS 1
#else
@@ -119,8 +129,13 @@
#else
# define ELPP_OS_EMSCRIPTEN 0
#endif
#if (defined(__DragonFly__))
# define ELPP_OS_DRAGONFLY 1
#else
# define ELPP_OS_DRAGONFLY 0
#endif
// Unix
#if ((ELPP_OS_LINUX || ELPP_OS_MAC || ELPP_OS_FREEBSD || ELPP_OS_NETBSD || ELPP_OS_SOLARIS || ELPP_OS_AIX || ELPP_OS_EMSCRIPTEN) && (!ELPP_OS_WINDOWS))
#if ((ELPP_OS_LINUX || ELPP_OS_MAC || ELPP_OS_FREEBSD || ELPP_OS_NETBSD || ELPP_OS_SOLARIS || ELPP_OS_AIX || ELPP_OS_DRAGONFLY || ELPP_OS_OPENBSD || ELPP_OS_NETBSD || ELPP_OS_EMSCRIPTEN) && (!ELPP_OS_WINDOWS))
# define ELPP_OS_UNIX 1
#else
# define ELPP_OS_UNIX 0
@@ -205,7 +220,7 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre
# define ELPP_INTERNAL_INFO(lvl, msg)
#endif // (defined(ELPP_DEBUG_INFO))
#if (defined(ELPP_FEATURE_ALL)) || (defined(ELPP_FEATURE_CRASH_LOG))
# if (ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_ANDROID && !ELPP_OS_EMSCRIPTEN)
# if (ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_ANDROID && !ELPP_OS_OPENBSD && !ELPP_OS_NETBSD && !ELPP_OS_EMSCRIPTEN)
# define ELPP_STACKTRACE 1
# else
# if ELPP_COMPILER_MSVC