This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: unlinkat, symlinkat in wrong headers
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 8 Dec 2009 11:42:35 +0100
- Subject: Re: unlinkat, symlinkat in wrong headers
- References: <loom.20091208T005847-339@post.gmane.org>
- Reply-to: cygwin at cygwin dot com
On Dec 8 00:05, Eric Blake wrote:
> Per POSIX, unlinkat should be declared in <unistd.h>; but cygwin only declares
> it in <fcntl.h>:
>
> $ echo '#include <unistd.h>' | gcc -E - | grep unlink
> int __attribute__((__cdecl__)) unlink (const char *__path );
> $ echo '#include <fcntl.h>' | gcc -E - | grep unlink
> extern int unlinkat (int, const char *, int);
>
> Likewise, symlinkat should be in <unistd.h>; but cygwin only declares it in
> <stdio.h>:
That's how it's defined in the Linux man pages. Apparently I took that
for granted since the declarations are actually in unistd.h, contrary to
the man pages. Dunno if we should really fix that for 1.7.1, but if you
can come up with a patch for newlib ASAP...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple