Fix prototype to match POSIX.
* lib/dirent.in.h (dirfd): Argument is not const, per POSIX.
* lib/dirfd.c (dirfd): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-12-19 Eric Blake <ebb9@byu.net>
+ dirfd: fix prototype
+ * lib/dirent.in.h (dirfd): Argument is not const, per POSIX.
+ * lib/dirfd.c (dirfd): Likewise.
+
canonicalize: reduce memory usage
* lib/canonicalize.c (canonicalize_filename_mode): Trim the
allocation to size.
# if !@HAVE_DECL_DIRFD@ && !defined dirfd
/* Return the file descriptor associated with the given directory stream,
or -1 if none exists. */
-extern int dirfd (DIR const *dir) _GL_ARG_NONNULL ((1));
+extern int dirfd (DIR *dir) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef dirfd
#include <errno.h>
int
-dirfd (DIR const *dir_p)
+dirfd (DIR *dir_p)
{
int fd = DIR_TO_FD (dir_p);
if (fd == -1)