History log of /freebsd-current/include/unistd.h
Revision Date Author Comments
# 5af6fbd7 14-May-2024 Kyle Evans <kevans@FreeBSD.org>

ssp: appease -Wgnu-statement-expression-from-macro-expansion

It's a stupid warning, but some ports enable it by default and were
already defining _FORTIFY_SOURCE, thus exposing the new macros
immediately. This at least fixes the libfido2 build, perhaps others as
well.

While we're here, fix a fresh build of stand w/ FORTIFY_SOURCE enabled
by not pulling in the ssp headers if _STANDALONE is defined. We do not
have runtime support in libsa as of the time of writing.

Reported by: netchild
Sponsored by: Stormshield
Sponsored by: Klara, Inc.


# 9bfd3b40 12-May-2024 Kyle Evans <kevans@FreeBSD.org>

Add a build knob for _FORTIFY_SOURCE

In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled,
otherwise default to _FORTIFY_SOURCE=0. For now we default it to 0
unconditionally to ease bisect across older versions without the new
symbols, and we'll put out a call for testing.

include/*.h include their ssp/*.h equivalents as needed based on the
knob. Programs and users are allowed to override FORTIFY_SOURCE in their
Makefiles or src.conf/make.conf to force it off.

Reviewed by: des, markj
Relnotes: yes
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32308


# 211bdd60 19-Jan-2024 Konstantin Belousov <kib@FreeBSD.org>

Add kcmp(2) userspace bits

Unlike Linux, we do provide libc wrapper. All definitions and
prototypes are available from <unistd.h>

Tested by: manu
Reviewed by: brooks, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43518


# 8ccd0b87 11-Dec-2023 Brooks Davis <brooks@FreeBSD.org>

libc: expose execvpe for Linux compat

We already implemented execvpe internally with an _ prefix in libc so
go ahead and expose it for compatibility with Linux.

This reverts c605eea952146348e5e1ad5cab6c127d7a1bd164.

Bump __FreeBSD_version for the addition and add definitions to supress
compat shims in libzfs (zfs changes were merged from upstream).

PR: 275370 (request and exp-run (thanks antoine!))
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D42846


# 33ccf366 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

include: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 5a1d1441 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

include: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 42b38843 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/


# 53465702 08-Dec-2021 Konstantin Belousov <kib@FreeBSD.org>

swapoff: add one more variant of the syscall

Requested and reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33343


# 49ad342c 01-Aug-2021 Konstantin Belousov <kib@FreeBSD.org>

Add _Fork()

Current POSIX standard requires fork() to be async-signal safe. Neither
our implementation, nor implementations in other operating systems are,
and practically it is impossible to make fork() async-signal safe without
too much efforts. Also, that would put undue requirement that all atfork
handlers should be async-signal safe as well, which contradicts its main
use.

As result, Austin Group dropped the requirement, and added a new function
_Fork() that should be async-signal safe, but it does not call atfork
handlers. Basically, _Fork() can be implemented as a raw syscall.

Release of glibc 2.34 added _Fork(), do the same for FreeBSD.
Clarify threading behavior for fork() in the manpage.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D31378


# 69112cca 09-Sep-2020 Kyle Evans <kevans@FreeBSD.org>

getlogin_r: fix the type of len

getlogin_r is specified by POSIX to to take a size_t len, not int. Fix our
version to do the same, bump the symbol version due to ABI change and
provide compat.

This was reported to break compilation of Ruby 2.8.

Some discussion about the necessity of the ABI compat did take place in the
review. While many 64-bit platforms would likely be passing it in a 64-bit
register and zero-extended and thus, not notice ABI breakage, some do
sign-extend (e.g. mips).

PR: 247102
Submitted by: Bertram Scharpf <software@bertram-scharpf.de> (original)
Submitted by: cem (ABI compat)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26335


# 472ced39 12-Apr-2020 Kyle Evans <kevans@FreeBSD.org>

Implement a close_range(2) syscall

close_range(min, max, flags) allows for a range of descriptors to be
closed. The Python folk have indicated that they would much prefer this
interface to closefrom(2), as the case may be that they/someone have special
fds dup'd to higher in the range and they can't necessarily closefrom(min)
because they don't want to hit the upper range, but relocating them to lower
isn't necessarily feasible.

sys_closefrom has been rewritten to use kern_close_range() using ~0U to
indicate closing to the end of the range. This was chosen rather than
requiring callers of kern_close_range() to hold FILEDESC_SLOCK across the
call to kern_close_range for simplicity.

The flags argument of close_range(2) is currently unused, so any flags set
is currently EINVAL. It was added to the interface in Linux so that future
flags could be added for, e.g., "halt on first error" and things of this
nature.

This patch is based on a syscall of the same design that is expected to be
merged into Linux.

Reviewed by: kib, markj, vangyzen (all slightly earlier revisions)
Differential Revision: https://reviews.freebsd.org/D21627


# 979b4b34 22-Jan-2020 Kyle Evans <kevans@FreeBSD.org>

Mark rfork(2) as __returns_twice

rfork is not generally a built-in that would be recognized as behaving like
vfork/fork; provide the hint.


# 727b66b6 14-Dec-2019 Kyle Evans <kevans@FreeBSD.org>

<unistd.h>: remove redundant __BSD_VISIBLE

This bit is already inside of a larger __BSD_VISIBLE block.

Reported by: vangyzen


# 6639e9bc 25-Jul-2019 Rick Macklem <rmacklem@FreeBSD.org>

Add an entry for copy_file_range(2) to unistd.h.

copy_file_range(2) is a Linux compatible syscall created by r350315.

Reviewed by: kib, asomers
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D20584


# a1304030 06-Apr-2019 Mariusz Zaborski <oshogbo@FreeBSD.org>

Introduce funlinkat syscall that always us to check if we are removing
the file associated with the given file descriptor.

Reviewed by: kib, asomers
Reviewed by: cem, jilles, brooks (they reviewed previous version)
Discussed with: pjd, and many others
Differential Revision: https://reviews.freebsd.org/D14567


# f4a5a0b8 08-Jul-2018 Konstantin Belousov <kib@FreeBSD.org>

Add a missed chunk r335939.

Noted by: David Carlier
MFC after: 9 days
Differential revision: https://reviews.freebsd.org/D16178


# a9125891 14-Feb-2018 Brian Behlendorf <behlendorf1@llnl.gov>

Prepare SPL repo to merge with ZFS repo

This commit removes everything from the repository except the core
SPL implementation for Linux. Those files which remain have been
moved to non-conflicting locations to facilitate the merge.
The README.md and associated files have been updated accordingly.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>


# e9ac2743 20-Mar-2018 Conrad Meyer <cem@FreeBSD.org>

Implement getrandom(2) and getentropy(3)

The general idea here is to provide userspace programs with well-defined
sources of entropy, in a fashion that doesn't require opening a new file
descriptor (ulimits) or accessing paths (/dev/urandom may be restricted
by chroot or capsicum).

getrandom(2) is the more general API, and comes from the Linux world.
Since our urandom and random devices are identical, the GRND_RANDOM flag
is ignored.

getentropy(3) is added as a compatibility shim for the OpenBSD API.

truss(1) support is included.

Tests for both system calls are provided. Coverage is believed to be at
least as comprehensive as LTP getrandom(2) test coverage. Additionally,
instructions for running the LTP tests directly against FreeBSD are provided
in the "Test Plan" section of the Differential revision linked below. (They
pass, of course.)

PR: 194204
Reported by: David CARLIER <david.carlier AT hardenedbsd.org>
Discussed with: cperciva, delphij, jhb, markj
Relnotes: maybe
Differential Revision: https://reviews.freebsd.org/D14500


# 5461eefe 07-Feb-2018 Brian Behlendorf <behlendorf1@llnl.gov>

Fix cstyle warnings

This patch contains no functional changes. It is solely intended
to resolve cstyle warnings in order to facilitate moving the spl
source code in to the zfs repository.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #681


# 2321c474 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

include: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# 4b393c50 03-Oct-2017 Olaf Faaland <faaland1@llnl.gov>

Make file headers conform to ZFS style standard

No semantic changes.

Change
/************\
and
\************/

to

/*
and
*/

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>


# 1a466ddc 03-Oct-2016 Ed Schouten <ed@FreeBSD.org>

Remove setkey(), encrypt(), des_setkey() and des_cipher().

The setkey() and encrypt() functions are part of XSI, not the POSIX base
definitions. There is no strict requirement for us to provide these,
especially if we're only going to keep these around as undocumented
stubs. The same holds for des_setkey() and des_cipher().

Instead of providing functions that only generate warnings when linking,
simply disallow linking against them. The impact of this is relatively
low. It only causes two leaf ports to break. I'll see what I can do to
help out to get those fixed.

PR: 211626


# 295af703 15-Aug-2016 Konstantin Belousov <kib@FreeBSD.org>

Add an implementation of fdatasync(2).

The syscall is a trivial wrapper around new VOP_FDATASYNC(), sharing
code with fsync(2). For all filesystems, this commit provides the
implementation which delegates the work of VOP_FDATASYNC() to
VOP_FSYNC(). This is functionally correct but not efficient.

This is not yet POSIX-compliant implementation, because it does not
ensure that queued AIO requests are completed before returning.

Reviewed by: mckusick
Discussed with: avg (ZFS), jhb (AIO part)
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D7471


# 5f521d7b 10-Aug-2016 Ed Schouten <ed@FreeBSD.org>

Make libcrypt thread-safe. Add crypt_r(3).

glibc has a pretty nice function called crypt_r(3), which is nothing
more than crypt(3), but thread-safe. It accomplishes this by introducing
a 'struct crypt_data' structure that contains a buffer that is large
enough to hold the resulting string.

Let's go ahead and also add this function. It would be a shame if a
useful function like this wouldn't be usable in multithreaded apps.
Refactor crypt.c and all of the backends to no longer declare static
arrays, but write their output in a provided buffer.

There is no need to do any buffer length computation here, as we'll just
need to ensure that 'struct crypt_data' is large enough, which it is.
_PASSWORD_LEN is defined to 128 bytes, but in this case I'm picking 256,
as this is going to be part of the actual ABI.

Differential Revision: https://reviews.freebsd.org/D7306


# 1bdbd705 28-Feb-2016 Konstantin Belousov <kib@FreeBSD.org>

Implement process-shared locks support for libthr.so.3, without
breaking the ABI. Special value is stored in the lock pointer to
indicate shared lock, and offline page in the shared memory is
allocated to store the actual lock.

Reviewed by: vangyzen (previous version)
Discussed with: deischen, emaste, jhb, rwatson,
Martin Simmons <martin@lispworks.com>
Tested by: pho
Sponsored by: The FreeBSD Foundation


# 96a8bf8f 05-Nov-2015 Pedro F. Giffuni <pfg@FreeBSD.org>

Rename __sentinel to __null_sentinel

GCC 5 uses a conflicting __sentinel definition in include/c++/bits/stl_algo.h

Reported by: matteo


# 5d0bef91 08-Jul-2015 Pedro F. Giffuni <pfg@FreeBSD.org>

Use the __sentinel attribute.

Start using the gcc sentinel attribute, which can be used to
mark varargs function that need a NULL pointer to mark argument
termination, like execl(3).

Relnotes: yes


# 749cd431 19-Sep-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

unistd: drop argument names from setpgrp(3) prototype.

They are useless and don't match the style of the header.
While here adjust the comment with tabs.

Suggested by: kevinlo


# d9446691 18-Sep-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

unistd: move setpgrp(2) to the __BSD_VISIBLE section

Our setpgrp(2) differs from the specified by POSIX, which
only has one argument, and is only meant for compatibility
with BSD.

Reference:
http://pubs.opengroup.org/onlinepubs/009695399/functions/setpgrp.html

Pointed-out in: openbsd-tech (2014-09-16)
MFC after: 6 weeks


# 448f5f73 11-May-2014 Jilles Tjoelker <jilles@FreeBSD.org>

include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE
or __POSIX_VISIBLE.

Whenever <sys/cdefs.h> sets __BSD_VISIBLE to non-zero, it also sets
__POSIX_VISIBLE and __XSI_VISIBLE to the newest version supported.

No functional change is intended.


# 67560dcf 16-Aug-2013 Jilles Tjoelker <jilles@FreeBSD.org>

Add dup3(), based on F_DUP2FD and F_DUP2FD_CLOEXEC fcntls.

I removed functionality not proposed for POSIX in Austin group issue #411.
A man page (my own) and test cases will follow in later commits.

PR: 176233
Submitted by: Jukka Ukkonen


# dc570d5e 01-May-2013 Jilles Tjoelker <jilles@FreeBSD.org>

Add pipe2() system call.

The pipe2() function is similar to pipe() but allows setting FD_CLOEXEC and
O_NONBLOCK (on both sides) as part of the function.

If p points to two writable ints, pipe2(p, 0) is equivalent to pipe(p).

If the pointer is not valid, behaviour differs: pipe2() writes into the
array from the kernel like socketpair() does, while pipe() writes into the
array from an architecture-specific assembler wrapper.

Reviewed by: kan, kib


# 3d6af2dd 04-Mar-2013 Ned Bass <bass6@llnl.gov>

Refresh links to web site

Update links to refer to the official ZFS on Linux website instead of
@behlendorf's personal fork on github.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>


# c80e6375 09-Sep-2012 David Xu <davidxu@FreeBSD.org>

Process CPU-Time Clocks option is supported, define _POSIX_CPUTIME.


# 460378bf 29-Apr-2012 Dimitry Andric <dim@FreeBSD.org>

Add a convenience macro for the returns_twice attribute, and apply it to
the prototypes of the appropriate functions (getcontext, savectx,
setjmp, sigsetjmp and vfork).

MFC after: 2 weeks


# 3e65b9c6 23-Dec-2011 Colin Percival <cperciva@FreeBSD.org>

Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]

Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]

Fix a buffer overflow in telnetd. [11:08]

Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]

Add sanity checking of service names in pam_start. [11:10]

Approved by: so (cperciva)
Approved by: re (bz)
Security: FreeBSD-SA-11:06.bind
Security: FreeBSD-SA-11:07.chroot
Security: FreeBSD-SA-11:08.telnetd
Security: FreeBSD-SA-11:09.pam_ssh
Security: FreeBSD-SA-11:10.pam


# 2bfc50bc 04-Mar-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add two new system calls, setloginclass(2) and getloginclass(2). This makes
it possible for the kernel to track login class the process is assigned to,
which is required for RCTL. This change also make setusercontext(3) call
setloginclass(2) and makes it possible to retrieve current login class using
id(1).

Reviewed by: kib (as part of a larger patch)


# 091c4c86 20-Dec-2010 Ulrich Spörlein <uqs@FreeBSD.org>

rpc.lockd(8) WARNS cleanup

- Provide function prototype for nlm_syscall
- Don't assign a variable from the stack to a global var[1]
- Remove unused vars

Found by: clang static analyser [1]
Reviewed by: dfr


# b67cc292 29-Oct-2010 David Xu <davidxu@FreeBSD.org>

Add sysctl kern.sched.cpusetsize to export the size of kernel cpuset,
also add sysconf() key _SC_CPUSET_SIZE to get sysctl value.

Submitted by: gcooper


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# ee1cd8fe 11-Aug-2010 Kevin Lo <kevlo@FreeBSD.org>

Style: tabs after #define


# 716154c5 17-May-2010 Brian Behlendorf <behlendorf1@llnl.gov>

Public Release Prep

Updated AUTHORS, COPYING, DISCLAIMER, and INSTALL files. Added
standardized headers to all source file to clearly indicate the
copyright, license, and to give credit where credit is due.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# f2556687 16-Feb-2010 Warner Losh <imp@FreeBSD.org>

Remove the Berkeley clause 3's.
Add a few $FreeBSD$


# 88b69f52 13-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Phase out ttyslot(3).

The ttyslot() function was originally part for SUSv1, marked LEGACY in
SUSv2 and removed later on. This function only makes sense when using
utmp(5), because it was used to determine the offset of the record for
the controlling TTY. It makes little sense to keep it here, because the
new utmpx file format doesn't index based on TTY slots.


# c3889811 08-Jul-2009 Edward Tomasz Napierala <trasz@FreeBSD.org>

There is an optimization in chmod(1), that makes it not to call chmod(2)
if the new file mode is the same as it was before; however, this
optimization must be disabled for filesystems that support NFSv4 ACLs.
Chmod uses pathconf(2) to determine whether this is the case - however,
pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't.

This change adds lpathconf(3) to make it possible to solve that problem
in a clean way.

Reviewed by: rwatson (earlier version)
Approved by: re (kib)


# c4f16b69 15-Jun-2009 John Baldwin <jhb@FreeBSD.org>

Add a new 'void closefrom(int lowfd)' system call. When called, it closes
any open file descriptors >= 'lowfd'. It is largely identical to the same
function on other operating systems such as Solaris, DFly, NetBSD, and
OpenBSD. One difference from other *BSD is that this closefrom() does not
fail with any errors. In practice, while the manpages for NetBSD and
OpenBSD claim that they return EINTR, they ignore internal errors from
close() and never return EINTR. DFly does return EINTR, but for the common
use case (closing fd's prior to execve()), the caller really wants all
fd's closed and returning EINTR just forces callers to call closefrom() in
a loop until it stops failing.

Note that this implementation of closefrom(2) does not make any effort to
resolve userland races with open(2) in other threads. As such, it is not
multithread safe.

Submitted by: rwatson (initial version)
Reviewed by: rwatson
MFC after: 2 weeks


# cc4603df 14-Mar-2009 David Schultz <das@FreeBSD.org>

Various namespace cleanups, including exposing fchmod() and fchmodat()
in the POSIX namespace, and hiding eaccess() and setproctitle().
Also move mknodat() from unistd.h to sys/stat.h where it belongs.
The *at() syscalls are only in CURRENT, so this shouldn't cause
problems.


# b2aa672e 03-Mar-2009 David Schultz <das@FreeBSD.org>

- Add getsid, fchdir, getpgid, lchown, pread, pwrite, truncate,
*at, and fexecve to the POSIX.1-2008 namespace.
- Remove getwd, ualarm, usleep, and vfork from the XSI namespace.
- Remove mkdtemp from the POSIX.1-2008 namespace (should be in stdlib.h).


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# a718c0c3 26-Sep-2008 Peter Wemm <peter@FreeBSD.org>

Move getosreldate(3) prototype from the machine generated <osreldate.h>
to <unistd.h> in the BSD section.

Suggested by: kib


# 1b2bb4a5 07-Jul-2008 David Xu <davidxu@FreeBSD.org>

posix_spawn() is supported, set _POSIX_SPAWN to 200212L.


# c605eea9 22-Jun-2008 Ed Schouten <ed@FreeBSD.org>

Turn execvpe() into an internal libc routine.

Adding exevpe() has caused some ports to break. Even though execvpe() is
a useful routine, it does not conform to any standards.

This patch is a little bit different from the patch sent to the mailing
list. I forgot to remove execvpe from the Symbol.map (which does not
seem to miscompile libc, though).

Reviewed by: davidxu
Approved by: philip


# 947aa542 17-Jun-2008 David Xu <davidxu@FreeBSD.org>

Add POSIX routines called posix_spawn() and posix_spawnp(), which
can be used as replacements for exec/fork in a lot of cases. This
change also added execvpe() which allows environment variable
PATH to be used for searching executable file, it is used for
implementing posix_spawnp().

PR: standards/122051


# 196afaa9 09-Apr-2008 Konstantin Belousov <kib@FreeBSD.org>

Add the restrict qualifiers to the pointer arguments of the readlinkat.


# 914c6963 01-Apr-2008 Konstantin Belousov <kib@FreeBSD.org>

Correct the prototype for the faccessat().

Reported by: ru


# ba2983e5 30-Mar-2008 Konstantin Belousov <kib@FreeBSD.org>

Add the libc glue and headers definitions for the *at() syscalls.

Based on the submission by rdivacky,
sponsored by Google Summer of Code 2007
Reviewed by: rwatson, rdivacky
Tested by: pho


# 14c5326c 04-Mar-2008 behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>

More stub headers,
moved generic to sysmacros,
added some more macros for kernel compatibility


git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@22 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c


# a059c409 26-Feb-2008 Ruslan Ermilov <ru@FreeBSD.org>

Added the "restrict" type-qualifier to the readlink() prototype.


# 5f56182b 12-Feb-2008 Ruslan Ermilov <ru@FreeBSD.org>

Change readlink(2)'s return type and type of the last argument
to match POSIX.

Prodded by: Alexey Lyashkov


# 0248203e 18-Jan-2008 David Xu <davidxu@FreeBSD.org>

_POSIX_THREAD_CPUTIME is now supported.


# ce309a2f 10-Jan-2008 John Baldwin <jhb@FreeBSD.org>

Add a feature_present(3) function which checks to see if a named kernel
feature is present by checking the kern.features sysctl MIB.

MFC after: 1 week


# 143943aa 14-Dec-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Forgot to commit this file: add definition for _SC_PHYS_PAGES.


# ea8fe575 01-Dec-2005 David Xu <davidxu@FreeBSD.org>

barrier and spin_lock had already been implemented in libpthread and
libthr for a long time, set both _POSIX_BARRIERS and _POSIX_SPIN_LOCKS
to 200112L.


# 8dcb56dc 13-May-2005 Xin LI <delphij@FreeBSD.org>

Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightly
different from what has been offered in libc_r (the one spotted in the
original PR which is found in libthr has already been removed by David's
commit, which is rev. 1.44 of lib/libthr/thread/thr_private.h):
- Use POSIX standard prototype for ttyname_r, which is,
int ttyname_r(int, char *, size_t);
Instead of:
char *ttyname_r(int, char *, size_t);
This is to conform IEEE Std 1003.1, 2004 Edition [1].
- Since we need to use standard errno for return code, include
errno.h in ttyname.c
- Update ttyname(3) implementation according to reflect the API
change.
- Document new ttyname_r(3) behavior
- Since we already make use of a thread local storage for
ttyname(3), remove the BUGS section.
- Remove conflicting ttyname_r related declarations found in libc_r.

Hopefully this change should not have changed the API/ABI, as the ttyname_r
symbol was never introduced before the last unistd.h change which happens a
couple of days before.

[1] http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html

Requested by: Tom McLaughlin <tmclaugh sdf lonestar org>
Through PR: threads/76938
Patched by: Craig Rodrigues <rodrigc crodrigues org> (with minor changes)
Prompted by: mezz@


# f73fd5bd 11-May-2005 Xin LI <delphij@FreeBSD.org>

Connect MLINKS for ttyname_r(3), and add prototype into unistd.h.


# 3eea6658 21-Mar-2005 David Schultz <das@FreeBSD.org>

- Declare mknod in stat.h (in addition to unistd.h), as per XSI.
- Use blksize_t and blkcnt_t in struct stat.
- Hide non-standard fields in stat.h when !__BSD_VISIBLE.
- Add restrict qualifiers in stat.h.


# 2f5cde3c 10-Dec-2004 Tom Rhodes <trhodes@FreeBSD.org>

According to the information on:
http://www.opengroup.org/onlinepubs/009695399/functions/swab.html
the prototype for swab() should be in <unistd.h> and not in <string.h>.
Move it, and update to match SUS. Leave the prototype in string.h for
now, for backwards compat.

PR: 74751
Submitted by: Craig Rodrigues <rodrigc@crodrigues.org>
Discussed with: das


# 47837a50 07-Dec-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Remove nfsclnt() prototype.


# de693dcb 22-Feb-2004 Andrey A. Chernov <ache@FreeBSD.org>

Add optreset to getopt.h too since NetBSD getopt_long() (but not GNU one)
use it too.


# 1919b885 22-Feb-2004 Andrey A. Chernov <ache@FreeBSD.org>

Try to better mimic GNU getopt.h which does not assume to make visible
all unistd.h functions, use _GETOPT_DECLARE define for that.


# 8720578d 22-Feb-2004 Andrey A. Chernov <ache@FreeBSD.org>

POSIX clearly states that getsubopt() should be declared in <stdlib.h>,
not in <unistd.h>


# 12eb46c8 07-Dec-2003 Marcel Moolenaar <marcel@FreeBSD.org>

Change the definition of NULL on ia64 (for LP64 compilations) from
an int constant to a long constant. This change improves consistency
in the following two ways:
1. The first 8 arguments are always passed in registers on ia64, which
by virtue of the generated code implicitly widens ints to longs and
allows the use of an 32-bit integral type for 64-bit arguments.
Subsequent arguments are passed onto the memory stack, which does
not exhibit the same behaviour and consequently do not allow this.
In practice this means that variadic functions taking pointers
and given NULL (without cast) work as long as the NULL is passed
in one of the first 8 arguments. A SIGSEGV is more likely the
result if such would be done for stack-based arguments. This is
due to the fact that the upper 4 bytes remain undefined.
2. All 64-bit platforms that FreeBSD supports, with the obvious
exception of ia64, allow 32-bit integral types (specifically NULL)
when 64-bit pointers are expected in variadic functions by way of
how the compiler generates code. As such, code that works correctly
(whether rightfully so or not) on any platform other than ia64, may
fail on ia64.

To more easily allow tweaking of the definition of NULL, this commit
removes the 12 definitions in the various headers and puts it in a
new header that can be included whenever NULL is to be made visible.

This commit fixes GNOME, emacs, xemacs and a whole bunch of ports
that I don't particularly care about at this time...


# 73282a3b 19-Aug-2003 Garrett Wollman <wollman@FreeBSD.org>

Update gethostname() prototype to match source and standard.


# f5bdb0f7 30-Jun-2003 Bruce Evans <bde@FreeBSD.org>

Fixed namespace pollution and unsorting of the 1003.1-1990 list in
previous commit.


# 09f49aab 29-Jun-2003 Gordon Tetlow <gordon@FreeBSD.org>

Add a libc function execvP that takes the search path as an arguement.
Change execvp to be a wrapper around execvP. This is necessary for some
of the /rescue pieces. It may also be more generally applicable as well.

Submitted by: Tim Kientzle <kientzle@acm.org>
Approved by: Silence on arch@


# 90bf9100 28-Dec-2002 Mike Barcroft <mike@FreeBSD.org>

o Add typedef for off_t, pid_t, and useconds_t.
o Use useconds_t where appropriate.
o Fix a bug in typedef for uid_t (5.0-R candidate).


# 92da00bb 15-Dec-2002 Matthew Dillon <dillon@FreeBSD.org>

This is David Schultz's swapoff code which I am finally able to commit.
This should be considered highly experimental for the moment.

Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after: 3 weeks


# 41eaee75 12-Nov-2002 Mike Barcroft <mike@FreeBSD.org>

Fix XSI (X/Open) namespace support.


# c9885518 27-Oct-2002 Garrett Wollman <wollman@FreeBSD.org>

Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard). The configuration is done
malloc(3)-style, with either an environment variable or a symlink.

Update expr(1) to use this new interface.


# 188c541c 27-Oct-2002 Garrett Wollman <wollman@FreeBSD.org>

Update limits and configuration parameters for 1003.1/TC1/D6.
Implement new sysconf keys. Change the implenentation of
_SC_ASYNCHRONOUS_IO in preparation for the next set of changes.

Move some limits which had been in <sys/syslimits.h> to <limits.h> where
they belong. They had only ever been in syslimits.h to provide for the
kernel implementation of the CTL_USER MIB branch, which went away with
newsysctl years ago. (There is a #error in <sys/syslimits.h> which I
will downgrade in the next commit.)


# d3d0ea18 13-Oct-2002 Mike Barcroft <mike@FreeBSD.org>

Move the _POSIX_VERSION constant from <unistd.h> to <sys/unistd.h>, so
that it can be used in-kernel for a sysctl.


# dcbfb460 24-Sep-2002 Garrett Wollman <wollman@FreeBSD.org>

Back down to 1003.2-1992 for the time being -- it is causing too many
headaches for common but deprecated uses of standard utilities.


# 56144d5a 23-Sep-2002 Mike Barcroft <mike@FreeBSD.org>

o Move select() helper macros from <sys/types.h> to <sys/select.h>.
o Include <sys/select.h> from <sys/types.h> in the __BSD_VISIBLE case,
so applications and base software can be slowly updated.
o Prototype select() in <sys/select.h>. It was previously only
prototyped in <unistd.h>.
o Add some XXX's to <sys/types.h>.

Reviewed by: -standards


# ffb19981 20-Sep-2002 Garrett Wollman <wollman@FreeBSD.org>

Define constants for those POSIX options and option groups which are
(or would be) implemented (or not) exclusively in user-land. A threads
expert should check over the values I have set to make sure that they
correctly reflect reality.

Move all sysconf() keys here from <sys/unistd.h> as they are not implemented
in the kernel. Add new keys from 1003.1-2001 final text. (Some additional
keys are expected in TC1.)

Add some protection against redundant declarations between <stdlib.h>
and <unistd.h> for some functions which XSI requires in the former and
BSD traditionally declares in the latter. Restrict qualifiers and other
changes from 1003.1-2001 have not been made to the functions prototyped here.

(3 of 5)


# 58d38e25 06-Sep-2002 Tim J. Robbins <tjr@FreeBSD.org>

Style: One space between "restrict" qualifier and "*".


# abbd8902 21-Aug-2002 Mike Barcroft <mike@FreeBSD.org>

o Merge <machine/ansi.h> and <machine/types.h> into a new header
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
macros, which are only MD because of gratuitous differences between
architectures.
o Change all headers to make use of this. This mainly involves
changing:
#ifdef _BSD_FOO_T_
typedef _BSD_FOO_T_ foo_t;
#undef _BSD_FOO_T_
#endif
to:
#ifndef _FOO_T_DECLARED
typedef __foo_t foo_t;
#define _FOO_T_DECLARED
#endif

Concept by: bde
Reviewed by: jake, obrien


# 603a6e79 15-Jul-2002 Garrett Wollman <wollman@FreeBSD.org>

Support POSIX/SUS ``programming environment'' mistake in confstr().


# 476d84ff 15-Jul-2002 Garrett Wollman <wollman@FreeBSD.org>

Move _CS_PATH from <sys/unistd.h> to <unistd.h> -- the kernel isn't involved
in confstr() processing.


# ef5b6399 15-Jul-2002 Garrett Wollman <wollman@FreeBSD.org>

getopt(3) was also added in 1003.2-1992.


# 2d7aab98 15-Jul-2002 Garrett Wollman <wollman@FreeBSD.org>

Fix visibility:
- symlink() is from 1003.1-2001 and XPG4.2
- fchown() is from 1003.1-2001
- fsync() is from ISO/IEC 9945-1:1995
- confstr() is from 1003.2-1992


# 1cb2a9ae 15-Jun-2002 Garrett Wollman <wollman@FreeBSD.org>

Partially fix namespace visibility issues by using new visibility macros.
Some issues still remain, and will require research in old POSIX standards
if we care to get them right.


# 8822d3fb 01-Apr-2002 Mike Barcroft <mike@FreeBSD.org>

o Implement <sys/_types.h>, a new header for storing types that are
MI, not required to be a fixed size, and used in multiple headers.
This will grow in time, as more things move here from <sys/types.h>
and <machine/ansi.h>.
o Add missing type definitions (uint16_t and uint32_t) to
<arpa/inet.h> and <netinet/in.h>.
o Reduce pollution in <sys/types.h> by using `#if _FOO_T_DECLARED'
widgets to avoid including <sys/stdint.h>.
o Add some missing type definitions to <unistd.h> and note the ones
that still need to be added.
o Make use of <sys/_types.h> primitives in <grp.h> and <sys/types.h>.

Reviewed by: bde


# bb28f3c2 23-Mar-2002 Warner Losh <imp@FreeBSD.org>

Breath deep and take __P out of the system include files.

# This appears to not break X11, but I'm having problems compiling the
# glide part of the server with or without this patch, so I can't tell
# for sure.


# 98d15924 23-Jan-2002 David Malone <dwmalone@FreeBSD.org>

Change brk's prototype from char *brk(const char *) to int brk(const void *)
and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t).

This makes us more consistant with NetBSD and standards which include
these functions. Bruce pointed out that ptrdiff_t would probably
have been better than intptr_t, but this doesn't match other
implimentations.

Also remove local declarations of sbrk and unnecessary casting.

PR: 32296
Tested by: Harti Brandt <brandt@fokus.gmd.de>
MFC after: 1 month


# 5567b258 22-Jan-2002 Mark Murray <markm@FreeBSD.org>

Use the proper type (gid_t) for (group)->gr_gid to be orthogonal
with uid_t usage and (user)->pw_uid.

PR: 3242


# ec55a605 21-Dec-2001 Mike Barcroft <mike@FreeBSD.org>

Fix support for K&R C.

MFC after: 3 days


# 0a679263 13-Nov-2001 Alfred Perlstein <alfred@FreeBSD.org>

NFS split forgot to prototype nfsclnt() syscall, do it.


# e117e7a5 09-Nov-2001 Ruslan Ermilov <ru@FreeBSD.org>

- Put missing prototype for rcmd() in <unistd.h>.
- Clean up the manpage.
- style(9) rcmdsh.c.

Committed from: BSDCon/EU 2k+1 terminal room


# 7c80f09b 21-Sep-2001 Robert Watson <rwatson@FreeBSD.org>

o Update unistd.h with the prototype for the new eaccess(2) system call.

Obtained from: TrustedBSD Project


# e6063dd1 17-Aug-2001 Dima Dorfman <dd@FreeBSD.org>

Implement getpeereid(3), a front-end to the LOCAL_PEERCRED
socket option for the Unix domain. It's weaker than the
socket option (this only returns the uid and gid, while the
socket opt. can return the entire group list), and is
implemented mostly for compatibility with OpenBSD.


# 0f639cc8 27-May-2001 Robert Nordier <rnordier@FreeBSD.org>

Drop nested __P(). This trips up Supelec's dcc.


# 5bbc3213 01-Jan-2001 Daniel Eischen <deischen@FreeBSD.org>

Change prototype to getlogin_r to reflect recent change to its
implementation (conformance to '96 POSIX standard).


# 9feac5c2 01-Sep-2000 Brian Somers <brian@FreeBSD.org>

Move setproctitle() from libutil to libc (after a repo-copy)
and bump __FreeBSD_version to 500012 to mark the occasion.

setproctitle() is prototyped in unistd.h as opposed to stdlib.h
where OpenBSD and NetBSD have it.

Reviewed by: peter


# 04c9749f 21-Aug-2000 Brian Feldman <green@FreeBSD.org>

Add working and easy crypt(3)-switching. Yes, we need a whole new API
for crypt(3) by now. In any case:

Add crypt_set_format(3) + documentation to -lcrypt.
Add login_setcryptfmt(3) + documentation to -lutil.
Support for switching crypt formats in passwd(8).
Support for switching crypt formats in pw(8).

The simple synopsis is:
edit login.conf; add a passwd_format field set to "des" or "md5"; go nuts :)

Reviewed by: peter


# 253fafca 29-Jul-2000 Peter Wemm <peter@FreeBSD.org>

Add a prototype for rfork_thread().
pid_t rfork_thread(int forkflags, void *stack, int (*func)(void *arg),
void *arg);
A new process is created, presumably using RFMEM shared address space.
The child process switches to the supplied stack, which is set up with a
function call frame. The function is called with the supplied arguement.
If the function returns, the return value will be used with _exit(2).


# c5bb91d1 17-Jun-2000 Josef Karthauser <joe@FreeBSD.org>

Add strtofflags and fflagstostr to libc.


# 418d67b0 05-Feb-2000 Josef Karthauser <joe@FreeBSD.org>

Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them.
These functions, upon reflection and discussion, are too generically
named for a library interface with such specific functionality.
Also the api that they use, whilst ok for private use, isn't good
enough for a libc function.

Additionally there were complications with the build/install-world
process. It depends heavily upon xinstall, which got broken by
the change in api, and caused bootstrap problems and general mayhem.

There is work in progress to address future problems that may be
caused by changes in install-chain tools, and better names for
{g|s}etflags can be derived when some future program requires them.
For now the code has been left in src/lib/libc/gen (it started off
in src/bin/ls).

It's important to provide library functions for manipulating file
flag strings if we ever want this interface to be adopted outside
of the source tree, but now isn't necessarily the right moment
with 4.0-release just around the corner.

Approved: jkh


# e3be4d7b 01-Feb-2000 Yoshinobu Inoue <shin@FreeBSD.org>

sync iruserok() extension API with other BSDs

Some of rcmd related function is need to be updated to
support IPv6. Some of them are already updated as standard
document. But there is also several de-facto functions and
they are not listed in standard documents.
They are,

iruserok() (used by rlogind, rshd)
ruserok() (used by kerberos, etc)

KAME package updated those functions in original way.

iruserok_af()
ruserok_af()

But recently there was discussion on IETF IPng mailing
list about how to sync those API, and it is decided,

-Those function is not standard and not documented.
-But let BSDs sync their API as de-facto.

And after some discussion, it is announced that

-add update to iruserok() as iruserok_sa()
-no ruserok() API change(it is only updated internaly)

So I sync those API before 4.0 is released.
The changes are,
-prototype changes
-ruserok() internal update (use iruserok_sa() inside)
-removal of ruserok_af()
-change iruserok_af() as static functioin, and also prefix the name with __.
-add iruserok_sa() (Just call __iruserok_af() inside)
-adding flag AI_ALL to getipnodebyaddr() called from __icheckhost().
This is necessary to support IPv4 communication via AF_INET6 socket
could be correctly authenticated via iruserok_sa()
-irusreok_af() call is replaced to iruserok_sa() call
in rlogind, and rshd.

Approved by: jkh


# 18c0eedd 27-Jan-2000 Josef Karthauser <joe@FreeBSD.org>

Historically file flags (schg, uschg, etc) have been converted from
string to u_long and back using two functions, flags_to_string and
string_to_flags, which co-existed with 'ls'. As time has progressed
more and more other tools have used these private functions to
manipulate the file flags.

Recently I moved these functions from /usr/src/bin/ls to libutil,
but after some discussion with bde it's been decided that they
really ought to go in libc.

There are two already existing libc functions for manipulating file
modes: setmode and getmode. In keeping with these flags_to_string
has been renamed getflags and string_to_flags to setflags.

The manual page could probably be improved upon ;)


# 0cac72f4 25-Jan-2000 Yoshinobu Inoue <shin@FreeBSD.org>

several tcp apps IPv6 update
-inetd
-rshd
-rlogind
-telnetd
-rsh
-rlogin

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


# d60809ca 17-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Add prototypes for [sg]etres[ug]id().


# a5341e91 14-Jan-2000 Bruce Evans <bde@FreeBSD.org>

Fixed disordering, misformatting, and duplicate declaration of
iruserok_af() in previous commit.


# 42b4f28e 13-Jan-2000 Yoshinobu Inoue <shin@FreeBSD.org>

libc rcmd update for IPv6.
A new function bindresvport2(), AF independent version of bindresvport()
is also added.

Reviewed by: sumikawa
Obtained from: KAME project


# c6dfd71a 23-Dec-1999 Bruce Evans <bde@FreeBSD.org>

Fixed missing declaration of getlogin_r(3).


# f2fd63af 16-Jul-1999 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

Make profil() 64bit-safe for alpha.
uintfptr_t may be better for offset, but we must wait until
the definition of uintfptr_t moves from machine/profile.h.

Reviewed by: bde


# 95a7753b 09-Apr-1999 Bruce Evans <bde@FreeBSD.org>

Declare mkstemps().


# 3a41a9b7 04-Apr-1999 Dmitrij Tejblum <dt@FreeBSD.org>

Add prototypes for pread and pwrite.


# 10332f32 11-Jan-1999 Mike Smith <msmith@FreeBSD.org>

optreset is a POSIX extension, make it visible in POSIX_SOURCE scope.
Submitted by: Andrzej Bialecki <abial@nask.pl>


# a7965840 10-Jan-1999 Mike Smith <msmith@FreeBSD.org>

POSIX introduced optreset to deal with multiple invocations
of getopt (as in, multiple input lines :). This is documented in the
man page and is used in the code, but unistd.h and stand.h do not
declare it. Incidentally, it prevents me fixing a bug in loader's
code... :-)

PR: misc/9373
Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>


# 2a54d8ef 11-Jul-1998 Bruce Evans <bde@FreeBSD.org>

Fixed whitespace lossage and long lines in previous commit.


# 6c0a7ecf 08-Jul-1998 Dmitrij Tejblum <dt@FreeBSD.org>

Declare lockf().


# 42c0f1c9 19-Apr-1998 Brian Somers <brian@FreeBSD.org>

Remove duplicate decls
Not objected to by: freebsd-hackers


# 642a4fdc 12-Mar-1998 Bruce Evans <bde@FreeBSD.org>

Added forgotten declaration of mkdtemp().


# c692d76d 22-Oct-1997 Andrey A. Chernov <ache@FreeBSD.org>

Change usleep return type from void to int to match OpenGroup specs.


# b2794e33 19-Aug-1997 Peter Wemm <peter@FreeBSD.org>

Prototypes for getsid() and getpgid(). Also, prefix type names in
setpgrp() prototype with _ as per style(9).


# 02b4ac7c 13-May-1997 Peter Wemm <peter@FreeBSD.org>

remove stray forward declaration for struct timespec

Pointed out by: bde


# 2c97335b 11-May-1997 Peter Wemm <peter@FreeBSD.org>

Oops, move clock_*() and nanosleep() to time.h

Submitted by: Peter Dufault <dufault@hda.com>


# 5add7c72 12-May-1997 Peter Wemm <peter@FreeBSD.org>

prototype clock_settime(), clock_gettime(), clock_getres(), nanosleep().


# fc632680 13-Apr-1997 Bruce Evans <bde@FreeBSD.org>

#ifdef'ed the declaration of lseek() so that -Wredundant-decls doesn't
cause noise.

Duplicated the lseek() redeclaration hack for all functions involving
off_t's (ftruncate(), mmap() and truncate()) to help broken programs
work.


# 44c1d774 05-Apr-1997 Peter Wemm <peter@FreeBSD.org>

Declare issetugid()

Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>, PR#3200


# 61714b4e 30-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Declare lchown()..


# c59376af 11-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Merge Lite2 changes -
move getopt etc declarations from stdlib.h to unistd.h


# dee7a427 11-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Import CSRG 4.4BSD-Lite2 includes onto vendor branch


# eaa86f9d 13-Sep-1996 Bruce Evans <bde@FreeBSD.org>

Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.


# a21dc21c 17-Jul-1996 Bruce Evans <bde@FreeBSD.org>

Fixed new and old standards conformance bugs. The non-POSIX confstr() was
in the POSIX section for a log time. The non-POSIX getgrouplist() and
setgroups() were recently added to the POSIX section although setgroups()
was already in the non-POSIX section.


# 7e5eded8 12-Jul-1996 Jordan K. Hubbard <jkh@FreeBSD.org>

General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>


# 34cc74ea 23-Feb-1996 Peter Wemm <peter@FreeBSD.org>

Add prototype for rfork().


# f70177e7 21-Jan-1996 Julian Elischer <julian@FreeBSD.org>

Reviewed by: julian and (hsu?)
Submitted by: John Birrel(L?)

changes for threadsafe operations


# 99909bef 16-Feb-1995 Joerg Wunsch <joerg@FreeBSD.org>

Make the argument list for the (non-Posix) fchown() consistent with
Posix chown(), and also with the man page.

Submitted by: Doug Rabson <dfr@render.com>


# 7d396923 18-Sep-1994 Garrett Wollman <wollman@FreeBSD.org>

Declare [gs]etdomainname().


# 2868e961 08-Sep-1994 Bruce Evans <bde@FreeBSD.org>

Declare functions that don't return as having attribute __dead2.


# 59deaec5 24-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Include Sources