[pcre-dev] [Bug 1830] pcre2posix defines the same names as P…

Top Page

Reply to this message
Author: admin
To: pcre-dev
Old-Topics: [pcre-dev] [Bug 1830] New: pcre2posix defines the same names as POSIX
Subject: [pcre-dev] [Bug 1830] pcre2posix defines the same names as POSIX

--- Comment #19 from Petr Pisar <ppisar@???> ---
(In reply to Philip Hazel from comment #18)
> 2. PCRE2 has been released for four years now and I really do not want to do
> anything much to PCRE1 now, except possibly to fix really serious bugs if
> the fix is not too involved. It is almost trivial for a program that uses
> the POSIX interface to change from PCRE1 to PCRE2.

Switching to PCRE2 without applying the PCRE2 patch won't help. PCRE2 suffers
from the same issue.

> 3. Declaring the regex function names as macros is not backwards compatible.
> It will, of course, probably make no difference to many C and C++ programs
> that use the library, but it might. Other programming languages have built
> interfaces to PCRE, and I don't know if this would matter to them, but
> again, it might and I wouldn't want to take the risk.

Yes, strictly speaking it probably changes API (I admit I'm not much versed in
C preprocessor peculiarities). But as you wrote it does not matter to many
programs. I also could imagine a foreign language interface could do ugly
things like parsing the header file manually. But to my limited knowledge these
techniques are already questionable. The important thing is the ABI is

> Note that the PCRE2 patch declares the POSIX functions as real functions.

No. The PCRE2 patch removes the POSIX function declarations and replaces them
with macros. Though the definitions still exist.

You are receiving this mail because:
You are on the CC list for the bug.