Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 5 Apr 2012 15:55:08 -0700
From: Isaac Dunham <>
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

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):

setlogin, getpass

These and chroot also should be available with lower values of

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

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

Your e-mail address:

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