Eric Blake wrote:
> According to POSIX, dirfd does not take a const argument.  I'm applying this:
...
> Subject: [PATCH] dirfd: fix prototype
>
> Fix prototype to match POSIX.
>
> * lib/dirent.in.h (dirfd): Argument is not const, per POSIX.
> * lib/dirfd.c (dirfd): Likewise.
...
> -extern int dirfd (DIR const *dir) _GL_ARG_NONNULL ((1));
> +extern int dirfd (DIR *dir) _GL_ARG_NONNULL ((1));

Do you know of any dirfd implementation that actually modifies the
pointed-to buffer?  I do not, and cannot imagine one that would.
I would prefer to leave it "const" and to consider lobbying POSIX
to permit the "const" declaration.


Reply via email to