Skip to content
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: 1 addition & 1 deletion src/platform/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#if defined(_WIN32)
#undef IS_WINDOWS
#define IS_WINDOWS 1
#elif defined(__linux)
#elif defined(__linux) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#undef IS_LINUX
#define IS_LINUX 1
#elif defined(__APPLE__)
Expand Down
6 changes: 2 additions & 4 deletions src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ namespace detail {
#endif
}

#if IS_WINDOWS
int fileno(std::FILE* stream) {
#if IS_WINDOWS
return _fileno(stream);
#else
return ::fileno(stream);
#endif
}
#endif

void enable_virtual_terminal_processing_if_needed() noexcept {
// enable colors / ansi processing if necessary
Expand Down
2 changes: 2 additions & 0 deletions src/utils/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
CPPTRACE_BEGIN_NAMESPACE
namespace detail {
bool isatty(int fd);
#if IS_WINDOWS
int fileno(std::FILE* stream);
#endif

void enable_virtual_terminal_processing_if_needed() noexcept;

Expand Down
Loading