From 7ccb74055fd37f22de83e4fbe42c146b6dd5656d Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 21 Aug 2025 23:04:57 +0000 Subject: support NetBSD on ARMv6 * LineVector is only instantiated for Sci::Position. It instantiates Partitioning as well and Partitioning::InsertPartitions() is called with a Sci::Position. This only couldn't cause problems if ptrdiff_t aliases to int. In either case, I don't see why we need LineVector at all. * We need RunStyles as well since ptrdiff_t is long int and we instantiate only RunStyles. Both types have the same storage size but are still different. See also this discussion about the same workaround for Haiku: https://groups.google.com/g/scintilla-interest/c/xPXquJUIXo8/m/BLXBpTTgBwAJ --- src/CellBuffer.cxx | 5 +---- src/RunStyles.cxx | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 643929352..3bdbd7730 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -338,10 +338,7 @@ CellBuffer::CellBuffer(bool hasStyles_, bool largeDocument_) : utf8LineEnds = LineEndType::Default; collectingUndo = true; uh = std::make_unique(); - if (largeDocument) - plv = std::make_unique>(); - else - plv = std::make_unique>(); + plv = std::make_unique>(); } CellBuffer::~CellBuffer() noexcept = default; diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index 848670ba9..508ab5ba4 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -321,7 +321,7 @@ void RunStyles::Check() const { template class Scintilla::Internal::RunStyles; template class Scintilla::Internal::RunStyles; -#if (PTRDIFF_MAX != INT_MAX) || defined(__HAIKU__) +#if (PTRDIFF_MAX != INT_MAX) || defined(__HAIKU__) || defined(__NetBSD__) template class Scintilla::Internal::RunStyles; template class Scintilla::Internal::RunStyles; #endif -- cgit v1.2.3