-
- Downloads
fdio: implement glnx_basename from scratch
At the top of glnx-fdio.h there's this comment: /* When we include libgen.h because we need * dirname() we immediately undefine * basename() since libgen.h defines it as * a macro to the XDG version which is really * broken. */ and then it does #undef basename to try to gain access to non-default basename implementation. The problem is that this trick doesn't work on some systems: ./libglnx/glnx-fdio.h: In function 'glnx_basename': ./libglnx/glnx-fdio.h:46:11: error: 'basename' undeclared (first use in this function) return (basename) (path); Anyway, basename() is like 3 lines of code to implement, so this commit just does that instead of relying on glibc for it.
Please register or sign in to comment