* pcre2posix: make code warning free and update ChangeLog
Somehow previous fix was not ammended to include this code change,
take the opportunity to update ChangeLog and do other cleanup so
it will be at least worth a PR.
Those found responsible have been sacked
* pcre2posix: fix crash on recent regerror code
Since 0710ce2 (pcre2posix: avoid snprintf quirks in regerror (#333),
2023-11-15), a call for snprintf was replaced by a pair of strncpy
and buf[errbuf_size - 1] = 0, but it didn't account for the case
where errbuf_size == 0.
Make the code conditional to mimic the original logic and avoid
crashing.
* doc: document that the POSIX interface is not POSIX compatible
POSIX 1003.1-2008 requires that regoff_t be at least as large as
ssize_t or ptrdiff_t, but we use int and therefore any match is
restricted to what that can hold, even in 64-bit architectures.
When using a DLL in Windows, the function declarations (and definitions)
that are public are decorated with attributes but those declarations would
conflict with the ones that are selected when the compiler supports the
visibility feature.
Define instead a new macro that would be added to the corresponding
macros independently and while at it allow setting visibility with cmake.