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

Recognize OpenBSD, NetBSD and DragonflyBSD as UNIX #701

Open
wants to merge 3 commits into
base: develop
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 17 additions & 2 deletions src/easylogging++.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down