/* Specification. */
#include <unistd.h>
+#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <dirent.h>
#include "canonicalize.h"
-#include "dirfd.h"
/* This replacement assumes that a directory is not renamed while opened
through a file descriptor. */
}
}
-/* Override close(), to keep track of the open file descriptors. */
-
-int
-rpl_close (int fd)
-#undef close
-{
- int retval = close (fd);
-
- if (retval >= 0)
- _gl_unregister_fd (fd);
- return retval;
-}
-
/* Override opendir() and closedir(), to keep track of the open file
descriptors. Needed because there is a function dirfd(). */