Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 5 Apr 2012 14:06:00 -0700
From: Isaac Dunham <idunham@...abit.com>
To: musl@...ts.openwall.com
Subject: Re: Fix function definitions.

On Fri, 16 Mar 2012 18:48:55 -0400
Rich Felker <dalias@...ifal.cx> wrote:
..
> Perhaps including features.h without defining any feature test macros
> at all could be construed as "asking for the kitchen sink", but I find
> that interpretation a bit doubtful since the behavior (on glibc) is
> unchanged from what they would have gotten without including it.
> 
It's at least asking for BSD-style stuff, instead of straight ANSI.
It certainly isn't asking for the full _GNU_SOURCE.
 
> Could you give a summary of what the differences in _BSD_SOURCE and
> _GNU_SOURCE are? My impression (possibly wrong) is that on glibc it's
> pretty close to _GNU_SOURCE but without the nasty intentional GNU
> incompatibilities (like GNU basename) and with some/most of the GNU or
> Linux-specific extensions missing.
...
> In any case I'm interested in adding _BSD_SOURCE if you or someone
> else will help with getting it right.

I started on <unistd.h>, and noticed a namespace issue:
ualarm, usleep, and a few other functions should actually NOT be defined
on _GNU_SOURCE (per the glibc headers and manpages), but only on
_BSD_SOURCE or _XOPEN_SOURCE >= 500
Instead, they are defined only on _GNU_SOURCE.
(There's also the L_SET & co. aliases for SEEK_* to do, but that's
trivial).

I'll have a patch once unistd.h is ready.  There are a few more
functions to move around, though--I have to locate all the problem ones.
Should be ready in a day or two.

Isaac Dunham

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.