[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dirfd prototype
From: |
Jim Meyering |
Subject: |
Re: dirfd prototype |
Date: |
Sun, 20 Dec 2009 01:46:27 +0100 |
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.
- dirfd prototype, Eric Blake, 2009/12/19
- Re: dirfd prototype,
Jim Meyering <=