Home | History | Annotate | only in /src/share/man/man3
History log of /src/share/man/man3
RevisionDateAuthorComments
 1.6 26-Mar-2025  riastradh cmsg(3): Clarify guarantees about CMSG_SPACE/LEN constancy.

Add some line breaks while here to break up walls of text so it's
easier to compare the two paragraphs and see how CMSG_SPACE is meant
for struct msghdr::msg_controllen and CMSG_LEN is meant for struct
cmsghdr::cmsg_len.

PR lib/59054: cmsg(3) uses malloc(3) unnecessarily
 1.5 08-Feb-2025  riastradh cmsg(3): Handle as many descriptors as the sender sends in example.

Due to a quirk of alignment, sizing the control buffer for
CMSG_SPACE(sizeof(int)) does not guarantee at most one file
descriptor fits in the buffer -- so if there is a chance the sender
may send more than one descriptor, the receiver has to loop over all
of them to avoid leaks.

Prompted by:

PR lib/59054: cmsg(3) uses malloc(3) unnecessarily
 1.4 08-Feb-2025  riastradh cmsg(3): Don't use malloc in example.

Since CMSG_SPACE (and CMSG_LEN) is required to expand to an integer
constant expression by POSIX, and it does in NetBSD as of 2012, there
is no reason to use malloc here -- we can just allocate the buffer on
the stack without tripping over variable-length arrays.

PR lib/59054: cmsg(3) uses malloc(3) unnecessarily
 1.3 24-Jan-2015  christos branches: 1.3.28;
correct CMSG_DATA documentation
 1.2 20-Jun-2008  christos branches: 1.2.2;
and adjust it to our liking.
 1.1 20-Jun-2008  christos steal the OpenBSD man page.
 1.2.2.2 23-Jun-2008  wrstuden Add files to branch that were added on -current.

After this, all that's left of update is to merge some changes
that had conflicts.
 1.2.2.1 20-Jun-2008  wrstuden file CMSG_DATA.3 was added on branch wrstuden-revivesa on 2008-06-23 05:02:12 +0000
 1.3.28.1 02-Aug-2025  perseant Sync with HEAD
 1.94 08-Oct-2024  christos Add man page for container_of
 1.93 15-Aug-2024  riastradh libc: New C11 functions mbrtoc16, mbrtoc32, c16rtomb, c32rtomb.

The mbrtoc16/32 functions read mulitbyte strings according to the
current locale into UTF-16/32 code unit sequences; the c16/32rtomb
functions write UTF-16/32 code unit sequences into multibyte strings
according to the current locale. The `r' means restartable: they
work incrementally and pick up where they left off.

NOTE: This bumps the libc minor version, since it adds new symbols.

PR lib/52374: <uchar.h> missing
 1.92 07-Mar-2024  christos branches: 1.92.2;
Add _dlauxinfo
 1.91 22-Jan-2022  skrll branches: 1.91.2;
Add __MASK(3)

__MASK(n): first n bits all set, where __MASK(4) == 0b1111.
 1.90 13-Jan-2020  kamil Document dlinfo(3)

Man-page taken from FreeBSD.
 1.89 10-Nov-2019  christos Document __FPTRCAST
XXX: more macros need documentation (__CAST etc.)
 1.88 27-Nov-2013  christos branches: 1.88.26;
fix typo
 1.87 27-Nov-2013  christos and a few more.
 1.86 27-Nov-2013  christos forgot one
 1.85 27-Nov-2013  christos Sync queue man pages with queue.h.
 1.84 26-Nov-2013  christos remove CIRCLEQ pages.
 1.83 27-Oct-2013  apb Add man mage links for __debugused(3) and __diagused(3).
 1.82 17-Oct-2013  christos describe the __USE macro
 1.81 07-Dec-2012  christos add __BITMAP_TYPE
 1.80 01-Dec-2012  christos add documentation for the bitmap macros
 1.79 09-Aug-2011  jruoho branches: 1.79.2; 1.79.8;
Add a summary page for <limits.h>.
 1.78 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.77 25-Jun-2011  nonaka PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.
 1.76 19-May-2011  riastradh Add a cmsg.3 man page symlink, since I can never remember its name.

ok wiz
 1.75 12-Apr-2011  jruoho Add a small summary parge for struct tm from <time.h>. Cf. timeval(3).
 1.74 10-Apr-2011  jruoho Add a small summary page for <unistd.h>.
 1.73 08-Apr-2011  jruoho Add also a small summary page for <sys/bitops.h>.
 1.72 08-Apr-2011  jruoho Briefly summarize <sys/param.h>.
 1.71 30-Mar-2011  jruoho Briefly document <paths.h>.
 1.70 19-Mar-2011  jruoho Briefly document __predict_true() and __predict_false().
 1.69 22-Dec-2010  jruoho Document the __builtin_prefetch() GNU extension.
 1.68 21-Dec-2010  jruoho Document the __builtin_types_compatible_p() GNU/GCC extension.
 1.67 19-Dec-2010  jruoho Document __builtin_constant_p().
 1.66 19-Dec-2010  jruoho Document the __builtin_return_address() GNU extension. Again this is well
justified due to the wide use of these non-standard extensions in the tree.
 1.65 19-Dec-2010  jruoho Document the __alignof__ GNU extension.
 1.64 17-Dec-2010  jruoho There is no harm to add a manual page for the GNU typeof()-construct, given
that it has already crawled into the source tree.
 1.63 17-Dec-2010  jruoho Briefly describe __read_mostly and __cachline_aligned.
 1.62 17-Dec-2010  jruoho Add __insn_barrier(3). XXX: Someone more knowledgeable may want to check this.
 1.61 16-Dec-2010  jruoho Document __dead, __pure, __constfunc, __noinline, __unused, and __used.
 1.60 16-Dec-2010  jruoho Now that <sys/cdefs.h> is mostly documented, include a small summary page
for it, cdefs(3).
 1.59 16-Dec-2010  jruoho Start to document the GNU C attributes. For now, only __packed, __aligned,
and __section are documented, but I will keep extending this.
 1.58 14-Dec-2010  jruoho Add a manual page for the makedev(), major(), and minor() macros.

Taken from FreeBSD. Written by Ed Schouten.
 1.57 24-Oct-2010  jruoho Catch-up with code changes.
 1.56 16-Oct-2010  skrll Implement dl_iterate_phdr.

Somewhat taken from FreeBSD. Manual page from OpenBSD.
 1.55 08-Jun-2010  jruoho Document ilog2() from <sys/bitops.h>.
 1.54 19-May-2010  jruoho Add sigevent(3), a manual page that describes the struct sigevent used by
the POSIX real time functions and timers.

XXX: (a) Needs to be modified once real time signals are supported.
(b) Could use an example.
 1.53 18-May-2010  jruoho Describe also the timespec() family of macros in timeradd(3).
 1.52 17-May-2010  jruoho Add a manual page that describes the basic structures in <sys/time.h>.
 1.51 16-May-2010  jruoho As was done with the man-page for <sys/types.h>, move dir(5) to dirent(3).
Add a table describing the stat <-> dirent types. Note IFTODT() and DTTOIF().
 1.50 28-Apr-2010  jruoho Document ffs32(), ffs64(), fls32(), and fls64() from <sys/bitops.h>.
 1.49 22-Apr-2010  jruoho Rewrite types(5) as per perry@'s suggestion from few years back ("XXX this
document is rather musty. It needs a general update."). Also move it to the
right section from section 5. Ok wiz@.

To minimize maintenance costs, the content is mostly jargon around The
Standard. Only few NetBSD-specific types are mentioned as an example.
 1.48 21-Apr-2010  jruoho Document __STRING(x) and __CONCAT(x, y) from <sys/cdefs.h>.
 1.47 13-Apr-2010  jruoho Hook rb(3) to the build.
 1.46 25-Mar-2010  jruoho Document <stdlib.h>.

Written with minimum maintenance costs in mind; only the defined types and
macros are described.
 1.45 21-Mar-2010  jruoho Document the weird <iso646.h>.
 1.44 21-Mar-2010  jruoho Document <inttypes.h>.
 1.43 21-Mar-2010  jruoho While at it, add also stddef(3).
 1.42 21-Mar-2010  jruoho As we have added stdint(3) and tgmath(3), we may as well add stdbool(3).
 1.41 20-Mar-2010  jruoho Add a manual page for <stdint.h>. From FreeBSD, by Mike Barcroft.
 1.40 19-Mar-2010  joerg Add man page for fast_divide32.
 1.39 01-Mar-2010  jruoho Add tgmath(3). From FreeBSD.

XXX: Needs proofreading, Matt?
 1.38 01-Mar-2010  jruoho Document __arraycount.
 1.37 01-Mar-2010  jruoho Document __UNCONST and __UNVOLATILE.

XXX: If there is anything to add or correct, please do so!
 1.36 27-Feb-2010  wiz Add offsetof(3) man page. From Thomas Pfaff via OpenBSD.
 1.35 24-Jan-2010  njoly Do not link timeradd.3 to itself.
 1.34 24-Jan-2010  jruoho Add timeradd(3).
 1.33 04-Apr-2009  perry add missing MLINKS for bitstring.3
 1.32 20-Jun-2008  christos branches: 1.32.2; 1.32.4;
steal the OpenBSD man page.
 1.31 29-Aug-2007  pooka branches: 1.31.6; 1.31.10;
Add table which summarizes operations supported by each queue type.

from Stathis Kamperis in PR misc/36857
 1.30 15-Aug-2007  kiyohara branches: 1.30.2;
Replace to Matthew Orgass's slhci(4).
http://mail-index.netbsd.org/tech-kern/2007/06/26/0001.html
 1.29 31-Aug-2006  dyoung Per discussion on tech-kern and tech-userlevel, move the bit-twiddling
macros, __BIT, __BITS, SHIFTIN, SHIFTOUT, and __arraycount() from
lib/libkern/libkern.h to sys/cdefs.h. Add a __-prefix to SHIFTIN
and SHIFTOUT, and add a manual page for the bit-twiddling macros,
bits(3).

Make the __BIT and __BITS macros "widthless," as best I can, by
changing their type to uintmax_t from uint32_t. XXX The manual
page lags this change by a bit.

Define __PRIxBIT and __PRIxBITS printf(3) format strings.
 1.28 07-Mar-2006  pooka document CIRCLEQ_LOOP
 1.27 30-Sep-2005  rpaulo Add sysexits.3
 1.26 18-Apr-2004  lukem Add MLINKS for:
CIRCLEQ_FOREACH(3) CIRCLEQ_FOREACH_REVERSE(3)
LIST_FOREACH(3)
SIMPLEQ_FOREACH(3)
SLIST_EMPTY(3) SLIST_ENTRY(3) SLIST_FIRST(3) SLIST_FOREACH(3)
SLIST_HEAD(3) SLIST_HEAD_INITIALIZER(3) SLIST_INIT(3)
SLIST_INSERT_AFTER(3) SLIST_INSERT_HEAD(3) SLIST_NEXT(3)
SLIST_REMOVE(3) SLIST_REMOVE_HEAD(3)
STAILQ_EMPTY(3) STAILQ_ENTRY(3) STAILQ_FIRST(3) STAILQ_FOREACH(3)
STAILQ_HEAD(3) STAILQ_HEAD_INITIALIZER(3) STAILQ_INIT(3)
STAILQ_INSERT_AFTER(3) STAILQ_INSERT_HEAD(3) STAILQ_INSERT_TAIL(3)
STAILQ_NEXT(3) STAILQ_REMOVE(3) STAILQ_REMOVE_HEAD(3)
TAILQ_FOREACH(3) TAILQ_FOREACH_REVERSE(3) TAILQ_LAST(3) TAILQ_PREV(3)
 1.25 07-Jul-2003  yamt tree(3) manpage from OpenBSD.
 1.24 01-Jun-2002  lukem SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field). whilst it's O(n),
this mirrors the functionality of SLIST_REMOVE() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
 1.23 04-Feb-2002  kleink Add a separate varargs(3) manual page, reusing stdarg(3) contents, and
remove the name `varargs' from stdarg(3); inspired by conversation with
Charles Hannum.
 1.22 22-Oct-2001  lukem install all the macro links to queue.3 using the correct UPPER_CASE name
 1.21 03-Jan-2001  lukem add manual page for _DIAGASSERT(3)
 1.20 03-Aug-2000  ad PCVT is dead. From NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>.
 1.19 27-May-2000  mycroft branches: 1.19.2;
Document *_EMPTY().
 1.18 03-Feb-2000  kleink branches: 1.18.2;
Document va_copy.
 1.17 28-Jun-1999  ad Add missing link for dladdr.3
 1.16 16-Mar-1999  mycroft Oops; missed one.
 1.15 14-Mar-1999  mycroft Add missing links for queue.3.
 1.14 11-Oct-1997  mycroft Use bsd.man.mk and bsd.subdir.mk as appropriate.
 1.13 30-Sep-1997  christos PR/4126: Luke Mewburn: queue(3) doesn't document SIMPLEQ_*
 1.12 24-Jun-1997  mikel SUBDIR must be set *before* including bsd.*.mk
 1.11 23-Jun-1997  mrg move man pages into share/man.
 1.10 06-Oct-1995  thorpej Fix typo: dclose.3 -> dlclose.3
 1.9 01-Oct-1995  pk Install dlfcn.3 and links.
 1.8 22-Dec-1994  cgd specify man pages the new way.
 1.7 30-Nov-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.6 06-Oct-1994  mycroft Add more links for queue.h.
 1.5 21-Dec-1993  cgd queue.h from 4.4, from Bostic
 1.4 30-Oct-1993  mycroft Add links for va_arg.3, va_end.3, va_start.3, per G.Wollman's suggestion.
 1.3 31-Jul-1993  mycroft Add RCS indentifiers.
 1.2 26-Apr-1993  mycroft Once more, don't make `all' depend on man page; bsd.prog.mk does this.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 30-Nov-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.18.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.19.2.1 08-Sep-2000  ad Pull up revision 1.20 (approved by releng-1-5):
PCVT is dead.
 1.30.2.1 06-Nov-2007  matt sync with HEAD
 1.31.10.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.31.6.1 29-Jun-2008  mjf Sync with HEAD.
 1.32.4.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.32.2.1 17-Mar-2012  bouyer Pull up following revision(s) via patch (requested by skrll in ticket #1724):
rescue/list.ldd: revision 1.4
lib/libc/dlfcn/dlfcn_elf.c: revision 1.7
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.57
distrib/sets/lists/comp/mi: revision 1.1512
share/man/man3/Makefile: revision 1.56
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.58
usr.bin/ldd/ldd.c: revision 1.15
libexec/ld.elf_so/rtld.h: revision 1.84
share/man/man3/dl_iterate_phdr.3: revision 1.1
libexec/ld.elf_so/rtld.c: revision 1.129
libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.44
libexec/ld.elf_so/rtld.h: revision 1.89
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.36
libexec/ld.elf_so/map_object.c: revision 1.41
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.37
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.46
include/link_elf.h: revision 1.10
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.29
libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.26
libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.34
libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.31
libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.35
libexec/ld.elf_so/Makefile: revision 1.94
libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.32
libexec/ld.elf_so/Makefile: revision 1.95
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.31
libexec/ld.elf_so/Makefile: revision 1.96
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.32
libexec/ld.elf_so/reloc.c: revision 1.98
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.33
sys/sys/exec_elf.h: revision 1.106
libexec/ld.elf_so/rtld.c: revision 1.130
libexec/ld.elf_so/load.c: revision 1.37
libexec/ld.elf_so/rtld.c: revision 1.131
libexec/ld.elf_so/load.c: revision 1.38
libexec/ld.elf_so/rtld.h: revision 1.90
libexec/ld.elf_so/headers.c: revision 1.36
libexec/ld.elf_so/rtld.h: revision 1.95
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.30
libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.25
libexec/ld.elf_so/symbol.c: revision 1.50
libexec/ld.elf_so/symbol.c: revision 1.51
libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.43
libexec/ld.elf_so/symbol.c: revision 1.52
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.27
libexec/ld.elf_so/symbol.c: revision 1.54
PR/39240: Satoshi Suetake: Don't fail when attempting to resolve weak symbols
when we are doing immediate binding, leave them alone and they will be dealt
with later during lazy binding. From skrll@
Implement negative cache checks for symbol lookups.
Uses the Donelist idea from FreeBSD.
Use alloca(3) instead of local xmalloc for creating our DoneLists.
This allows threaded programs to use us a little better, PR lib/43005.
Implement dl_iterate_phdr.
Somewhat taken from FreeBSD. Manual page from OpenBSD.
 1.79.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.79.8.1 25-Feb-2013  tls resync with head
 1.79.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.79.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.88.26.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.88.26.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.91.2.1 14-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #976):

lib/libc/locale/c32rtomb.3: revision 1.10
lib/libc/locale/c32rtomb.3: revision 1.9
lib/libc/locale/c32rtomb.3: revision 1.11
tests/lib/libc/locale/t_mbrtoc32.c: revision 1.1
distrib/sets/lists/base/shl.mi: revision 1.988
lib/libc/include/namespace.h: revision 1.204
lib/libc/include/namespace.h: revision 1.205
lib/libc/locale/mbrtoc16.3: revision 1.1
lib/libc/locale/mbrtoc16.c: revision 1.1
lib/libc/locale/mbrtoc16.3: revision 1.2
lib/libc/locale/mbrtoc16.c: revision 1.2
lib/libc/locale/mbrtoc16.3: revision 1.3
lib/libc/locale/mbrtoc16.c: revision 1.3
lib/libc/locale/mbrtoc32.3: revision 1.1
lib/libc/locale/mbrtoc32.c: revision 1.1
tests/lib/libc/locale/t_c16rtomb.c: revision 1.1
lib/libc/locale/mbrtoc32.c: revision 1.2
lib/libc/locale/mbrtoc16.3: revision 1.4
lib/libc/locale/mbrtoc16.c: revision 1.4
lib/libc/locale/mbrtoc32.3: revision 1.2
tests/lib/libc/locale/t_c16rtomb.c: revision 1.2
lib/libc/locale/mbrtoc32.c: revision 1.3
lib/libc/locale/mbrtoc16.3: revision 1.5
lib/libc/locale/mbrtoc16.c: revision 1.5
lib/libc/locale/mbrtoc32.3: revision 1.3
tests/lib/libc/locale/t_c16rtomb.c: revision 1.3
lib/libc/locale/mbrtoc32.c: revision 1.4
lib/libc/locale/mbrtoc16.3: revision 1.6
lib/libc/locale/mbrtoc16.c: revision 1.6
lib/libc/locale/mbrtoc32.3: revision 1.4
tests/lib/libc/locale/t_c16rtomb.c: revision 1.4
lib/libc/locale/mbrtoc32.c: revision 1.5
lib/libc/locale/mbrtoc16.3: revision 1.7
lib/libc/locale/mbrtoc16.c: revision 1.7
lib/libc/locale/mbrtoc32.3: revision 1.5
tests/lib/libc/locale/t_c16rtomb.c: revision 1.5
lib/libc/locale/mbrtoc32.c: revision 1.6
lib/libc/locale/mbrtoc16.3: revision 1.8
lib/libc/locale/mbrtoc32.3: revision 1.6
tests/lib/libc/locale/t_c16rtomb.c: revision 1.6
lib/libc/locale/mbrtoc32.c: revision 1.7
lib/libc/locale/mbrtoc16.3: revision 1.9
lib/libc/locale/mbrtoc32.3: revision 1.7
lib/libc/locale/mbrtoc32.c: revision 1.8
lib/libc/locale/mbrtoc32.3: revision 1.8
lib/libc/locale/mbrtoc32.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.2468
lib/libc/locale/mbrtoc32.3: revision 1.9
distrib/sets/lists/comp/mi: revision 1.2469
lib/libc/locale/c32rtomb.h: revision 1.1
lib/libc/locale/c32rtomb.h: revision 1.2
include/Makefile: revision 1.147
share/man/man3/uchar.3: revision 1.1
share/man/man3/uchar.3: revision 1.2
tests/lib/libc/locale/t_c32rtomb.c: revision 1.1
distrib/sets/lists/comp/mi: revision 1.2470
lib/libc/locale/c16rtomb.3: revision 1.1
lib/libc/locale/c16rtomb.c: revision 1.1
lib/libc/locale/c16rtomb.3: revision 1.2
lib/libc/locale/c16rtomb.c: revision 1.2
lib/libc/locale/c16rtomb.3: revision 1.3
lib/libc/locale/c16rtomb.c: revision 1.3
lib/libc/locale/c16rtomb.3: revision 1.4
lib/libc/locale/c16rtomb.c: revision 1.4
lib/libc/locale/c16rtomb.3: revision 1.5
lib/libc/locale/c16rtomb.c: revision 1.5
lib/libc/locale/c16rtomb.3: revision 1.6
lib/libc/locale/c16rtomb.c: revision 1.6
lib/libc/locale/c16rtomb.3: revision 1.7
lib/libc/locale/c16rtomb.c: revision 1.7
lib/libc/locale/c16rtomb.3: revision 1.8
lib/libc/locale/c16rtomb.3: revision 1.9
distrib/sets/lists/tests/mi: revision 1.1330
distrib/sets/lists/tests/mi: revision 1.1331
distrib/sets/lists/tests/mi: revision 1.1332
tests/lib/libc/locale/t_uchar.c: revision 1.1
tests/lib/libc/locale/t_uchar.c: revision 1.2
tests/lib/libc/locale/t_uchar.c: revision 1.3
tests/lib/libc/locale/t_mbrtoc16.c: revision 1.1
tests/lib/libc/locale/t_mbrtoc16.c: revision 1.2
tests/lib/libc/locale/t_mbrtoc16.c: revision 1.3
include/uchar.h: revision 1.1
include/uchar.h: revision 1.2
include/uchar.h: revision 1.3
include/uchar.h: revision 1.4
include/uchar.h: revision 1.5
tests/lib/libc/locale/t_c8rtomb.c: revision 1.1
include/uchar.h: revision 1.6
tests/lib/libc/locale/t_c8rtomb.c: revision 1.2
tests/lib/libc/locale/t_c8rtomb.c: revision 1.3
tests/lib/libc/locale/t_c8rtomb.c: revision 1.4
share/man/man3/Makefile: revision 1.93
tests/lib/libc/locale/t_c8rtomb.c: revision 1.5
tests/lib/libc/locale/t_c8rtomb.c: revision 1.6
tests/lib/libc/locale/t_c8rtomb.c: revision 1.7
lib/libc/shlib_version: revision 1.297
lib/libc/locale/c16rtomb.3: revision 1.10
lib/libc/locale/c16rtomb.3: revision 1.11
tests/lib/libc/locale/t_mbrtoc8.c: revision 1.1
tests/lib/libc/locale/t_mbrtoc8.c: revision 1.2
tests/lib/libc/locale/t_mbrtoc8.c: revision 1.3
lib/libc/locale/mbrtoc16.3: revision 1.10
tests/lib/libc/locale/Makefile: revision 1.15
tests/lib/libc/locale/Makefile: revision 1.16
tests/lib/libc/locale/Makefile: revision 1.17
tests/lib/libc/locale/Makefile: revision 1.18
distrib/sets/lists/debug/mi: revision 1.442
distrib/sets/lists/debug/mi: revision 1.443
distrib/sets/lists/debug/mi: revision 1.444
lib/libc/locale/c8rtomb.3: revision 1.1
lib/libc/locale/c8rtomb.c: revision 1.1
lib/libc/locale/c8rtomb.3: revision 1.2
lib/libc/locale/c8rtomb.c: revision 1.2
lib/libc/locale/c8rtomb.3: revision 1.3
lib/libc/locale/c8rtomb.c: revision 1.3
lib/libc/locale/c8rtomb.3: revision 1.4
lib/libc/locale/c8rtomb.c: revision 1.4
lib/libc/locale/c8rtomb.3: revision 1.5
lib/libc/locale/c8rtomb.c: revision 1.5
lib/libc/locale/c8rtomb.3: revision 1.6
lib/libc/locale/c8rtomb.c: revision 1.6
lib/libc/locale/c8rtomb.3: revision 1.7
lib/libc/locale/c8rtomb.3: revision 1.8
lib/libc/locale/c8rtomb.3: revision 1.9
lib/libc/locale/mbrtoc32.h: revision 1.1
lib/libc/locale/mbrtoc32.h: revision 1.2
lib/libc/locale/mbrtoc8.c: revision 1.1
lib/libc/locale/mbrtoc8.3: revision 1.1
lib/libc/locale/mbrtoc8.c: revision 1.2
lib/libc/locale/mbrtoc8.3: revision 1.2
lib/libc/locale/mbrtoc8.c: revision 1.3
lib/libc/locale/mbrtoc8.3: revision 1.3
lib/libc/locale/mbrtoc8.c: revision 1.4
lib/libc/locale/mbrtoc8.3: revision 1.4
lib/libc/locale/Makefile.inc: revision 1.66
lib/libc/locale/mbrtoc8.c: revision 1.5
lib/libc/locale/mbrtoc8.3: revision 1.5
lib/libc/locale/Makefile.inc: revision 1.67
lib/libc/locale/mbrtoc8.c: revision 1.6
lib/libc/locale/mbrtoc8.3: revision 1.6
lib/libc/locale/mbrtoc8.c: revision 1.7
lib/libc/locale/mbrtoc8.3: revision 1.7
lib/libc/locale/mbrtoc8.c: revision 1.8
lib/libc/locale/c32rtomb.3: revision 1.1
lib/libc/locale/c32rtomb.c: revision 1.1
lib/libc/locale/c32rtomb.3: revision 1.2
lib/libc/locale/c32rtomb.c: revision 1.2
lib/libc/locale/c32rtomb.3: revision 1.3
lib/libc/locale/c32rtomb.c: revision 1.3
lib/libc/locale/c32rtomb.3: revision 1.4
lib/libc/locale/c32rtomb.c: revision 1.4
lib/libc/locale/c32rtomb.3: revision 1.5
lib/libc/locale/c32rtomb.c: revision 1.5
lib/libc/locale/c32rtomb.3: revision 1.6
lib/libc/locale/c32rtomb.c: revision 1.6
lib/libc/locale/c32rtomb.3: revision 1.7
lib/libc/locale/c32rtomb.3: revision 1.8

(all via patch)


tests/lib/libc/locale/Makefile: Sort.
No functional change intended.
Preparation for PR lib/52374.

uchar.h: New header file for C11 (and C++11) compliance.

Implementation of the new functions mbrtoc16, c16rtomb, mbrtoc32, and
c32rtomb to come later. Updates for C23 to come later.
PR lib/52374: <uchar.h> missing

libc: New C11 functions mbrtoc16, mbrtoc32, c16rtomb, c32rtomb.

The mbrtoc16/32 functions read mulitbyte strings according to the
current locale into UTF-16/32 code unit sequences; the c16/32rtomb
functions write UTF-16/32 code unit sequences into multibyte strings
according to the current locale. The `r' means restartable: they
work incrementally and pick up where they left off.

NOTE: This bumps the libc minor version, since it adds new symbols.

PR lib/52374: <uchar.h> missing
mbrtoc16(3), mbrtoc32(3): Fix \n in man page examples.
Need to write \en to pacify roff.
PR lib/52374: <uchar.h> missing

c16rtomb(3), c32rtomb(3): Fix more \n in man pages.
Also, tighten an assertion: we left room for a NUL byte at the end.
PR lib/52374: <uchar.h> missing

libc: Use the more idiomatic alignof from stdalign.h.
No functional change intended.
PR lib/52374: <uchar.h> missing

mbrtoc16(3): Simplify surrogate state test.

Turn the finer-grained test into an assertion.
No semantic change intended: we are supposed to control this state,
and we always arrange it this way. (But in principle this could
change the behaviour of buggy programs that violate the mbstate_t
abstraction.)
PR lib/52374: <uchar.h> missing

libc: New functions c8rtomb(3) and mbrtoc8(3).

New in C23, for converting from UTF-8 to locale-dependent multibyte
sequences (c8rtomb) or vice versa (mbrtoc8), along with the new type
char8_t.

Conditional on either:
- _NETBSD_SOURCE
- _ISOC23_SOURCE
- __STDC_VERSION__ >= 202311L
(Riding the libc minor bump from this morning for the UTF-16/UTF-32
versions from C11.)

PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb
libc: c32rtomb and mbrtoc32 are used internally, so weak-alias them.
PR lib/52374: <uchar.h> missing
c8rtomb(3), mbrtoc8(3): Use namespace.h to get private aliases.

This way applications defining the symbols c32rtomb or mbrtoc32 won't
clobber our private definitions, which are slightly more constrained
about their use of mbstate_t than is obvious from the interface
contract.

PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb
mbrtoc16(3), mbrtoc32(3): brush up markup

Split long .Fn lines into Fo/Fa/Fc. Dont indent the list of return
values. Don't use artisanal -width.

Untabify code examples - indented literal displays don't have correct
tab stops consistent with tab stops in the fixed font code, so the
lines end up misaligned in the PostScript output.

c16rtomb(3), c32rtomb(3): brush up markup

mbrtoc16(3), mbrtoc32(3): Simplify return value language.
Also expand BMP only once.
PR lib/52374: <uchar.h> missing

mbrtoc16(3), mbrtoc32(3): No state overlap with mbrtoc8 or c8rtomb.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc32(3): Clarify control flow.
No need for another goto here; let's keep it clearly structured with
a single `out' label.
No functional change intended.
PR lib/52374: <uchar.h> missing

c8rtomb(3), mbrtoc8(3): brush up markup

mbrtoc8(3): Simplify return value language.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

c16rtomb(3), c32rtomb(3): Specify what happens if ps is null.
PR lib/52374: <uchar.h> missing

c8rtomb(3): Specify what happens when ps is null.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

c16rtomb(3), c32rtomb(3): No state overlap with mbrtoc8 or c8rtomb.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc16(3), mbrtoc32(3): Work on deturgidifying prose.
Still maybe not great but at least there's less jargon in most of the
text, without really losing any content.
PR lib/52374: <uchar.h> missing

mbrtoc8(3): Work on deturgidifying prose.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc16(3), mbrtoc32(3): Restore word accidentally removed.
PR lib/52374: <uchar.h> missing

mbrtoc8(3): Restore word accidentally removed.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

c8rtomb(3): Fix possible error descriptions.
The argument c8 can't be a surrogate code point itself (they're in
the range [0xd800,0xdfff], beyond 8-bit values), but the bits of a
surrogate code point could be forced into the UTF-8 format, which is
also invalid.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

c16rtomb(3), c32rtomb(3): Attempt a deturgidification pass.
Limit the jargon around surrogates.
PR lib/52374: <uchar.h> missing

c8rtomb(3): Clarify prose and fix example in caveat.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb
c16rtomb(3), c32rtomb(3), mbrtoc16(3), mbrtoc32(3): xref c8 versions.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc16(3): Clarify how many bytes are consumed in special cases.
Fix overlap in RETURN VALUES section.
PR lib/52374: <uchar.h> missing

mbrtoc8(3): Clarify how many bytes are consumed in special cases.
Fix overlap in RETURN VALUES section.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

pass lint, XXX see lint bug.

libc: Add _l variants of the cNrtomb and mbrtocN functions.
These accept an explicit locale parameter, rather than using the
current locale.
Visible under _NETBSD_SOURCE, not exposed otherwise.
NOTE: This adds libc symbols. Riding the libc minor bump for the
non-_l variants of these from two days ago -- hope that's not pushing
it too far.
PR lib/58613: c*rtomb, mbrtoc* should have locale-parametric _l
variants

c8rtomb(3), c16rtomb(3): Add tests for incomplete NUL termination.
PR lib/58615: incomplete c8rtomb, c16rtomb handles NUL termination
wrong

c8rtomb(3), c16rtomb(3): Fix NUL handling.
PR lib/58615: incomplete c8rtomb, c16rtomb handles NUL termination
wrong

c8rtomb(3), c16rtomb(3), c32rtomb(3): Test stateful shift sequences.
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

c8rtomb(3): Fix digit error in shift sequence test.
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

c8rtomb(3): Nix __CTASSERT after case label.
I put this in to make it (machine-verifiably) clear that zeroing the
state is the same as returning to the initial conversion state, as
the standard requires, but this is causing build trouble (and will
likely cause more trouble if pulled up) because some definitions of
__CTASSERT make a declaration which is forbidden after a label, so
let's remove it.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc8(3): Fix pasto in comment at top.
No functional change intended.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc8: remove lint-specific workarounds
No binary change.

mbrtoc8: fix comments

mbrtoc16, mbrtoc32: fix comments, remove lint-specific workarounds
No binary change.
t_c8rtomb, t_c16rtomb: Simplify comment.
ESC $ B is technically rather the JIS X 0208-1983 shift sequence, but
since I don't see any way to provoke the JIS X 0208-1978 shift
sequence to come flying out of this conversion (ESC $ @), and I'm not
sure there's any difference in the interpretation, let's just say JIS
X 0208.
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

c32rtomb(3): Use conversion state to handle shift sequences.
For conversion of Unicode scalar values to coding systems requiring
shift sequences, such as ISO-2022-JP, _citrus_iconv_convert will
always produce:
1. a shift sequence from the initial state to some nondefault state,
like from US-ASCII to JIS X 0208
2. the encoding of the desired characater
3. a shift sequence restoring the initial state
This is unnecessary if the output is already in the state needed to
encoded the desired character. For example, this method produces
seven bytes to encode each YEN SIGN in ISO-2022-JP -- and fourteen,
to encode two consecutive ones -- even though the shift sequence is
only three bytes long and once shifted YEN SIGN takes only one byte.
Instead, convert the Unicode scalar value to a locale-dependent wide
character and encode that, by composing
- _citrus_iconv_convert
=> gives us a multibyte encoding of the character from the initial
state (and restoring the initial state afterward)
- mbrtowc with initial conversion state
=> gives us the single wide character representation
XXX If combining characters are possible here, this may fail.
- wcrtomb with caller's conversion tsate
=> gives us a state-dependent multibyte encoding of the character
XXX Is there a cheaper way to convert from Unicode scalar value to
locale-dependent wide character? It is not obvious to me from the
largely undocumented Citrus machinery, but it would obviously be
better than this somewhat circuitous Rube Goldberg contraption of
chained multibyte APIs.
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

mbrtoc8(3), mbrtoc16(3): Test consuming shift sequences with state.
This has the side effect of testing mbrtoc32(3) because they are both
defined in terms of it.
PR lib/58618: mbrtocN(3) fails to keep shift state

c8rtomb(3), c16rtomb(3), c32rtomb(3): Suggest MB_LEN_MAX in example.
This way it avoids variable-length arrays, by always allocating the
maximum space that could be occupied by MB_CUR_MAX.

mbrtoc32(3): Use conversion state to handle shift sequences.
PR lib/58618: mbrtocN(3) fails to keep shift state

mbrtoc32(3): Fix name and type of mbrtowc_l return value.
This was from `int mbtowc_l(...)' in an earlier draft and I didn't
update it to size_t when I changed the draft to mbrtowc_l. Caught by
lint.
`mb_len' avoids (harmless) clash with standard C function mblen(3).
PR lib/58618: mbrtocN(3) fails to keep shift state

c32rtomb(3): Fix type of wcrtomb_l return value.
This was from `int wctomb_l(...)' in an earlier draft and I didn't
update it to size_t when I changed the draft to wcrtomb_l. Caught by
lint.
`wc_len' mirrors `mb_len' in the complementary code in mbrtoc32(3) to
avoid clash with standard C function mblen(3).
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

c8rtomb(3), c16rtomb(3), c32rtomb(3): Attempt to simplify language.

c8rtomb(3), c16rtomb(3), c32rtomb(3): Fix null string output case.
This ignores c8/c16/c32, produces no output anywhere, and just resets
ps to the initial conversion state.
Also just use 0 in the example, not '\0' or L'\0'. This works for
C11, which prefers '\0' and L'\0', for and C23, which introduced the
new u8'\0', u'\0' (UTF-16), and U'\0' (UTF-32).
c16rtomb, c32rtomb, mbrtoc8: fix page numbers in comments
mbrtoc8(3), mbrtoc16(3), mbrtoc32(3): Say 0 for zero code unit.
Rather than deal with differences between C11 and C23 in notation,
'\0' vs L'\0' vs u8'\0' vs u'\0' vs U'\0'.
uchar.h: Include <sys/featuretest.h> before testing _*_SOURCE.
PR lib/58752: various header files test _*_SOURCE macros but don't
include sys/featuretest.h
PR lib/52374: <uchar.h> missing

uchar.h: Need <sys/cdefs.h> for __restrict.
PR lib/52374: <uchar.h> missing

uchar.h: Simplify __cpp_char8_t and __cplusplus conditionals.
No functional change intended.
PR lib/52374: <uchar.h> missing

tests/lib/libc/locale/t_uchar: Test for char8_t, mbrtoc8, c8rtomb.
PR lib/58752: various header files test _*_SOURCE macros but don't
include sys/featuretest.h
PR lib/52374: <uchar.h> missing

tests/t_uchar: fix copy-and-paste typo
 1.92.2.1 02-Aug-2025  perseant Sync with HEAD
 1.8 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.7 22-Jan-2007  jdc branches: 1.7.10; 1.7.12;
Add additional cross-references (from Slava Semushin).
 1.6 27-Jun-2003  lukem The actual environment variable is `LIBC_DIAGASSERT' not `LIBC_DIAGNOSTIC'.
Spotted by Nathan Williams < nathanw @ >.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 24-Jun-2001  wiz Typo/whitespace fix.
 1.2 03-Jan-2001  lukem remove unnecessary duplication
 1.1 03-Jan-2001  lukem add manual page for _DIAGASSERT(3)
 1.7.12.1 18-May-2008  yamt sync with head.
 1.7.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 17-Oct-2013  wiz Remove trailing whitespace.
 1.7 17-Oct-2013  christos add non-portability caveat.
 1.6 16-Dec-2010  jruoho branches: 1.6.6; 1.6.12;
Xref cdefs(3).
 1.5 13-May-2010  joerg \\ -> \e
 1.4 13-May-2010  joerg Reorder prologue
 1.3 21-Apr-2010  wiz Fix an xref and change word order slightly so it sounds better to me.
 1.2 21-Apr-2010  jruoho Fix a roff warning.
 1.1 21-Apr-2010  jruoho Document __STRING(x) and __CONCAT(x, y) from <sys/cdefs.h>.
 1.6.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 11-Nov-2019  wiz branches: 1.2.4;
Make a sentence easier to read, and fix some nits.
 1.1 10-Nov-2019  christos Document __FPTRCAST
XXX: more macros need documentation (__CAST etc.)
 1.2.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.1 11-Nov-2019  martin file __FPTRCAST.3 was added on branch phil-wifi on 2020-04-13 08:03:25 +0000
 1.7 17-Oct-2013  wiz Remove trailing whitespace.
 1.6 17-Oct-2013  christos add non-portability caveat.
 1.5 16-Dec-2010  jruoho branches: 1.5.6; 1.5.12;
Xref cdefs(3).
 1.4 13-May-2010  joerg Reorder prologue
 1.3 02-Mar-2010  jruoho As per suggestions from mrg@, improve the lead paragraph and stress that
these macros are not recommended. Also remove the example as it feels a
little frivolous and takes too much space.
 1.2 01-Mar-2010  wiz Sort SEE ALSO. Remove unnecessary Pp.
 1.1 01-Mar-2010  jruoho Document __UNCONST and __UNVOLATILE.

XXX: If there is anything to add or correct, please do so!
 1.5.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 17-Oct-2013  jnemeth branches: 1.2.4; 1.2.8;
- DPRINTF(("val is %d\n", val)); -> DPRINTF(("val is %d\n", var));
- mdoclint:
- .Nd should not end with period
- remove trailing spaces
 1.1 17-Oct-2013  christos describe the __USE macro
 1.2.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 17-Oct-2013  tls file __USE.3 was added on branch tls-maxphys on 2014-08-20 00:02:34 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 17-Oct-2013  yamt file __USE.3 was added on branch yamt-pagecache on 2014-05-22 11:37:50 +0000
 1.5 14-Apr-2011  wiz No need to use \*[q], use plain double quotes instead.
 1.4 20-Dec-2010  jruoho A small clarification in the example.
 1.3 19-Dec-2010  wiz Uppercase Dt argument, use \e for backslashes.
 1.2 19-Dec-2010  jruoho A small fix.
 1.1 19-Dec-2010  jruoho Document the __alignof__ GNU extension.
 1.7 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.6 16-Dec-2010  jruoho branches: 1.6.38;
Xref cdefs(3).
 1.5 13-May-2010  joerg Reorder prologue
 1.4 02-Mar-2010  jruoho Speak about typical instead of possible usage in the example.
 1.3 01-Mar-2010  wiz Uppercase Dt, make HTML-ready.
 1.2 01-Mar-2010  jruoho Use buf[BUFSIZE] instead of *buf[BUFSIZE] in the example.
 1.1 01-Mar-2010  jruoho Document __arraycount.
 1.6.38.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.2 19-Dec-2010  jruoho Fix xref.
 1.1 19-Dec-2010  jruoho Document __builtin_constant_p().
 1.4 07-Sep-2024  rillig man: convert some URLs to https
 1.3 22-Dec-2010  wiz branches: 1.3.58;
Fix Fn arguments.
 1.2 22-Dec-2010  jruoho Fix URL of the paper.
 1.1 22-Dec-2010  jruoho Document the __builtin_prefetch() GNU extension.
 1.3.58.1 02-Aug-2025  perseant Sync with HEAD
 1.1 19-Dec-2010  jruoho Document the __builtin_return_address() GNU extension. Again this is well
justified due to the wide use of these non-standard extensions in the tree.
 1.2 22-Dec-2010  wiz Remove superfluous Pp.
 1.1 21-Dec-2010  jruoho Document the __builtin_types_compatible_p() GNU/GCC extension.
 1.4 13-Nov-2017  wiz Remove Tn.
 1.3 12-Nov-2017  riastradh Replace xref mb(9) by xref membar_ops(3).
 1.2 02-Jan-2011  jruoho Xref __insn_barrier(3) and mb(9) with each other.
 1.1 17-Dec-2010  jruoho Add __insn_barrier(3). XXX: Someone more knowledgeable may want to check this.
 1.14 01-Jun-2016  pgoyette Fix AT&T version reference. From PR misc/49519
 1.13 23-Jan-2007  wiz Sort SEE ALSO.
 1.12 22-Jan-2007  jdc Add additional cross-references (from Slava Semushin).
 1.11 09-Jan-2005  snj Kill an unnecessary argument to Nm.
 1.10 08-Sep-2003  wiz Use St -isoC-9X instead of St -isoC9X, to be in sync with groff.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.6 19-Dec-2000  kleink C99: Print the name of the function enclosing the assertion, if possible.
 1.5 30-Nov-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.4 16-Dec-1993  jtc Use -DNDEBUG, not -NDEBUG to disable assertions.
 1.3 01-Aug-1993  mycroft Add RCS indentifiers.
 1.2 16-Jun-1993  jtc Make assert macro ansi complient.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 30-Nov-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.18 14-Sep-2018  christos PR/53608: Ian Bruene: document __{printf,syslog}like.
 1.17 14-Sep-2018  joerg __dead functions can not return, which is different from not returning a
value.
 1.16 21-Apr-2014  riastradh branches: 1.16.22; 1.16.24;
Fix note on __predict_true: predicts nonzero, not 1 specifically.
 1.15 25-Oct-2013  wiz branches: 1.15.2;
Whitespace; better macro.
 1.14 25-Oct-2013  apb Use markup in the descriptions of __diagused and __debugused.
 1.13 25-Oct-2013  apb Document __diagused and __debugused
 1.12 25-Oct-2013  apb Try to make this more compiler-neutral, and give both GCC and LLVM/Clang
as examples.
 1.11 18-Sep-2011  jym branches: 1.11.2; 1.11.4; 1.11.8;
typo: prefict -> predict
 1.10 19-Mar-2011  jruoho Briefly document __predict_true() and __predict_false().
 1.9 19-Dec-2010  jruoho Document the __alignof__ GNU extension.
 1.8 17-Dec-2010  jruoho Note that the previous are available only for the kernel.
 1.7 17-Dec-2010  jruoho Briefly describe __read_mostly and __cachline_aligned.
 1.6 16-Dec-2010  jruoho Reference __builtin_object_size(3) and attribute(3) with each other.
 1.5 16-Dec-2010  jruoho Document __dead, __pure, __constfunc, __noinline, __unused, and __used.
 1.4 16-Dec-2010  jruoho Paraphrase slightly.
 1.3 16-Dec-2010  jruoho Xref cdefs(3).
 1.2 16-Dec-2010  jruoho Remove extra .Pp before wizd(8) beats me.
 1.1 16-Dec-2010  jruoho Start to document the GNU C attributes. For now, only __packed, __aligned,
and __section are documented, but I will keep extending this.
 1.11.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.4.1 29-Sep-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1127):
share/man/man3/attribute.3: revision 1.16
Fix note on __predict_true: predicts nonzero, not 1 specifically.
 1.11.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.2.1 10-Aug-2014  tls Rebase.
 1.16.24.1 10-Jun-2019  christos Sync with HEAD
 1.16.22.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.12 08-Mar-2018  wiz Bump date for previous.
 1.11 08-Mar-2018  martin __BITMAP_ZERO() only takes the pointer to the bitmap as an argument
 1.10 03-Jul-2017  wiz branches: 1.10.4;
Remove workaround for ancient HTML generation code.
 1.9 18-Mar-2014  riastradh branches: 1.9.18;
Merge riastradh-drm2 to HEAD.
 1.8 22-Jul-2013  njoly Use <major>.<minor> for NetBSD version.
 1.7 07-Dec-2012  christos branches: 1.7.2; 1.7.4; 1.7.6;
add __BITMAP_TYPE
 1.6 04-Dec-2012  wiz Whitespace.
 1.5 04-Dec-2012  christos more xref and info
 1.4 04-Dec-2012  jruoho Move the bitmap(3) test to the "right" place. Note it in bitops(3). Xrefs.
 1.3 01-Dec-2012  wiz Whitespace, comma nit, uppercase Dt argument.
 1.2 01-Dec-2012  christos fix bug
 1.1 01-Dec-2012  christos add documentation for the bitmap macros
 1.7.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.6.2 25-Feb-2013  tls resync with head
 1.7.6.1 07-Dec-2012  tls file bitmap.3 was added on branch tls-maxphys on 2013-02-25 00:28:12 +0000
 1.7.4.1 23-Jul-2013  riastradh sync with HEAD
 1.7.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.7.2.1 07-Dec-2012  yamt file bitmap.3 was added on branch yamt-pagecache on 2013-01-16 05:32:35 +0000
 1.9.18.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.10.4.1 15-Mar-2018  pgoyette Synch with HEAD
 1.6 13-Jan-2020  uwe Sort the list. Minor markup and wording tweaks.
 1.5 16-Dec-2016  abhinav branches: 1.5.14;
Fix sentence.
 1.4 04-Dec-2012  jruoho branches: 1.4.12;
Move the bitmap(3) test to the "right" place. Note it in bitops(3). Xrefs.
 1.3 08-Apr-2011  jruoho branches: 1.3.4; 1.3.10;
And finally, fix a typo.
 1.2 08-Apr-2011  jruoho Clarify a little; ilog2(3) is a macro.
 1.1 08-Apr-2011  jruoho Add also a small summary page for <sys/bitops.h>.
 1.3.10.1 25-Feb-2013  tls resync with head
 1.3.4.1 16-Jan-2013  yamt sync with (a bit old) head
 1.4.12.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.5.14.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.22 22-Jan-2022  wiz New sentence, new line.
 1.21 22-Jan-2022  skrll Add __MASK(3)

__MASK(n): first n bits all set, where __MASK(4) == 0b1111.
 1.20 20-Jan-2022  skrll Add return type of the __SHIFT* macros. Bump date.

"looks right to me" from mrg@
 1.19 08-Jun-2020  sevan Pp before Bl
 1.18 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.17 07-Nov-2016  riastradh branches: 1.17.6;
These have been able to handle uintmax-width masks since creation.

XXX pullup-6
XXX pullup-7
 1.16 18-Mar-2014  riastradh branches: 1.16.4; 1.16.8; 1.16.10;
Merge riastradh-drm2 to HEAD.
 1.15 20-Jul-2013  wiz Use Mt for email addresses.
 1.14 16-Oct-2012  msaitoh branches: 1.14.2;
Change to uintmax_t again.
 1.13 16-Oct-2012  msaitoh Return value of __BIT() and __BITS() is not uint32_t but uint64_t.
 1.12 30-Apr-2011  jym branches: 1.12.4; 1.12.6; 1.12.10;
Small typo fix.
 1.11 08-Apr-2011  jruoho Xref bitops(3).
 1.10 16-Dec-2010  jruoho Xref cdefs(3).
 1.9 27-Aug-2010  jruoho Replace the example with something more generic and perceptual.
 1.8 26-Aug-2010  dyoung Apparently, you have to #include <sys/param.h>, too, for MAX().
 1.7 22-Mar-2010  jruoho Add a missing word introduced in the previous commit. Thanks, snj@.
 1.6 22-Mar-2010  jruoho Small changes to wording and markup.
 1.5 02-Mar-2010  jruoho Remove some /* comments */ in the example so that it will nicely fit into 80
columns.
 1.4 19-Oct-2009  rmind Drop 3rd and 4th clauses from David Young's license.
Reviewed and approved by dyoung@ (copyright holder).
 1.3 19-Aug-2008  jnemeth branches: 1.3.2;
PR/39381 - Taylor R Campbell -- missing line break causing funny formatting
 1.2 03-Sep-2006  wiz branches: 1.2.2; 1.2.12; 1.2.16; 1.2.20;
Sort sections. Remove unnecessary quotes. Use macros for <>
for HTML output. Some nits.
 1.1 31-Aug-2006  dyoung Per discussion on tech-kern and tech-userlevel, move the bit-twiddling
macros, __BIT, __BITS, SHIFTIN, SHIFTOUT, and __arraycount() from
lib/libkern/libkern.h to sys/cdefs.h. Add a __-prefix to SHIFTIN
and SHIFTOUT, and add a manual page for the bit-twiddling macros,
bits(3).

Make the __BIT and __BITS macros "widthless," as best I can, by
changing their type to uintmax_t from uint32_t. XXX The manual
page lags this change by a bit.

Define __PRIxBIT and __PRIxBITS printf(3) format strings.
 1.2.20.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.16.1 05-Oct-2008  mjf Sync with HEAD.
 1.2.12.1 31-Mar-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1293):
share/man/man3/bits.3: revision 1.3
PR/39381 - Taylor R Campbell -- missing line break causing funny formatting
 1.2.2.1 31-Mar-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1293):
share/man/man3/bits.3: revision 1.3
PR/39381 - Taylor R Campbell -- missing line break causing funny formatting
 1.3.2.1 26-Oct-2012  sborrill Pull up the following revisions(s) (requested by msaitoh in ticket #1808):
share/man/man3/bits.3: revision 1.13-1.14 via patch

Document the correct return value of __BIT() and __BITS().
 1.12.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.6.2 06-Jul-2017  snj Pull up following revision(s) (requested by riastradh in ticket #1420):
share/man/man3/bits.3: revision 1.17
These have been able to handle uintmax-width masks since creation.
 1.12.6.1 25-Oct-2012  riz share/man/man3/bits.3 1.13-1.14

Document the correct return value of __BIT() and __BITS().
[msaitoh, ticket #636]
 1.12.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.4.1 30-Oct-2012  yamt sync with head
 1.14.2.1 23-Jul-2013  riastradh sync with HEAD
 1.16.10.1 18-Jan-2017  skrll Sync with netbsd-5
 1.16.8.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.16.4.1 18-Dec-2016  snj Pull up following revision(s) (requested by riastradh in ticket #1315):
share/man/man3/bits.3: revision 1.17
These have been able to handle uintmax-width masks since creation.
 1.17.6.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.18 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.17 29-Dec-2016  wiz branches: 1.17.6;
bitstring.h does not provide size_t; include sys/types.h for that.
Bump date.
 1.16 20-Nov-2015  christos branches: 1.16.2;
reflect reality.
 1.15 04-Dec-2012  christos more xref and info
 1.14 04-Dec-2012  jruoho Move the bitmap(3) test to the "right" place. Note it in bitops(3). Xrefs.
 1.13 08-Mar-2005  wiz branches: 1.13.50; 1.13.56;
Quote dot at beginning of line, otherwise it will be interpreted
as the start of a macro. From jmc@openbsd.
 1.12 10-Nov-2004  wiz Add bit_ffc to NAME; sort functions in SYNOPSIS; from Sergey Svishchev.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.10 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 11-Sep-2001  wiz Punctuation nit.
 1.7 11-Sep-2001  wiz Use standard section headers.
 1.6 15-Mar-1999  garbled First round of .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.5 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.4 30-Nov-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.3 25-Aug-1993  cgd description of return val for bit_test was reversed.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 30-Nov-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.56.1 25-Feb-2013  tls resync with head
 1.13.50.1 16-Jan-2013  yamt sync with (a bit old) head
 1.16.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.17.6.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.5 10-Nov-2019  christos Document __FPTRCAST
XXX: more macros need documentation (__CAST etc.)
 1.4 27-Oct-2013  apb branches: 1.4.26;
refer to __USE(3)
 1.3 08-Apr-2011  jruoho branches: 1.3.4; 1.3.10;
Xref param(3).
 1.2 17-Dec-2010  jruoho Add __insn_barrier(3). XXX: Someone more knowledgeable may want to check this.
 1.1 16-Dec-2010  jruoho Now that <sys/cdefs.h> is mostly documented, include a small summary page
for it, cdefs(3).
 1.3.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 09-Oct-2024  uwe branches: 1.2.4;
container_of(3): fix return type, don't indent example

There's no text around example so the indentation doesn't serve any
useful purpose and just wastes horizontal space. It's not too nice
given a lengthy line in the example.
 1.1 08-Oct-2024  christos Add man page for container_of
 1.2.4.2 02-Aug-2025  perseant Sync with HEAD
 1.2.4.1 09-Oct-2024  perseant file container_of.3 was added on branch perseant-exfatfs on 2025-08-02 05:55:10 +0000
 1.7 12-Aug-2021  andvar s/directry/directory/
 1.6 07-Sep-2019  sevan I missread a diff before making the change for the previous commit.
Drop the reference to v7 and the direct struct.
https://www.bell-labs.com/usr/dmr/www/man51.pdf
 1.5 07-Sep-2019  sevan dir(5) was what appeared in v7, the struct was called direct.
Fix history for dirent.

via Ingo Schwarze <schwarze@OpenBSD>
 1.4 08-Apr-2011  wiz branches: 1.4.44;
Remove superfluous Pp.
 1.3 14-Oct-2010  skrll Fix RCSID
 1.2 16-May-2010  jruoho Fix the SYNOPSIS.
 1.1 16-May-2010  jruoho As was done with the man-page for <sys/types.h>, move dir(5) to dirent(3).
Add a table describing the stat <-> dirent types. Note IFTODT() and DTTOIF().
 1.4.44.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 16-Oct-2010  wiz branches: 1.2.10;
Use .In.
 1.1 16-Oct-2010  skrll Implement dl_iterate_phdr.

Somewhat taken from FreeBSD. Manual page from OpenBSD.
 1.2.10.2 17-Mar-2012  bouyer Pull up following revision(s) via patch (requested by skrll in ticket #1724):
rescue/list.ldd: revision 1.4
lib/libc/dlfcn/dlfcn_elf.c: revision 1.7
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.57
distrib/sets/lists/comp/mi: revision 1.1512
share/man/man3/Makefile: revision 1.56
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.58
usr.bin/ldd/ldd.c: revision 1.15
libexec/ld.elf_so/rtld.h: revision 1.84
share/man/man3/dl_iterate_phdr.3: revision 1.1
libexec/ld.elf_so/rtld.c: revision 1.129
libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.44
libexec/ld.elf_so/rtld.h: revision 1.89
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.36
libexec/ld.elf_so/map_object.c: revision 1.41
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.37
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.46
include/link_elf.h: revision 1.10
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.29
libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.26
libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.34
libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.31
libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.35
libexec/ld.elf_so/Makefile: revision 1.94
libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.32
libexec/ld.elf_so/Makefile: revision 1.95
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.31
libexec/ld.elf_so/Makefile: revision 1.96
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.32
libexec/ld.elf_so/reloc.c: revision 1.98
libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.33
sys/sys/exec_elf.h: revision 1.106
libexec/ld.elf_so/rtld.c: revision 1.130
libexec/ld.elf_so/load.c: revision 1.37
libexec/ld.elf_so/rtld.c: revision 1.131
libexec/ld.elf_so/load.c: revision 1.38
libexec/ld.elf_so/rtld.h: revision 1.90
libexec/ld.elf_so/headers.c: revision 1.36
libexec/ld.elf_so/rtld.h: revision 1.95
libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.30
libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.25
libexec/ld.elf_so/symbol.c: revision 1.50
libexec/ld.elf_so/symbol.c: revision 1.51
libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.43
libexec/ld.elf_so/symbol.c: revision 1.52
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.27
libexec/ld.elf_so/symbol.c: revision 1.54
PR/39240: Satoshi Suetake: Don't fail when attempting to resolve weak symbols
when we are doing immediate binding, leave them alone and they will be dealt
with later during lazy binding. From skrll@
Implement negative cache checks for symbol lookups.
Uses the Donelist idea from FreeBSD.
Use alloca(3) instead of local xmalloc for creating our DoneLists.
This allows threaded programs to use us a little better, PR lib/43005.
Implement dl_iterate_phdr.
Somewhat taken from FreeBSD. Manual page from OpenBSD.
 1.2.10.1 16-Oct-2010  bouyer file dl_iterate_phdr.3 was added on branch netbsd-5 on 2012-03-17 18:28:30 +0000
 1.42 09-Mar-2024  gutteridge dlfcn.3: remove duplicated dlopen() entry
 1.41 09-Mar-2024  uwe dlfcn(3): touch up markup
 1.40 07-Mar-2024  christos Add _dlauxinfo
 1.39 13-Jan-2020  uwe Oops. Restore the dot lost in -width ".Dv ..."
 1.38 13-Jan-2020  uwe Fix -width in the tagged list of special "handle" values.
 1.37 13-Jan-2020  uwe Minor tweaks.

Use same -indent for lists of values that are OR'ed as one argument.
Use consistent markup for dli_* member names.
Untabify Dl_info definition so that it lines up in PS output.
 1.36 13-Jan-2020  wiz Clean up dash use. Remove superfluous Pp.
 1.35 13-Jan-2020  kamil Bump date in dlfcn(3)
 1.34 13-Jan-2020  kamil Cross-Link from dlfcn(3) to dlinfo(3)
 1.33 25-Jun-2011  wiz branches: 1.33.42;
Bump date for previous.
 1.32 25-Jun-2011  nonaka PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.
 1.31 13-Feb-2011  wiz Explain "Cannot dlopen non-loadable /usr/lib/libpthread.so.1".
Bump date.
 1.30 24-Dec-2010  wiz branches: 1.30.2;
Fix xref and pasto.
 1.29 24-Dec-2010  skrll Bump date.
 1.28 24-Dec-2010  skrll Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.
 1.27 24-Jan-2010  wiz Remove one unnecessary Ns. (Rest still ugly.)
 1.26 24-Jan-2010  joerg Avoid using .Sm on/.Sm off if that results in the latter getting an
additional argument.
 1.25 18-Jan-2010  wiz Use Dv for defined values.
 1.24 18-Jan-2010  skrll Various improvements to bring closer to reality. Mostly from OpenBSD.

More improvements possible / probable.
 1.23 13-Mar-2009  joerg .Ud doesn't take arguments.
 1.22 10-Mar-2009  joerg Remove use of .Xo/.Xc to workaround ancient macro argument limit.
 1.21 30-Apr-2008  martin branches: 1.21.6;
Convert TNF licenses to new 2 clause variant
 1.20 31-Mar-2008  tnn branches: 1.20.2; 1.20.4;
Portable code should use RTLD_LAZY, not DL_LAZY.
 1.19 21-Mar-2005  kleink Add restrict qualifiers to dlsym() (XSI) and dladdr() arguments.
 1.18 11-Nov-2004  jmmv branches: 1.18.2;
Fix typo.
 1.17 10-Nov-2004  wiz Add dladdr to NAME; fix type of dli_saddr; from Sergey Svishchev.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 21-Jan-2002  wiz Fix typo in macro.
 1.13 24-Jun-2001  wiz Typo/whitespace fix.
 1.12 25-Apr-2001  simonb Spell occurred correctly.
 1.11 17-Jun-2000  christos document dlopen(NULL, ...)
 1.10 20-Jul-1999  perry branches: 1.10.6;
Note that the dl*() functions are not in a library per se but are
available in every dynamically linked program automatically.
 1.9 05-Sep-1998  pk Assign my copyrights to TNF.
 1.8 30-May-1998  kleink Add information to dlerror() regarding its behaviour in absence of an error
condition.
 1.7 13-May-1998  pk Document `dladdr()'.
 1.6 29-Apr-1998  fair fix bad .Xr references
 1.5 07-Feb-1998  kleink Sync with <dlfcn.h>: const'ify some arguments.
 1.4 14-Mar-1997  cgd Fix bogons (missing commas) in the synopsis section
 1.3 09-Jan-1996  pk Note search mechanism.
 1.2 01-Oct-1995  pk Install dlfcn.3 and links.
 1.1 30-Sep-1995  pk Man page for dlfcn.h
 1.10.6.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.18.2.1 21-Mar-2005  jwise Pull up revision 1.18 of include/dlfcn.h (requested by kleink in [pullup-3 #39])
Pull up revision 1.19 of share/man/man3/dlfcn.3) (requested by kleink in same)

Add restrict qualifiers to dlsym() (XSI) and dladdr() arguments.
 1.20.4.1 18-May-2008  yamt sync with head.
 1.20.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.20.2.1 31-Mar-2008  mjf file dlfcn.3 was added on branch mjf-devfs2 on 2008-06-02 13:21:34 +0000
 1.21.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.30.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.33.42.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7 06-Mar-2022  andvar s/sarch/search/ in commented part.
 1.6 13-Jan-2020  kamil branches: 1.6.4;
Fix a typo
 1.5 13-Jan-2020  kamil Correct the authorship note of dlinfo(3)
 1.4 13-Jan-2020  uwe Miscellaneous fixes.

No space after asterisk in "type *arg".
There's no "-width indent", use something relevant instead.
Do not document the structure tag of the Link_map typedef.
Give the Link_map members a paragraph of their own for readability.
Give them a bit more breathing space in the tagged list.
Spell pooka's name correctly.

TODO: The text is pleonastic in several places ("Do foo. On success
does foo." etc) and could use some copy editing.
 1.3 13-Jan-2020  wiz Add missing El. Fix grammar.
 1.2 13-Jan-2020  kamil Bump date in dlinfo(3)
 1.1 13-Jan-2020  kamil Document dlinfo(3)

Man-page taken from FreeBSD.
 1.6.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6.4.1 13-Jan-2020  martin file dlinfo.3 was added on branch phil-wifi on 2020-04-08 14:07:21 +0000
 1.9 08-Apr-2011  wiz New sentence, new line.
 1.8 01-Sep-2005  kleink In the wake of C99 (which dropped the implicit int), add a type specifier
to the declarations to keep them warning-free; also add some clarifying
words that the globals are _located at_ those addresses.

Inspired by a conversation with Takayoshi Kochi.
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.6 16-Oct-1996  perry Close 2831, which noted that the man page is confusing. I have edited
it slightly differently than Mike originally suggested after
consulting with him and others.
 1.5 01-Mar-1996  jtc the values of end, etext and edata are not set by brk(2)
 1.4 30-Nov-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.3 16-Dec-1993  jtc Fix typo: It's etext, not extext.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 30-Nov-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10 07-Sep-2024  rillig man: convert some URLs to https
 1.9 03-Jul-2017  wiz branches: 1.9.18;
Remove workaround for ancient HTML generation code.
 1.8 10-May-2011  jruoho branches: 1.8.36;
Xref div(3) and remainder(3).
 1.7 08-Apr-2011  jruoho Xref bitops(3).
 1.6 15-Apr-2010  jruoho Back and forth: gcc(1) -> GCC.
 1.5 14-Apr-2010  jruoho EXAMPLE -> EXAMPLES, GCC -> gcc(1), and minor markup changes.
 1.4 20-Mar-2010  jruoho Do not use .pp with %P, as noted by joerg@.
 1.3 20-Mar-2010  wiz Serial comma; prepare for HTML-output.
 1.2 20-Mar-2010  jruoho Add the (ACM) journal where this appeared. Fix URL.
 1.1 19-Mar-2010  joerg Add man page for fast_divide32.
 1.8.36.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.9.18.1 02-Aug-2025  perseant Sync with HEAD
 1.6 08-Apr-2011  wiz Sort SEE ALSO.
 1.5 08-Apr-2011  jruoho Xref bitops(3).
 1.4 14-May-2010  joerg Fix prologue
 1.3 28-Apr-2010  jruoho Two small grammar fixes.
 1.2 28-Apr-2010  jruoho Fix typo in XXX-comment.
 1.1 28-Apr-2010  jruoho Document ffs32(), ffs64(), fls32(), and fls64() from <sys/bitops.h>.
 1.4 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.3 27-May-2009  wiz branches: 1.3.38;
Drop trailing whitespace. Sort SEE ALSO. Make HTML-ready. Fix Dt argument case.
 1.2 27-May-2009  snj Fix a few spelling errors.
 1.1 15-Aug-2007  kiyohara Replace to Matthew Orgass's slhci(4).
http://mail-index.netbsd.org/tech-kern/2007/06/26/0001.html
 1.3.38.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.6 05-Nov-2021  riastradh Rework ilog2(3) man page.

- Tweak title.
- Clarify semantics -- round down, not any other way.
- xref ffs(3)
- Fix return type: int.
- Fix language about input type.
. Any unsigned type is fine.
. Types smaller than uint32_t will be safely converted to uint32_t.
- Note that it is a constant expression if x is constant.
 1.5 10-May-2011  jruoho Xref ilogb(3).
 1.4 08-Apr-2011  jruoho Xref bitops(3).
 1.3 20-Jun-2010  joerg Sort prologue
 1.2 08-Jun-2010  jruoho Put also powerof2(9) to SEE ALSO.
 1.1 08-Jun-2010  jruoho Document ilog2() from <sys/bitops.h>.
 1.38 30-Sep-2025  uwe intro(3): g/c reference to non-existent -lhesiod

PR lib/59676
 1.37 30-Sep-2025  uwe intro(3): g/c spurious .Tn
 1.36 14-Apr-2021  nia branches: 1.36.6; 1.36.10;
OpenSSL man pages have moved
 1.35 14-Apr-2021  nia intro.3: add a few
 1.34 11-May-2018  sevan branches: 1.34.4;
Pass through mandoc -Tlint, drop Pp before Bl.
Remove reference to libkadm, it is no longer present in NetBSD.
Direct reader to kadm5_pwcheck(3) for libkadm5srv.
 1.33 21-May-2017  riastradh branches: 1.33.8;
Remove some vestiges of MKCRYPTO_IDEA/MKCRYPTO_MDC2.
 1.32 21-May-2017  riastradh Remove MKCRYPTO_RC5. Unconditionally include RC5 in libcrypto.so.

This option existed only because RC5 is covered by patents that, twenty
years ago, we had reason to suspect the patent holder, RSA, Inc., might
litigate. The two US patents in question are 5,724,428 and 5,835,600.

According to the USPTO Patent Term Calculator web site at
<https://www.uspto.gov/patent/laws-and-regulations/patent-term-calculator#heading-5>
(retrieved 2017-05-21), patents filed after 1995-06-07 expire twenty
years after the filing date.

number filing date
5,724,428 1995-11-01
5,835,600 1997-04-21

Thus, these patents appear to be expired.

As proposed on tech-crypto and tech-security:

https://mail-index.netbsd.org/tech-crypto/2017/05/05/msg000718.html
https://mail-index.netbsd.org/tech-security/2017/05/05/msg000927.html
 1.31 22-Nov-2015  wiz Bump date for previous.
 1.30 22-Nov-2015  kamil +libpanel: Z-order for curses windows
 1.29 03-Jul-2012  wiz Finish previous.
 1.28 03-Jul-2012  wiz Reference libusbhid instead of usb(3) (which was the predecessor for libusbhid).
Bump date.
 1.27 02-Jul-2012  oki add reference to usb(3) and zlib(3).
 1.26 21-Apr-2012  roy Add capfile(5) to describe the termcap format.
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.
 1.25 08-Feb-2011  wiz branches: 1.25.4;
New sentence, new line. Bump date for previous.
 1.24 08-Feb-2011  haad Initial import of libdm and dmctl to tree. libdm library can be used
to access, manage and manipulate device-mapper driver. Which opens us bunch
of new possibilities like

dm-multipath device target
dm-crypt device target
dm-ccd compatibility layer

With this import I'm bringing in dmctl tool for working with dm driver ,too.
I plan to replace gpl2 licensed dmsetup command with our dmctl tool in near
feature. It can also by placed to /rescue where we was not able to put
dmsetup because of licensing problems.

With libdm in tree we can now write RUMP atf test suite for dm driver to
ensure LVM subsystem stability as time goes.

Reviewed by: blymn@ and rmind@
Oked: by no objections on tech-userlevel@
 1.23 09-Dec-2010  njoly branches: 1.23.2;
Remove reference to Curses development kit (CDK) which do not exists
anymore.
 1.22 10-Mar-2009  joerg Remove use of .Xo/.Xc to workaround ancient macro argument limit.
 1.21 10-Nov-2004  wiz branches: 1.21.36;
Fix typo, and comment out link to non-existing usb(3); from Sergey Svishchev.
 1.20 16-Oct-2004  snj Fix two trailing xrefs and kill an unnecessary argument to Nm.
 1.19 20-Mar-2004  snj Err, nevermind.
 1.18 20-Mar-2004  snj Correct usb Xref.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.16 23-Nov-2001  gmcgarry General cleanup; xref kafs(3)
 1.15 23-Nov-2001  gmcgarry - Xr cdk(3), for what is worth
- describe libposix with xrefs
 1.14 23-Nov-2001  gmcgarry Xref util.3
 1.13 21-Nov-2001  gmcgarry xref com_err(3)
 1.12 10-Nov-2001  gmcgarry - cross-reference skey(3)
- relegate FILES section to library pages
 1.11 08-Nov-2001  gmcgarry Reference krb5(3) and add description for libcom_err.
 1.10 06-Nov-2001  gmcgarry Rework to describe the plethora of libraries that arrived with the
introduction of crypto/Kerberos into the base system.

Doesn't have a hope of being complete since there is little (no?)
documentation available on what the libraries actually do, much
less how to use the functions included within them. It's questionable
whether some of the libraries should exist in the first place.

Does NOT address lib/11191, lib/11171 + others I haven't found yet.
 1.9 11-Sep-2001  wiz Boring whitespace fixes.
 1.8 15-Mar-1999  garbled First round of .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.7 30-Aug-1998  enami In SEE ALSO list, use comma to separate elements and don't use to terminate.
 1.6 29-Apr-1998  fair fix bad .Xr references
 1.5 10-May-1995  jtc Commented out inappropriate sections and cross references
 1.4 30-Nov-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.3 24-Oct-1994  deraadt tiny cleanup
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 28-Apr-1995  mrg 4.4BSD-Lite2
 1.1.1.2 30-Nov-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.21.36.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.23.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.25.4.2 30-Oct-2012  yamt sync with head
 1.25.4.1 23-May-2012  yamt sync with head.
 1.33.8.1 21-May-2018  pgoyette Sync with HEAD
 1.34.4.1 01-Oct-2025  martin Pull up following revision(s) (requested by uwe in ticket #1971):

share/man/man3/intro.3: revision 1.37
share/man/man3/intro.3: revision 1.38

intro(3): g/c spurious .Tn

intro(3): g/c reference to non-existent -lhesiod
PR lib/59676
 1.36.10.1 01-Oct-2025  martin Pull up following revision(s) (requested by uwe in ticket #41):

share/man/man3/intro.3: revision 1.37
share/man/man3/intro.3: revision 1.38

intro(3): g/c spurious .Tn

intro(3): g/c reference to non-existent -lhesiod
PR lib/59676
 1.36.6.1 01-Oct-2025  martin Pull up following revision(s) (requested by uwe in ticket #1167):

share/man/man3/intro.3: revision 1.37
share/man/man3/intro.3: revision 1.38

intro(3): g/c spurious .Tn

intro(3): g/c reference to non-existent -lhesiod
PR lib/59676
 1.2 14-May-2010  joerg Fix prologue. \\ -> \e
 1.1 21-Mar-2010  jruoho Document <inttypes.h>.
 1.6 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.5 16-Dec-2010  pgoyette branches: 1.5.38;
Darn - can't tytpe today!
 1.4 16-Dec-2010  pgoyette Get this right (don't need to \ escape the [Ba]) and update the date
 1.3 16-Dec-2010  pgoyette Fix typo - or_eq is "|=" and not "!="
 1.2 14-May-2010  joerg Fix prologue
 1.1 21-Mar-2010  jruoho Document the weird <iso646.h>.
 1.5.38.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.2 29-Aug-2011  njoly Fix prologue macros order.
 1.1 09-Aug-2011  jruoho Add a summary page for <limits.h>.
 1.2 01-Apr-2011  jruoho Xref MAKEDEV(8).
 1.1 14-Dec-2010  jruoho Add a manual page for the makedev(), major(), and minor() macros.

Taken from FreeBSD. Written by Ed Schouten.
 1.5 14-Apr-2011  wiz No need to use \*[q], use plain double quotes instead.
 1.4 01-Apr-2011  jruoho Add example.
 1.3 19-Dec-2010  jruoho Document the __alignof__ GNU extension.
 1.2 21-Mar-2010  jruoho Reference stddef(3).
 1.1 27-Feb-2010  wiz Add offsetof(3) man page. From Thomas Pfaff via OpenBSD.
 1.4 10-Apr-2011  jruoho Xref unistd(3).
 1.3 08-Apr-2011  jruoho Xref bitops(3).
 1.2 08-Apr-2011  jruoho Remove leftover .Ed.
 1.1 08-Apr-2011  jruoho Briefly summarize <sys/param.h>.
 1.3 08-Apr-2011  jruoho Use bullets in the list.
 1.2 01-Apr-2011  njoly Fix prologue macros order.
 1.1 30-Mar-2011  jruoho Briefly document <paths.h>.
 1.61 20-Oct-2020  kamil Remove the CIRCLEQ API from queue(3)

It was marked deprecated in NetBSD 7 and already removed from
FreeBSD in 2000 and OpenBSD in 2015.

Proposed on tech-kern@.
 1.60 18-Jun-2018  eadler queue.3: deduplicate deduplicate a a word word
 1.59 02-Oct-2017  pgoyette branches: 1.59.2;
Update for new signature for LIST_MOVE()
 1.58 08-Aug-2017  isaki s/tail queue/simple queue/ in SIMPLE QUEUES section.
 1.57 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.56 25-Apr-2017  abhinav branches: 1.56.4;
Use Fn instead of Nm to refer the macros in the body of the man page.

Thanks to wiz@ for reviewing.
 1.55 22-Apr-2017  abhinav Remove comma after the last Nm entry.
 1.54 15-Oct-2016  jdolecek fix tyop
 1.53 31-May-2016  wiz branches: 1.53.2;
Remove trailing whitespace.
 1.52 31-May-2016  pgoyette Correct list of operations to note that SLISTs and SIMPLEQs cannot insert
entries before existing entries. This can only be done for LISTs and
TAILQs.

Fixes PR kern/50845
 1.51 02-Feb-2016  ryoon Fix layout for comments. Bump date.
 1.50 03-Dec-2014  snj Fix some grammar and punctuation issues. Remove a pasto.
 1.49 18-May-2014  wiz branches: 1.49.2;
Whitespace and punctuation.
 1.48 17-May-2014  rmind Rename LIST_CONCAT() to LIST_MOVE() as that is what it actually does (and
there is no point to implement LIST_CONCAT() which would iterate). Update
the queue(3) manpage.
 1.47 28-Nov-2013  wiz branches: 1.47.2;
Very slightly more consistency in ordering in SYNOPSIS.
Fix a few typos. Remove superfluous Pp.
 1.46 27-Nov-2013  christos Sync queue man pages with queue.h.
 1.45 23-Nov-2013  wiz Remove extra comma.
 1.44 23-Nov-2013  christos remove documentation for CIRCLEQ to discourage its use.
 1.43 08-Oct-2012  njoly Remove a tab character in non-literal context.
While here, replace all sp macros with Pp.
 1.42 20-Apr-2009  mschuett branches: 1.42.6; 1.42.12;
Add queue macros SLIST_FOREACH_SAFE, STAILQ_FOREACH_SAFE, STAILQ_LAST,
SIMPLEQ_CONCAT, and SIMPLEQ_LAST.

Remove seperate definitions outside of queue.h.
 1.41 11-Mar-2009  wiz Do not mark up "and". Bump date for previous.
 1.40 11-Mar-2009  mrg add a SIMPLEQ_FOREACH_SAFE() macro.

document it, and the TAILQ versions.
 1.39 07-Oct-2008  apb branches: 1.39.4;
Add a NOTE saying that invalid usage leads to undefined behaviour.
Inspired by PR 39684.
 1.38 02-May-2008  martin Move TNF licenses to 2 clause form
 1.37 11-Dec-2007  elad branches: 1.37.6; 1.37.8;
Add TAILQ_CONCAT() and STAILQ_CONCAT(), from FreeBSD.
 1.36 22-Oct-2007  pooka Note that CIRCLEQ_LOOP first appeared in NetBSD 4.0.
 1.35 29-Aug-2007  pooka bump date

Wrath of wizd avoided because of quick tip from Juan RP.
 1.34 29-Aug-2007  pooka Add table which summarizes operations supported by each queue type.

from Stathis Kamperis in PR misc/36857
 1.33 07-Mar-2006  pooka branches: 1.33.6; 1.33.8; 1.33.12;
document CIRCLEQ_LOOP
 1.32 15-Dec-2005  pooka * CICRLEQ -> CIRCLEQ in some places (it's much easier to pronounce)
* be more explicit that CIRCLEQ_FOREACH{,_REVERSE) traverse the queue
exactly once
 1.31 13-Jan-2005  ragge Fix CIRCLEQ example bug, from Peter A Jonsson.
 1.30 18-Apr-2004  lukem Reorder macros within a queue type to match queue.h definition order.
Document STAILQ_* as compatibility macros for SIMPLEQ_*.
Document TAILQ_LAST and TAILQ_PREV.
 1.29 13-Apr-2004  wiz Bump date for pooka.
 1.28 13-Apr-2004  pooka Note that SLISTs came from FreeBSD to give people an idea that
they're not necessarily a part of 4.4BSD derived implementations.
 1.27 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.26 20-May-2003  wiz Grammar fix, from jmc@openbsd.
 1.25 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.24 01-Jun-2002  lukem SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field). whilst it's O(n),
this mirrors the functionality of SLIST_REMOVE() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
 1.23 01-Jun-2002  lukem correct descriptions of SLIST_REMOVE_HEAD() and SIMPLEQ_REMOVE_HEAD()
 1.22 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.21 07-Feb-2002  wiz s/All four/All five/
 1.20 11-Sep-2001  wiz Drop unneeded empty line.
 1.19 24-Jun-2001  wiz Typo/whitespace fix.
 1.18 12-May-2001  wiz Fix description of simple queue. misc/12917 by Witold J. Wnuk with an
additional 'of '.
 1.17 11-Feb-2001  enami Subst head.cqh_first with CIRCLEQ_FIRST(&head) instead of CIRCLEQ_HEAD.
Pointed out by Tim on icb sometimes ago (iirc).
 1.16 20-Jul-2000  deberg document the singly-linked list macros brought in last year. also
document FOREACH_*{,_REVERSE}, to be added to queue.h shortly.

random cleanups and clarifications, mostly from the freebsd queue.3
 1.15 27-May-2000  mycroft One more formatting nit. *sigh*
 1.14 27-May-2000  mycroft Update the date.
 1.13 27-May-2000  mycroft Fix formatting error.
 1.12 27-May-2000  mycroft Document *_EMPTY().
 1.11 19-Nov-1999  enami branches: 1.11.2;
Don't pass so many args to .Nd macro. It just overflows.
 1.10 15-Mar-1999  garbled branches: 1.10.6;
First round of .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.8 05-Jan-1998  thorpej Document new queue access methods.
 1.7 30-Sep-1997  christos PR/4126: Luke Mewburn: queue(3) doesn't document SIMPLEQ_*
 1.6 29-May-1997  cgd Fix broken uses of Dd. Both the mdoc and mdoc.samples pages agree:
.Dd is supposed to be invoked like:
.Dd month day, year
e.g. ".Dd January 25, 1989", rather than:
.Dd "month day, year"
which is what these pages did.
 1.5 01-Oct-1996  cgd add and document *_HEAD_INITIALIZER macros, which provide structure
initializers which can be used to initialize list/queue heads at
compile time.
 1.4 03-Jul-1995  mycroft Document {LIST,TAILQ}_INSERT_BEFORE().
 1.3 03-Jul-1995  mycroft Document {LIST,TAILQ}_INSERT_BEFORE().
 1.2 30-Nov-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.1 21-Dec-1993  cgd branches: 1.1.1;
queue.h from 4.4, from Bostic
 1.1.1.2 17-Oct-1997  mrg 4.4BSD-Lite2
 1.1.1.1 30-Nov-1994  jtc imported from 4.4lite
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.33.12.2 09-Jan-2008  matt sync with HEAD
 1.33.12.1 06-Nov-2007  matt sync with HEAD
 1.33.8.1 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.33.6.1 15-Dec-2007  pavel Pull up following revision (requested by pooka in ticket #1009):
share/man/man3/queue.3: revision 1.36
Note that CIRCLEQ_LOOP first appeared in NetBSD 4.0.
 1.37.8.1 18-May-2008  yamt sync with head.
 1.37.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.39.4.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.42.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.42.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.42.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.42.6.1 30-Oct-2012  yamt sync with head
 1.47.2.1 10-Aug-2014  tls Rebase.
 1.49.2.1 04-Dec-2014  martin Pull up following revision(s) (requested by snj in ticket #293):
share/man/man3/queue.3: revision 1.50
Fix some grammar and punctuation issues. Remove a pasto.
 1.53.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.53.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.56.4.2 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.56.4.1 02-Oct-2017  martin Pull up following revision(s) (requested by pgoyette in ticket #296):
tests/include/sys/t_list.c: revision 1.1
tests/include/sys/t_list.c: revision 1.2
tests/include/sys/Makefile: revision 1.13
share/man/man3/queue.3: revision 1.59
distrib/sets/lists/debug/mi: revision 1.226
sys/sys/queue.h: revision 1.71
distrib/sets/lists/tests/mi: revision 1.764
Fix the LIST_MOVE macro to properly update the back-pointer of the
first entry in the list.

Note that the signature of LIST_MOVE() macro also changes (it grew an
additional argument). This should not require a kernel version bump
since nothing appears to use LIST_MOVE() other than the recently added
atf test.

Update for new signature for LIST_MOVE()

Add a new minimalistic test for LIST_MOVE to verify that the list's
first entry's prev pointer correctly points to the listhead.
This test will fail until a fix for LIST_MOVE is checked in (soon).

Add new LIST_MOVE test to sets list.

Update recently-added test to adapt to new signature of LIST_MOVE()

add t_list test.
 1.59.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.5 24-Oct-2010  jruoho Catch-up with code changes.
 1.4 14-Apr-2010  njoly Add missing .El directive.
 1.3 20-Mar-2010  wiz Sort SEE ALSO. New sentence, new line.
 1.2 19-Mar-2010  jruoho Some cosmetic modifications, including removal of white space.
 1.1 19-Mar-2010  dyoung First draft of a manual page for Matt Thomas' red-black trees. Please
review for correctness.
 1.14 22-Oct-2025  roy rbtree: Rename rb.c to rbtree.c to match it's header rbtree.h

While here rename RBTEST to RBLOCAL to give a better meaning as we
want to include the local rbtest.h rather than the system one.

Also allow to compile outside of NetBSD source tree by guarding some
things we would otherwise expect to be defined.
 1.13 07-Mar-2019  roy rbtree(3): Implement _FOREACH_SAFE macros

And _NEXT and _PREV as well.
 1.12 30-Aug-2016  dholland branches: 1.12.14;
Use only "function" for the comparison functions, not both that and
"operator". Noted by riastradh.
 1.11 29-Aug-2016  dholland Clarify the usage, so hopefully nobody else makes the set of wrong
assumptions I just did.
 1.10 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.9 20-Jul-2013  wiz Use Mt for email addresses.
 1.8 13-Mar-2013  riastradh branches: 1.8.4;
Fix documentation of rbtree(3) iteration.

. Fix sense of rb_tree_iterate(rbt, NULL, ...).
. Document RB_TREE_MIN/RB_TREE_MAX to avoid relying on that sense.
. Document RB_TREE_FOREACH and RB_TREE_FOREACH_REVERSE to simplify
iteration.

Addresses PR lib/46034 and PR lib/47144. It would have been nice to
make `x = NULL; while ((x = rb_tree_iterate(t, NULL, ...)) != NULL)'
DTRT to traverse t, but it's too much late for that now.

We probably ought to have an RB_TREE_FOREACH{,_REVERSE}_SAFE too.

ok christos
 1.7 19-Aug-2012  wiz branches: 1.7.2;
Add more function argument names to the man page, trying to address
PR 46814 by Lloyd Parkes. Bump date.
 1.6 17-Feb-2012  yamt sync with code
(remove const quals)
 1.5 28-Mar-2011  ahoka branches: 1.5.4; 1.5.6; 1.5.8;
Fix manpage wrt reversed compare functions.
 1.4 17-Mar-2011  jruoho Remove boiler plate paragraph in the CODE REFERENCES section.
 1.3 08-Nov-2010  enami Fix typo in previous commit.
 1.2 08-Nov-2010  enami - Add library section.
- Fix function signatures.
- Describe added member to an ops structure.
- Describe rb_tree_remove_node.
 1.1 24-Oct-2010  jruoho Catch-up with code changes.
 1.5.8.1 01-Nov-2012  matt sync with netbsd-6-0-RELEASE.
 1.5.6.2 27-Oct-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1136):
share/man/man3/rbtree.3: revision 1.8
Fix documentation of rbtree(3) iteration.
. Fix sense of rb_tree_iterate(rbt, NULL, ...).
. Document RB_TREE_MIN/RB_TREE_MAX to avoid relying on that sense.
. Document RB_TREE_FOREACH and RB_TREE_FOREACH_REVERSE to simplify
iteration.
Addresses PR lib/46034 and PR lib/47144. It would have been nice to
make `x = NULL; while ((x = rb_tree_iterate(t, NULL, ...)) != NULL)'
DTRT to traverse t, but it's too much late for that now.
We probably ought to have an RB_TREE_FOREACH{,_REVERSE}_SAFE too.
ok christos
 1.5.6.1 03-Sep-2012  riz Pull up following revision(s) (requested by dholland in ticket #526):
share/man/man3/rbtree.3: revision 1.7
Add more function argument names to the man page, trying to address
PR 46814 by Lloyd Parkes. Bump date.
 1.5.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.4.2 30-Oct-2012  yamt sync with head
 1.5.4.1 17-Apr-2012  yamt sync with head
 1.7.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.1 23-Jun-2013  tls resync from head
 1.8.4.1 23-Jul-2013  riastradh sync with HEAD
 1.12.14.1 10-Jun-2019  christos Sync with HEAD
 1.8 24-Jun-2010  jruoho Couple of grammar fixes.
 1.7 15-Jun-2010  wiz Sort SEE ALSO.
 1.6 15-Jun-2010  jruoho Fix xref: timer_create(3) -> timer_create(2).
 1.5 08-Jun-2010  jruoho Xref mq(3).
 1.4 20-May-2010  jruoho Add a bold-faced note that the interface is not fully functional, but the
opposite.
 1.3 19-May-2010  jruoho Continue the discussion w.r.t. SIGEV_THREAD by nothing that pthread_join(3)
should be out of the question and that thread stack cannot be recovered.
 1.2 19-May-2010  wiz Sort sections.
 1.1 19-May-2010  jruoho Add sigevent(3), a manual page that describes the struct sigevent used by
the POSIX real time functions and timers.

XXX: (a) Needs to be modified once real time signals are supported.
(b) Could use an example.
 1.21 15-Jun-2015  dholland Catch up with <varargs.h> removal.
 1.20 08-Apr-2011  wiz Sort sections.
 1.19 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.18 08-Sep-2003  wiz Use St -isoC-9X instead of St -isoC9X, to be in sync with groff.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 18-Aug-2002  yamt mention argument promotion and change example
as well.
from OpenBSD.
 1.14 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.13 05-Feb-2002  kleink KNF example code snippet.
 1.12 04-Feb-2002  kleink Add a separate varargs(3) manual page, reusing stdarg(3) contents, and
remove the name `varargs' from stdarg(3); inspired by conversation with
Charles Hannum.
 1.11 04-Feb-2002  kleink While va_{start,arg,end} conform to ISO C90, they were certainly not
introduced in there but ANSI C; pointed out by Charles.
 1.10 11-Sep-2001  wiz Punctuation fix.
 1.9 11-Sep-2001  wiz Boring whitespace fixes.
 1.8 14-Apr-2001  kleink Make standards/portability description more granular.
 1.7 04-Feb-2000  kleink Typoe in previous.
 1.6 03-Feb-2000  kleink Document va_copy.
 1.5 16-Mar-1999  kleink Minor KNF nit.
 1.4 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.3 30-Nov-1994  jtc branches: 1.3.4;
Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 28-Apr-1995  mrg 4.4BSD-Lite2
 1.1.1.2 30-Nov-1994  jtc imported from 4.4lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.3.4.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.2 14-May-2010  joerg Fix prologue
 1.1 21-Mar-2010  jruoho As we have added stdint(3) and tgmath(3), we may as well add stdbool(3).
 1.8 10-Apr-2011  jruoho Xref unistd(3).
 1.7 14-May-2010  joerg Fix prologue
 1.6 25-Mar-2010  jruoho Document <stdlib.h>.

Written with minimum maintenance costs in mind; only the defined types and
macros are described.
 1.5 22-Mar-2010  wiz Mark up NULL with Dv, as usual.
 1.4 22-Mar-2010  jruoho Note that some definitions, such as NULL, were already in v4 UNIX.
 1.3 21-Mar-2010  wiz Remove superfluous Pp.
 1.2 21-Mar-2010  jruoho Note that some of these were already in ANSI C.

XXX: Maybe someone with insight adds a word or two about the history?
 1.1 21-Mar-2010  jruoho While at it, add also stddef(3).
 1.6 09-Aug-2011  jruoho Xref limits(3).
 1.5 10-Apr-2011  jruoho Xref unistd(3).
 1.4 21-Mar-2010  jruoho Document <inttypes.h>.
 1.3 21-Mar-2010  jruoho Reference stdbool(3).
 1.2 20-Mar-2010  wiz Remove quotes around Nd argument, they are not needed.
 1.1 20-Mar-2010  jruoho Add a manual page for <stdint.h>. From FreeBSD, by Mike Barcroft.
 1.3 10-Apr-2011  jruoho Xref unistd(3).
 1.2 14-May-2010  joerg Fix prologue
 1.1 25-Mar-2010  jruoho Document <stdlib.h>.

Written with minimum maintenance costs in mind; only the defined types and
macros are described.
 1.6 08-Apr-2011  jruoho Use .In for headers.
 1.5 08-Apr-2011  wiz Do not Xr yourself.
 1.4 25-Mar-2010  jruoho Document <stdlib.h>.

Written with minimum maintenance costs in mind; only the defined types and
macros are described.
 1.3 09-Mar-2009  joerg Fix preamble to match order set out by mdoc(7). Discussed with wiz.
 1.2 03-Oct-2005  wiz branches: 1.2.30;
Use Dv instead of Sy for macros.
Do not Xr to ourselves, use .Nm instead.
 1.1 30-Sep-2005  rpaulo Add a manual page for <sysexists.h>, from FreeBSD with a minor
adjustments (removed reference to the style(9) man page added NetBSD
to the HISTORY section) by me.
 1.2.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.9 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.8 20-Jul-2013  wiz Use Mt for email addresses.
 1.7 30-Jan-2011  njoly branches: 1.7.4; 1.7.10; 1.7.14;
Add missing Ta macro.
 1.6 14-Dec-2010  jruoho branches: 1.6.2;
Remove functions/macros that are not in <tgmath.h> in NetBSD.
Use .Xr instead of .Fn for those functions/macros that have a manual page.
 1.5 14-May-2010  joerg Fix prologue. Drop size of last column as it doesn't exist in all cases
and implicit last column handling will do TRT.
 1.4 15-Apr-2010  jruoho Back and forth: gcc(1) -> GCC.
 1.3 14-Apr-2010  jruoho GCC -> gcc(1).
 1.2 01-Mar-2010  wiz Serial comma.
 1.1 01-Mar-2010  jruoho Add tgmath(3). From FreeBSD.

XXX: Needs proofreading, Matt?
 1.6.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.7.14.1 23-Jul-2013  riastradh sync with HEAD
 1.7.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10 23-Feb-2021  rillig timeradd.3: declare timespeccmp parameters as const

Comparison is implemented as a read-only operation.
 1.9 23-Feb-2021  wiz Fix timespeccmp declaration.

From Kouichi Hashikawa in PR 56010.
 1.8 07-Jun-2010  jruoho Add a missing word.
 1.7 18-May-2010  wiz Slight wording improvement.
 1.6 18-May-2010  jruoho Macros, not functions.
 1.5 18-May-2010  jruoho Fix .Nd.
 1.4 18-May-2010  jruoho Describe also the timespec() family of macros in timeradd(3).
 1.3 17-May-2010  jruoho Reference timeval(3).
 1.2 24-Jan-2010  jruoho Add the missing $Id$ tag.
 1.1 24-Jan-2010  jruoho Add timeradd(3) from FreeBSD. Needs proofreading.

ok wiz@
 1.12 12-Apr-2011  jruoho Move some of the discussion from the messy ctime(3) to tm(3).
 1.11 08-Jun-2010  jruoho Xref bintime_add(9).
 1.10 20-May-2010  jruoho Note clock_gettime(2) in the example.
 1.9 19-May-2010  tsutsui microtime(9) stores struct timeval. bintime(9) stores struct bintime.
 1.8 18-May-2010  jruoho Fix a typo.
 1.7 18-May-2010  jruoho Add an introductory example.
 1.6 18-May-2010  jruoho Note that struct bintime is described in timecounter(9). Improve wording.
 1.5 17-May-2010  jruoho Due previous, remove STANDARDS.
 1.4 17-May-2010  jruoho Briefly describe and note also struct bintime.
 1.3 17-May-2010  jruoho Remove trailing comma.
 1.2 17-May-2010  jruoho Fix .Dt.
 1.1 17-May-2010  jruoho Add a manual page that describes the basic structures in <sys/time.h>.
 1.7 13-Oct-2024  riastradh tm(3): Fix type of tm_zone again, and describe it as const.

It is `char *', not `char'. But it's also not supposed to be written
to, as kre@ noted, so just document it as `const' even though it's
technically not declared that way, presumably for expedience of
managing it with malloc/free internally.

PR lib/58651: tm(3): wrong type in man page for tm_gmtoff
 1.6 28-Aug-2024  riastradh tm(3): Fix types in man page.

PR lib/58651: tm(3): wrong type in man page for tm_gmtoff
 1.5 23-Oct-2022  jschauma branches: 1.5.2; 1.5.4;
correct tm_sec range to be [0-60]

The previous range introduced in time.h rev1.14 was supposed to account
for a mystical "double leap second", which ultimately never could exist
and was a mistaken interpretation from an early ISO C standard whereby
the possibility of two leap seconds within a year was erroneously
interpreted to mean that two leap seconds could occur at once.
 1.4 14-Apr-2011  jruoho branches: 1.4.46;
Improve as per discussion on source-changes.
 1.3 12-Apr-2011  jruoho Put asctime(3) explicitly to SEE ALSO.
 1.2 12-Apr-2011  jruoho Move some of the discussion from the messy ctime(3) to tm(3).
 1.1 12-Apr-2011  jruoho Add a small summary parge for struct tm from <time.h>. Cf. timeval(3).
 1.4.46.1 13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1908):

share/man/man3/tm.3: revision 1.6
share/man/man3/tm.3: revision 1.7

tm(3): Fix types in man page.

PR lib/58651: tm(3): wrong type in man page for tm_gmtoff

tm(3): Fix type of tm_zone again, and describe it as const.

It is `char *', not `char'. But it's also not supposed to be written
to, as kre@ noted, so just document it as `const' even though it's
technically not declared that way, presumably for expedience of
managing it with malloc/free internally.

PR lib/58651: tm(3): wrong type in man page for tm_gmtoff
 1.5.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5.2.1 13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #966):

share/man/man3/tm.3: revision 1.6
share/man/man3/tm.3: revision 1.7

tm(3): Fix types in man page.

PR lib/58651: tm(3): wrong type in man page for tm_gmtoff

tm(3): Fix type of tm_zone again, and describe it as const.

It is `char *', not `char'. But it's also not supposed to be written
to, as kre@ noted, so just document it as `const' even though it's
technically not declared that way, presumably for expedience of
managing it with malloc/free internally.

PR lib/58651: tm(3): wrong type in man page for tm_gmtoff
 1.14 24-May-2019  wiz Remove empty line.
 1.13 24-May-2019  ryoon Add rbtree(3) to SEE ALSO
 1.12 03-Jul-2017  wiz branches: 1.12.6;
Remove workaround for ancient HTML generation code.
 1.11 29-Mar-2013  christos branches: 1.11.20;
fix merge conflicts
 1.10 29-Mar-2013  wiz Fix date and conflict; use Dv for NULL.
 1.9 29-Mar-2013  christos sync with OpenBSD.
 1.8 29-Mar-2013  pgoyette Minor typo
 1.7 21-Dec-2010  njoly branches: 1.7.6; 1.7.12;
Fix xref: rb(3) -> rbtree(3).
 1.6 05-May-2010  jruoho Add a note that rb(3) is preferred for new code.
 1.5 14-Feb-2009  dholland Document that the element argument of RB_REMOVE must be present in the
tree. Minor adjoining grammar fix. PR 39684.
Bump date.
 1.4 07-Oct-2008  apb branches: 1.4.2; 1.4.4;
Add a NOTE saying that invalid usage leads to undefined behaviour.
Inspired by PR 39684.
 1.3 14-Apr-2004  pooka Rather than using RB_EMPTY() for checking if a splay tree is empty,
suggest using it for checking if a red-black tree is empty.
 1.2 09-Jul-2003  wiz Nd argument needs no quotes; use .In instead of .Fd ...; mark up
NULL as Dv instead of Va (it's not really variable, is it? :) ).
Replace & with \*[Am].
 1.1 07-Jul-2003  yamt tree(3) manpage from OpenBSD.
 1.4.4.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.4.2.1 23-Feb-2009  snj Pull up following revision(s) (requested by dholland in ticket #466):
share/man/man3/tree.3: revision 1.5
Document that the element argument of RB_REMOVE must be present in the
tree. Minor adjoining grammar fix. PR 39684.
Bump date.
 1.7.12.1 23-Jun-2013  tls resync from head
 1.7.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.20.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.12.6.1 10-Jun-2019  christos Sync with HEAD
 1.2 19-Dec-2010  jruoho Document the __alignof__ GNU extension.
 1.1 17-Dec-2010  jruoho There is no harm to add a manual page for the GNU typeof()-construct, given
that it has already crawled into the source tree.
 1.7 08-Jun-2020  sevan Pp before Bl
 1.6 10-Apr-2011  jruoho Xref unistd(3).
 1.5 08-Apr-2011  jruoho Xref param(3).
 1.4 22-Apr-2010  jruoho A small correction. Typos.
 1.3 22-Apr-2010  wiz Get rid of some unnecessary whitespace.
Add backslash before a dash to get a minus.
 1.2 22-Apr-2010  jruoho One small correction: .Ss instead of .Sh.
 1.1 22-Apr-2010  jruoho Rewrite types(5) as per perry@'s suggestion from few years back ("XXX this
document is rather musty. It needs a general update."). Also move it to the
right section from section 5. Ok wiz@.

To minimize maintenance costs, the content is mostly jargon around The
Standard. Only few NetBSD-specific types are mentioned as an example.
 1.2 15-Aug-2024  riastradh branches: 1.2.2; 1.2.6;
libc: New functions c8rtomb(3) and mbrtoc8(3).

New in C23, for converting from UTF-8 to locale-dependent multibyte
sequences (c8rtomb) or vice versa (mbrtoc8), along with the new type
char8_t.

Conditional on either:
- _NETBSD_SOURCE
- _ISOC23_SOURCE
- __STDC_VERSION__ >= 202311L

(Riding the libc minor bump from this morning for the UTF-16/UTF-32
versions from C11.)

PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb
 1.1 15-Aug-2024  riastradh libc: New C11 functions mbrtoc16, mbrtoc32, c16rtomb, c32rtomb.

The mbrtoc16/32 functions read mulitbyte strings according to the
current locale into UTF-16/32 code unit sequences; the c16/32rtomb
functions write UTF-16/32 code unit sequences into multibyte strings
according to the current locale. The `r' means restartable: they
work incrementally and pick up where they left off.

NOTE: This bumps the libc minor version, since it adds new symbols.

PR lib/52374: <uchar.h> missing
 1.2.6.2 02-Aug-2025  perseant Sync with HEAD
 1.2.6.1 15-Aug-2024  perseant file uchar.3 was added on branch perseant-exfatfs on 2025-08-02 05:55:10 +0000
 1.2.2.2 14-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #976):

lib/libc/locale/c32rtomb.3: revision 1.10
lib/libc/locale/c32rtomb.3: revision 1.9
lib/libc/locale/c32rtomb.3: revision 1.11
tests/lib/libc/locale/t_mbrtoc32.c: revision 1.1
distrib/sets/lists/base/shl.mi: revision 1.988
lib/libc/include/namespace.h: revision 1.204
lib/libc/include/namespace.h: revision 1.205
lib/libc/locale/mbrtoc16.3: revision 1.1
lib/libc/locale/mbrtoc16.c: revision 1.1
lib/libc/locale/mbrtoc16.3: revision 1.2
lib/libc/locale/mbrtoc16.c: revision 1.2
lib/libc/locale/mbrtoc16.3: revision 1.3
lib/libc/locale/mbrtoc16.c: revision 1.3
lib/libc/locale/mbrtoc32.3: revision 1.1
lib/libc/locale/mbrtoc32.c: revision 1.1
tests/lib/libc/locale/t_c16rtomb.c: revision 1.1
lib/libc/locale/mbrtoc32.c: revision 1.2
lib/libc/locale/mbrtoc16.3: revision 1.4
lib/libc/locale/mbrtoc16.c: revision 1.4
lib/libc/locale/mbrtoc32.3: revision 1.2
tests/lib/libc/locale/t_c16rtomb.c: revision 1.2
lib/libc/locale/mbrtoc32.c: revision 1.3
lib/libc/locale/mbrtoc16.3: revision 1.5
lib/libc/locale/mbrtoc16.c: revision 1.5
lib/libc/locale/mbrtoc32.3: revision 1.3
tests/lib/libc/locale/t_c16rtomb.c: revision 1.3
lib/libc/locale/mbrtoc32.c: revision 1.4
lib/libc/locale/mbrtoc16.3: revision 1.6
lib/libc/locale/mbrtoc16.c: revision 1.6
lib/libc/locale/mbrtoc32.3: revision 1.4
tests/lib/libc/locale/t_c16rtomb.c: revision 1.4
lib/libc/locale/mbrtoc32.c: revision 1.5
lib/libc/locale/mbrtoc16.3: revision 1.7
lib/libc/locale/mbrtoc16.c: revision 1.7
lib/libc/locale/mbrtoc32.3: revision 1.5
tests/lib/libc/locale/t_c16rtomb.c: revision 1.5
lib/libc/locale/mbrtoc32.c: revision 1.6
lib/libc/locale/mbrtoc16.3: revision 1.8
lib/libc/locale/mbrtoc32.3: revision 1.6
tests/lib/libc/locale/t_c16rtomb.c: revision 1.6
lib/libc/locale/mbrtoc32.c: revision 1.7
lib/libc/locale/mbrtoc16.3: revision 1.9
lib/libc/locale/mbrtoc32.3: revision 1.7
lib/libc/locale/mbrtoc32.c: revision 1.8
lib/libc/locale/mbrtoc32.3: revision 1.8
lib/libc/locale/mbrtoc32.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.2468
lib/libc/locale/mbrtoc32.3: revision 1.9
distrib/sets/lists/comp/mi: revision 1.2469
lib/libc/locale/c32rtomb.h: revision 1.1
lib/libc/locale/c32rtomb.h: revision 1.2
include/Makefile: revision 1.147
share/man/man3/uchar.3: revision 1.1
share/man/man3/uchar.3: revision 1.2
tests/lib/libc/locale/t_c32rtomb.c: revision 1.1
distrib/sets/lists/comp/mi: revision 1.2470
lib/libc/locale/c16rtomb.3: revision 1.1
lib/libc/locale/c16rtomb.c: revision 1.1
lib/libc/locale/c16rtomb.3: revision 1.2
lib/libc/locale/c16rtomb.c: revision 1.2
lib/libc/locale/c16rtomb.3: revision 1.3
lib/libc/locale/c16rtomb.c: revision 1.3
lib/libc/locale/c16rtomb.3: revision 1.4
lib/libc/locale/c16rtomb.c: revision 1.4
lib/libc/locale/c16rtomb.3: revision 1.5
lib/libc/locale/c16rtomb.c: revision 1.5
lib/libc/locale/c16rtomb.3: revision 1.6
lib/libc/locale/c16rtomb.c: revision 1.6
lib/libc/locale/c16rtomb.3: revision 1.7
lib/libc/locale/c16rtomb.c: revision 1.7
lib/libc/locale/c16rtomb.3: revision 1.8
lib/libc/locale/c16rtomb.3: revision 1.9
distrib/sets/lists/tests/mi: revision 1.1330
distrib/sets/lists/tests/mi: revision 1.1331
distrib/sets/lists/tests/mi: revision 1.1332
tests/lib/libc/locale/t_uchar.c: revision 1.1
tests/lib/libc/locale/t_uchar.c: revision 1.2
tests/lib/libc/locale/t_uchar.c: revision 1.3
tests/lib/libc/locale/t_mbrtoc16.c: revision 1.1
tests/lib/libc/locale/t_mbrtoc16.c: revision 1.2
tests/lib/libc/locale/t_mbrtoc16.c: revision 1.3
include/uchar.h: revision 1.1
include/uchar.h: revision 1.2
include/uchar.h: revision 1.3
include/uchar.h: revision 1.4
include/uchar.h: revision 1.5
tests/lib/libc/locale/t_c8rtomb.c: revision 1.1
include/uchar.h: revision 1.6
tests/lib/libc/locale/t_c8rtomb.c: revision 1.2
tests/lib/libc/locale/t_c8rtomb.c: revision 1.3
tests/lib/libc/locale/t_c8rtomb.c: revision 1.4
share/man/man3/Makefile: revision 1.93
tests/lib/libc/locale/t_c8rtomb.c: revision 1.5
tests/lib/libc/locale/t_c8rtomb.c: revision 1.6
tests/lib/libc/locale/t_c8rtomb.c: revision 1.7
lib/libc/shlib_version: revision 1.297
lib/libc/locale/c16rtomb.3: revision 1.10
lib/libc/locale/c16rtomb.3: revision 1.11
tests/lib/libc/locale/t_mbrtoc8.c: revision 1.1
tests/lib/libc/locale/t_mbrtoc8.c: revision 1.2
tests/lib/libc/locale/t_mbrtoc8.c: revision 1.3
lib/libc/locale/mbrtoc16.3: revision 1.10
tests/lib/libc/locale/Makefile: revision 1.15
tests/lib/libc/locale/Makefile: revision 1.16
tests/lib/libc/locale/Makefile: revision 1.17
tests/lib/libc/locale/Makefile: revision 1.18
distrib/sets/lists/debug/mi: revision 1.442
distrib/sets/lists/debug/mi: revision 1.443
distrib/sets/lists/debug/mi: revision 1.444
lib/libc/locale/c8rtomb.3: revision 1.1
lib/libc/locale/c8rtomb.c: revision 1.1
lib/libc/locale/c8rtomb.3: revision 1.2
lib/libc/locale/c8rtomb.c: revision 1.2
lib/libc/locale/c8rtomb.3: revision 1.3
lib/libc/locale/c8rtomb.c: revision 1.3
lib/libc/locale/c8rtomb.3: revision 1.4
lib/libc/locale/c8rtomb.c: revision 1.4
lib/libc/locale/c8rtomb.3: revision 1.5
lib/libc/locale/c8rtomb.c: revision 1.5
lib/libc/locale/c8rtomb.3: revision 1.6
lib/libc/locale/c8rtomb.c: revision 1.6
lib/libc/locale/c8rtomb.3: revision 1.7
lib/libc/locale/c8rtomb.3: revision 1.8
lib/libc/locale/c8rtomb.3: revision 1.9
lib/libc/locale/mbrtoc32.h: revision 1.1
lib/libc/locale/mbrtoc32.h: revision 1.2
lib/libc/locale/mbrtoc8.c: revision 1.1
lib/libc/locale/mbrtoc8.3: revision 1.1
lib/libc/locale/mbrtoc8.c: revision 1.2
lib/libc/locale/mbrtoc8.3: revision 1.2
lib/libc/locale/mbrtoc8.c: revision 1.3
lib/libc/locale/mbrtoc8.3: revision 1.3
lib/libc/locale/mbrtoc8.c: revision 1.4
lib/libc/locale/mbrtoc8.3: revision 1.4
lib/libc/locale/Makefile.inc: revision 1.66
lib/libc/locale/mbrtoc8.c: revision 1.5
lib/libc/locale/mbrtoc8.3: revision 1.5
lib/libc/locale/Makefile.inc: revision 1.67
lib/libc/locale/mbrtoc8.c: revision 1.6
lib/libc/locale/mbrtoc8.3: revision 1.6
lib/libc/locale/mbrtoc8.c: revision 1.7
lib/libc/locale/mbrtoc8.3: revision 1.7
lib/libc/locale/mbrtoc8.c: revision 1.8
lib/libc/locale/c32rtomb.3: revision 1.1
lib/libc/locale/c32rtomb.c: revision 1.1
lib/libc/locale/c32rtomb.3: revision 1.2
lib/libc/locale/c32rtomb.c: revision 1.2
lib/libc/locale/c32rtomb.3: revision 1.3
lib/libc/locale/c32rtomb.c: revision 1.3
lib/libc/locale/c32rtomb.3: revision 1.4
lib/libc/locale/c32rtomb.c: revision 1.4
lib/libc/locale/c32rtomb.3: revision 1.5
lib/libc/locale/c32rtomb.c: revision 1.5
lib/libc/locale/c32rtomb.3: revision 1.6
lib/libc/locale/c32rtomb.c: revision 1.6
lib/libc/locale/c32rtomb.3: revision 1.7
lib/libc/locale/c32rtomb.3: revision 1.8

(all via patch)


tests/lib/libc/locale/Makefile: Sort.
No functional change intended.
Preparation for PR lib/52374.

uchar.h: New header file for C11 (and C++11) compliance.

Implementation of the new functions mbrtoc16, c16rtomb, mbrtoc32, and
c32rtomb to come later. Updates for C23 to come later.
PR lib/52374: <uchar.h> missing

libc: New C11 functions mbrtoc16, mbrtoc32, c16rtomb, c32rtomb.

The mbrtoc16/32 functions read mulitbyte strings according to the
current locale into UTF-16/32 code unit sequences; the c16/32rtomb
functions write UTF-16/32 code unit sequences into multibyte strings
according to the current locale. The `r' means restartable: they
work incrementally and pick up where they left off.

NOTE: This bumps the libc minor version, since it adds new symbols.

PR lib/52374: <uchar.h> missing
mbrtoc16(3), mbrtoc32(3): Fix \n in man page examples.
Need to write \en to pacify roff.
PR lib/52374: <uchar.h> missing

c16rtomb(3), c32rtomb(3): Fix more \n in man pages.
Also, tighten an assertion: we left room for a NUL byte at the end.
PR lib/52374: <uchar.h> missing

libc: Use the more idiomatic alignof from stdalign.h.
No functional change intended.
PR lib/52374: <uchar.h> missing

mbrtoc16(3): Simplify surrogate state test.

Turn the finer-grained test into an assertion.
No semantic change intended: we are supposed to control this state,
and we always arrange it this way. (But in principle this could
change the behaviour of buggy programs that violate the mbstate_t
abstraction.)
PR lib/52374: <uchar.h> missing

libc: New functions c8rtomb(3) and mbrtoc8(3).

New in C23, for converting from UTF-8 to locale-dependent multibyte
sequences (c8rtomb) or vice versa (mbrtoc8), along with the new type
char8_t.

Conditional on either:
- _NETBSD_SOURCE
- _ISOC23_SOURCE
- __STDC_VERSION__ >= 202311L
(Riding the libc minor bump from this morning for the UTF-16/UTF-32
versions from C11.)

PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb
libc: c32rtomb and mbrtoc32 are used internally, so weak-alias them.
PR lib/52374: <uchar.h> missing
c8rtomb(3), mbrtoc8(3): Use namespace.h to get private aliases.

This way applications defining the symbols c32rtomb or mbrtoc32 won't
clobber our private definitions, which are slightly more constrained
about their use of mbstate_t than is obvious from the interface
contract.

PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb
mbrtoc16(3), mbrtoc32(3): brush up markup

Split long .Fn lines into Fo/Fa/Fc. Dont indent the list of return
values. Don't use artisanal -width.

Untabify code examples - indented literal displays don't have correct
tab stops consistent with tab stops in the fixed font code, so the
lines end up misaligned in the PostScript output.

c16rtomb(3), c32rtomb(3): brush up markup

mbrtoc16(3), mbrtoc32(3): Simplify return value language.
Also expand BMP only once.
PR lib/52374: <uchar.h> missing

mbrtoc16(3), mbrtoc32(3): No state overlap with mbrtoc8 or c8rtomb.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc32(3): Clarify control flow.
No need for another goto here; let's keep it clearly structured with
a single `out' label.
No functional change intended.
PR lib/52374: <uchar.h> missing

c8rtomb(3), mbrtoc8(3): brush up markup

mbrtoc8(3): Simplify return value language.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

c16rtomb(3), c32rtomb(3): Specify what happens if ps is null.
PR lib/52374: <uchar.h> missing

c8rtomb(3): Specify what happens when ps is null.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

c16rtomb(3), c32rtomb(3): No state overlap with mbrtoc8 or c8rtomb.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc16(3), mbrtoc32(3): Work on deturgidifying prose.
Still maybe not great but at least there's less jargon in most of the
text, without really losing any content.
PR lib/52374: <uchar.h> missing

mbrtoc8(3): Work on deturgidifying prose.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc16(3), mbrtoc32(3): Restore word accidentally removed.
PR lib/52374: <uchar.h> missing

mbrtoc8(3): Restore word accidentally removed.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

c8rtomb(3): Fix possible error descriptions.
The argument c8 can't be a surrogate code point itself (they're in
the range [0xd800,0xdfff], beyond 8-bit values), but the bits of a
surrogate code point could be forced into the UTF-8 format, which is
also invalid.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

c16rtomb(3), c32rtomb(3): Attempt a deturgidification pass.
Limit the jargon around surrogates.
PR lib/52374: <uchar.h> missing

c8rtomb(3): Clarify prose and fix example in caveat.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb
c16rtomb(3), c32rtomb(3), mbrtoc16(3), mbrtoc32(3): xref c8 versions.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc16(3): Clarify how many bytes are consumed in special cases.
Fix overlap in RETURN VALUES section.
PR lib/52374: <uchar.h> missing

mbrtoc8(3): Clarify how many bytes are consumed in special cases.
Fix overlap in RETURN VALUES section.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

pass lint, XXX see lint bug.

libc: Add _l variants of the cNrtomb and mbrtocN functions.
These accept an explicit locale parameter, rather than using the
current locale.
Visible under _NETBSD_SOURCE, not exposed otherwise.
NOTE: This adds libc symbols. Riding the libc minor bump for the
non-_l variants of these from two days ago -- hope that's not pushing
it too far.
PR lib/58613: c*rtomb, mbrtoc* should have locale-parametric _l
variants

c8rtomb(3), c16rtomb(3): Add tests for incomplete NUL termination.
PR lib/58615: incomplete c8rtomb, c16rtomb handles NUL termination
wrong

c8rtomb(3), c16rtomb(3): Fix NUL handling.
PR lib/58615: incomplete c8rtomb, c16rtomb handles NUL termination
wrong

c8rtomb(3), c16rtomb(3), c32rtomb(3): Test stateful shift sequences.
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

c8rtomb(3): Fix digit error in shift sequence test.
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

c8rtomb(3): Nix __CTASSERT after case label.
I put this in to make it (machine-verifiably) clear that zeroing the
state is the same as returning to the initial conversion state, as
the standard requires, but this is causing build trouble (and will
likely cause more trouble if pulled up) because some definitions of
__CTASSERT make a declaration which is forbidden after a label, so
let's remove it.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc8(3): Fix pasto in comment at top.
No functional change intended.
PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb

mbrtoc8: remove lint-specific workarounds
No binary change.

mbrtoc8: fix comments

mbrtoc16, mbrtoc32: fix comments, remove lint-specific workarounds
No binary change.
t_c8rtomb, t_c16rtomb: Simplify comment.
ESC $ B is technically rather the JIS X 0208-1983 shift sequence, but
since I don't see any way to provoke the JIS X 0208-1978 shift
sequence to come flying out of this conversion (ESC $ @), and I'm not
sure there's any difference in the interpretation, let's just say JIS
X 0208.
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

c32rtomb(3): Use conversion state to handle shift sequences.
For conversion of Unicode scalar values to coding systems requiring
shift sequences, such as ISO-2022-JP, _citrus_iconv_convert will
always produce:
1. a shift sequence from the initial state to some nondefault state,
like from US-ASCII to JIS X 0208
2. the encoding of the desired characater
3. a shift sequence restoring the initial state
This is unnecessary if the output is already in the state needed to
encoded the desired character. For example, this method produces
seven bytes to encode each YEN SIGN in ISO-2022-JP -- and fourteen,
to encode two consecutive ones -- even though the shift sequence is
only three bytes long and once shifted YEN SIGN takes only one byte.
Instead, convert the Unicode scalar value to a locale-dependent wide
character and encode that, by composing
- _citrus_iconv_convert
=> gives us a multibyte encoding of the character from the initial
state (and restoring the initial state afterward)
- mbrtowc with initial conversion state
=> gives us the single wide character representation
XXX If combining characters are possible here, this may fail.
- wcrtomb with caller's conversion tsate
=> gives us a state-dependent multibyte encoding of the character
XXX Is there a cheaper way to convert from Unicode scalar value to
locale-dependent wide character? It is not obvious to me from the
largely undocumented Citrus machinery, but it would obviously be
better than this somewhat circuitous Rube Goldberg contraption of
chained multibyte APIs.
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

mbrtoc8(3), mbrtoc16(3): Test consuming shift sequences with state.
This has the side effect of testing mbrtoc32(3) because they are both
defined in terms of it.
PR lib/58618: mbrtocN(3) fails to keep shift state

c8rtomb(3), c16rtomb(3), c32rtomb(3): Suggest MB_LEN_MAX in example.
This way it avoids variable-length arrays, by always allocating the
maximum space that could be occupied by MB_CUR_MAX.

mbrtoc32(3): Use conversion state to handle shift sequences.
PR lib/58618: mbrtocN(3) fails to keep shift state

mbrtoc32(3): Fix name and type of mbrtowc_l return value.
This was from `int mbtowc_l(...)' in an earlier draft and I didn't
update it to size_t when I changed the draft to mbrtowc_l. Caught by
lint.
`mb_len' avoids (harmless) clash with standard C function mblen(3).
PR lib/58618: mbrtocN(3) fails to keep shift state

c32rtomb(3): Fix type of wcrtomb_l return value.
This was from `int wctomb_l(...)' in an earlier draft and I didn't
update it to size_t when I changed the draft to wcrtomb_l. Caught by
lint.
`wc_len' mirrors `mb_len' in the complementary code in mbrtoc32(3) to
avoid clash with standard C function mblen(3).
PR lib/58612: c8rtomb/c16rtomb/c32rtomb yield suboptimal shift
sequences

c8rtomb(3), c16rtomb(3), c32rtomb(3): Attempt to simplify language.

c8rtomb(3), c16rtomb(3), c32rtomb(3): Fix null string output case.
This ignores c8/c16/c32, produces no output anywhere, and just resets
ps to the initial conversion state.
Also just use 0 in the example, not '\0' or L'\0'. This works for
C11, which prefers '\0' and L'\0', for and C23, which introduced the
new u8'\0', u'\0' (UTF-16), and U'\0' (UTF-32).
c16rtomb, c32rtomb, mbrtoc8: fix page numbers in comments
mbrtoc8(3), mbrtoc16(3), mbrtoc32(3): Say 0 for zero code unit.
Rather than deal with differences between C11 and C23 in notation,
'\0' vs L'\0' vs u8'\0' vs u'\0' vs U'\0'.
uchar.h: Include <sys/featuretest.h> before testing _*_SOURCE.
PR lib/58752: various header files test _*_SOURCE macros but don't
include sys/featuretest.h
PR lib/52374: <uchar.h> missing

uchar.h: Need <sys/cdefs.h> for __restrict.
PR lib/52374: <uchar.h> missing

uchar.h: Simplify __cpp_char8_t and __cplusplus conditionals.
No functional change intended.
PR lib/52374: <uchar.h> missing

tests/lib/libc/locale/t_uchar: Test for char8_t, mbrtoc8, c8rtomb.
PR lib/58752: various header files test _*_SOURCE macros but don't
include sys/featuretest.h
PR lib/52374: <uchar.h> missing

tests/t_uchar: fix copy-and-paste typo
 1.2.2.1 15-Aug-2024  martin file uchar.3 was added on branch netbsd-10 on 2024-10-14 17:20:21 +0000
 1.4 09-Aug-2011  jruoho Xref limits(3).
 1.3 12-Apr-2011  jruoho Small rewording.
 1.2 10-Apr-2011  wiz Fix some xrefs.
 1.1 10-Apr-2011  jruoho Add a small summary page for <unistd.h>.
 1.9 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.8 08-Apr-2011  wiz Sort sections.
 1.7 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.5 16-Apr-2003  wiz Use .In instead of .Fd.
 1.4 31-Mar-2003  perry preceeding->preceding, from Igor Sobrado PR misc/19814
 1.3 06-Feb-2002  wiz Drop some trailing whitespace.
 1.2 05-Feb-2002  kleink KNF example code snippet.
 1.1 04-Feb-2002  kleink Add a separate varargs(3) manual page, reusing stdarg(3) contents, and
remove the name `varargs' from stdarg(3); inspired by conversation with
Charles Hannum.

RSS XML Feed