I asked for a posix reference: https://savannah.gnu.org/support/?106973 and got http://www.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_01 which is pretty compelling. If there are no objections then please do commit your fix and you or I can request pullup to netbsd-5.
Attachment:
pgpg0dpqZwhTB.pgp
Description: PGP signature