On Tue, Sep 03, 2024 at 06:39:18AM +0000, Brahmajit Das wrote: > +#if !defined(__GLIBC__) > +#define basename(src) (strrchr(src, '/') ? strrchr(src, '/') + 1 : src) > +#endif A hacky macro without any explanation is really not a good idea. Now this basically open codes the glibc implementation of basename, so maybe just turn it into a proper function always used and write a comment explaining why it exists.