head 1.4; access; symbols pkgsrc-2026Q1:1.4.0.2 pkgsrc-2026Q1-base:1.4 pkgsrc-2017Q1:1.2.0.4 pkgsrc-2017Q1-base:1.2 pkgsrc-2016Q4:1.2.0.2 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.1.0.6 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.4 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.2 pkgsrc-2016Q1-base:1.1; locks; strict; comment @// @; 1.4 date 2026.01.18.09.17.48; author wiz; state Exp; branches; next 1.3; commitid RftMvHqswaJF4RqG; 1.3 date 2017.05.07.03.13.24; author mef; state dead; branches; next 1.2; commitid YA6mJeUcvAx4dpQz; 1.2 date 2016.10.17.14.06.39; author mef; state Exp; branches; next 1.1; commitid CSzukUGvFWkPivqz; 1.1 date 2016.03.29.22.03.52; author joerg; state Exp; branches; next ; commitid DqWN58wuAkAZrA0z; desc @@ 1.4 log @cre2: fix build on NetBSD 11 @ text @$NetBSD$ Add missing header for strlen(). --- src/cre2.cpp.orig 2026-01-18 09:16:30.360014220 +0000 +++ src/cre2.cpp @@@@ -18,6 +18,7 @@@@ #include #include +#include #include @ 1.3 log @Updated devel/cr2 from 0.1b6 to 0.3.4 -------------------------------- 0.3.4 2017-04-04 - bumped version number to 0.3.4, added credits 0.3.3 2016-09-15 - development of building infrastructure, better selection of C++11 0.3.2 2016-09-14 - udpated installation infrastructure to work with recent revision of re2 under the autotools 0.3.1 2016-03-18 - bumped version number to 0.3.1 0.3.0 2016-03-17 - bumped version number to 0.3.0 0.2.0 2016-02-16 - documentation review @ text @d1 1 a1 1 $NetBSD: patch-src_cre2.cpp,v 1.2 2016/10/17 14:06:39 mef Exp $ d3 1 a3 1 Don't depend on GCC's VLA of non-POD types extensions. d5 1 a5 1 --- src/cre2.cpp.orig 2016-03-28 17:32:57.445282715 +0000 d7 1 a7 1 @@@@ -17,6 +17,7 @@@@ d11 2 a12 1 +#include a14 99 /** -------------------------------------------------------------------- @@@@ -201,7 +202,7 @@@@ cre2_match (const cre2_regexp_t *re , co cre2_string_t *match, int nmatch) { re2::StringPiece text_re2(text, textlen); - re2::StringPiece match_re2[nmatch]; + std::vector match_re2(nmatch); RE2::Anchor anchor_re2 = RE2::UNANCHORED; bool retval; // 0 for no match // 1 for successful matching @@@@ -215,7 +216,7 @@@@ cre2_match (const cre2_regexp_t *re , co case CRE2_UNANCHORED: break; } - retval = TO_CONST_RE2(re)->Match(text_re2, startpos, endpos, anchor_re2, match_re2, nmatch); + retval = TO_CONST_RE2(re)->Match(text_re2, startpos, endpos, anchor_re2, match_re2.data(), nmatch); if (retval) { for (int i=0; idata, text->length); \ - re2::StringPiece strv[nmatch]; \ - RE2::Arg argv[nmatch]; \ - RE2::Arg * args[nmatch]; \ + std::vector strv(nmatch); \ + std::vector argv(nmatch); \ + std::vector args(nmatch); \ bool retval; \ for (int i=0; idata, text->length); \ - re2::StringPiece strv[nmatch]; \ - RE2::Arg argv[nmatch]; \ - RE2::Arg * args[nmatch]; \ + std::vector strv(nmatch); \ + std::vector argv(nmatch); \ + std::vector args(nmatch); \ bool retval; \ for (int i=0; idata = input.data(); \ text->length = input.length(); \ @@@@ -335,15 +336,15 @@@@ DEFINE_MATCH_ZSTRING_FUN2(cre2_find_and_ cre2_string_t * match, int nmatch) \ { \ re2::StringPiece input(text->data, text->length); \ - re2::StringPiece strv[nmatch]; \ - RE2::Arg argv[nmatch]; \ - RE2::Arg * args[nmatch]; \ + std::vector strv(nmatch); \ + std::vector argv(nmatch); \ + std::vector args(nmatch); \ bool retval; \ for (int i=0; idata, text->length); \ - re2::StringPiece strv[nmatch]; \ - RE2::Arg argv[nmatch]; \ - RE2::Arg * args[nmatch]; \ + std::vector strv(nmatch); \ + std::vector argv(nmatch); \ + std::vector args(nmatch); \ bool retval; \ for (int i=0; idata = input.data(); \ text->length = input.length(); \ @ 1.2 log @Add following line CPPFLAGS+= -std=c++11 to fix (at least) pkgsrc NetBSD 7.0.1_PATCH/x86_64 2016-10-13 12:53 build Just for FYI, without FLAGS, | checking re2/re2.h usability... no | checking re2/re2.h presence... no | checking for re2/re2.h... no | configure: error: test for RE2 header failed with CXXFLAGS+=, getting below | configure: WARNING: re2/re2.h: accepted by the compiler, rejected by the preprocessor! | configure: WARNING: re2/re2.h: proceeding with the compiler's result Thanks joerg@@, @ text @d1 1 a1 1 $NetBSD: patch-src_cre2.cpp,v 1.1 2016/03/29 22:03:52 joerg Exp $ @ 1.1 log @Don't depend on GCC's VLA of non-POD types extensions. @ text @d1 3 a3 1 $NetBSD$ @