Yesterday I finished my implementation of basename(3) and dirname(3) for FreeBSD, compatible with XPG 4.2. They match 1:1 with test results all the specified behavior with HP-UX 10.20's implementation. The code is being reviewed now and hopefully it can go in at some point this week.
