XXX duplicate the prototype in getcwd regression test (which needs to call the syscall directly for reasonably complete testing).