On Sat, 2022-12-17 at 05:22 +0800, 罗勇刚(Yonggang Luo) wrote: > On Fri, Oct 28, 2022 at 7:45 PM Mark Wielaard <m...@klomp.org> wrote: > > > > On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel > > wrote: > > > basename function are accessed multiple place, but used without > > > include libgen.h > > > > This is wrong. We use the GNU basename (from string.h with > > _GNU_SOURCE), not the POSIX one (from libgen.h). > > Thanks, that informs me, are they the same thing?
No, they are subtly different things. See https://www.man7.org/linux/man-pages/man3/basename.3.html#NOTES In particular the GNU basename never manipulates its argument (which is why the cast is wrong). Cheers, Mark