tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] POSIX extended API set 2

On Sun, Nov 11, 2012 at 10:39:06AM +0200, Alan Barrett wrote:
 > However, I also want the inconsistent POSIX names to be provided.
 > I don't know a good way of satisfying both goals.

#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) /* or whatever */
int fchmodat(int, const char *, mode_t, int) __RENAME(__posix_fchmodat);


__posix_fchmodat(int fd, const char *path, mode_t mode, int flags)
        if (flags & AT_SYMLINK_NOFOLLOW) {
                return lchmodat(fd, path, mode);
        } else {
                return chmodat(fd, path, mode);

Or something like that.

David A. Holland

Home | Main Index | Thread Index | Old Index