delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/08/05:42:55

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 8 Dec 2009 11:42:35 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: unlinkat, symlinkat in wrong headers
Message-ID: <20091208104235.GB12303@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <loom DOT 20091208T005847-339 AT post DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <loom.20091208T005847-339@post.gmane.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019