Re: [pcre-dev] [Bug 1830] pcre2posix defines the same names …

Αρχική Σελίδα
Delete this message
Συντάκτης: Ze'ev Atlas
Ημερομηνία:  
Προς: pcre-dev@exim.org
Αντικείμενο: Re: [pcre-dev] [Bug 1830] pcre2posix defines the same names as POSIX

<snip>Your"trick" would require recompiling, or somehow modifying the already-compiled
application.

I am very loath to make incompatible changes because, however rare you think
dependence on some feature may be, there is always sure to be somebody who gets
caught out.</snip>
I do not know about Pascal's environment, and I agree that any linkage time dependencies should be resolved in link time, but the reality is that not always you have control on it. Therefore, I had to do a similar trick to force the resolution in compile time to be definite and absolute.
If pragma map or something similar is available outside of the IBM compiler (i.e if it exists in gcc and other major compilers) I may propose a standard solution for such environments.  I have to research that since I do noty really use any other C compiler

<snip>I'm slightly mystified here because I can't see any reference to
pcre2_real_code_8 in the pcre2posix sources (or "real" at all, in fact).
It does include pcre2_internal.h, which defines some "real" things, but I can't
see where it might use them. I also looked for match_data:</snip>
regexec(const regex_t *preg, const char *string, size_t nmatch,
  regmatch_t pmatch[], int eflags)
{
/\/\/\/\/\/\/
if ((((pcre2_real_code *)(preg->re_pcre2_code))->compile_options &
  PCRE2_NO_AUTO_CAPTURE) != 0 || pmatch == NULL) nmatch = 0;


Ze'ev Atlas