Re: [pcre-dev] memmove() vs. bcopy()

Pàgina inicial
Delete this message
Autor: ph10
Data:  
A: pcre-dev
CC: Daniel Richard G.
Assumpte: Re: [pcre-dev] memmove() vs. bcopy()
On Thu, 9 Aug 2018, ph10@??? wrote:

> > I would suggest something like moving bcopy() into the pcre2_memmove()
> > function, along the lines of
>
> <snip>
>
> Yes, good idea. I'll do it. Thanks for the diagnosis and the solution.


I have done this and tested it (!). It turned out to be not quite as
trivial as modifying the existing function, because that was defined as
a static function in pcre2_internal.h, included by all PCRE2 modules.
Only a few actually use memmove(), and I was getting lots of compiler
warnings about an unused function from all the others. The
implementation seems to go back to 2000, when I suspect I wasn't using
so many compiler warnings (or so many modules), but there have been
various fixes since then (see PCRE1 ChangeLog).

Now the emulation is in a private library function, and both pcre2test
and pcre2grep have their own static versions. It all seems to work. I've
committed the patch.

Philip

--
Philip Hazel