The function basename is the GNU version, and __xpg_basename (with redirects in libgen.h) is the XPG version. But under POSIX, functions not involving types defined in a header can be declared and used directly. So (with appropriate symbol versions to support existing binaries) plain basename should get the XPG function and __gnu_basename should be the GNU version.