[PATCH] Check for existence of asprintf and vasprintf

Ulf Hermann ulf.hermann@qt.io
Thu Feb 23 09:39:00 GMT 2017


> basename() is in the dirname module

That's the POSIX variant. We're using the GNU variant everywhere and the GNU variant is a whopping two lines of code:

char *base = strrchr(path, '/');
return base ? base + 1 : (char *)path;

> you're correct that GNU strerror_r is not handled by gnulib.
> that doesn't look like it's too hard to deal with, but it is
> something that'd have to be considered.

We're using strerror_r in exactly one place and my proposal is to just return a fixed string if we hit that on platforms where GNU strerror_r is not available.

Ulf



More information about the Elfutils-devel mailing list