Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120405155508.0f782675@newbook>
Date: Thu, 5 Apr 2012 15:55:08 -0700
From: Isaac Dunham <idunham@...abit.com>
To: musl@...ts.openwall.com
Subject: Namespace issues, missing functions, _BSD_SOURCE for unistd.h

Attached is a patch that should add proper BSD_SOURCE support for
<unistd.h>. I'm not sure that the formatting/style is proper, and the
exact arrangement is rather arbitrary.  But I've moved a lot of things
that were wrongly grouped in either ANSI namespace or GNU-only
namespace.

BSD || XOPEN means the macro test should be
#if defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
I see glibc turns on both of these with _GNU_SOURCE.

Misplaced (should be BSD || XOPEN):
(Properly, these require XOPEN >= 500)
usleep, ualarm, fchown, fchdir, lchown,vhangup,
apparently fsync?

Missing (BSD || XOPEN):
getwd,ttyslot,sethostid,get/setdomainname,revoke,profil,acct,get/end/setusershell

BSD||GNU:
setlogin, getpass

These and chroot also should be available with lower values of
_XOPEN_SOURCE

Incompatible:
BSD uses setpgrp the same way everyone else uses setpgid--a
substitution macro will do the job. That's what glibc does and what I
did.

And there may be one or two more that I didn't mention in here because
I lost track.

Isaac Dunham
View attachment "unistd.diff" of type "text/x-patch" (3489 bytes)

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.