Skip to content

Commit

Permalink
Set SPDLOG_EOL to LF instead of CRLF and use LF with Clonk.log on all…
Browse files Browse the repository at this point in the history
… operating systems
  • Loading branch information
Fulgen301 committed Aug 28, 2024
1 parent c0228e5 commit c03c177
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ set(SPDLOG_USE_STD_FORMAT ON)

FetchContent_MakeAvailable(spdlog)

target_compile_definitions(spdlog PUBLIC SPDLOG_EOL=\"\\x0A\")
target_link_libraries(standard spdlog::spdlog)

# Link Windows Imaging Component
Expand Down
2 changes: 1 addition & 1 deletion src/C4Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ C4LogSystem::LogSink::LogSink()
// open
int iLog = 2;
#ifdef _WIN32
while (!(file = _fsopen(logFileName.c_str(), "wt", _SH_DENYWR)))
while (!(file = _fsopen(logFileName.c_str(), "wb", _SH_DENYWR)))
#else
while (!(file = fopen(logFileName.c_str(), "wb")))
#endif
Expand Down

0 comments on commit c03c177

Please sign in to comment.