Compare commits

...

73 Commits
0.8.3 ... 0.9.0

Author SHA1 Message Date
Guillem Jover
e007233cf0 Release libbsd 0.9.0 2018-05-21 04:48:32 +02:00
Guillem Jover
3cabf46bb0 Deprecate fgetwln()
This function has the same problems as fgetln() which is already marked
as deprecated.
2018-05-21 04:48:32 +02:00
Guillem Jover
6eebc1f264 Fix typo in fgetln() linker warning 2018-05-21 04:48:32 +02:00
Guillem Jover
a1730c1063 Add Windows support for getentropy() and arc4random()
Import from OpenBSD.
2018-05-21 04:48:32 +02:00
Guillem Jover
6f68c93076 Switch strtonum() implementation from strtoll() to strtoi()
Import from NetBSD.
2018-05-21 04:48:32 +02:00
Guillem Jover
e13b1a337a Import strtoi() and strtou() functions from NetBSD 2018-05-21 04:47:28 +02:00
Guillem Jover
ef5faeb575 Update few RCS keyword contents to match BSD originals
This will slightly reduce the delta, and makes it easier to compare the
sources.
2018-05-21 04:47:28 +02:00
Guillem Jover
2d7de186e9 Update vis/unvis modules from NetBSD 2018-05-21 04:47:28 +02:00
Guillem Jover
3efad64155 Update readpassphrase() from OpenBSD 2018-05-21 04:47:28 +02:00
Guillem Jover
a6f407ab0d Update heapsort() from OpenBSD 2018-05-21 04:47:28 +02:00
Guillem Jover
21edbb4f22 Update fmtcheck() from NetBSD 2018-05-21 04:47:28 +02:00
Guillem Jover
e3979d1a7c Update humanize_number() from FreeBSD
Implements HN_IEC_PREFIXES.
2018-05-21 04:47:28 +02:00
Guillem Jover
facbddb652 Update pidfile module from FreeBSD
Use EINVAL instead of EDOOFUS. Add a missing synopsis for
pidfile_fileno() in the man page. Move the definition of struct pidfh
from libutil.h into pidfile.c following upstream change.
2018-05-21 04:47:28 +02:00
Guillem Jover
3d88c999b4 Update arc4random() headers from OpenBSD
Split Linux support into its own header separate from the generic Unix
to fix a Linux-specific issue with clone(). Reset rsp to NULL on failure.
2018-05-21 04:47:28 +02:00
Guillem Jover
e42381dc51 Update getentropy() code from OpenBSD
Includes changes to handle the Linux syscall blocking when there is not
enough entropy during boot, by switching it to non-blocking mode and
falling back to the alternative implementations. Man page URL reference
fixes. Build fixes for Mac OS X.

Fixes: https://bugs.debian.org/898088
2018-05-21 04:47:28 +02:00
Guillem Jover
993828d84e Add flopenat() function from FreeBSD 2018-05-21 03:49:26 +02:00
Guillem Jover
30b4d50754 Add __arraycount() macro from NetBSD 2018-05-21 03:36:44 +02:00
Baruch Siach
f6ed7c278b Fix build for openrisc with uClibc
uClibc defines EM_OR1K instead of EM_OPENRISC for the OpenRISC ELF
e_machine ID. Use EM_OR1K when EM_OPENRISC is not defined.

This fixes the following build failure:

In file included from nlist.c:44:0:
nlist.c: In function ‘__elf_is_okay__’:
local-elf.h:224:23: error: ‘EM_OPENRISC’ undeclared (first use in this function)
 #define ELF_TARG_MACH EM_OPENRISC
                       ^
nlist.c:77:26: note: in expansion of macro ‘ELF_TARG_MACH’
   if (ehdr->e_machine == ELF_TARG_MACH &&
                          ^

Signed-off-by: Guillem Jover <guillem@hadrons.org>
2018-04-04 02:29:15 +02:00
Guillem Jover
1f8a3f7bcc Fix function declaration protection for glibc already providing them
On non-glibc based systems we cannot unconditionally use the
__GLIBC_PREREQ macro as it gets expanded before evaluation. Instead,
if it is undefined, define it to 0.

We should also always declare these functions on non-glibc based
systems. And on systems with a new enough glibc, which provides these
functions, we should still provide the declarations if _GNU_SOURCE
is *not* defined.

Reported-by: Jörg Krause <joerg.krause@embedded.rocks>
2018-03-13 02:28:53 +01:00
Guillem Jover
b20272f5a9 Remove <features.h> inclusion from <bsd/libutil.h>
This is a non-portable header, and we should not assume it is present.
Let the first system header pull it in if needed.
2018-03-13 02:28:53 +01:00
Guillem Jover
11ec8f1e5d Handle systems missing <sys/cdefs.h>
This is a non-portable header, and we cannot expect it to be provided by
the system libc (e.g. musl). We just need and rely on declaration that
we have defined ourselves in our own <bsd/sys/cdefs.h>. So we switch to
only ever assume that.

Fixes: https://bugs.freedesktop.org/105281
2018-03-13 02:28:53 +01:00
Guillem Jover
5ba8c5bab0 progname: Port to Windows
Define the directory separator depending on the system targetted.

Reported-by: Progyan Bhattacharya <progyanb@acm.org>
2018-03-06 01:10:14 +01:00
Guillem Jover
0093ca2b0e Handle SPARC V8+ on Sun Studio compiler 2018-03-05 00:02:34 +01:00
James Clarke
0b65d43963 Add support for ELF machine EM_SPARC32PLUS
32-bit SPARC on V8+ uses a different ELF machine type.

Fixes: https://bugs.gentoo.org/634550
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2018-03-04 23:49:25 +01:00
Guillem Jover
0b61c5ffed Release libbsd 0.8.7 2018-01-13 16:20:35 +01:00
Jason Duerstock
9ceac74e91 test: Fix nlist(3) unit test on IA64
On IA64 this is only the case in the ELF binary, but it gets normalized
when loaded at run-time.

Fixes: https://bugs.debian.org/881611
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2018-01-13 16:17:28 +01:00
Adam Lackorzynski
9afc7100a1 Fix <sys/cdefs.h> for gcc with no __has_include or __has_include_next support
Fixes: https://bugs.freedesktop.org/103396
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2018-01-13 16:17:10 +01:00
Guillem Jover
22fbd62368 Handle several functions now being provided by glibc
We mention that these are now superseded by the glibc implementations,
make the headers cope with already declared functions on glibc-based
systems, and document this in the man pages.
2017-12-03 16:43:28 +01:00
Guillem Jover
b4f7c065ba man: Document on what other BSDs arc4random(3) is present 2017-12-03 16:41:55 +01:00
Guillem Jover
bbf90ac3cd Release libbsd 0.8.6 2017-07-17 01:01:13 +02:00
Guillem Jover
2a8514d8a5 Fix handling of non-contiguous argv + envp in setproctitle()
The two arrays might not reference contiguous memory, and assuming they
are does break at least now on GNU/Hurd, which contains an unmapped
memory block between the memory used by the two arrays.

Just check that each element is strictly after the previous one, so that
we know there are no unmapped memory blocks inbetween.
2017-07-17 00:58:06 +02:00
Guillem Jover
3b2b7938f7 test: Fix nlist() unit test on IA64 and PowerPC 64-bit ELFv1
At least on IA64 and PowerPC 64-bit ELFv1, the functions are stored in
the .text sections but they are accessed through a function descriptor
stored in a data section, for example for PowerPC 64-bit ELFv1 that
section is called .opd.

We should take this into account when checking the n_type for the
functions we have requested information from nlist().

Rationale-by: James Clarke <jrtc27@jrtc27.com>
2017-06-25 02:10:26 +02:00
Guillem Jover
415e3cb266 Release libbsd 0.8.5 2017-06-24 16:10:14 +02:00
Guillem Jover
9532cb39f4 man: Update man page sections in titles and references
We have moved all man pages to section 3bsd, let's do the same for the
page title, and in all the references for uniformity and to avoid
confusions.

Fixes: https://bugs.freedesktop.org/101545
2017-06-24 16:08:27 +02:00
Guillem Jover
a4dd754c8d man: Ship and install libbsd(7)
Fixes: https://bugs.freedesktop.org/101543
2017-06-24 16:08:27 +02:00
James Cowgill
b480b7a3f8 Fix ELF definitions for MIPS in local-elf.h
Add a check for _MIPS_SIM inside the __mips__ #elif to detect mips64el
and use ELFCLASS64 in that case. Note that we can't use defined(__mips64)
here because that is also defined when the n32 ABI is in use, which uses
ELFCLASS32.

Fixes: https://bugs.debian.org/865091
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2017-06-24 16:08:22 +02:00
James Cowgill
4cc20e23f5 Fix ELF definitions for PowerPC in local-elf.h
* ppc64el defines both __powerpc__ and __powerpc64__ but since the
  __powerpc64__ #elif is below the __powerpc__ one, it will never be hit.
* Both assumed that powerpc* was big-endian.

Fixes: https://bugs.debian.org/865091
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2017-06-24 16:08:14 +02:00
Guillem Jover
c4e58c0950 test: Remove unused variable in nlist() unit test 2017-06-24 16:06:15 +02:00
Guillem Jover
736e12e8d8 test: Handle libtool executable names in getprogname() unit test
Sometimes libtool will prefix the test programs with "lt-", we should
handle these and strip the prefix.

Fixes: https://bugs.debian.org/865090
2017-06-24 16:05:50 +02:00
Guillem Jover
8bff4b1fab Release libbsd 0.8.4 2017-06-19 03:17:21 +02:00
Guillem Jover
0071b97958 Import <sys/time.h> for some of its macros
Fixes: https://bugs.freedesktop.org/94320
2017-06-19 03:17:21 +02:00
Guillem Jover
cdbb9d0555 test: Add new strnstr() unit test 2017-06-19 03:17:21 +02:00
Guillem Jover
0365d0efda test: Add new setprogname() and getprogname() unit test 2017-06-19 03:17:21 +02:00
Guillem Jover
10b1328570 test: Add new setmode() and getmode() unit test 2017-06-19 03:17:21 +02:00
Guillem Jover
922eff5c5e test: Add new nlist() unit test 2017-06-19 03:17:21 +02:00
Guillem Jover
8e8834d8e5 Remove RCSID tags
These are obsolete markers, and in some cases they repeat the
information already present in the comment header.
2017-06-19 03:17:21 +02:00
Guillem Jover
7938619254 Update .gitignore for headers generator 2017-06-19 03:17:21 +02:00
Guillem Jover
ec5d9a685a Namespace header inclusion protection macros
Use LIBBSD_, and remove trailing underscores.
2017-06-19 03:17:21 +02:00
Guillem Jover
47013bc92a Fix broken mmap() usage in nlist() by switching to pread()
The offset is not page aligned, which makes mmap() return EINVAL on
Linux. Switch to use pread() which handles unaligned offset and non-page
sized reads, and because we are already loading parts of the executable
by read() calls, so there's not much point in using mmap() anyway.
2017-06-19 03:17:21 +02:00
Guillem Jover
e8d340de9e Remove a.out support from nlist()
Some libc libraries do not have an <a.out.h> header. And a.out as an
executable format is very much obsolete on pretty much all currently
supported systems, even if they might still support loading such
objects.

Remove the a.out support to increase portability.
2017-06-19 03:17:21 +02:00
Igor Gnatenko
7aede6a999 Make strlcpy()/strlcat() slightly easier to read
Backport new changes from OpenBSD.

[guillem@hadrons.org:
 - Update copyright years in COPYING. ]

References: https://svnweb.freebsd.org/base?view=revision&revision=281135
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2017-06-19 03:17:21 +02:00
Guillem Jover
ab5db68bae build: Add missing \ at end of line
Fixes: commit 934b7a0ccb
2017-06-19 03:03:23 +02:00
Guillem Jover
5a46e4867d Update TODO 2017-06-18 23:37:01 +02:00
Guillem Jover
7a75f550e8 Update TODO 2017-06-09 05:47:07 +02:00
Guillem Jover
f1dd5f2e71 test: Add unit test for strlcpy() and strlcat() 2017-06-09 05:47:07 +02:00
Guillem Jover
c8a1b08b74 build: Match any glibc and musl ABIs on the host_os AS_CASE
Reported-by: Helmut Grohne <helmut@subdivi.de>
2017-06-09 05:47:07 +02:00
Guillem Jover
4fec871c79 build: Quote the arguments to AC_CONDITIONAL 2017-06-09 05:47:07 +02:00
Guillem Jover
3945693ebe build: Move AC_TYPE_UID_T close to the other AC_TYPE_* checks 2017-06-09 05:47:07 +02:00
Guillem Jover
c253365d65 build: Move configure.ac comment into actual AC_CASE 2017-06-09 05:47:06 +02:00
Guillem Jover
8248e5f7a6 build: Use src/strlcpy.c in AC_CONFIG_SRCDIR
The src/fgetln.c file contains a function considered obsolete, use one
that is not.
2017-06-09 05:46:34 +02:00
Guillem Jover
c74ca09916 man: Use .In intead of .Fd macros for includes 2017-06-09 05:46:34 +02:00
Guillem Jover
ba9e2a5a9c man: Add new libbsd(7) library overview man page 2017-06-09 05:46:29 +02:00
Guillem Jover
6a5a515820 man: Add missing man pages
This adds man pages for byteorder(3), errc(3) and fpurge(3), including
all their aliases.
2017-06-09 05:40:28 +02:00
Guillem Jover
934b7a0ccb man: Add missing aliases 2017-06-07 05:07:55 +02:00
Guillem Jover
f20e6972b3 man: Move all man pages to section 3bsd
This should guarantee that even if the system provides or will provide
native implementations of these functions, we will not have file
conflicts.
2017-06-06 04:37:56 +02:00
Guillem Jover
07c76b666d Do not use legacy BSD u_* types
Some systems do not have these types available, and they are simply
convenience aliases. Instead use the expanded versions which are more
portable.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101192
2017-06-05 06:18:27 +02:00
Guillem Jover
e4475738fe Try <linux/a.out.h> if <a.out.h> is not present
At least musl ships the former but not the latter.
2017-06-05 05:52:07 +02:00
Guillem Jover
d6c35f618c Do not provide funopen() on musl
Fixes: https://bugs.debian.org/818246
2017-06-05 05:52:07 +02:00
Guillem Jover
db7470b048 Gracefully handle lack of system <sys/cdefs.h>
This is the case on musl.

Fixes: https://bugs.debian.org/810589
2017-06-05 05:52:07 +02:00
Guillem Jover
368af99f55 Fix the __progname check to avoid the optimizer discarding the symbol
Because we were assigning to another unused variable, when building the
check with optimizations enabled, which is the default when using gcc
as the compiler, the variable was being discarded. Instead pass it to
printf() so that it cannot do so.
2017-06-05 05:52:07 +02:00
Guillem Jover
337e620275 Support GCC deprecated attribute for GCC older than 4.5
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99190
Based-on-patch-by: Eric Smith <brouhaha@fedoraproject.org>
2017-06-05 05:51:52 +02:00
Guillem Jover
088f147ec8 Add support for RISC-V 2017-06-05 05:31:35 +02:00
Helmut Grohne
b2b1020d8e Add support for TileGX
Fixes: https://bugs.debian.org/847560
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2017-01-16 09:59:20 +01:00
315 changed files with 5973 additions and 1748 deletions

136
COPYING
View File

@@ -3,12 +3,12 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files:
*
Copyright:
Copyright © 2004-2006, 2008-2015 Guillem Jover <guillem@hadrons.org>
Copyright © 2004-2006, 2008-2018 Guillem Jover <guillem@hadrons.org>
License: BSD-3-clause
Files:
man/arc4random.3
man/tree.3
man/arc4random.3bsd
man/tree.3bsd
Copyright:
Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
All rights reserved.
@@ -39,7 +39,7 @@ License: BSD-4-clause-Niels-Provos
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files:
man/getprogname.3
man/getprogname.3bsd
Copyright:
Copyright © 2001 Christopher G. Demetriou
All rights reserved.
@@ -90,26 +90,31 @@ Files:
include/bsd/netinet/ip_icmp.h
include/bsd/sys/bitstring.h
include/bsd/sys/queue.h
include/bsd/sys/time.h
include/bsd/timeconv.h
include/bsd/vis.h
man/bitstring.3
man/explicit_bzero.3
man/fgetln.3
man/fgetwln.3
man/bitstring.3bsd
man/errc.3bsd
man/explicit_bzero.3bsd
man/fgetln.3bsd
man/fgetwln.3bsd
man/fpurge.3bsd
man/funopen.3bsd
man/getbsize.3
man/heapsort.3
man/nlist.3
man/getbsize.3bsd
man/heapsort.3bsd
man/nlist.3bsd
man/queue.3bsd
man/radixsort.3
man/reallocarray.3
man/reallocf.3
man/setmode.3
man/strmode.3
man/strnstr.3
man/unvis.3
man/vis.3
man/wcslcpy.3
man/radixsort.3bsd
man/reallocarray.3bsd
man/reallocf.3bsd
man/setmode.3bsd
man/strmode.3bsd
man/strnstr.3bsd
man/strtoi.3bsd
man/strtou.3bsd
man/unvis.3bsd
man/vis.3bsd
man/wcslcpy.3bsd
src/getbsize.c
src/heapsort.c
src/merge.c
@@ -118,8 +123,9 @@ Files:
src/setmode.c
src/strmode.c
src/strnstr.c
src/strtoi.c
src/strtou.c
src/unvis.c
src/vis.c
Copyright:
Copyright © 1980, 1982, 1986, 1989-1994
The Regents of the University of California. All rights reserved.
@@ -207,7 +213,38 @@ License: BSD-3-clause-Peter-Wemm
SUCH DAMAGE.
Files:
man/setproctitle.3
man/timeradd.3bsd
Copyright:
Copyright © 2009 Jukka Ruohonen <jruohonen@iki.fi>
Copyright © 1999 Kelly Yancey <kbyanc@posi.net>
All rights reserved.
License: BSD-3-clause-John-Birrell
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the author nor the names of any co-contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Files:
man/setproctitle.3bsd
Copyright:
Copyright © 1995 Peter Wemm <peter@FreeBSD.org>
All rights reserved.
@@ -230,14 +267,18 @@ License: BSD-5-clause-Peter-Wemm
Files:
include/bsd/stringlist.h
man/fmtcheck.3
man/humanize_number.3
man/stringlist.3
man/fmtcheck.3bsd
man/humanize_number.3bsd
man/stringlist.3bsd
man/timeval.3bsd
src/fmtcheck.c
src/humanize_number.c
src/stringlist.c
src/strtonum.c
Copyright:
Copyright © 1994, 1997-2000, 2002, 2008 The NetBSD Foundation, Inc.
Copyright © 1994, 1997-2000, 2002, 2008, 2010, 2014
The NetBSD Foundation, Inc.
Copyright © 2013 John-Mark Gurney <jmg@FreeBSD.org>
All rights reserved.
.
Some code was contributed to The NetBSD Foundation by Allen Briggs.
@@ -254,6 +295,9 @@ Copyright:
.
Some code is derived from software contributed to The NetBSD Foundation
by Christos Zoulas.
.
Some code is derived from software contributed to The NetBSD Foundation
by Jukka Ruohonen.
License: BSD-2-clause-NetBSD
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -276,13 +320,24 @@ License: BSD-2-clause-NetBSD
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Files:
src/vis.c
Copyright:
Copyright © 1989, 1993
The Regents of the University of California. All rights reserved.
.
Copyright © 1999, 2005 The NetBSD Foundation, Inc.
All rights reserved.
License: BSD-3-clause-Regents and BSD-2-clause-NetBSD
Files:
include/bsd/sys/endian.h
man/expand_number.3
man/closefrom.3
man/flopen.3
man/getpeereid.3
man/pidfile.3
man/byteorder.3bsd
man/closefrom.3bsd
man/expand_number.3bsd
man/flopen.3bsd
man/getpeereid.3bsd
man/pidfile.3bsd
src/expand_number.c
src/hash/sha512.h
src/hash/sha512c.c
@@ -302,6 +357,9 @@ Copyright:
Copyright © 2002 Thomas Moestl <tmm@FreeBSD.org>
All rights reserved.
.
Copyright © 2002 Mike Barcroft <mike@FreeBSD.org>
All rights reserved.
.
Copyright © 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
All rights reserved.
.
@@ -325,7 +383,7 @@ License: BSD-2-clause
Files:
src/flopen.c
Copyright:
Copyright © 2007 Dag-Erling Coïdan Smørgrav
Copyright © 2007-2009 Dag-Erling Coïdan Smørgrav
All rights reserved.
License: BSD-2-clause-verbatim
Redistribution and use in source and binary forms, with or without
@@ -352,7 +410,7 @@ License: BSD-2-clause-verbatim
Files:
include/bsd/sys/tree.h
man/fparseln.3
man/fparseln.3bsd
src/fparseln.c
Copyright:
Copyright © 1997 Christos Zoulas.
@@ -383,13 +441,15 @@ License: BSD-2-clause-author
Files:
include/bsd/readpassphrase.h
man/readpassphrase.3
man/strlcpy.3
man/strtonum.3
man/readpassphrase.3bsd
man/strlcpy.3bsd
man/strtonum.3bsd
src/arc4random.c
src/arc4random_linux.h
src/arc4random_openbsd.h
src/arc4random_uniform.c
src/arc4random_unix.h
src/arc4random_win.h
src/closefrom.c
src/getentropy_aix.c
src/getentropy_bsd.c
@@ -398,17 +458,17 @@ Files:
src/getentropy_linux.c
src/getentropy_osx.c
src/getentropy_solaris.c
src/getentropy_win.c
src/readpassphrase.c
src/reallocarray.c
src/strlcat.c
src/strlcpy.c
src/strtonum.c
Copyright:
Copyright © 2004 Ted Unangst and Todd Miller
All rights reserved.
.
Copyright © 1996 David Mazieres <dm@uun.org>
Copyright © 1998, 2000-2002, 2004-2005, 2007, 2010, 2012-2014
Copyright © 1998, 2000-2002, 2004-2005, 2007, 2010, 2012-2015
Todd C. Miller <Todd.Miller@courtesan.com>
Copyright © 2004 Ted Unangst
Copyright © 2008 Damien Miller <djm@openbsd.org>

11
TODO
View File

@@ -1,3 +1,14 @@
* Add more functions used by ported packages (check openssh).
* Add more unit tests.
* Add missing man pages.
- bsd_getopt.
- timeconv?
* Add a README.import file.
* Update man pages:
- Fix references to a.out(5) and inline needed struct definitions.
- Document when each interface was added on every BSD, and libbsd.
* Handle LFS properly. By default the library emits LFS objects, but might
be used by non-LFS objects. We should either provide foo and foo64
functions and appropriate mappings on _FILE_OFFSET_BITS=64,
_LARGEFILE_SOURCE and _LARGEFILE64_SOURCE. Or error out when the off_t
used by the code including us does not match a 64-bit type.

View File

@@ -2,7 +2,7 @@
AC_PREREQ([2.67])
AC_INIT([libbsd], m4_esyscmd([./get-version]), [libbsd@lists.freedesktop.org])
AC_CONFIG_SRCDIR([src/fgetln.c])
AC_CONFIG_SRCDIR([src/strlcpy.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
@@ -12,8 +12,8 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
LIBBSD_ABI_MAJOR=0
LIBBSD_ABI_MINOR=8
LIBBSD_ABI_PATCH=3
LIBBSD_ABI_MINOR=9
LIBBSD_ABI_PATCH=0
LIBBSD_ABI="$LIBBSD_ABI_MAJOR:$LIBBSD_ABI_MINOR:$LIBBSD_ABI_PATCH"
AC_SUBST([LIBBSD_ABI])
@@ -44,27 +44,31 @@ AC_SUBST([TESTU01_LIBS])
AM_CONDITIONAL([HAVE_LIBTESTU01],
[test "x$ac_cv_lib_testu01_unif01_CreateExternGenBits" = "xyes"])
# In old glibc versions (< 2.17) clock_gettime() is in librt.
AS_CASE([$host_os],
[*-gnu], [
[*-gnu*], [
# In old glibc versions (< 2.17) clock_gettime() is in librt.
saved_LIBS="$LIBS"
AC_SEARCH_LIBS([clock_gettime], [rt], [CLOCK_GETTIME_LIBS="-lrt"])
AC_SUBST([CLOCK_GETTIME_LIBS])
LIBS="$saved_LIBS"
]
],
[*-musl*], [
# Upstream refuses to define this, we will do it ourselves then.
AC_DEFINE([__MUSL__], [1], [Define to 1 if we are building for musl])
],
)
# Checks for header files.
AC_CHECK_HEADERS([sys/ndir.h sys/dir.h ndir.h dirent.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
AC_C_INLINE
AC_C_TYPEOF
AC_TYPE_INT64_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_UID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
@@ -131,9 +135,8 @@ AC_LINK_IFELSE(
AC_MSG_CHECKING([for __progname])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]],
[[extern char *__progname;
const char *p = __progname;]])],
[AC_LANG_PROGRAM([[extern char *__progname;]],
[[printf("%s", __progname);]])],
[AC_DEFINE([HAVE___PROGNAME], [1], [Define to 1 if you have __progname])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
@@ -141,7 +144,7 @@ AC_LINK_IFELSE(
AC_CHECK_FUNCS([clearenv dirfd fopencookie __fpurge \
getauxval getentropy getexecname getline \
pstat_getproc sysconf])
AM_CONDITIONAL(HAVE_GETENTROPY, [test "x$ac_cv_func_getentropy" = "xtrue"])
AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xtrue"])
AC_CONFIG_FILES([
Makefile

View File

@@ -6,12 +6,14 @@ nobase_include_HEADERS = \
bsd/sys/endian.h \
bsd/sys/poll.h \
bsd/sys/queue.h \
bsd/sys/time.h \
bsd/sys/tree.h \
bsd/netinet/ip_icmp.h \
bsd/bitstring.h \
bsd/bsd.h \
bsd/err.h \
bsd/getopt.h \
bsd/inttypes.h \
bsd/libutil.h \
bsd/md5.h \
bsd/nlist.h \

49
include/bsd/inttypes.h Normal file
View File

@@ -0,0 +1,49 @@
/*
* Copyright © 2018 Guillem Jover <guillem@hadrons.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef LIBBSD_OVERLAY
#include_next <inttypes.h>
#else
#include <inttypes.h>
#endif
#ifndef LIBBSD_INTTYPES_H
#define LIBBSD_INTTYPES_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
__BEGIN_DECLS
intmax_t strtoi(const char *__restrict nptr, char **__restrict endptr,
int base, intmax_t lo, intmax_t hi, int *rstatus);
uintmax_t strtou(const char *__restrict nptr, char **__restrict endptr,
int base, uintmax_t lo, uintmax_t hi, int *rstatus);
__END_DECLS
#endif

View File

@@ -36,22 +36,19 @@
* $FreeBSD: src/lib/libutil/libutil.h,v 1.47 2008/04/23 00:49:12 scf Exp $
*/
#ifndef _LIBUTIL_H_
#define _LIBUTIL_H_
#ifndef LIBBSD_LIBUTIL_H
#define LIBBSD_LIBUTIL_H
#include <features.h>
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/types.h>
#include <stdint.h>
#include <stdio.h>
/* for pidfile.c */
struct pidfh {
int pf_fd;
char *pf_path;
dev_t pf_dev;
ino_t pf_ino;
};
struct pidfh;
__BEGIN_DECLS
int humanize_number(char *buf, size_t len, int64_t bytes,
@@ -59,8 +56,10 @@ int humanize_number(char *buf, size_t len, int64_t bytes,
int expand_number(const char *_buf, uint64_t *_num);
int flopen(const char *_path, int _flags, ...);
int flopenat(int dirfd, const char *path, int flags, ...);
struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr);
int pidfile_fileno(const struct pidfh *pfh);
int pidfile_write(struct pidfh *pfh);
int pidfile_close(struct pidfh *pfh);
int pidfile_remove(struct pidfh *pfh);
@@ -68,14 +67,16 @@ int pidfile_remove(struct pidfh *pfh);
char *fparseln(FILE *, size_t *, size_t *, const char[3], int);
__END_DECLS
/* humanize_number(3) */
#define HN_DECIMAL 0x01
#define HN_NOSPACE 0x02
#define HN_B 0x04
#define HN_DIVISOR_1000 0x08
/* Values for humanize_number(3)'s flags parameter. */
#define HN_DECIMAL 0x01
#define HN_NOSPACE 0x02
#define HN_B 0x04
#define HN_DIVISOR_1000 0x08
#define HN_IEC_PREFIXES 0x10
#define HN_GETSCALE 0x10
#define HN_AUTOSCALE 0x20
/* Values for humanize_number(3)'s scale parameter. */
#define HN_GETSCALE 0x10
#define HN_AUTOSCALE 0x20
/*
* fparseln() specific operation flags.
@@ -86,4 +87,4 @@ __END_DECLS
#define FPARSELN_UNESCREST 0x08
#define FPARSELN_UNESCALL 0x0f
#endif /* !_LIBUTIL_H_ */
#endif /* !LIBBSD_LIBUTIL_H */

View File

@@ -12,8 +12,8 @@
* with every copy.
*/
#ifndef _MD5_H_
#define _MD5_H_
#ifndef LIBBSD_MD5_H
#define LIBBSD_MD5_H
#include <stdint.h>
@@ -27,7 +27,11 @@ typedef struct MD5Context {
uint8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
} MD5_CTX;
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/types.h>
__BEGIN_DECLS
@@ -51,4 +55,4 @@ char *MD5Data(const uint8_t *, size_t, char *)
__attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH)));
__END_DECLS
#endif /* _MD5_H_ */
#endif /* LIBBSD_MD5_H */

View File

@@ -30,10 +30,10 @@
* $FreeBSD: src/sys/netinet/ip_icmp.h,v 1.22 2004/04/07 20:46:13 imp Exp $
*/
#ifndef _NETINET_IP_ICMP_H_
#define _NETINET_IP_ICMP_H_
#ifndef LIBBSD_NETINET_IP_ICMP_H
#define LIBBSD_NETINET_IP_ICMP_H
#include <sys/types.h> /* u_int32_t, u_char */
#include <sys/types.h> /* uint32_t */
#include <netinet/in.h> /* in_addr */
#include <netinet/in_systm.h> /* n_short */
#include <netinet/ip.h> /* idi_ip */
@@ -47,19 +47,19 @@
* Internal of an ICMP Router Advertisement
*/
struct icmp_ra_addr {
u_int32_t ira_addr;
u_int32_t ira_preference;
uint32_t ira_addr;
uint32_t ira_preference;
};
/*
* Structure of an icmp header.
*/
struct icmp {
u_char icmp_type; /* type of message, see below */
u_char icmp_code; /* type sub code */
u_short icmp_cksum; /* ones complement cksum of struct */
unsigned char icmp_type; /* type of message, see below */
unsigned char icmp_code; /* type sub code */
unsigned short icmp_cksum; /* ones complement cksum of struct */
union {
u_char ih_pptr; /* ICMP_PARAMPROB */
unsigned char ih_pptr; /* ICMP_PARAMPROB */
struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
struct ih_idseq {
n_short icd_id;
@@ -74,9 +74,9 @@ struct icmp {
} ih_pmtu;
struct ih_rtradv {
u_char irt_num_addrs;
u_char irt_wpa;
u_int16_t irt_lifetime;
unsigned char irt_num_addrs;
unsigned char irt_wpa;
uint16_t irt_lifetime;
} ih_rtradv;
} icmp_hun;
#define icmp_pptr icmp_hun.ih_pptr
@@ -100,7 +100,7 @@ struct icmp {
/* options and then 64 bits of data */
} id_ip;
struct icmp_ra_addr id_radv;
u_int32_t id_mask;
uint32_t id_mask;
char id_data[1];
} icmp_dun;
#define icmp_otime icmp_dun.id_ts.its_otime

View File

@@ -27,8 +27,70 @@
#ifndef LIBBSD_NLIST_H
#define LIBBSD_NLIST_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#include <a.out.h>
#else
#include <bsd/sys/cdefs.h>
#endif
struct nlist {
union {
char *n_name;
struct n_list *n_next;
long n_strx;
} n_un;
unsigned char n_type;
char n_other;
short n_desc;
unsigned long n_value;
};
#define n_hash n_desc /* used internally by ld(1); XXX */
/*
* Defines for n_type.
*/
#define N_UNDF 0x00 /* Undefined */
#define N_ABS 0x02 /* Absolute address */
#define N_TEXT 0x04 /* Text segment */
#define N_DATA 0x06 /* Data segment */
#define N_BSS 0x08 /* Bss segment */
#define N_INDR 0x0a /* Alias definition */
#define N_SIZE 0x0c /* Pseudo type, defines a symbol's size */
#define N_COMM 0x12 /* Common reference */
/* GNU extensions */
#define N_SETA 0x14 /* Absolute set element symbol */
#define N_SETT 0x16 /* Text set element symbol */
#define N_SETD 0x18 /* Data set element symbol */
#define N_SETB 0x1a /* Bss set element symbol */
#define N_SETV 0x1c /* Set vector symbol */
/* end GNU extensions */
#define N_FN 0x1e /* File name (N_EXT on) */
#define N_WARN 0x1e /* Warning message (N_EXT off) */
#define N_EXT 0x01 /* External (global) bit, OR'ed in */
#define N_TYPE 0x1e /* Mask for all the type bits */
#define N_STAB 0xe0 /* Mask for debugger symbols -- stab(5) */
#define N_NAME(p) ((p)->n_un.n_name)
/*
* Defines for n_other. It contains the ".type" (AUX) field in the least
* significant 4 bits, and the binding (for weak symbols) in the most
* significant 4 bits.
*/
#define N_AUX(p) ((p)->n_other & 0xf)
#define N_BIND(p) (((unsigned int)(p)->n_other >> 4) & 0xf)
#define N_OTHER(r, v) (((unsigned int)(r) << 4) | ((v) & 0xf))
#define AUX_OBJECT 1 /* Data object */
#define AUX_FUNC 2 /* Function */
/*#define BIND_LOCAL 0 Not used */
/*#define BIND_GLOBAL 1 Not used */
#define BIND_WEAK 2 /* Weak binding */
#define N_FORMAT "%08x" /* namelist value format; XXX */
__BEGIN_DECLS
extern int nlist(const char *filename, struct nlist *list);

View File

@@ -20,8 +20,8 @@
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
*/
#ifndef _READPASSPHRASE_H_
#define _READPASSPHRASE_H_
#ifndef LIBBSD_READPASSPHRASE_H
#define LIBBSD_READPASSPHRASE_H
#define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */
#define RPP_ECHO_ON 0x01 /* Leave echo on. */
@@ -31,11 +31,15 @@
#define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */
#define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/types.h>
__BEGIN_DECLS
char * readpassphrase(const char *, char *, size_t, int);
__END_DECLS
#endif /* !_READPASSPHRASE_H_ */
#endif /* !LIBBSD_READPASSPHRASE_H */

View File

@@ -38,7 +38,11 @@
#ifndef LIBBSD_STDIO_H
#define LIBBSD_STDIO_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/types.h>
__BEGIN_DECLS
@@ -47,9 +51,9 @@ const char *fmtcheck(const char *, const char *);
/* XXX: The function requires cooperation from the system libc to store the
* line buffer in the FILE struct itself. */
char *fgetln(FILE *fp, size_t *lenp)
__attribute__((deprecated("This functions cannot be safely ported, "
"use getline(3) instead, as it is supported "
"by GNU and POSIX.1-2008.")));
LIBBSD_DEPRECATED("This functions cannot be safely ported, "
"use getline(3) instead, as it is supported "
"by GNU and POSIX.1-2008.");
/*
* Note: We diverge from the FreeBSD, OpenBSD and DragonFlyBSD declarations,

View File

@@ -42,14 +42,18 @@
#ifndef LIBBSD_STDLIB_H
#define LIBBSD_STDLIB_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/stat.h>
#include <stdint.h>
__BEGIN_DECLS
uint32_t arc4random(void);
void arc4random_stir(void);
void arc4random_addrandom(u_char *dat, int datlen);
void arc4random_addrandom(unsigned char *dat, int datlen);
void arc4random_buf(void *_buf, size_t n);
uint32_t arc4random_uniform(uint32_t upper_bound);
@@ -67,7 +71,10 @@ int sradixsort(const unsigned char **base, int nmemb,
const unsigned char *table, unsigned endbyte);
void *reallocf(void *ptr, size_t size);
#if !defined(__GLIBC__) || \
(defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 26) || !defined(_GNU_SOURCE)))
void *reallocarray(void *ptr, size_t nmemb, size_t size);
#endif
long long strtonum(const char *nptr, long long minval, long long maxval,
const char **errstr);

View File

@@ -33,7 +33,11 @@
#ifndef LIBBSD_STRING_H
#define LIBBSD_STRING_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/types.h>
__BEGIN_DECLS
@@ -42,7 +46,10 @@ size_t strlcat(char *dst, const char *src, size_t siz);
char *strnstr(const char *str, const char *find, size_t str_len);
void strmode(mode_t mode, char *str);
#if !defined(__GLIBC__) || \
(defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 25) || !defined(_GNU_SOURCE)))
void explicit_bzero(void *buf, size_t len);
#endif
__END_DECLS
#endif

View File

@@ -29,9 +29,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _STRINGLIST_H
#define _STRINGLIST_H
#ifndef LIBBSD_STRINGLIST_H
#define LIBBSD_STRINGLIST_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/types.h>
/*
@@ -51,4 +56,4 @@ char *sl_find(StringList *, const char *);
int sl_delete(StringList *, const char *, int);
__END_DECLS
#endif /* _STRINGLIST_H */
#endif /* LIBBSD_STRINGLIST_H */

View File

@@ -32,8 +32,8 @@
* $FreeBSD$
*/
#ifndef _SYS_BITSTRING_H_
#define _SYS_BITSTRING_H_
#ifndef LIBBSD_SYS_BITSTRING_H
#define LIBBSD_SYS_BITSTRING_H
typedef unsigned char bitstr_t;
@@ -143,4 +143,4 @@ typedef unsigned char bitstr_t;
*(value) = _value; \
} while (0)
#endif /* !_SYS_BITSTRING_H_ */
#endif /* !LIBBSD_SYS_BITSTRING_H */

View File

@@ -24,15 +24,48 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __has_include
#define __has_include(x) 1
#endif
#ifndef __has_include_next
#define __has_include_next(x) 1
#endif
#ifdef LIBBSD_OVERLAY
/*
* Some libc implementations do not have a <sys/cdefs.h>, in particular
* musl, try to handle this gracefully.
*/
#if __has_include_next(<sys/cdefs.h>)
#include_next <sys/cdefs.h>
#endif
#else
#if __has_include(<sys/cdefs.h>)
#include <sys/cdefs.h>
#endif
#endif
#ifndef LIBBSD_SYS_CDEFS_H
#define LIBBSD_SYS_CDEFS_H
#ifndef __BEGIN_DECLS
#ifdef __cplusplus
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
#endif
/*
* On non-glibc based systems, we cannot unconditionally use the
* __GLIBC_PREREQ macro as it gets expanded before evaluation.
*/
#ifndef __GLIBC_PREREQ
#define __GLIBC_PREREQ(maj, min) 0
#endif
/*
* Some kFreeBSD headers expect those macros to be set for sanity checks.
*/
@@ -49,6 +82,14 @@
#define LIBBSD_GCC_VERSION 0
#endif
#if LIBBSD_GCC_VERSION >= 0x0405
#define LIBBSD_DEPRECATED(x) __attribute__((deprecated(x)))
#elif LIBBSD_GCC_VERSION >= 0x0301
#define LIBBSD_DEPRECATED(x) __attribute__((deprecated))
#else
#define LIBBSD_DEPRECATED(x)
#endif
#ifndef __dead2
# if LIBBSD_GCC_VERSION >= 0x0207
# define __dead2 __attribute__((__noreturn__))
@@ -114,6 +155,12 @@
# define __bounded__(x, y, z)
#endif
/*
* Return the number of elements in a statically-allocated array,
* __x.
*/
#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
/*
* We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
* require it.

View File

@@ -30,10 +30,14 @@
* $FreeBSD$
*/
#ifndef _SYS_QUEUE_H_
#define _SYS_QUEUE_H_
#ifndef LIBBSD_SYS_QUEUE_H
#define LIBBSD_SYS_QUEUE_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
/*
* This file defines four types of data structures: singly-linked lists,
@@ -691,4 +695,4 @@ struct { \
(head2)->tqh_last = &(head2)->tqh_first; \
} while (0)
#endif /* !_SYS_QUEUE_H_ */
#endif /* !LIBBSD_SYS_QUEUE_H */

138
include/bsd/sys/time.h Normal file
View File

@@ -0,0 +1,138 @@
/* $OpenBSD: time.h,v 1.36 2016/09/12 19:41:20 guenther Exp $ */
/* $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)time.h 8.2 (Berkeley) 7/10/94
*/
#ifdef LIBBSD_OVERLAY
#include_next <sys/time.h>
#else
#include <sys/time.h>
#endif
#ifndef LIBBSD_SYS_TIME_H
#define LIBBSD_SYS_TIME_H
#ifndef TIMEVAL_TO_TIMESPEC
#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
(ts)->tv_sec = (tv)->tv_sec; \
(ts)->tv_nsec = (tv)->tv_usec * 1000; \
}
#endif
#ifndef TIMESPEC_TO_TIMEVAL
#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
(tv)->tv_sec = (ts)->tv_sec; \
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
}
#endif
/* Operations on timevals. */
#ifndef timerclear
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif
#ifndef timerisset
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#endif
#ifndef timercmp
#define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
((tvp)->tv_sec cmp (uvp)->tv_sec))
#endif
#ifndef timeradd
#define timeradd(tvp, uvp, vvp) \
do { \
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
if ((vvp)->tv_usec >= 1000000) { \
(vvp)->tv_sec++; \
(vvp)->tv_usec -= 1000000; \
} \
} while (0)
#endif
#ifndef timersub
#define timersub(tvp, uvp, vvp) \
do { \
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
if ((vvp)->tv_usec < 0) { \
(vvp)->tv_sec--; \
(vvp)->tv_usec += 1000000; \
} \
} while (0)
#endif
/* Operations on timespecs. */
#ifndef timespecclear
#define timespecclear(tsp) (tsp)->tv_sec = (tsp)->tv_nsec = 0
#endif
#ifndef timespecisset
#define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec)
#endif
#ifndef timespeccmp
#define timespeccmp(tsp, usp, cmp) \
(((tsp)->tv_sec == (usp)->tv_sec) ? \
((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
((tsp)->tv_sec cmp (usp)->tv_sec))
#endif
#ifndef timespecadd
#define timespecadd(tsp, usp, vsp) \
do { \
(vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \
(vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \
if ((vsp)->tv_nsec >= 1000000000L) { \
(vsp)->tv_sec++; \
(vsp)->tv_nsec -= 1000000000L; \
} \
} while (0)
#endif
#ifndef timespecsub
#define timespecsub(tsp, usp, vsp) \
do { \
(vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \
(vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \
if ((vsp)->tv_nsec < 0) { \
(vsp)->tv_sec--; \
(vsp)->tv_nsec += 1000000000L; \
} \
} while (0)
#endif
#endif

View File

@@ -27,10 +27,14 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _SYS_TREE_H_
#define _SYS_TREE_H_
#ifndef LIBBSD_SYS_TREE_H
#define LIBBSD_SYS_TREE_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
/*
* This file defines data structures for different types of trees:
@@ -762,4 +766,4 @@ name##_RB_MINMAX(struct name *head, int val) \
((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
(x) = (y))
#endif /* _SYS_TREE_H_ */
#endif /* LIBBSD_SYS_TREE_H */

View File

@@ -38,10 +38,14 @@
* $FreeBSD$
*/
#ifndef _TIMECONV_H_
#define _TIMECONV_H_
#ifndef LIBBSD_TIMECONV_H
#define LIBBSD_TIMECONV_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <stdint.h>
#include <time.h>
@@ -54,4 +58,4 @@ time_t _long_to_time(long tlong);
int _time_to_int(time_t t);
time_t _int_to_time(int tint);
#endif /* _TIMECONV_H_ */
#endif /* LIBBSD_TIMECONV_H */

View File

@@ -1,3 +1,5 @@
/* $NetBSD: vis.h,v 1.25 2017/04/23 01:57:36 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -27,36 +29,44 @@
* SUCH DAMAGE.
*
* @(#)vis.h 8.1 (Berkeley) 6/2/93
* $FreeBSD: src/include/vis.h,v 1.11 2003/10/30 10:40:49 phk Exp $
*/
#ifndef _VIS_H_
#define _VIS_H_
#ifndef LIBBSD_VIS_H
#define LIBBSD_VIS_H
#include <sys/types.h>
/*
* to select alternate encoding format
*/
#define VIS_OCTAL 0x01 /* use octal \ddd format */
#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */
#define VIS_OCTAL 0x0001 /* use octal \ddd format */
#define VIS_CSTYLE 0x0002 /* use \[nrft0..] where appropriate */
/*
* to alter set of characters encoded (default is to encode all
* non-graphic except space, tab, and newline).
*/
#define VIS_SP 0x04 /* also encode space */
#define VIS_TAB 0x08 /* also encode tab */
#define VIS_NL 0x10 /* also encode newline */
#define VIS_SP 0x0004 /* also encode space */
#define VIS_TAB 0x0008 /* also encode tab */
#define VIS_NL 0x0010 /* also encode newline */
#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL)
#define VIS_SAFE 0x20 /* only encode "unsafe" characters */
#define VIS_SAFE 0x0020 /* only encode "unsafe" characters */
#define VIS_DQ 0x8000 /* also encode double quotes */
/*
* other
*/
#define VIS_NOSLASH 0x40 /* inhibit printing '\' */
#define VIS_HTTPSTYLE 0x80 /* http-style escape % HEX HEX */
#define VIS_GLOB 0x100 /* encode glob(3) magics */
#define VIS_NOSLASH 0x0040 /* inhibit printing '\' */
#define VIS_HTTP1808 0x0080 /* http-style escape % hex hex */
#define VIS_HTTPSTYLE 0x0080 /* http-style escape % hex hex */
#define VIS_MIMESTYLE 0x0100 /* mime-style escape = HEX HEX */
#define VIS_HTTP1866 0x0200 /* http-style &#num; or &string; */
#define VIS_NOESCAPE 0x0400 /* don't decode `\' */
#define _VIS_END 0x0800 /* for unvis */
#define VIS_GLOB 0x1000 /* encode glob(3) magic characters */
#define VIS_SHELL 0x2000 /* encode shell special characters [not glob] */
#define VIS_META (VIS_WHITE | VIS_GLOB | VIS_SHELL)
#define VIS_NOLOCALE 0x4000 /* encode using the C locale */
/*
* unvis return codes
@@ -70,19 +80,44 @@
/*
* unvis flags
*/
#define UNVIS_END 1 /* no more characters */
#define UNVIS_END _VIS_END /* no more characters */
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
__BEGIN_DECLS
char *vis(char *, int, int, int);
char *nvis(char *, size_t, int, int, int);
char *svis(char *, int, int, int, const char *);
char *snvis(char *, size_t, int, int, int, const char *);
int strvis(char *, const char *, int);
int stravis(char **, const char *, int);
int strnvis(char *, size_t, const char *, int);
int strsvis(char *, const char *, int, const char *);
int strsnvis(char *, size_t, const char *, int, const char *);
int strvisx(char *, const char *, size_t, int);
int strnvis(char *, const char *, size_t, int);
int strnvisx(char *, size_t, const char *, size_t, int);
int strenvisx(char *, size_t, const char *, size_t, int, int *);
int strsvisx(char *, const char *, size_t, int, const char *);
int strsnvisx(char *, size_t, const char *, size_t, int, const char *);
int strsenvisx(char *, size_t, const char *, size_t , int, const char *,
int *);
int strunvis(char *, const char *);
int strnunvis(char *, size_t, const char *);
int strunvisx(char *, const char *, int);
ssize_t strnunvis(char *, const char *, size_t);
int strnunvisx(char *, size_t, const char *, int);
int unvis(char *, int, int *, int);
__END_DECLS
#endif /* !_VIS_H_ */
#endif /* !LIBBSD_VIS_H */

View File

@@ -40,7 +40,11 @@
#define LIBBSD_WCHAR_H
#include <stddef.h>
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/types.h>
__BEGIN_DECLS

1
man/.gitignore vendored
View File

@@ -1,2 +1 @@
md5.3
md5.3bsd

1
man/LIST_EMPTY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_ENTRY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_FIRST.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_FOREACH.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_HEAD.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_INIT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_NEXT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_PREV.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_REMOVE.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/LIST_SWAP.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -14,50 +14,224 @@ md5.3bsd: $(srcdir)/mdX.3bsd
$(AM_V_GEN) sed $(SED_MD5_SUBST) $< > $@
dist_man_MANS = \
arc4random.3 \
arc4random_addrandom.3 \
arc4random_buf.3 \
arc4random_stir.3 \
arc4random_uniform.3 \
bitstring.3 \
closefrom.3 \
dehumanize_number.3 \
expand_number.3 \
explicit_bzero.3 \
fgetln.3 \
fgetwln.3 \
flopen.3 \
fmtcheck.3 \
fparseln.3 \
LIST_EMPTY.3bsd \
LIST_ENTRY.3bsd \
LIST_FIRST.3bsd \
LIST_FOREACH.3bsd \
LIST_FOREACH_FROM.3bsd \
LIST_FOREACH_FROM_SAFE.3bsd \
LIST_FOREACH_SAFE.3bsd \
LIST_HEAD.3bsd \
LIST_HEAD_INITIALIZER.3bsd \
LIST_INIT.3bsd \
LIST_INSERT_AFTER.3bsd \
LIST_INSERT_BEFORE.3bsd \
LIST_INSERT_HEAD.3bsd \
LIST_NEXT.3bsd \
LIST_PREV.3bsd \
LIST_REMOVE.3bsd \
LIST_SWAP.3bsd \
RB_EMPTY.3bsd \
RB_ENTRY.3bsd \
RB_FIND.3bsd \
RB_FOREACH.3bsd \
RB_FOREACH_REVERSE.3bsd \
RB_GENERATE.3bsd \
RB_GENERATE_STATIC.3bsd \
RB_HEAD.3bsd \
RB_INIT.3bsd \
RB_INITIALIZER.3bsd \
RB_INSERT.3bsd \
RB_LEFT.3bsd \
RB_MAX.3bsd \
RB_MIN.3bsd \
RB_NEXT.3bsd \
RB_NFIND.3bsd \
RB_PARENT.3bsd \
RB_PREV.3bsd \
RB_PROTOTYPE.3bsd \
RB_PROTOTYPE_STATIC.3bsd \
RB_REMOVE.3bsd \
RB_RIGHT.3bsd \
RB_ROOT.3bsd \
SLIST_EMPTY.3bsd \
SLIST_ENTRY.3bsd \
SLIST_FIRST.3bsd \
SLIST_FOREACH.3bsd \
SLIST_FOREACH_FROM.3bsd \
SLIST_FOREACH_FROM_SAFE.3bsd \
SLIST_FOREACH_SAFE.3bsd \
SLIST_HEAD.3bsd \
SLIST_HEAD_INITIALIZER.3bsd \
SLIST_INIT.3bsd \
SLIST_INSERT_AFTER.3bsd \
SLIST_INSERT_HEAD.3bsd \
SLIST_NEXT.3bsd \
SLIST_REMOVE.3bsd \
SLIST_REMOVE_AFTER.3bsd \
SLIST_REMOVE_HEAD.3bsd \
SLIST_SWAP.3bsd \
SPLAY_EMPTY.3bsd \
SPLAY_ENTRY.3bsd \
SPLAY_FIND.3bsd \
SPLAY_FOREACH.3bsd \
SPLAY_GENERATE.3bsd \
SPLAY_HEAD.3bsd \
SPLAY_INIT.3bsd \
SPLAY_INITIALIZER.3bsd \
SPLAY_INSERT.3bsd \
SPLAY_LEFT.3bsd \
SPLAY_MAX.3bsd \
SPLAY_MIN.3bsd \
SPLAY_NEXT.3bsd \
SPLAY_PROTOTYPE.3bsd \
SPLAY_REMOVE.3bsd \
SPLAY_RIGHT.3bsd \
SPLAY_ROOT.3bsd \
STAILQ_CONCAT.3bsd \
STAILQ_EMPTY.3bsd \
STAILQ_ENTRY.3bsd \
STAILQ_FIRST.3bsd \
STAILQ_FOREACH.3bsd \
STAILQ_FOREACH_FROM.3bsd \
STAILQ_FOREACH_FROM_SAFE.3bsd \
STAILQ_FOREACH_SAFE.3bsd \
STAILQ_HEAD.3bsd \
STAILQ_HEAD_INITIALIZER.3bsd \
STAILQ_INIT.3bsd \
STAILQ_INSERT_AFTER.3bsd \
STAILQ_INSERT_HEAD.3bsd \
STAILQ_INSERT_TAIL.3bsd \
STAILQ_LAST.3bsd \
STAILQ_NEXT.3bsd \
STAILQ_REMOVE.3bsd \
STAILQ_REMOVE_AFTER.3bsd \
STAILQ_REMOVE_HEAD.3bsd \
STAILQ_SWAP.3bsd \
TAILQ_CONCAT.3bsd \
TAILQ_EMPTY.3bsd \
TAILQ_ENTRY.3bsd \
TAILQ_FIRST.3bsd \
TAILQ_FOREACH.3bsd \
TAILQ_FOREACH_FROM.3bsd \
TAILQ_FOREACH_FROM_SAFE.3bsd \
TAILQ_FOREACH_REVERSE.3bsd \
TAILQ_FOREACH_REVERSE_FROM.3bsd \
TAILQ_FOREACH_REVERSE_FROM_SAFE.3bsd \
TAILQ_FOREACH_REVERSE_SAFE.3bsd \
TAILQ_FOREACH_SAFE.3bsd \
TAILQ_HEAD.3bsd \
TAILQ_HEAD_INITIALIZER.3bsd \
TAILQ_INIT.3bsd \
TAILQ_INSERT_AFTER.3bsd \
TAILQ_INSERT_BEFORE.3bsd \
TAILQ_INSERT_HEAD.3bsd \
TAILQ_INSERT_TAIL.3bsd \
TAILQ_LAST.3bsd \
TAILQ_NEXT.3bsd \
TAILQ_PREV.3bsd \
TAILQ_REMOVE.3bsd \
TAILQ_SWAP.3bsd \
TIMESPEC_TO_TIMEVAL.3bsd \
TIMEVAL_TO_TIMESPEC.3bsd \
arc4random.3bsd \
arc4random_addrandom.3bsd \
arc4random_buf.3bsd \
arc4random_stir.3bsd \
arc4random_uniform.3bsd \
be16dec.3bsd \
be16enc.3bsd \
be32dec.3bsd \
be32enc.3bsd \
be64dec.3bsd \
be64enc.3bsd \
bit_alloc.3bsd \
bit_clear.3bsd \
bit_decl.3bsd \
bit_ffc.3bsd \
bit_ffs.3bsd \
bit_nclear.3bsd \
bit_nset.3bsd \
bit_set.3bsd \
bit_test.3bsd \
bitstr_size.3bsd \
bitstring.3bsd \
byteorder.3bsd \
closefrom.3bsd \
dehumanize_number.3bsd \
errc.3bsd \
expand_number.3bsd \
explicit_bzero.3bsd \
fgetln.3bsd \
fgetwln.3bsd \
flopen.3bsd \
fmtcheck.3bsd \
fparseln.3bsd \
fpurge.3bsd \
funopen.3bsd \
getbsize.3 \
getmode.3 \
getpeereid.3 \
getprogname.3 \
heapsort.3 \
humanize_number.3 \
getbsize.3bsd \
getmode.3bsd \
getpeereid.3bsd \
getprogname.3bsd \
heapsort.3bsd \
humanize_number.3bsd \
le16dec.3bsd \
le16enc.3bsd \
le32dec.3bsd \
le32enc.3bsd \
le64dec.3bsd \
le64enc.3bsd \
libbsd.7 \
md5.3bsd \
mergesort.3 \
nlist.3 \
pidfile.3 \
mergesort.3bsd \
nlist.3bsd \
pidfile.3bsd \
pidfile_close.3bsd \
pidfile_open.3bsd \
pidfile_remove.3bsd \
pidfile_write.3bsd \
queue.3bsd \
radixsort.3 \
readpassphrase.3 \
reallocarray.3 \
reallocf.3 \
setmode.3 \
setproctitle.3 \
setprogname.3 \
sradixsort.3 \
stringlist.3 \
strlcat.3 \
strlcpy.3 \
strnstr.3 \
strmode.3 \
strtonum.3 \
tree.3 \
unvis.3 \
vis.3 \
wcslcat.3 \
wcslcpy.3 \
radixsort.3bsd \
readpassphrase.3bsd \
reallocarray.3bsd \
reallocf.3bsd \
setmode.3bsd \
setproctitle.3bsd \
setproctitle_init.3bsd \
setprogname.3bsd \
sl_add.3bsd \
sl_delete.3bsd \
sl_find.3bsd \
sl_free.3bsd \
sl_init.3bsd \
sradixsort.3bsd \
stringlist.3bsd \
strlcat.3bsd \
strlcpy.3bsd \
strmode.3bsd \
strnstr.3bsd \
strnunvis.3bsd \
strnvis.3bsd \
strtoi.3bsd \
strtonum.3bsd \
strtou.3bsd \
strunvis.3bsd \
strvis.3bsd \
strvisx.3bsd \
timeradd.3bsd \
timerclear.3bsd \
timercmp.3bsd \
timerisset.3bsd \
timersub.3bsd \
timespecadd.3bsd \
timespecclear.3bsd \
timespeccmp.3bsd \
timespecisset.3bsd \
timespecsub.3bsd \
timeval.3bsd \
tree.3bsd \
unvis.3bsd \
vis.3bsd \
wcslcat.3bsd \
wcslcpy.3bsd \
$(nil)

1
man/RB_EMPTY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_ENTRY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_FIND.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_FOREACH.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_GENERATE.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_HEAD.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_INIT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_INITIALIZER.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_INSERT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_LEFT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_MAX.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_MIN.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_NEXT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_NFIND.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_PARENT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_PREV.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_PROTOTYPE.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_REMOVE.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_RIGHT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/RB_ROOT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SLIST_EMPTY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SLIST_ENTRY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SLIST_FIRST.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SLIST_FOREACH.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SLIST_HEAD.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SLIST_INIT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SLIST_NEXT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SLIST_REMOVE.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SLIST_SWAP.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/SPLAY_EMPTY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_ENTRY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_FIND.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_FOREACH.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_GENERATE.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_HEAD.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_INIT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_INSERT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_LEFT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_MAX.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_MIN.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_NEXT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_PROTOTYPE.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_REMOVE.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_RIGHT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/SPLAY_ROOT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/tree.3bsd

1
man/STAILQ_CONCAT.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

1
man/STAILQ_EMPTY.3bsd Normal file
View File

@@ -0,0 +1 @@
.so man3/queue.3bsd

Some files were not shown because too many files have changed in this diff Show More