This is the mail archive of the
cygwin
mailing list for the Cygwin project.
unlinkat, symlinkat in wrong headers
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Tue, 8 Dec 2009 00:05:20 +0000 (UTC)
- Subject: unlinkat, symlinkat in wrong headers
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>:
$ echo '#include <unistd.h>' | gcc -E - | grep 'symlink'
int __attribute__((__cdecl__)) symlink (const char *__name1, const char
*__name2);
$ echo '#include <stdio.h>' | gcc -E - | grep 'symlink'
int __attribute__((__cdecl__)) symlinkat (const char *, int, const char *);
--
Eric Blake
--
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