file descriptor before returning. This makes our replacement
implementation a little closer to Solaris's, where fdopendir
ties the file descriptor to the returned DIR* pointer.
restore_cwd failure. Now, an application can arrange e.g.,
to perform a longjump in that case.
* openat.c: Include dirname.h.
Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
(rpl_openat, fdopendir, fstatat): Call openat_save_die
and openat_restore_die rather than calling error directly.
Don't include "error.h" or "exitfail.h"; they're no longer needed.
* openat-die.c (openat_save_die, openat_restore_die): New file.
* openat.h (openat_save_die, openat_restore_die): Declare and define.
Include "exitfail.h".
(openat): Remove #undef; no longer needed now that we include openat.h first.
(rpl_openat): Add comment about mode_t promotion. Simplify
code a bit by moving initializations around. Use exit_failure
rather than EXIT_FAILURE.