head 1.2; access; symbols; locks; strict; comment @// @; 1.2 date 2026.09.10.09.56.15; author adam; state Exp; branches; next 1.1; commitid GSAGTaFd1n8kJ3VG; 1.1 date 2026.08.30.01.13.18; author gdt; state Exp; branches; next ; commitid krEgFSBfxMVBbBTG; desc @@ 1.2 log @par2: updated to 1.4.0 1.4.0 Issues: * Par2 create fails to follow symlinks * Windows long-path prefix doubled the separator producing `\\?\UNC\\server\share` * Announcement: @@mnightingale joins the group PRs: * Cross-compile the FreeBSD release binaries from Linux * Bump actions/download-artifact from 7 to 8 * Bump cross-platform-actions/action from 1.3.0 to 1.4.0 * Skip the redundant whole-file MD5 during verification * Cleanup minor items after review * Verify the blocks of a file in parallel * Scan each file with a reader thread feeding worker threads * Run tests on pull requests from forks * Reduce test suite runtime * Bump cross-platform-actions/action from 1.4.0 to 1.5.0 * Count the tail of a scanned file when built without OpenMP * Replace wstring_convert with the Win32 conversion functions * Check the 16k hash again, and make the whole file hash opt-in * Suppress reachable blocks from libgomp init and sync_with_stdio * Blank the whole scan buffer beyond the end of the file @ text @$NetBSD: patch-src_par2repairer.cpp,v 1.1 2026/08/30 01:13:18 gdt Exp $ Apparently, gcc<=10, when using ostringstream, somehow turns the type into ostream after <<, and ostream has no str(). Not yet filed upstream, because probably upstream does not regard gcc 10 as reasonable, or they would have CI with it. --- src/par2repairer.cpp.orig 2026-09-09 06:33:53.000000000 +0000 +++ src/par2repairer.cpp @@@@ -1943,9 +1943,12 @@@@ bool Par2Repairer::ScanDataFile(DiskFile { if (lastmatchoffset < filechecksummer.Offset() && noiselevel > nlNormal) { - progress.PrintLine((std::ostringstream() - << "No data found between offset " << lastmatchoffset - << " and " << filechecksummer.Offset()).str()); + // Avoid gcc <= 10 bug. + std::ostringstream oss = std::ostringstream(); + oss << "No data found between offset " << lastmatchoffset + << " and " << filechecksummer.Offset(); + + progress.PrintLine(oss.str()); } // Is this the first match @@@@ -2073,9 +2076,12 @@@@ bool Par2Repairer::ScanDataFile(DiskFile if (lastmatchoffset < filechecksummer.Offset() && noiselevel > nlNormal) { - progress.PrintLine((std::ostringstream() - << "No data found between offset " << lastmatchoffset - << " and " << filechecksummer.Offset()).str()); + // Avoid gcc <= 10 bug. + std::ostringstream oss = std::ostringstream(); + oss << "No data found between offset " << lastmatchoffset + << " and " << filechecksummer.Offset(); + + progress.PrintLine(oss.str()); } } @ 1.1 log @archivers/par2: Work around gcc 10 bug It seems that when an ostringstream is operated on with <<, the resulting object is an ostream, not an ostringstream, and one can't .str() that. Simplify the code and use variables. All tests pass on NetBSD 10 amd64. @ text @d1 1 a1 1 $NetBSD$ d9 1 a9 1 --- src/par2repairer.cpp.orig 2026-08-30 01:03:00.454241587 +0000 d11 1 a11 1 @@@@ -1673,9 +1673,12 @@@@ bool Par2Repairer::ScanDataFile(DiskFile d27 1 a27 1 @@@@ -1805,9 +1808,12 @@@@ bool Par2Repairer::ScanDataFile(DiskFile d42 1 a42 1 // Get the Full and 16k hash values of the file @