mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Isaac Dunham <idunham@lavabit.com>
To: musl@lists.openwall.com
Subject: Re: Fix function definitions.
Date: Thu, 5 Apr 2012 14:06:00 -0700	[thread overview]
Message-ID: <20120405140600.7ef5c1fc@newbook> (raw)
In-Reply-To: <20120316224855.GA22075@brightrain.aerifal.cx>

On Fri, 16 Mar 2012 18:48:55 -0400
Rich Felker <dalias@aerifal.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



      reply	other threads:[~2012-04-05 21:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09  8:14 [PATCH 0/4] " Georgi Chorbadzhiyski
2012-03-09  8:14 ` [PATCH 1/4] include/stdlib.h: Define clearenv() if (_SVID_SOURCE || _BSD_SOURCE) is set Georgi Chorbadzhiyski
2012-03-09  8:14 ` [PATCH 2/4] include/unistd.h: Define sethostname() if _BSD_SOURCE " Georgi Chorbadzhiyski
2012-03-09  8:14 ` [PATCH 3/4] include/unistd.h: Define vfork() " Georgi Chorbadzhiyski
2012-03-09  8:14 ` [PATCH 4/4] include/sys/types.h: major(), minor() and makedev() should be defined " Georgi Chorbadzhiyski
2012-03-09  8:21 ` [PATCH 0/4] Fix function definitions Georgi Chorbadzhiyski
2012-03-09  8:22   ` Georgi Chorbadzhiyski
2012-03-09  8:33   ` Rich Felker
2012-03-09  9:16     ` Georgi Chorbadzhiyski
2012-03-09 15:11       ` Rob Landley
2012-03-09 16:38         ` Rich Felker
2012-03-16 19:05           ` Isaac Dunham
2012-03-16 22:48             ` Rich Felker
2012-04-05 21:06               ` Isaac Dunham [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120405140600.7ef5c1fc@newbook \
    --to=idunham@lavabit.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).