On Sun, Dec 03, 2017 at 07:57:58AM +0700, Robert Elz wrote: > The next POSIX update (issue 8 of whatever it is called in the wild) - that > is the next "minor corrections" update, as distinct from the next major > update, is planning on (if I follow correctly, has already decided) to > tighten the definitions of basename(3) and dirname(3) in order to make > it possible to implement them in a thread safe way, and I think to actually > require that.
Effectively requiring modifyable input for basename(3) is highly annoying and breaks legacy code. FreeBSD had quite a bit of fun with that. I don't really see the point since thread-safety can be obtained much easier by using TLS. So who will audit src and pkgsrc for the regressions this is going to introduce? Side issue: the reason why basename(3) has to modify the input at all is because it is supposed to drop trailing slashes. IMO that is the more central design mistake, but it is prevalent in various other parts. Joerg
