Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

linkat(2)

3 views
Skip to first unread message

Emmanuel Dreyfus

unread,
Aug 2, 2011, 11:19:58 AM8/2/11
to
I am about adding linkat(2), which is defined in
The Open Group Technical Standard, 2006, Extended API Set Part 2.
However, I am not going to implement the whole Extended API Set Part 2,
at least for now. This means I am going ot have linkat(2) but not
openat(2) for instance.

That approach breaks our own build, because
external/gpl2/xcvs/dist/lib/openat.h tests for AT_FDCW, which I defined
for in <fcntl.h> linkat(2). Then it ssumes it means openat(2) is available.

Does that mean AT_FDCW should be guarded by #ifdef _NETBSD_SOURCE
until the whole Extended API Set Part 2 is implemented?

--
Emmanuel Dreyfus
ma...@netbsd.org

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Emmanuel Dreyfus

unread,
Aug 2, 2011, 1:07:27 PM8/2/11
to
On Tue, Aug 02, 2011 at 04:27:12PM +0000, David Holland wrote:
> > Does that mean AT_FDCW should be guarded by #ifdef _NETBSD_SOURCE
> > until the whole Extended API Set Part 2 is implemented?
>
> There's a preexisting patch set for *at somewhere. It got rejected in
> its original form because it did horrible things instead of
> interfacing semi-sanely to namei.

But that does not answer the original question: it is sane to
ifdef _NETBSD_SOURCE a partial implementation of linkat(), while the
full thing is not yet ready.

David Holland

unread,
Aug 2, 2011, 12:27:12 PM8/2/11
to
On Tue, Aug 02, 2011 at 03:19:58PM +0000, Emmanuel Dreyfus wrote:
> I am about adding linkat(2), which is defined in
> The Open Group Technical Standard, 2006, Extended API Set Part 2.
> However, I am not going to implement the whole Extended API Set Part 2,
> at least for now. This means I am going ot have linkat(2) but not
> openat(2) for instance.
>
> That approach breaks our own build, because
> external/gpl2/xcvs/dist/lib/openat.h tests for AT_FDCW, which I defined
> for in <fcntl.h> linkat(2). Then it ssumes it means openat(2) is available.
>
> Does that mean AT_FDCW should be guarded by #ifdef _NETBSD_SOURCE
> until the whole Extended API Set Part 2 is implemented?

There's a preexisting patch set for *at somewhere. It got rejected in


its original form because it did horrible things instead of
interfacing semi-sanely to namei.

The necessary namei parts should be tractable nowadays; however, I
probably can't get to it before this weekend, and it'll take just as
long to explain what to do as to do it myself...

--
David A. Holland
dhol...@netbsd.org

Emmanuel Dreyfus

unread,
Aug 2, 2011, 3:39:08 PM8/2/11
to
Emmanuel Dreyfus <ma...@netbsd.org> wrote:

> But that does not answer the original question: it is sane to
> ifdef _NETBSD_SOURCE a partial implementation of linkat(), while the
> full thing is not yet ready.

I can answer to myself: through config.h -> float.h -> whatever,
_NETBSD_SOURCE gets defined in
/usr/src-20110608/external/gpl2/xcvs/dist/lib/chdir-long.c

--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz

0 new messages