Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/robin/update-3rdparty'
Browse files Browse the repository at this point in the history
* origin/topic/robin/update-3rdparty:
  Fix for Windows compilation.
  Revert spdlog submodule to release version.
  Revert dependabout grouping.
  Bump the 3rdparty group across 1 directory with 10 updates
  • Loading branch information
rsmmr committed Jul 5, 2024
2 parents af61c53 + 745641c commit d04ef6a
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
groups:
3rdparty:
patterns:
- "3rdparty/*"

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/filesystem
2 changes: 1 addition & 1 deletion 3rdparty/fmt
Submodule fmt updated 150 files
2 changes: 1 addition & 1 deletion 3rdparty/glob
Submodule glob updated 2 files
+0 −3 include/glob/glob.h
+72 −93 source/glob.cpp
2 changes: 1 addition & 1 deletion 3rdparty/vcpkg
Submodule vcpkg updated 3059 files
3 changes: 2 additions & 1 deletion src/core/logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "autogen/config.h"
#include "core/configuration.h"
#include "util/filesystem.h"

#include <memory>
#include <string>
Expand Down Expand Up @@ -65,7 +66,7 @@ Result<Nothing> zeek::agent::setGlobalLogger(options::LogType type, options::Log
if ( ! path )
return result::Error("file logging requires a path");

sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(path->string());
sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(path_to_spdlog_filename(*path));
break;
}

Expand Down
3 changes: 3 additions & 0 deletions src/util/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <string>

#include <ghc/filesystem.hpp>
#include <spdlog/common.h>

/** Type alias. */
namespace filesystem = ghc::filesystem;
Expand All @@ -18,8 +19,10 @@ namespace platform::windows {
std::string narrowWstring(const std::wstring& wstr); // provided by platform.cc
} // namespace platform::windows
inline std::string path_to_string(const filesystem::path& p) { return platform::windows::narrowWstring(p.native()); }
inline spdlog::filename_t path_to_spdlog_filename(const filesystem::path& p) { return p.wstring(); }
#else
inline std::string path_to_string(const filesystem::path& p) { return p.native(); }
inline spdlog::filename_t path_to_spdlog_filename(const filesystem::path& p) { return p.string(); }
#endif

} // namespace zeek::agent

0 comments on commit d04ef6a

Please sign in to comment.