dirfd: fix prototype
authorEric Blake <ebb9@byu.net>
Sat, 19 Dec 2009 18:49:32 +0000 (11:49 -0700)
committerEric Blake <ebb9@byu.net>
Sat, 19 Dec 2009 18:53:55 +0000 (11:53 -0700)
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>
ChangeLog
lib/dirent.in.h
lib/dirfd.c

index 4e3a924c1e74029ae52b5519861fda4919eb0151..f392c10dec751986fe11de850d97bbe863f3fc55 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 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.
index 8694b8596e75226172f75c40f8bbbc4bdd5fc827..f0fd26ea8b678219df759b81ac60dafdd3f2a4b9 100644 (file)
@@ -46,7 +46,7 @@ extern int closedir (DIR *) _GL_ARG_NONNULL ((1));
 # 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
index 81993c502c1f89c71304d7390c9df8240a86d782..ea8ec4eb8873c27857e6039c865ec8b1d1cc30b3 100644 (file)
@@ -23,7 +23,7 @@
 #include <errno.h>
 
 int
-dirfd (DIR const *dir_p)
+dirfd (DIR *dir_p)
 {
   int fd = DIR_TO_FD (dir_p);
   if (fd == -1)