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

Kezdőlap
Üzenet törlése
Szerző: admin
Dátum:  
Címzett: pcre-dev
Régi témák: [pcre-dev] [Bug 1830] New: pcre2posix defines the same names as POSIX
Tárgy: [pcre-dev] [Bug 1830] pcre2posix defines the same names as POSIX
https://bugs.exim.org/show_bug.cgi?id=1830

--- Comment #23 from Petr Pisar <ppisar@???> ---
(In reply to Philip Hazel from comment #22)
> But consider this: A user knows about this issue and writes a
> program that calls pcre2_regcomp(). Unfortunately, the inclusion of
> pcre2posix.h will turn this into pcre2_pcre2_regcomp()


C preprocessor works on tokens. Not on substrings. It does not turn
pcre2_regcomp() into pcre2_pcre2_regcomp(). The preprocessor will see
"pcre2_regcomp" token, not "pcre2" and "regcomp" tokens.

> unless, as your patch has done, there is an #undef.


My patch uses #undef in the pcre2posix.c compilation unit. Not in the
pcre2posix.h header file. The reason for the #undef is to prevent preprocessor
from rewriting regcomp() definition to pcre2_regcomp() in the pcre2posix.c. Two
reasons: We want providing the unprefixed functions and we cannot/should not
have two prefixed definitions.

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