Debian's "lintian" picked this up - line 950 in the man page starts
with a ' which is how you start a roff request. You can reproduce the
warning thus:
```
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
man --warnings -E UTF-8 -l -Tutf8 -Z doc/pcre2grep.1 >/dev/null
```
The fix is to add a zero-width space (`\&`) to the start of the
relevant line (indeed `groff_man(7)` suggests exactly this use for \&).
---------
Co-authored-by: Matthew Vernon <matthew@debian.org>
__GNUC__ is defined by any compiler that claims compliance to GNU
but that doesn't include the cmdline interface, so avoid passing
GCC specific warning flags to clang.
* autotools: retire conditional for debug build
likely added by mistake, the functionality works through `--enable-debug`
instead.
* maint: allow selecting compiler for ManyConfigTests
Instead of hardcoding the compiler as `cc`, let a CC environment
variable dictate which compiler to use.
For example, in macOS/arm64 where the GNU compiler is provided by
brew the following will allow using it instead of the system compiler
(which ALSO answers to `gcc` even though is `clang`)
% CC=gcc-13 maint/ManyConfigTests
I previously added a CI that the documentation was not dirty. This turns out to be too strict: it's onerous to have contributors install the exactly-matching `nroff` setup required to sync the documentation.
Instead, the CI check now commits and pushes the change to the PR (if it's a same-fork PR), and ignores the changes if it's a PR from another fork.
The CI will push the PrepareRelease changes on master, if needed.
Fixes#653
* S390x is important, because it's basically the only supported big-endian
architecture I can find anywhere. I used to work on SPARC and PPC-be systems
a long time ago, but even Debian has dropped those architectures now, so
it's nice that there's *least one* arch remaining to shake out endian
assumptions.
* PPC64LE is Big-iron POWER only (this is not the PowerPC arch used in old Apple Macs)
* ARMv7 is a 32-bit Linux build. i386 is mostly gone now, so ARMv7 is all that's left.
* AARCH64 is the only really widely-deployed non-x86 archicture, at least that's likely
to be running PCRE2.
* RiscV, since it's the Next Big Thing™.
Part of #651
* Use much stricter windows warnings (`/W3` rather than `/W1`). This requires quite a few fixes for all the sloppy places where we do implicit assignment of 64-bit values to 32-bit storage.
* Use and test CMake build & install on FreeBSD and Solaris
* Add 64 bit Solaris build (`cc -m64`) and fix existing Solaris warnings
* Make compile flags used in CI consistent across platforms. Previously Mac & Linux were building with different warning flags.
* Add `--enable-Werror` to `configure.ac`. This means that you can build with `-Werror` in a clean way. Previously, you had to hackily override the CPPFLAGS when calling `make` since you can't pass `-Werror` as a CFLAG into `./configure` (it messes with compiler feature detection).
Also fix a few minor portability issues.
- The unix "MSYS" environment has an usual (but sane) French locale,
requiring a test update
- pcre2grep needs a fix to use the WIN32 when both WIN32 and sys/stat.h
are available
Fixes#127
Fixes#564
The previous API was not extensible to handle multi-character case rules. It required a fair bit of reworking in order to accommodate this. I had to delay the casing transformations to be done later, by buffering up the string to transform, and then allowing the callback to do an in-place transformation on the entire input to be transformed.
Fixes#526
The handling is rather brittle; but it will do for now. We should always compute the caseless extension of character classes, for cranges and bitset branches; however we can add some delicate and dubious optimisation to avoid doing the caseless extension two times, when converting from a cranges to a bitset.
The workflow shall be:
* When the release number is bumped, all references to that release number need to be bumped immediately. (For example, when the source code moves from 10.45 → 10.46, the man pages must do so as well.)
* When documentation is updated, there's no need to update the "last modified" dates by hand. We can sweep those all up during the release process. Or update them immediately - there's no harm in it; we simply aren't obliged to.
I believe this is the correct procedure, based on Philip's documentation.
The libpcre2-posix interface is completely unchanged, but the source code has been updated.
The libpcre2-NN interface has been extended in backwards-compatible ways, with new enum values and API functions, so callers compiled and linked against the old version may use the newer as a drop-in replacement, but callers compiled against the 10.45 headers will fail when used against the old version (if they require any newly-added functions).
I reckon that callers are assuming that when you use the PCRE2_SUBSTITUTE_OVERFLOW_LENGTH option, it will calculate the entire memory requirement in one go. Just two calls should be sufficient (rather than needing to loop with a gradually-increasing buffer size).
However, with a substitution callout this is not true. If you call once with PCRE2_SUBSTITUTE_OVERFLOW_LENGTH, the buffer length returned might still not be sufficient for the second call to succeed.
This is because the callout might not be called the first time, but the second time it will be called and can affect control flow, by requiring even more buffer to be used. This occurs even if the callout is completely stateless, idempotent and well-behaved.
This fix ensures that when we skip a callout (due to overflow), we still request enough buffer size for either option that the callout might return.
The new CI job ensures that `make distcheck` passes.
It also bundles up the tarball and includes in the GitHub artifacts, along with a GitHub-provided attestation that the tarball is derived from the given build steps.
It's not ideal, but at least it's being tested. I have added support for pcre2test, so that we can run the unit tests against the library which Zig builds.
Add Bazel to CI using Bazelisk from the GitHub test runners.
Fix many things in the Bazel build file... and also add basic testing which executes pcre2test using RunTest.
---------
Co-authored-by: zaucy <zekewarren@gmail.com>
The Solaris build tests using Oracle's Sun-Studio `cc` compiler.
These builds are run inside nested VMs, using a third-party GitHub Action (but on GitHub-hosted hardware).
The builds are run on pushes to master, but not on each change to a PR.
* Add details on new maintainership
* Remove checked-in autoconf outputs
* Sync & cleanup files with Detrail
* Add CI job for ensuring PrepareRelease is run
* Add Ubuntu-20.04 autoconf runner
* Make CMake installed files match autoconf
* Update acknowledgements