Hash :
357e1c26
Author :
Date :
2005-09-22T23:30:37
* modules/openat (Files): Add lib/openat-die.c. (Depends-on): Remove error, exitfail. Add dirname. * lib/openat.c (fdopendir): Be sure to close the supplied 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. * lib/openat.c (unlinkat): New function. * lib/openat.h (unlinkat): Add prototype. * lib/openat-die.c (openat_save_fail): Rename from openat_save_die. (openat_restore_fail): Rename from openat_restore_die. * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming. Provide an alternative to exiting immediately upon save_cwd or restore_cwd failure. Now, an application can arrange e.g., to perform a longjump in that case. * lib/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. * lib/openat-die.c (openat_save_die, openat_restore_die): New file. * lib/openat.h (openat_save_die, openat_restore_die): Declare and define. * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
Description:
Open a file at a directory.
Files:
lib/openat.c
lib/openat.h
lib/openat-die.c
m4/openat.m4
Depends-on:
save-cwd
gettext-h
dirname
extensions
configure.ac:
gl_FUNC_OPENAT
Makefile.am:
Include:
"openat.h"
License:
GPL
Maintainer:
Jim Meyering