viewer: fix MSVC compatibility in viewer-reachable code

Address portability issues found building jfjoch_viewer with MSVC:

- common/{ADUHistogram,AzimuthalIntegrationProfile}.h and
  image_analysis/spot_finding/StrongPixelSet.h only need DeviceOutput,
  so include fpga/pcie_driver/jfjoch_fpga.h (plain-C, self-contained)
  directly instead of acquisition_device/AcquisitionDevice.h, which
  dragged <unistd.h> into the viewer tree.
- common/time_utc.h: guard gmtime_r/timegm/localtime_r with the MSVC
  equivalents (gmtime_s/_mkgmtime/localtime_s) under _WIN32; drop the
  duplicated includes and add the headers used directly.
- gemmi_gph/gemmi/utf.hpp: vendor the upstream gemmi header; fileutil.hpp
  includes it on Windows for UTF8_to_wchar but it was never vendored.
- writer/HDF5Objects.cpp: ExtractFilename returns path.filename().string()
  (std::filesystem::path has no implicit conversion to std::string on
  Windows, where it is wchar_t-based).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 23:15:27 +02:00
co-authored by Claude Opus 4.8
parent 07ce8b785a
commit ebc28744e2
6 changed files with 99 additions and 9 deletions
+1 -1
View File
@@ -1014,7 +1014,7 @@ CompressionAlgorithm HDF5Dcpl::GetCompression() {
std::string ExtractFilename(const std::string& str) {
std::filesystem::path path(str);
// if (std::filesystem::is_regular_file(path))
return path.filename();
return path.filename().string();
}
bool HDF5Object::GetBool(const std::string &name) const {