This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Check for existence of asprintf and vasprintf


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]