Re: [PATCH] Check for existence of mempcpy

2017-02-23 Thread Mark Wielaard
On Fri, Feb 17, 2017 at 01:16:11PM +0100, Ulf Hermann wrote: > And then there are nonstandard C constructs, especially void* arithmetics void * arithmetic can at times be surprising, so that seems a fine cleanup. Best to make sure the code compiles cleanly with -Wpointer-arith. > and statement ex

Re: [PATCH] Check for existence of mempcpy

2017-02-17 Thread Ulf Hermann
> If at all possible I would like elfutils to not turn into some > abstraction layer for broken non-GNU/Linux systems. I don't mind small > (mostly) obvious correct defines/checks or tweaks to help out people > using such broken systems. But if we need a lot more of these things I > think we shoul

Re: [PATCH] Check for existence of mempcpy

2017-02-17 Thread Mark Wielaard
On Fri, 2017-02-17 at 10:50 +0100, Ulf Hermann wrote: > True. With other missing functions I tend to conditionally build the > replacements into libeu.a as actual functions. That requires libeu.a > to be linked into libdw.so, libelf.so, etc. I will create a followup > patch that does the same with

Re: [PATCH] Check for existence of mempcpy

2017-02-17 Thread Ulf Hermann
On 02/17/2017 10:46 AM, Mark Wielaard wrote: > On Thu, 2017-02-16 at 10:10 +0100, Ulf Hermann wrote: >> If it doesn't exist, provide a definition based on memcpy. > > Applied, but slightly reluctantly. I have no way to test this. And it > will evaluate the last argument (n) twice. Which seems to n

Re: [PATCH] Check for existence of mempcpy

2017-02-17 Thread Mark Wielaard
On Thu, 2017-02-16 at 10:10 +0100, Ulf Hermann wrote: > If it doesn't exist, provide a definition based on memcpy. Applied, but slightly reluctantly. I have no way to test this. And it will evaluate the last argument (n) twice. Which seems to not matter in the current calls in our codebase. But it

[PATCH] Check for existence of mempcpy

2017-02-16 Thread Ulf Hermann
If it doesn't exist, provide a definition based on memcpy. Signed-off-by: Ulf Hermann --- ChangeLog | 4 configure.ac | 3 +++ lib/ChangeLog | 5 + lib/system.h | 5 + lib/xstrndup.c | 2 +- li