Thank you Ze'ev, and Alan.
1. I haven't tested with GCC on z/OS either, only with IBM's xlc compiler. I don't know how common it is for users to use alternative compilers? I only have time and energy to maintain support for one compiler I think.
I'm not exactly sure what "classic z/OS", but I have access to a standard IBM base system of z/OS, which is fully UNIX-compliant (POSIX/SUSv3). It runs a Bourne /bin/sh (not Bash though), it runs the Autoconf script ./configure very nicely without needing any GNU tools installed, and it can compile and run the official PCRE2 tarball very nicely just with IBM-provided closed-source tools, including IBM's xlc compiler.
3. Yes, in the IBM 037 codepage NL is 0x15. It is also 0x15 in the (popular?) IBM 1047 codepage, which is the default on the system I was given access to. I don't think 0x25 should be the default - unless you have evidence.
The question from Alan Lehotsky was about using 0x25. Alan never said what his codepage was, but he reported that "\n is not being handled as a line break" when using "#define
EBCDIC_NL25 1". So whatever his codepage is, he wants NL to be 0x15 I think (the PCRE2 default), and he'd mistakenly set it to 0x25. I think PCRE2's default is right, and Alan had changed from the default and (unsurprisingly) this didn't work.
4. Ze'ev - I'm really curious. Did you ever run the PCRE2 test suite for your fork? There are several quite critical bugs in the EBCDIC support for PCRE2 10.45, which I discovered after the 10.45 release, while doing testing. I strongly suspect that previous releases are very buggy too, since the PCRE2 maintainers have never done any EBCDIC testing themselves.
I have a suspicion that perhaps, no-one has ever run the test suite on an EBCDIC machine? Or at least, not on any recent release.
Could it be that when you did your PCRE2 10.44 release on CBT Tape, that you didn't run the test suite?
I fixed about 6 EBCDIC bugs, three of which I would classify as "major errors in pattern matching".
I basically can't recommend that anyone use PCRE2 version 10.45 (or 10.44 and earlier) with EBCDIC. The nightly releases of 10.46-DEV however are fixed, and the full test suite now passes in EBCIC mode on real z/OS hardware.
Thank you Ze'ev for offering your port for so many years. But, you're not under any obligation to support it any longer than you want to; it's not something we would request you to do.
> 4. I never fiddled with the code itself. Phil Hazel was very kind and provided me with a very few hooks, mainly in DFTABLES, GREP and TEST. The hooks are triggered by the NATIVE_ZOS macro, and allow the code to #include some stuff (not available outside of my 'fork'). In that way we kept my code, recognized by the main code, but totally external in the same time.
Now that PCRE2 is in Git, not Subversion, it is much easier to maintain forks of the code. I am considering removing those hooks from the upstream code. Those NATIVE_ZOS hooks could be maintained in the fork, in the same place as the pcrzoscs.h header itself, using the same "git merge" that you (presumably) use to sync with PCRE2 releases. Would you prefer to keep the NATIVE_ZOS hooks in the upstream code, or would be happy to keep those in your fork - especially as they can't even compile unless used as part of your fork!
All the best,
Nick