Home | History | Annotate | only in /src/lib/libc/compat
History log of /src/lib/libc/compat
RevisionDateAuthorComments
 1.6 22-Jan-2012  christos From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
 1.5 07-Jun-2010  tnozaki branches: 1.5.6;
1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.4 11-Jan-2009  christos merge christos-time_t
 1.3 26-Aug-2006  matt branches: 1.3.26;
Move ns_addr and ns_ntoa to compat libc. Add a stripped version of
<netns/ns.h> which only include struct ns_addr and the ns_addr and ns_ntoa
function prototypes.
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.3.26.1 08-Nov-2008  christos time_t changes
 1.5.6.1 17-Apr-2012  yamt sync with head
 1.7 22-Jan-2012  christos From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
 1.6 07-Jun-2010  tnozaki branches: 1.6.6;
1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.5 11-Jan-2009  christos merge christos-time_t
 1.4 26-Aug-2006  matt branches: 1.4.26;
Move ns_addr and ns_ntoa to compat libc. Add a stripped version of
<netns/ns.h> which only include struct ns_addr and the ns_addr and ns_ntoa
function prototypes.
 1.3 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.2 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.1 13-Sep-2005  christos compat core reorg.
 1.4.26.1 08-Nov-2008  christos time_t changes
 1.6.6.1 17-Apr-2012  yamt sync with head
 1.1 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.2 29-Apr-2018  jmcneill Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1 10-Aug-2014  matt branches: 1.1.4; 1.1.24;
Preliminary files for AARCH64 (64-bit ARM) support.
Enough for a distribution build.
 1.1.24.1 02-May-2018  pgoyette Synch with HEAD
 1.1.4.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.4.1 10-Aug-2014  tls file Makefile.inc was added on branch tls-maxphys on 2014-08-20 00:02:13 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file Makefile.inc was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_Ovfork.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat___semctl.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat___sigreturn14.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_msgctl.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_quotactl.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_shmctl.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_sigaction.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_sigpending.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_sigprocmask.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_sigreturn.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.1 29-Apr-2018  jmcneill branches: 1.1.2;
Add some compat stubs for aarch64. Not providing any actual compatibility
with old binaries (there are none), but having these symbols helps GNU
configure scripts.
 1.1.2.2 02-May-2018  pgoyette Synch with HEAD
 1.1.2.1 29-Apr-2018  pgoyette file compat_sigsuspend.S was added on branch pgoyette-compat on 2018-05-02 07:20:01 +0000
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.2 28-Jun-2006  drochner build frexp/ldexp/modf in the "compat" part
(code is identical)
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.5 25-May-2021  thorpej POSIX sez:
The longjmp() function shall not cause setjmp() to return 0; if val
is 0, setjmp() shall return 1.

Fixes the _longjmp_zero and longjmp_zero test cases in the t_setjmp
test on alpha.
 1.4 24-Jan-2014  skrll branches: 1.4.32;
Load the magic into the right register for the comparison in _longjmp
 1.3 24-Jan-2014  christos remove bogus comment, we are not working around an assembler issue.
 1.2 23-Jan-2014  christos Use a constant in the text segment to avoid the .lit8 out of range relocation
error.
 1.1 16-Sep-2005  drochner branches: 1.1.44; 1.1.50;
bring the compat code for alpha into place
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.32.1 31-May-2021  cjep sync with head
 1.3 25-May-2021  thorpej POSIX sez:
The longjmp() function shall not cause setjmp() to return 0; if val
is 0, setjmp() shall return 1.

Fixes the _longjmp_zero and longjmp_zero test cases in the t_setjmp
test on alpha.
 1.2 23-Jan-2014  christos branches: 1.2.32;
Use a constant in the text segment to avoid the .lit8 out of range relocation
error.
 1.1 16-Sep-2005  drochner branches: 1.1.44; 1.1.50;
bring the compat code for alpha into place
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.32.1 31-May-2021  cjep sync with head
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 16-Sep-2005  drochner branches: 1.1.40;
bring the compat code for alpha into place
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Sep-2005  drochner branches: 1.1.18;
bring the compat code for alpha into place
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Sep-2005  drochner branches: 1.1.18;
bring the compat code for alpha into place
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Sep-2005  drochner branches: 1.1.18;
bring the compat code for alpha into place
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Sep-2005  drochner branches: 1.1.18;
bring the compat code for alpha into place
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.1 16-Sep-2005  drochner bring the compat code for alpha into place
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 16-Oct-2005  christos complete arm's move to the new compat layout.
 1.2 28-Jun-2006  drochner build frexp/ldexp/modf in the "compat" part (code is identical)
(These are the easy cases where no assembler implementations exist.)
 1.1 16-Oct-2005  christos complete arm's move to the new compat layout.
 1.5 05-Dec-2020  skrll spaces to tab
 1.4 30-Nov-2013  joerg Use PLT_SYM.
 1.3 19-Aug-2013  matt Use _INVOKE_CERROR() and movs
 1.2 11-Jan-2013  matt Remove all FPA code.
Support VFP for hard float
Allow MKSOFTFLOAT=no
 1.1 16-Oct-2005  christos branches: 1.1.10; 1.1.44; 1.1.50;
complete arm's move to the new compat layout.
 1.1.50.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.50.1 25-Feb-2013  tls resync with head
 1.1.44.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.1.44.1 23-Jan-2013  yamt sync with head
 1.1.10.1 06-Nov-2007  matt Make the compat syscalls thumb compatible.
 1.3 30-Nov-2013  joerg Use PLT_SYM.
 1.2 19-Aug-2013  matt Use _INVOKE_CERROR() and movs
 1.1 16-Oct-2005  christos branches: 1.1.10; 1.1.44; 1.1.50;
complete arm's move to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.1.10.1 06-Nov-2007  matt Make the compat syscalls thumb compatible.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 16-Oct-2005  christos branches: 1.1.40;
complete arm's move to the new compat layout.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.3 19-Aug-2013  matt Use _INVOKE_CERROR() and movs
 1.2 01-Aug-2013  matt CERROR is now hidden so no need to call it via the PLT
 1.1 16-Oct-2005  christos branches: 1.1.10; 1.1.44; 1.1.50;
complete arm's move to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.1.10.1 06-Nov-2007  matt Make the compat syscalls thumb compatible.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
complete arm's move to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.1 16-Oct-2005  christos complete arm's move to the new compat layout.
 1.3 19-Aug-2013  matt Use _INVOKE_CERROR() and movs
 1.2 28-Apr-2008  martin branches: 1.2.4; 1.2.8; 1.2.28;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
complete arm's move to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___sigtramp1.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2.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.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
complete arm's move to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
complete arm's move to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
complete arm's move to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.3 19-Aug-2013  matt Use _INVOKE_CERROR() and movs
 1.2 01-Aug-2013  matt CERROR is now hidden so no need to call it via the PLT
 1.1 16-Oct-2005  christos branches: 1.1.10; 1.1.44; 1.1.50;
complete arm's move to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.1.10.1 06-Nov-2007  matt Make the compat syscalls thumb compatible.
 1.3 19-Aug-2013  matt Use _INVOKE_CERROR() and movs
 1.2 01-Aug-2013  matt CERROR is now hidden so no need to call it via the PLT
 1.1 16-Oct-2005  christos branches: 1.1.10; 1.1.44; 1.1.50;
complete arm's move to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.1.10.1 06-Nov-2007  matt Make the compat syscalls thumb compatible.
 1.2 16-Oct-2005  christos fix typo.
 1.1 16-Oct-2005  christos complete arm's move to the new compat layout.
 1.2 16-Oct-2005  christos fix typo.
 1.1 16-Oct-2005  christos complete arm's move to the new compat layout.
 1.3 19-Aug-2013  matt Use _INVOKE_CERROR() and movs
 1.2 01-Aug-2013  matt CERROR is now hidden so no need to call it via the PLT
 1.1 16-Oct-2005  christos branches: 1.1.10; 1.1.44; 1.1.50;
complete arm's move to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.1.10.1 06-Nov-2007  matt Make the compat syscalls thumb compatible.
 1.3 28-Jun-2006  drochner build frexp/ldexp/modf in the "compat" part (code is identical)
(These are the easy cases where no assembler implementations exist.)
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 11-Mar-2006  christos move hppa to the new compat layout.
 1.1 28-Jun-2006  drochner build frexp/ldexp/modf in the "compat" part (code is identical)
(These are the easy cases where no assembler implementations exist.)
 1.1 07-Jun-2010  tnozaki 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.3 30-Oct-2021  christos Put back the sigcontext sigtramp code.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 11-Mar-2006  christos branches: 1.1.40;
move hppa to the new compat layout.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.3 05-May-2020  skrll Add a space before any non-nullified instruction. NFCI.
 1.2 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.1 11-Mar-2006  christos move hppa to the new compat layout.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
move hppa to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.1 11-Mar-2006  christos move hppa to the new compat layout.
 1.1 30-Oct-2021  christos Put back the sigcontext sigtramp code.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
move hppa to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
move hppa to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
move hppa to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.6 09-Aug-2021  andvar fix various typos in compatibility, mainly in comments.
 1.5 05-May-2020  skrll Mark __cerror as hidden to avoid using the PLT. This is required for new
binutils where the PLT stubs now use %t1 (%r22) which is used to pass
the errno to __cerror.
 1.4 05-May-2020  skrll Use the delay slot
 1.3 03-May-2020  skrll More trailing whitespace
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
move hppa to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigpending.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.6 09-Aug-2021  andvar fix various typos in compatibility, mainly in comments.
 1.5 05-May-2020  skrll Mark __cerror as hidden to avoid using the PLT. This is required for new
binutils where the PLT stubs now use %t1 (%r22) which is used to pass
the errno to __cerror.
 1.4 05-May-2020  skrll Use the delay slot
 1.3 03-May-2020  skrll Trailing whitespace
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
move hppa to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigprocmask.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.6 09-Aug-2021  andvar fix various typos in compatibility, mainly in comments.
 1.5 05-May-2020  skrll Mark __cerror as hidden to avoid using the PLT. This is required for new
binutils where the PLT stubs now use %t1 (%r22) which is used to pass
the errno to __cerror.
 1.4 05-May-2020  skrll Use the delay slot
 1.3 03-May-2020  skrll More trailing whitespace
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
move hppa to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigreturn.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.6 09-Aug-2021  andvar fix various typos in compatibility, mainly in comments.
 1.5 05-May-2020  skrll Mark __cerror as hidden to avoid using the PLT. This is required for new
binutils where the PLT stubs now use %t1 (%r22) which is used to pass
the errno to __cerror.
 1.4 05-May-2020  skrll Use the delay slot
 1.3 03-May-2020  skrll Trailing whitespace
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
move hppa to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigsuspend.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.3 09-Feb-2015  pooka Include compat in rumprun libc

Not including non-renamed symbols in libc caused all kinds of configure
scripts to do the wrong thing when they just tested linkage without
including headers. So, go for the "least moving parts" bandaid for now.
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 13-Sep-2005  christos compat core reorg.
 1.3 27-Jun-2006  drochner Build just the compatibility versions of frexp()/ldexp()/modf(), the
real implementation is in libm.
 1.2 05-Oct-2005  christos _setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes
 1.1 13-Sep-2005  christos compat core reorg.
 1.2 05-Oct-2005  christos _setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes
 1.1 13-Sep-2005  christos compat core reorg.
 1.4 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.3 23-May-2014  uebayasi branches: 1.3.36;
Put missing END() markers to set ELF symbol size.
 1.2 12-Sep-2013  joerg branches: 1.2.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 13-Sep-2005  christos branches: 1.1.44; 1.1.50;
compat core reorg.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.2.1 10-Aug-2014  tls Rebase.
 1.3.36.1 02-Aug-2025  perseant Sync with HEAD
 1.4 03-May-2025  riastradh libc/i386: Omit needless __PIC__ conditionals.

No binary change.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.3 23-May-2014  uebayasi branches: 1.3.36;
Put missing END() markers to set ELF symbol size.
 1.2 12-Sep-2013  joerg branches: 1.2.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 13-Sep-2005  christos branches: 1.1.44; 1.1.50;
compat core reorg.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.2.1 10-Aug-2014  tls Rebase.
 1.3.36.1 02-Aug-2025  perseant Sync with HEAD
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 13-Sep-2005  christos branches: 1.1.40;
compat core reorg.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.3 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.2 12-Sep-2013  joerg branches: 1.2.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 13-Sep-2005  christos branches: 1.1.44; 1.1.50;
compat core reorg.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.2.1 10-Aug-2014  tls Rebase.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.3 23-May-2014  uebayasi Define hacked version of END() in addition to ENTRY().
 1.2 12-Jan-2011  joerg branches: 1.2.12; 1.2.22;
Allow use of traditional CPP to be set on a per platform base in sys.mk.
Honour this for dependency processing in bsd.dep.mk. Switch i386 and
amd64 assembly to use ISO C90 preprocessor concat and drop the
-traditional-cpp on this platform.
 1.1 13-Sep-2005  christos compat core reorg.
 1.2.22.1 10-Aug-2014  tls Rebase.
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.28; 1.2.40;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.40.1 10-Aug-2014  tls Rebase.
 1.2.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___sigtramp1.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.1 13-Sep-2005  christos branches: 1.1.50; 1.1.62;
compat core reorg.
 1.1.62.1 10-Aug-2014  tls Rebase.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.2 12-Sep-2013  joerg branches: 1.2.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 13-Sep-2005  christos branches: 1.1.44; 1.1.50;
compat core reorg.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.2.1 10-Aug-2014  tls Rebase.
 1.3 23-May-2014  uebayasi Define hacked version of END() in addition to ENTRY().
 1.2 12-Jan-2011  joerg branches: 1.2.12; 1.2.22;
Allow use of traditional CPP to be set on a per platform base in sys.mk.
Honour this for dependency processing in bsd.dep.mk. Switch i386 and
amd64 assembly to use ISO C90 preprocessor concat and drop the
-traditional-cpp on this platform.
 1.1 13-Sep-2005  christos compat core reorg.
 1.2.22.1 10-Aug-2014  tls Rebase.
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 23-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.2 12-Sep-2013  joerg branches: 1.2.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 13-Sep-2005  christos branches: 1.1.44; 1.1.50;
compat core reorg.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.2.1 10-Aug-2014  tls Rebase.
 1.1 23-Sep-2006  cherry Further ia64 libc compat bits
 1.4 07-Apr-2025  riastradh ia64: Include compat13 sigprocmask and sigsuspend stubs.

All the other ports already do this. Although ia64 was imported long
after 1.4, the same is true of other ports that nevertheless include
these stubs, like amd64.

We could invent a new __NetBSD_Compat_Min__ macro like
__NetBSD_Version__ that tells the earliest version of NetBSD for
which we aim to support compat binaries, and use that to
conditionalize tests like t_compat_cancel.c. But that's a bit more
trouble for something we can dispense with by a couple tiny syscall
stubs.

Should fix build for:

PR lib/59240: POSIX.1-2024: cancellation point audit
PR lib/59247: pthread_cancelstub.c is inadequately tested
 1.3 30-Jun-2016  mrg branches: 1.3.28;
various ia64 updates:
- add a compat vfork because of stupid
- add a weak sbrk
- add a shmat syscall
- add an empty kvm implementation that links
- add missing fp stuff
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 23-Sep-2006  cherry branches: 1.1.38;
Further ia64 libc compat bits
 1.1.38.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.3.28.1 02-Aug-2025  perseant Sync with HEAD
 1.1 30-Jun-2016  mrg various ia64 updates:
- add a compat vfork because of stupid
- add a weak sbrk
- add a shmat syscall
- add an empty kvm implementation that links
- add missing fp stuff
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 23-Sep-2006  cherry branches: 1.1.16;
Further ia64 libc compat bits
 1.1.16.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.1 07-Apr-2025  riastradh branches: 1.1.4;
ia64: Include compat13 sigprocmask and sigsuspend stubs.

All the other ports already do this. Although ia64 was imported long
after 1.4, the same is true of other ports that nevertheless include
these stubs, like amd64.

We could invent a new __NetBSD_Compat_Min__ macro like
__NetBSD_Version__ that tells the earliest version of NetBSD for
which we aim to support compat binaries, and use that to
conditionalize tests like t_compat_cancel.c. But that's a bit more
trouble for something we can dispense with by a couple tiny syscall
stubs.

Should fix build for:

PR lib/59240: POSIX.1-2024: cancellation point audit
PR lib/59247: pthread_cancelstub.c is inadequately tested
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 07-Apr-2025  perseant file compat_sigprocmask.S was added on branch perseant-exfatfs on 2025-08-02 05:54:34 +0000
 1.1 07-Apr-2025  riastradh branches: 1.1.4;
ia64: Include compat13 sigprocmask and sigsuspend stubs.

All the other ports already do this. Although ia64 was imported long
after 1.4, the same is true of other ports that nevertheless include
these stubs, like amd64.

We could invent a new __NetBSD_Compat_Min__ macro like
__NetBSD_Version__ that tells the earliest version of NetBSD for
which we aim to support compat binaries, and use that to
conditionalize tests like t_compat_cancel.c. But that's a bit more
trouble for something we can dispense with by a couple tiny syscall
stubs.

Should fix build for:

PR lib/59240: POSIX.1-2024: cancellation point audit
PR lib/59247: pthread_cancelstub.c is inadequately tested
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 07-Apr-2025  perseant file compat_sigsuspend.S was added on branch perseant-exfatfs on 2025-08-02 05:54:34 +0000
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 09-Mar-2006  christos files moved from arch compat layout
 1.2 03-Jul-2006  drochner build frexp_ieee754 in the "compat" subtree
(The Makefile logics for ldexp and modf is too involved for me to deal
with this now.)
 1.1 09-Mar-2006  christos files moved from arch compat layout
 1.3 04-Mar-2014  matt Avoid a warning and just do the trap #1 instead of calling sigreturn inline.
If it fails, it'll fall into the botch case so don't bother calling CERROR
on failure.
 1.2 17-Jul-2013  matt Missed these. Convert to motorola format.
 1.1 09-Mar-2006  christos branches: 1.1.44; 1.1.50; 1.1.56;
files moved from arch compat layout
 1.1.56.1 23-Jul-2013  riastradh sync with HEAD
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.3 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.2 17-Jul-2013  matt Missed these. Convert to motorola format.
 1.1 09-Mar-2006  christos branches: 1.1.44; 1.1.50; 1.1.56;
files moved from arch compat layout
 1.1.56.1 23-Jul-2013  riastradh sync with HEAD
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 09-Mar-2006  christos branches: 1.1.40;
files moved from arch compat layout
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.3 12-Sep-2013  joerg Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.2 16-Jul-2013  matt Use SYSTRAP.
Don't use the PLT to call CERROR
Use LEA_LCL / GOT_SETUP
Remove non-__ELF__ code.
Make __minbrk and __curbrk hidden and avoid using the GOT for them.
Convert to motorola syntax.
 1.1 09-Mar-2006  christos branches: 1.1.44; 1.1.50;
files moved from arch compat layout
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 09-Mar-2006  christos branches: 1.1.18;
files moved from arch compat layout
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 16-Jul-2013  matt Use SYSTRAP.
Don't use the PLT to call CERROR
Use LEA_LCL / GOT_SETUP
Remove non-__ELF__ code.
Make __minbrk and __curbrk hidden and avoid using the GOT for them.
Convert to motorola syntax.
 1.1 09-Mar-2006  christos branches: 1.1.44; 1.1.50;
files moved from arch compat layout
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.3 16-Jul-2013  matt Use SYSTRAP.
Don't use the PLT to call CERROR
Use LEA_LCL / GOT_SETUP
Remove non-__ELF__ code.
Make __minbrk and __curbrk hidden and avoid using the GOT for them.
Convert to motorola syntax.
 1.2 28-Apr-2008  martin branches: 1.2.4; 1.2.8; 1.2.28;
Remove clause 3 and 4 from TNF licenses
 1.1 09-Mar-2006  christos branches: 1.1.18;
files moved from arch compat layout
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___sigtramp1.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2.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.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 09-Mar-2006  christos branches: 1.1.18;
files moved from arch compat layout
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 09-Mar-2006  christos branches: 1.1.18;
files moved from arch compat layout
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 09-Mar-2006  christos branches: 1.1.18;
files moved from arch compat layout
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 16-Jul-2013  matt Use SYSTRAP.
Don't use the PLT to call CERROR
Use LEA_LCL / GOT_SETUP
Remove non-__ELF__ code.
Make __minbrk and __curbrk hidden and avoid using the GOT for them.
Convert to motorola syntax.
 1.1 09-Mar-2006  christos branches: 1.1.44; 1.1.50;
files moved from arch compat layout
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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 25-Jul-2013  matt Fix some more CERROR inversions
 1.3 17-Jul-2013  matt Use a more compact instruction sequence that also works on coldfire
 1.2 16-Jul-2013  matt Use SYSTRAP.
Don't use the PLT to call CERROR
Use LEA_LCL / GOT_SETUP
Remove non-__ELF__ code.
Make __minbrk and __curbrk hidden and avoid using the GOT for them.
Convert to motorola syntax.
 1.1 09-Mar-2006  christos branches: 1.1.44; 1.1.50;
files moved from arch compat layout
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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 16-Jul-2013  matt Use SYSTRAP.
Don't use the PLT to call CERROR
Use LEA_LCL / GOT_SETUP
Remove non-__ELF__ code.
Make __minbrk and __curbrk hidden and avoid using the GOT for them.
Convert to motorola syntax.
 1.1 09-Mar-2006  christos branches: 1.1.44; 1.1.50;
files moved from arch compat layout
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.3 25-Jul-2013  matt Fix some more CERROR inversions
 1.2 16-Jul-2013  matt Use SYSTRAP.
Don't use the PLT to call CERROR
Use LEA_LCL / GOT_SETUP
Remove non-__ELF__ code.
Make __minbrk and __curbrk hidden and avoid using the GOT for them.
Convert to motorola syntax.
 1.1 09-Mar-2006  christos branches: 1.1.44; 1.1.50;
files moved from arch compat layout
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 17-Sep-2005  tsutsui Switch mips to the new libc compat code layout.
 1.3 03-Jul-2006  drochner build frexp_ieee754 in the "compat" subtree
(There are assembler versions of ldexp and modf which need to be checked.
I'm in doubt they are metter than those in libm.)
 1.2 07-Oct-2005  tsutsui Follow compat libc changes on i386:
> _setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes
 1.1 17-Sep-2005  tsutsui Switch mips to the new libc compat code layout.
 1.2 07-Oct-2005  tsutsui Follow compat libc changes on i386:
> _setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes
 1.1 17-Sep-2005  tsutsui Switch mips to the new libc compat code layout.
 1.7 24-Apr-2025  riastradh mips/compat_longjmp: Make sure compat13 setjmp returns nonzero.

PR port-mips/59285: _longjmp(..., 0) makes setjmp return 0, not 1
 1.6 24-Apr-2025  riastradh mips/compat_setjmp: .set reorder doesn't have delay slots.

PR port-mips/59342: compat_setjmp.S is confused about delay slots
 1.5 15-Oct-2020  skrll branches: 1.5.8;
Remove '_OFFSETOF' prefix for genassm(1) generate CPP identifers for
consistency with other arches.

NFCI and libc.so is the same before and after.
 1.4 15-Oct-2020  skrll Trailing whitespace
 1.3 26-Mar-2016  martin Do not store FP registers in softfloat userland
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.1 17-Sep-2005  tsutsui branches: 1.1.34;
Switch mips to the new libc compat code layout.
 1.1.34.4 03-Feb-2010  matt Cleanup #ifdefs.
 1.1.34.3 27-Jan-2010  matt Don't use cfc1/ctc1 in softfloat. Use the "common" fabs/modf/ldexp when
using softfloat.
 1.1.34.2 18-Aug-2009  uebayasi .cprestore doesn't accept register. Pass CALLFRAME_S0 instead.
 1.1.34.1 18-Aug-2009  matt Make arch/gen/_setjmp.S and compat/arch/gen/compat_setjmp.S as identical
as possible.
Use RCSID. Use FP_L/FP_S
 1.5.8.1 02-Aug-2025  perseant Sync with HEAD
 1.4 24-Apr-2025  riastradh mips/compat_sigsetjmp: Add missing RESTORE_GP64.

Otherwise, compat13 sigsetjmp clobbers the caller's gp when it
returns (the first time around, anyway), which leads to a lovely
display of fireworks.

PR port-mips/59343: compat_sigsetjmp.S: missing RESTORE_GP64
 1.3 15-Oct-2020  skrll branches: 1.3.8;
Remove '_OFFSETOF' prefix for genassm(1) generate CPP identifers for
consistency with other arches.

NFCI and libc.so is the same before and after.
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.1 17-Sep-2005  tsutsui branches: 1.1.34;
Switch mips to the new libc compat code layout.
 1.1.34.2 05-Sep-2009  matt More LP64 cleanup --> s/la/PTR_LA
 1.1.34.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.3.8.1 02-Aug-2025  perseant Sync with HEAD
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 17-Sep-2005  tsutsui branches: 1.1.40;
Switch mips to the new libc compat code layout.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.1 17-Sep-2005  tsutsui branches: 1.1.34;
Switch mips to the new libc compat code layout.
 1.1.34.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.4 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.3 14-Dec-2009  matt Merge from matt-nb5-mips64.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 17-Sep-2005  tsutsui branches: 1.1.18;
Switch mips to the new libc compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.14.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.1 17-Sep-2005  tsutsui branches: 1.1.34;
Switch mips to the new libc compat code layout.
 1.1.34.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.4 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.3 14-Dec-2009  matt Merge from matt-nb5-mips64.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 17-Sep-2005  tsutsui branches: 1.1.18;
Switch mips to the new libc compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.14.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___sigtramp1.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.3 14-Dec-2009  matt Merge from matt-nb5-mips64.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 17-Sep-2005  tsutsui branches: 1.1.18;
Switch mips to the new libc compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.14.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.3 14-Dec-2009  matt Merge from matt-nb5-mips64.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 17-Sep-2005  tsutsui branches: 1.1.18;
Switch mips to the new libc compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.14.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.3 14-Dec-2009  matt Merge from matt-nb5-mips64.
 1.2 28-Apr-2008  martin branches: 1.2.8; 1.2.14;
Remove clause 3 and 4 from TNF licenses
 1.1 17-Sep-2005  tsutsui branches: 1.1.18;
Switch mips to the new libc compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.14.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.3 15-Oct-2020  skrll Remove '_OFFSETOF' prefix for genassm(1) generate CPP identifers for
consistency with other arches.

NFCI and libc.so is the same before and after.
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.1 17-Sep-2005  tsutsui branches: 1.1.34;
Switch mips to the new libc compat code layout.
 1.1.34.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.1 17-Sep-2005  tsutsui branches: 1.1.34;
Switch mips to the new libc compat code layout.
 1.1.34.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.1 17-Sep-2005  tsutsui branches: 1.1.34;
Switch mips to the new libc compat code layout.
 1.1.34.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.2 14-Dec-2009  matt Merge from matt-nb5-mips64
 1.1 17-Sep-2005  tsutsui branches: 1.1.34;
Switch mips to the new libc compat code layout.
 1.1.34.1 18-Aug-2009  matt Adapt to be ABI agnostic. Fix RCSIDs.
 1.1 03-Sep-2014  matt New files for OR1K support
 1.3 15-Jan-2011  matt Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.3 28-Jun-2006  drochner build frexp/ldexp/modf in the "compat" part (code is identical)
(These are the easy cases where no assembler implementations exist.)
 1.2 18-Feb-2006  matt *setjmp14 are not compat, plain setjmp/sigsetjmp are the compat versions.
Exchange the files.
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.2 18-Feb-2006  matt *setjmp14 are not compat, plain setjmp/sigsetjmp are the compat versions.
Exchange the files.
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.2 18-Feb-2006  matt *setjmp14 are not compat, plain setjmp/sigsetjmp are the compat versions.
Exchange the files.
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.2 15-Jan-2011  matt Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
 1.1 18-Feb-2006  matt *setjmp14 are not compat, plain setjmp/sigsetjmp are the compat versions.
Exchange the files.
 1.2 15-Jan-2011  matt Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
 1.1 18-Feb-2006  matt *setjmp14 are not compat, plain setjmp/sigsetjmp are the compat versions.
Exchange the files.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 18-Feb-2006  matt branches: 1.1.40;
Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 15-Jan-2011  matt Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 18-Feb-2006  matt branches: 1.1.18;
Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.3 15-Jan-2011  matt Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 18-Feb-2006  matt branches: 1.1.18;
Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___sigtramp1.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 18-Feb-2006  matt branches: 1.1.18;
Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.3 16-Jan-2011  matt align comments
 1.2 15-Jan-2011  matt Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.2 15-Jan-2011  matt Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.2 15-Jan-2011  matt Use END(foo) everywhere.
Make __cerror hidden.
Use non-PLT calls to __cerror.
Use assym.h when appropriate.
Use addi to adjust stack instead of loading it.
Add __RCSIDs
Force -D_NOREGNAMES for all .S files.
[this is all in preperation for secure plt support]
 1.1 18-Feb-2006  matt Move PowerPC compat files from arch/powerpc to compat/arch/powerpc.
 1.1 01-Jul-2006  ross powerpc64 build framework
 1.1 01-Jul-2006  ross ppc64 build framework
 1.4 20-Sep-2020  christos Add symbol entries for the missing signal functions for the benefit of
autoconf. Autoconf compiles simple programs like:
char symbol();
int main() { return symbol(); }
To check if the symbol is present. This makes it happy.
Another way our symbol renaming breaks things.
This fixes gdb native build, which does not find sigprocmask otherwise
and fails to build because it finds pthread_sigmask() and not sigprocmask()!
 1.3 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.2 07-Jul-2006  ross branches: 1.2.40;
urk, need these too
 1.1 01-Jul-2006  ross ppc64 build framework
 1.2.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 07-Jul-2006  ross branches: 1.1.18;
urk, need these too
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 02-Nov-2021  thorpej Adjust for new __sigaction_siginfo symbol.
 1.1 20-Sep-2020  christos Add symbol entries for the missing signal functions for the benefit of
autoconf. Autoconf compiles simple programs like:
char symbol();
int main() { return symbol(); }
To check if the symbol is present. This makes it happy.
Another way our symbol renaming breaks things.
This fixes gdb native build, which does not find sigprocmask otherwise
and fails to build because it finds pthread_sigmask() and not sigprocmask()!
 1.1 07-Jul-2006  ross urk, need these too
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 07-Jul-2006  ross branches: 1.1.18;
urk, need these too
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.2 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-Sep-2014  matt New files for Userland support of UCB RISC-V (both 32-bit and 64-bit)
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.1 19-May-2023  skrll Add the compat calls for renamed symbols so that configure scripts
can find them. sigprocmask being the most problematic.

RISC-V doesn't need the compat syscalls, but seeing them fail in
ktrace is helpful.
 1.3 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.2 15-Sep-2005  uwe Switch arch/sh3/gen to the new compat code layout.
 1.1 15-Sep-2005  uwe Switch arch/sh3/sys to the new compat code layout.
 1.3 28-Jun-2006  drochner build frexp/ldexp/modf in the "compat" part (code is identical)
(These are the easy cases where no assembler implementations exist.)
 1.2 15-Oct-2005  uwe _setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes.
 1.1 15-Sep-2005  uwe Switch arch/sh3/gen to the new compat code layout.
 1.2 15-Oct-2005  uwe _setjmp and _longjmp are not compat functions. Noticed by Havard Eidnes.
 1.1 15-Sep-2005  uwe Switch arch/sh3/gen to the new compat code layout.
 1.3 05-Jan-2006  uwe Use PIC_PROLOGUE_NOSAVE in long jumps, where we don't need to preserve r12.
While here, swap the order in which r4 and r5 saved on the stack so
that r4 is restored further away from its first use.
 1.2 05-Jan-2006  uwe Use PLT for PIC calls to avoids text relocs in the shared library.
Use constants from <machine/setjmp.h> for better readability.
Provide .size directives.
 1.1 15-Sep-2005  uwe Switch arch/sh3/gen to the new compat code layout.
 1.5 05-Jan-2006  uwe Use PIC_PROLOGUE_NOSAVE in long jumps, where we don't need to preserve r12.
While here, swap the order in which r4 and r5 saved on the stack so
that r4 is restored further away from its first use.
 1.4 05-Jan-2006  uwe Oops^2. Init pointer to the saved registers area.
 1.3 05-Jan-2006  uwe Oops, correct numeric label in branch.
 1.2 05-Jan-2006  uwe Use PLT for PIC calls to avoids text relocs in the shared library.
Use constants from <machine/setjmp.h> for better readability.
Provide .size directives.
 1.1 15-Sep-2005  uwe Switch arch/sh3/gen to the new compat code layout.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 15-Sep-2005  uwe branches: 1.1.40;
Switch arch/sh3/sys to the new compat code layout.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 06-Jan-2006  uwe Use JUMP_CERROR instead of messing with errno directly.
Simplify. Add WARN_REFERENCES.
 1.1 15-Sep-2005  uwe Switch arch/sh3/sys to the new compat code layout.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Sep-2005  uwe branches: 1.1.18;
Switch arch/sh3/sys to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.1 15-Sep-2005  uwe Switch arch/sh3/sys to the new compat code layout.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Sep-2005  uwe branches: 1.1.18;
Switch arch/sh3/sys to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___sigtramp1.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Sep-2005  uwe branches: 1.1.18;
Switch arch/sh3/sys to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Sep-2005  uwe branches: 1.1.18;
Switch arch/sh3/sys to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Sep-2005  uwe branches: 1.1.18;
Switch arch/sh3/sys to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 06-Jan-2006  uwe Simplify.
 1.1 15-Sep-2005  uwe Switch arch/sh3/sys to the new compat code layout.
 1.3 06-Jan-2006  uwe Simplify.
 1.2 06-Jan-2006  uwe Change cerror to take errno in r4, instead of r0.
In PIC code fetch cerror address from GOT to avoid
unresolved text relocations in shared libraries.
Hide the code to jump to cerror inside JUMP_CERROR macro.
Change syscall code to use JUMP_CERROR.
Die text relocations! DIE!
 1.1 15-Sep-2005  uwe Switch arch/sh3/sys to the new compat code layout.
 1.1 15-Sep-2005  uwe Switch arch/sh3/sys to the new compat code layout.
 1.3 06-Jan-2006  uwe Simplify. Add WARN_REFERENCES.
 1.2 06-Jan-2006  uwe Change cerror to take errno in r4, instead of r0.
In PIC code fetch cerror address from GOT to avoid
unresolved text relocations in shared libraries.
Hide the code to jump to cerror inside JUMP_CERROR macro.
Change syscall code to use JUMP_CERROR.
Die text relocations! DIE!
 1.1 15-Sep-2005  uwe Switch arch/sh3/sys to the new compat code layout.
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.2 03-Jul-2006  drochner build frexp_ieee754 and ldexp_ieee754 in the "compat" subtree
(There is an assembler version of modf which needs to be checked.)
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.3 12-Sep-2013  joerg Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.2 08-Oct-2007  uwe branches: 1.2.30; 1.2.36;
In handwritten asm use -fPIC code instead of -fpic, our libc has grown
large enough for GOT to be larger than 8k.

While here kill redundant PIC ifdefs in setjmp.S - sparc "call"
instruction is piccy by itself.

Tested by martin@
 1.1 15-Oct-2005  uwe branches: 1.1.10;
Switch sparc to the new compat code layout.
 1.1.10.1 06-Nov-2007  matt sync with HEAD
 1.2.36.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.30.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 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 15-Oct-2005  uwe branches: 1.1.40;
Switch sparc to the new compat code layout.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Oct-2005  uwe branches: 1.1.18;
Switch sparc to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Oct-2005  uwe branches: 1.1.18;
Switch sparc to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Oct-2005  uwe branches: 1.1.18;
Switch sparc to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Oct-2005  uwe branches: 1.1.18;
Switch sparc to the new compat code layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.1 15-Oct-2005  uwe Switch sparc to the new compat code layout.
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.2 03-Jul-2006  drochner build frexp_ieee754 and ldexp_ieee754 in the "compat" subtree
(There is an assembler version of modf which needs to be checked.)
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.2 28-Apr-2025  martin PR 59370: compat_13: since we do not initialize the %o0 slot in jmpbuf
in setjmp() we need to store the full 64bit argument from longjmp()
there, otherwise the upper 32bit will be random garbage.
 1.1 16-Oct-2005  christos branches: 1.1.88; 1.1.96; 1.1.98;
Bring sparc64 to the new compat layout.
 1.1.98.1 02-Aug-2025  perseant Sync with HEAD
 1.1.96.1 10-May-2025  bouyer Pull up following revision(s) (requested by martin in ticket #1108):
lib/libc/compat/arch/sparc64/gen/compat_setjmp.S: revision 1.2
PR 59370: compat_13: since we do not initialize the %o0 slot in jmpbuf
in setjmp() we need to store the full 64bit argument from longjmp()
there, otherwise the upper 32bit will be random garbage.
 1.1.88.1 10-May-2025  bouyer Pull up following revision(s) (requested by martin in ticket #1946):
lib/libc/compat/arch/sparc64/gen/compat_setjmp.S: revision 1.2
PR 59370: compat_13: since we do not initialize the %o0 slot in jmpbuf
in setjmp() we need to store the full 64bit argument from longjmp()
there, otherwise the upper 32bit will be random garbage.
 1.2 12-Sep-2013  joerg Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 16-Oct-2005  christos branches: 1.1.44; 1.1.50;
Bring sparc64 to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 16-Oct-2005  christos branches: 1.1.40;
Bring sparc64 to the new compat layout.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
Bring sparc64 to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.2 12-Jul-2011  mrg rename sparc64 BLOCK_SIZE and BLOCK_ALIGN to have SPARC64_ prefixes.
for the assembler files, define the old names to the new names
since using the new names cause ugliness due to longer identifer
names, and reduces churn.

fixes build issues in dtv and vaguely makes <machine/psl.h> slightly
less name-space invasive.
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
Bring sparc64 to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
Bring sparc64 to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2005  christos branches: 1.1.18;
Bring sparc64 to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.1 16-Oct-2005  christos Bring sparc64 to the new compat layout.
 1.3 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.2 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.1 18-Feb-2006  matt Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 18-Feb-2006  matt branches: 1.1.40;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 25-Jan-2011  matt Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden
 1.1 18-Feb-2006  matt branches: 1.1.40;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 18-Feb-2006  matt branches: 1.1.18;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 25-Jan-2011  matt Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden
 1.1 18-Feb-2006  matt branches: 1.1.40;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.3 29-Jan-2011  matt Fix type sigtramp_t -> sigtramp_2
 1.2 25-Jan-2011  matt Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden
 1.1 18-Feb-2006  matt branches: 1.1.40;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 18-Feb-2006  matt branches: 1.1.18;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 18-Feb-2006  matt branches: 1.1.18;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 18-Feb-2006  matt branches: 1.1.18;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction13.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 25-Jan-2011  matt Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden
 1.1 18-Feb-2006  matt branches: 1.1.40;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.2 25-Jan-2011  matt Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden
 1.1 18-Feb-2006  matt branches: 1.1.40;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.2 25-Jan-2011  matt Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden
 1.1 18-Feb-2006  matt branches: 1.1.40;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.2 25-Jan-2011  matt Move IDs into .ident
Use END(x)
Remove a.out support
Make CERROR hidden
 1.1 18-Feb-2006  matt branches: 1.1.40;
Seperate out the compat support for VAX. Also, make references to the
sigcontext sigtramp code weak so compat can be compiled out.
 1.1.40.1 08-Feb-2011  bouyer Sync with HEAD
 1.5 09-Feb-2015  pooka Include compat in rumprun libc

Not including non-renamed symbols in libc caused all kinds of configure
scripts to do the wrong thing when they just tested linkage without
including headers. So, go for the "least moving parts" bandaid for now.
 1.4 03-Jul-2006  drochner build {frexp,ldexp,modf} in the "compat" subtree
(Drop the modf assembler version. We have the same code in libm.)
(Drop the ldexp inline-assembler version. The same code is in libm as
scalbn; the ldexp there is just a wrapper providing error handling.)
 1.3 11-Mar-2006  christos Fix bug where we did not build archdir and simplify.
 1.2 11-Mar-2006  christos More new compat layout fixes.
 1.1 11-Mar-2006  christos Welcome to the new compat layout.
 1.1 03-Jul-2006  drochner build {frexp,ldexp,modf} in the "compat" subtree
(Drop the modf assembler version. We have the same code in libm.)
(Drop the ldexp inline-assembler version. The same code is in libm as
scalbn; the ldexp there is just a wrapper providing error handling.)
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 11-Mar-2006  christos branches: 1.1.40;
Welcome to the new compat layout.
 1.1.40.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.3 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.2 12-Sep-2013  joerg branches: 1.2.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 11-Mar-2006  christos branches: 1.1.44; 1.1.50;
Welcome to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.2.1 10-Aug-2014  tls Rebase.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
Welcome to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat___semctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.1 11-Mar-2006  christos Welcome to the new compat layout.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
Welcome to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_msgctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.1 20-Jan-2011  bouyer branches: 1.1.2;
file compat_quotactl.S was initially added on branch bouyer-quota2.
 1.1.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
Welcome to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_shmctl.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 11-Mar-2006  christos branches: 1.1.18;
Welcome to the new compat layout.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file compat_sigaction.S was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.1 11-Mar-2006  christos branches: 1.1.50; 1.1.62;
Welcome to the new compat layout.
 1.1.62.1 10-Aug-2014  tls Rebase.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.2 12-Sep-2013  joerg branches: 1.2.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 11-Mar-2006  christos branches: 1.1.44; 1.1.50;
Welcome to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.2.1 10-Aug-2014  tls Rebase.
 1.1 11-Mar-2006  christos Welcome to the new compat layout.
 1.3 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.2 12-Sep-2013  joerg branches: 1.2.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.1 11-Mar-2006  christos branches: 1.1.44; 1.1.50;
Welcome to the new compat layout.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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.2.1 10-Aug-2014  tls Rebase.
 1.2 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.1 13-Sep-2005  christos compat core reorg.
 1.2 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.1 13-Sep-2005  christos compat core reorg.
 1.2 13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.1 13-Sep-2005  christos branches: 1.1.44;
compat core reorg.
 1.1.44.1 17-Apr-2012  yamt sync with head
 1.18 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.17 16-Jan-2014  christos branches: 1.17.26;
"soon" is "now". Remove all __indr_reference crap.
 1.16 24-Oct-2012  christos Add a warning when we are using the libc version of alloca(3).
 1.15 10-Oct-2012  christos Add compat functions for syslog.
 1.14 12-Mar-2011  christos branches: 1.14.4; 1.14.10;
Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
the buffer is not large enough, instead of silently truncating.
 1.13 23-Apr-2010  drochner use the local versions of ldexp/frexp/modf again rather than pulling
in libm source code. The libm functions depend on other libm functions,
this requires symbol renaming, and with the reachover method this
is going to be a mess. Also, bundling the dependencies into one .o
file has the potential to cause symbol conflicts on static linking.
 1.12 16-Aug-2009  christos Version fts one more time! This is the most versioned API ever... Bump
fts_level from short to int to avoid a potential DoS.
From Maksymilian Arciemowicz
 1.11 24-Feb-2009  christos version alphasort.
 1.10 20-Jan-2009  drochner branches: 1.10.2;
cleanup after devmajor_t:
-since getdevmajor(3) is now binary compatible again with <=5.0
there is no need to rename, I've just left a __getdevmajor50 symbol
temporarily for those who track -current
-update manpage
 1.9 11-Jan-2009  christos merge christos-time_t
 1.8 26-Oct-2008  mrg branches: 1.8.4;
define and use LIBCDIR in terms of .CURDIR. fixes compat/lib/libc build.
 1.7 28-Sep-2008  christos having 2 separate implementations of frexp ldexp and modf (one here and
one in libm) that produce different results does not make any sense. Use
the one from libm to build instead.
 1.6 04-May-2008  tonnerre Fix a bug in the implementation of seekdir(). If the first entry in
a block has been unlinked, seekdir() may overshoot by one entry.
Thus, _readdir_unlinked() must not skip deleted entries when being
called from seekdir().
Christos agreed.
 1.5 27-Jul-2006  christos branches: 1.5.18;
Turn fts_number to a quad.
 1.4 30-Mar-2006  christos PR/33163: Auster Vl.: fts: cant allocate memory | filename too long
Change the ftp_pathlen and fts_namelen to u_int from u_short so that
pathnames > 32K work.
 1.3 26-Mar-2006  christos PR/33123: Murray Armfield: standards compliance & glob.h
Certain fields in glob.h need to be size_t; fix this and version glob(3).
http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
 1.2 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.1 13-Sep-2005  christos compat core reorg.
 1.5.18.1 18-May-2008  yamt sync with head.
 1.8.4.4 23-Nov-2008  christos fix utmp{,x} issues:
- add old utmp format support. Ugly and difficult to get right. For now
try to deal by detecting the size of the file and seeing if it is a
multiple of sizeof(struct utmp50).
- fix NULL pointer in cvt.
- version the UTMPX database, and detect if we have an old or new one
and act accordingly.
 1.8.4.3 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.8.4.2 08-Nov-2008  christos time_t changes
 1.8.4.1 26-Oct-2008  christos file Makefile.inc was added on branch christos-time_t on 2008-11-08 21:45:37 +0000
 1.10.2.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.14.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.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.14.4.1 30-Oct-2012  yamt sync with head
 1.17.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.10 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.9 14-Mar-2012  christos branches: 1.9.2;
rename the macros ftsent_ since they apply to the ftsent struct not the
fts one.
 1.8 13-Mar-2012  joerg Fix all the issues lint is too dumb to warn about and re-enable
-Wconstant-conversion.
 1.7 13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.6 19-Oct-2009  christos branches: 1.6.6;
PR/42201: NAKAJIMA Yoshihiro: fts(3): broken compatibility
As new field types were added, we did not provide overrides for older compat
versions. This restores compatibility.
 1.5 11-Jan-2009  christos merge christos-time_t
 1.4 27-Jul-2006  christos branches: 1.4.28;
Turn fts_number to a quad.
 1.3 30-Mar-2006  christos Unbreak fts13 after yesterdays header changes [yes I keep old binaries around
just to test this]
 1.2 11-Dec-2005  christos Restore the compatibility versions of fts not to do path mangling (i.e.
remove double slashes). Also make sure we free sp in all cases. From yamt,
many thanks!
 1.1 13-Sep-2005  christos compat core reorg.
 1.4.28.1 08-Nov-2008  christos time_t changes
 1.6.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.6.6.1 17-Apr-2012  yamt sync with head
 1.9.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.7 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.6 14-Mar-2012  christos branches: 1.6.2;
rename the macros ftsent_ since they apply to the ftsent struct not the
fts one.
 1.5 13-Mar-2012  joerg Fix all the issues lint is too dumb to warn about and re-enable
-Wconstant-conversion.
 1.4 13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.3 19-Oct-2009  christos branches: 1.3.6;
PR/42201: NAKAJIMA Yoshihiro: fts(3): broken compatibility
As new field types were added, we did not provide overrides for older compat
versions. This restores compatibility.
 1.2 27-Jul-2006  christos Turn fts_number to a quad.
 1.1 30-Mar-2006  christos PR/33163: Auster Vl.: fts: cant allocate memory | filename too long
Change the ftp_pathlen and fts_namelen to u_int from u_short so that
pathnames > 32K work.
 1.3.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.3.6.1 17-Apr-2012  yamt sync with head
 1.6.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.5 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.4 14-Mar-2012  christos branches: 1.4.2;
rename the macros ftsent_ since they apply to the ftsent struct not the
fts one.
 1.3 13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.2 19-Oct-2009  christos branches: 1.2.6;
PR/42201: NAKAJIMA Yoshihiro: fts(3): broken compatibility
As new field types were added, we did not provide overrides for older compat
versions. This restores compatibility.
 1.1 27-Jul-2006  christos Turn fts_number to a quad.
 1.2.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.2.6.1 17-Apr-2012  yamt sync with head
 1.4.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.4 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.3 19-Oct-2009  christos branches: 1.3.6; 1.3.12;
PR/42201: NAKAJIMA Yoshihiro: fts(3): broken compatibility
As new field types were added, we did not provide overrides for older compat
versions. This restores compatibility.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 09-Nov-2008  christos branches: 1.1.2;
file compat___fts32.c was initially added on branch christos-time_t.
 1.1.2.1 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.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 19-Oct-2009  christos PR/42201: NAKAJIMA Yoshihiro: fts(3): broken compatibility
As new field types were added, we did not provide overrides for older compat
versions. This restores compatibility.
 1.1 16-Aug-2009  christos Version fts one more time! This is the most versioned API ever... Bump
fts_level from short to int to avoid a potential DoS.
From Maksymilian Arciemowicz
 1.1 22-Sep-2019  christos branches: 1.1.4;
Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 22-Sep-2019  martin file compat___getmntinfo13.c was added on branch phil-wifi on 2020-04-13 08:03:09 +0000
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 26-Mar-2006  christos branches: 1.1.28;
PR/33123: Murray Armfield: standards compliance & glob.h
Certain fields in glob.h need to be size_t; fix this and version glob(3).
http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.1 12-Mar-2011  christos Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
the buffer is not large enough, instead of silently truncating.
 1.1 04-May-2008  tonnerre branches: 1.1.4; 1.1.10;
Fix a bug in the implementation of seekdir(). If the first entry in
a block has been unlinked, seekdir() may overshoot by one entry.
Thus, _readdir_unlinked() must not skip deleted entries when being
called from seekdir().
Christos agreed.
 1.1.10.2 04-May-2008  tonnerre Fix a bug in the implementation of seekdir(). If the first entry in
a block has been unlinked, seekdir() may overshoot by one entry.
Thus, _readdir_unlinked() must not skip deleted entries when being
called from seekdir().
Christos agreed.
 1.1.10.1 04-May-2008  tonnerre file compat__readdir_unlocked30.c was added on branch christos-time_t on 2008-05-04 18:53:27 +0000
 1.1.4.2 18-May-2008  yamt sync with head.
 1.1.4.1 04-May-2008  yamt file compat__readdir_unlocked30.c was added on branch yamt-pf42 on 2008-05-18 12:30:15 +0000
 1.2 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.1 13-Sep-2005  christos branches: 1.1.44; 1.1.50;
compat core reorg.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.1 13-Sep-2005  christos branches: 1.1.44; 1.1.50;
compat core reorg.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.1 13-Sep-2005  christos branches: 1.1.44; 1.1.50;
compat core reorg.
 1.1.50.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.44.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 08-Oct-2022  nia libc: Use a functional example when warning about incorrect alloca usage
 1.1 24-Oct-2012  christos branches: 1.1.2; 1.1.4;
Add a warning when we are using the libc version of alloca(3).
 1.1.4.2 24-Oct-2012  christos Add a warning when we are using the libc version of alloca(3).
 1.1.4.1 24-Oct-2012  christos file compat_alloca.c was added on branch tls-maxphys on 2012-10-24 22:10:53 +0000
 1.1.2.2 30-Oct-2012  yamt sync with head
 1.1.2.1 24-Oct-2012  yamt file compat_alloca.c was added on branch yamt-pagecache on 2012-10-30 18:58:43 +0000
 1.2 16-Dec-2016  mrg scandir/alphasort take "const struct dirent **" not "const void *" in
modern unix. since we claim to be 'IEEE Std 1003.1-2008', make it so.
 1.1 24-Feb-2009  christos branches: 1.1.2; 1.1.30;
version alphasort.
 1.1.30.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1.2.2 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.1.2.1 24-Feb-2009  jym file compat_alphasort.c was added on branch jym-xensuspend on 2009-05-13 19:18:22 +0000
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_devname.c was initially added on branch christos-time_t.
 1.1.2.2 08-Nov-2008  christos add more stuff.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 31-Oct-2006  cbiere Changed error message of ENOPROTOOPT to "Protocol option not available".
 1.1 13-Sep-2005  christos compat core reorg.
 1.6 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.5 23-Apr-2010  drochner use the local versions of ldexp/frexp/modf again rather than pulling
in libm source code. The libm functions depend on other libm functions,
this requires symbol renaming, and with the reachover method this
is going to be a mess. Also, bundling the dependencies into one .o
file has the potential to cause symbol conflicts on static linking.
 1.4 28-Sep-2008  christos branches: 1.4.6;
having 2 separate implementations of frexp ldexp and modf (one here and
one in libm) that produce different results does not make any sense. Use
the one from libm to build instead.
 1.3 14-Sep-2008  drochner fix the -0.0 case, fixes a gm4 test error reported by wiz
(normally, the libm implementation should be used)
 1.2 03-Jul-2006  drochner branches: 1.2.20;
Remove a comment questioning correct denormal handling.
This has been fixed.
 1.1 27-Jun-2006  drochner First step to clean up the variety of frexp(), ldexp() and modf()
implementations.
Long term goal is to use the implementation in libm and get rid of
the libc instances. For now, we need to keep one in libc for compatibility,
it belongs into the compat subtree.
The switch is per-arch. Should be painless for ieee754 boxes.
If all ieee754 archs are switched, libc/gen/{frexp,ldexp,modf}_ieee754.c
can be removed.
 1.2.20.1 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.4.6.2 28-Sep-2008  christos having 2 separate implementations of frexp ldexp and modf (one here and
one in libm) that produce different results does not make any sense. Use
the one from libm to build instead.
 1.4.6.1 28-Sep-2008  christos file compat_frexp_ieee754.c was added on branch christos-time_t on 2008-09-28 15:19:10 +0000
 1.8 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.7 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.6 15-Mar-2012  christos branches: 1.6.2;
missed one (thanks joerg)
 1.5 13-Mar-2012  joerg Fix all the issues lint is too dumb to warn about and re-enable
-Wconstant-conversion.
 1.4 19-Oct-2009  christos branches: 1.4.6;
PR/42201: NAKAJIMA Yoshihiro: fts(3): broken compatibility
As new field types were added, we did not provide overrides for older compat
versions. This restores compatibility.
 1.3 11-Jan-2009  christos merge christos-time_t
 1.2 11-Dec-2005  christos branches: 1.2.28;
Restore the compatibility versions of fts not to do path mangling (i.e.
remove double slashes). Also make sure we free sp in all cases. From yamt,
many thanks!
 1.1 13-Sep-2005  christos compat core reorg.
 1.2.28.1 08-Nov-2008  christos time_t changes
 1.4.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.4.6.1 17-Apr-2012  yamt sync with head
 1.6.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 20-Jan-2009  drochner cleanup after devmajor_t:
-since getdevmajor(3) is now binary compatible again with <=5.0
there is no need to rename, I've just left a __getdevmajor50 symbol
temporarily for those who track -current
-update manpage
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_getdevmajor.c was initially added on branch christos-time_t.
 1.1.2.2 08-Nov-2008  christos add more stuff.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.4 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 20-Mar-2012  matt branches: 1.2.2;
Switch to C89 definitions.
Remove use of __P
 1.1 13-Sep-2005  christos branches: 1.1.44;
compat core reorg.
 1.1.44.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.1.44.1 17-Apr-2012  yamt sync with head
 1.2.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 01-Jun-2009  yamt fix NULL dereferences in the compat versions of getpwent, getpwnam,
and getpwuid.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_getpwent.c was initially added on branch christos-time_t.
 1.1.2.3 28-Dec-2008  christos move conversion functions to inlines so that libutil can use them.
 1.1.2.2 08-Nov-2008  christos add more stuff.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.4 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 13-Sep-2005  christos branches: 1.1.28;
compat core reorg.
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.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-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_lastlogx.c was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.9 17-Jun-2024  riastradh libc ldexp(3): Avoid undefined behaviour in arithmetic overflow.

PR lib/58347
 1.8 21-May-2020  riastradh branches: 1.8.6;
Teach libc's compat ldexp stub to raise fp exceptions.

This ldexp stub will shadow the ldexp weak alias for scalbn in libm,
which is unfortunate but hard to fix properly without chasing the
mythical libc bump beast. With the change here, we should raise all
the same exceptions that libm's scalbn does -- overflow, underflow,
inexact-result, and (for signalling NaN only) invalid-operation.
This in turn should correct the missing overflow/underflow exceptions
of our portable C fma, and perhaps other routines.

XXX pullup
 1.7 27-Aug-2016  christos branches: 1.7.16;
remove debugging
 1.6 27-Aug-2016  christos detect overflow in oldexp + newexp
 1.5 23-Apr-2010  drochner use the local versions of ldexp/frexp/modf again rather than pulling
in libm source code. The libm functions depend on other libm functions,
this requires symbol renaming, and with the reachover method this
is going to be a mess. Also, bundling the dependencies into one .o
file has the potential to cause symbol conflicts on static linking.
 1.4 28-Sep-2008  christos branches: 1.4.6;
this needs finite and scalbn
 1.3 28-Sep-2008  christos having 2 separate implementations of frexp ldexp and modf (one here and
one in libm) that produce different results does not make any sense. Use
the one from libm to build instead.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 27-Jun-2006  drochner branches: 1.1.18;
First step to clean up the variety of frexp(), ldexp() and modf()
implementations.
Long term goal is to use the implementation in libm and get rid of
the libc instances. For now, we need to keep one in libc for compatibility,
it belongs into the compat subtree.
The switch is per-arch. Should be painless for ieee754 boxes.
If all ieee754 archs are switched, libc/gen/{frexp,ldexp,modf}_ieee754.c
can be removed.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.4.6.2 28-Sep-2008  christos this needs finite and scalbn
 1.4.6.1 28-Sep-2008  christos file compat_ldexp_ieee754.c was added on branch christos-time_t on 2008-09-28 18:54:31 +0000
 1.7.16.2 13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1905):

lib/libc/compat/gen/compat_ldexp_ieee754.c: revision 1.9

libc ldexp(3): Avoid undefined behaviour in arithmetic overflow.

PR lib/58347
 1.7.16.1 25-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #920):

lib/libc/compat/gen/compat_ldexp_ieee754.c: revision 1.8

Teach libc's compat ldexp stub to raise fp exceptions.

This ldexp stub will shadow the ldexp weak alias for scalbn in libm,
which is unfortunate but hard to fix properly without chasing the
mythical libc bump beast. With the change here, we should raise all
the same exceptions that libm's scalbn does -- overflow, underflow,
inexact-result, and (for signalling NaN only) invalid-operation.

This in turn should correct the missing overflow/underflow exceptions
of our portable C fma, and perhaps other routines.

XXX pullup
 1.8.6.1 13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #962):

lib/libc/compat/gen/compat_ldexp_ieee754.c: revision 1.9

libc ldexp(3): Avoid undefined behaviour in arithmetic overflow.

PR lib/58347
 1.6 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.5 07-Oct-2016  christos Sync with compat and remove dup implementations of ldexp and modf, switching
mips and m68k to the compat copies.
 1.4 23-Apr-2010  drochner branches: 1.4.28;
use the local versions of ldexp/frexp/modf again rather than pulling
in libm source code. The libm functions depend on other libm functions,
this requires symbol renaming, and with the reachover method this
is going to be a mess. Also, bundling the dependencies into one .o
file has the potential to cause symbol conflicts on static linking.
 1.3 27-Jan-2010  drochner fix behavior in case of +-Inf or NaN input: return the proper
values and set *iptr
(This code is only used under non-default build options, and on m68k.)
 1.2 28-Sep-2008  christos branches: 1.2.6;
having 2 separate implementations of frexp ldexp and modf (one here and
one in libm) that produce different results does not make any sense. Use
the one from libm to build instead.
 1.1 27-Jun-2006  drochner First step to clean up the variety of frexp(), ldexp() and modf()
implementations.
Long term goal is to use the implementation in libm and get rid of
the libc instances. For now, we need to keep one in libc for compatibility,
it belongs into the compat subtree.
The switch is per-arch. Should be painless for ieee754 boxes.
If all ieee754 archs are switched, libc/gen/{frexp,ldexp,modf}_ieee754.c
can be removed.
 1.2.6.2 28-Sep-2008  christos having 2 separate implementations of frexp ldexp and modf (one here and
one in libm) that produce different results does not make any sense. Use
the one from libm to build instead.
 1.2.6.1 28-Sep-2008  christos file compat_modf_ieee754.c was added on branch christos-time_t on 2008-09-28 15:19:10 +0000
 1.4.28.1 04-Nov-2016  pgoyette Sync with HEAD
 1.2 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.1 13-Sep-2005  christos branches: 1.1.86;
compat core reorg.
 1.1.86.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3 08-Feb-2012  mbalmer Add missing cast, fixes i386 build. releng ok.
 1.2 08-Feb-2012  christos Restore binary compatibility with netbsd-1.x for readdir(3). Tested with
a shark tcsh dynamic binary:

tcsh: ELF 32-bit LSB executable, ARM, version 1, dynamically linked \
(uses shared libs), for NetBSD, not stripped
-rwxr-xr-x 1 root wheel 994170 Jun 24 2004 /bin/tcsh

This would infinite loop on ls-F /dev
 1.1 13-Sep-2005  christos branches: 1.1.44;
compat core reorg.
 1.1.44.1 17-Apr-2012  yamt sync with head
 1.2 16-Dec-2016  mrg scandir/alphasort take "const struct dirent **" not "const void *" in
modern unix. since we claim to be 'IEEE Std 1003.1-2008', make it so.
 1.1 13-Sep-2005  christos branches: 1.1.68;
compat core reorg.
 1.1.68.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.2 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.1 13-Sep-2005  christos compat core reorg.
 1.2 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.1 13-Sep-2005  christos compat core reorg.
 1.3 20-Mar-2012  matt Switch to C89 definitions.
Remove use of __P
 1.2 11-Jan-2009  christos branches: 1.2.8;
merge christos-time_t
 1.1 13-Sep-2005  christos branches: 1.1.28;
compat core reorg.
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.2.8.1 17-Apr-2012  yamt sync with head
 1.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 11-Oct-2012  christos branches: 1.2.2; 1.2.4;
take care of the signal safe syslog calls which are not exposed.
 1.1 10-Oct-2012  christos Add compat functions for syslog.
 1.2.4.2 11-Oct-2012  christos take care of the signal safe syslog calls which are not exposed.
 1.2.4.1 11-Oct-2012  christos file compat_syslog.c was added on branch tls-maxphys on 2012-10-11 17:09:56 +0000
 1.2.2.2 30-Oct-2012  yamt sync with head
 1.2.2.1 11-Oct-2012  yamt file compat_syslog.c was added on branch yamt-pagecache on 2012-10-30 18:58:43 +0000
 1.4 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_time.c was initially added on branch christos-time_t.
 1.1.2.2 23-Nov-2008  christos simplify the time_t define dance.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.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 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 13-Sep-2005  christos branches: 1.1.28;
compat core reorg.
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.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.5 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.4 20-Mar-2012  matt Switch to C89 definitions.
Remove use of __P
 1.3 11-Jan-2009  christos branches: 1.3.8;
merge christos-time_t
 1.2 29-Nov-2005  christos branches: 1.2.28;
WARNS=4
 1.1 13-Sep-2005  christos compat core reorg.
 1.2.28.1 08-Nov-2008  christos time_t changes
 1.3.8.1 17-Apr-2012  yamt sync with head
 1.3 12-Mar-2011  christos Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
the buffer is not large enough, instead of silently truncating.
 1.2 10-Mar-2007  hubertf - Remove unused ctype.h header
- ANSIfy prototype

From: Slava Semushin <php-coder@altlinux.ru>
 1.1 13-Sep-2005  christos compat core reorg.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_utime.c was initially added on branch christos-time_t.
 1.1.2.2 29-Dec-2008  christos don't call one compat function from another.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 23-Nov-2008  christos branches: 1.1.2;
file compat_utmp.c was initially added on branch christos-time_t.
 1.1.2.1 23-Nov-2008  christos fix utmp{,x} issues:
- add old utmp format support. Ugly and difficult to get right. For now
try to deal by detecting the size of the file and seeing if it is a
multiple of sizeof(struct utmp50).
- fix NULL pointer in cvt.
- version the UTMPX database, and detect if we have an old or new one
and act accordingly.
 1.4 01-Jul-2011  joerg Fix memcpy usage.
 1.3 11-Jan-2009  christos merge christos-time_t
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.4 28-Dec-2008  christos move conversion functions to inlines so that libutil can use them.
 1.2.8.3 23-Nov-2008  christos fix utmp{,x} issues:
- add old utmp format support. Ugly and difficult to get right. For now
try to deal by detecting the size of the file and seeing if it is a
multiple of sizeof(struct utmp50).
- fix NULL pointer in cvt.
- version the UTMPX database, and detect if we have an old or new one
and act accordingly.
 1.2.8.2 08-Nov-2008  christos time_t changes
 1.2.8.1 28-Apr-2008  christos file compat_utmpx.c was added on branch christos-time_t on 2008-11-08 21:45:38 +0000
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 09-Nov-2008  christos branches: 1.1.2;
file aio.h was initially added on branch christos-time_t.
 1.1.2.1 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.8 16-Dec-2016  mrg scandir/alphasort take "const struct dirent **" not "const void *" in
modern unix. since we claim to be 'IEEE Std 1003.1-2008', make it so.
 1.7 24-Feb-2009  christos branches: 1.7.28;
version alphasort.
 1.6 04-May-2008  tonnerre branches: 1.6.8; 1.6.10;
Fix a bug in the implementation of seekdir(). If the first entry in
a block has been unlinked, seekdir() may overshoot by one entry.
Thus, _readdir_unlinked() must not skip deleted entries when being
called from seekdir().
Christos agreed.
 1.5 26-Mar-2006  christos branches: 1.5.18;
PR/33124: Murray Armfield: readdir_r is missing a restrict qualifier.
http://www.opengroup.org/onlinepubs/000095399/basedefs/dirent.h.html
 1.4 24-Jan-2006  christos rename __func to _func_unlocked, and add their prototypes in extern.h
instead of exposing them in dirent.h. More locking consistency fixes.
 1.3 24-Jan-2006  christos Expose __readdir and __telldir, unlocked versions of the non-underscore
versions.
 1.2 14-Sep-2005  christos Fix opendir30 screwup and sort the compat defs for clarity.
 1.1 13-Sep-2005  christos compat core reorg.
 1.5.18.1 18-May-2008  yamt sync with head.
 1.6.10.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.6.8.2 04-May-2008  tonnerre Fix a bug in the implementation of seekdir(). If the first entry in
a block has been unlinked, seekdir() may overshoot by one entry.
Thus, _readdir_unlinked() must not skip deleted entries when being
called from seekdir().
Christos agreed.
 1.6.8.1 04-May-2008  tonnerre file dirent.h was added on branch christos-time_t on 2008-05-04 18:53:27 +0000
 1.7.28.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.1 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.4 28-Apr-2008  martin branches: 1.4.8;
Remove clause 3 and 4 from TNF licenses
 1.3 04-Aug-2006  yamt branches: 1.3.18;
whitespace.
 1.2 04-Aug-2006  yamt remove the support of variable-sized filehandle from compat version of
syscalls. (strictly speaking, it breaks abi. i don't think it's a problem
because this feature is short-lived and there are no affected in-tree
filesystems.)
 1.1 31-Jul-2006  martin Make filehandles opaque to userland
 1.3.18.1 18-May-2008  yamt sync with head.
 1.4.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4.8.1 28-Apr-2008  martin file fstypes.h was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.1 13-Sep-2005  christos compat core reorg.
 1.1 13-Sep-2005  christos compat core reorg.
 1.2 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.1 07-Jun-2010  tnozaki 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.5 26-Dec-2017  christos Fix const argument inconsistency (found by lint(1))
 1.4 31-Jan-2014  christos expose __lwp_park60
 1.3 29-Mar-2013  christos Compat glue for lwp park, but does not use the new syscall yet.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 10-Nov-2008  christos branches: 1.1.2;
file lwp.h was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.2.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.14.1 23-Jun-2013  tls resync from head
 1.2.8.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-Jan-2009  christos merge christos-time_t
 1.1 09-Nov-2008  christos branches: 1.1.2;
file mqueue.h was initially added on branch christos-time_t.
 1.1.2.1 09-Nov-2008  christos add mqueue stuff, fix _sys aliases.
 1.1 13-Sep-2005  christos compat core reorg.
 1.1 26-Aug-2006  matt Move ns_addr and ns_ntoa to compat libc. Add a stripped version of
<netns/ns.h> which only include struct ns_addr and the ns_addr and ns_ntoa
function prototypes.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file pwd.h was initially added on branch christos-time_t.
 1.1.2.2 28-Dec-2008  christos move conversion functions to inlines so that libutil can use them.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.1 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 05-Nov-2011  joerg Add __returns_twice for the attribute of the same name. This makes the
attribute explicit based on the functions GCC gives it too.
 1.1 13-Sep-2005  christos branches: 1.1.44;
compat core reorg.
 1.1.44.1 10-Nov-2011  yamt sync with head
 1.4 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.3 02-Nov-2021  thorpej Adjust for new __sigaction_siginfo symbol.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 13-Sep-2005  christos branches: 1.1.28;
compat core reorg.
 1.1.28.2 05-Jan-2009  christos fix kernel sigtimedwait prototypes
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.1 22-Jan-2012  christos branches: 1.1.4;
From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 22-Jan-2012  yamt file stdio.h was added on branch yamt-pagecache on 2012-04-17 00:05:17 +0000
 1.7 12-Jun-2014  christos rename to 60
 1.6 12-Jun-2014  christos fix srandom and initstate signatures (from enh at google)
 1.5 20-Apr-2012  christos branches: 1.5.2; 1.5.8;
PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
 1.4 26-Jan-2009  drochner branches: 1.4.8; 1.4.10;
remove stale getdevmajor() declarations, fixes lint(1) warning
reported by Bernd Ernesti
 1.3 20-Jan-2009  drochner Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 13-Sep-2005  christos branches: 1.1.28;
compat core reorg.
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.4.10.1 07-May-2012  riz Pull up following revision(s) (requested by christos in ticket #222):
include/stdlib.h: revision 1.98
lib/libc/compat/stdlib/Makefile.inc: revision 1.3
lib/libc/compat/include/stdlib.h: revision 1.5
lib/libc/compat/stdlib/compat_putenv.c: revision 1.1
lib/libc/compat/stdlib/compat_putenv.c: revision 1.2
PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
use setenv so that we don't leak memory.
 1.4.8.1 23-May-2012  yamt sync with head.
 1.5.8.1 10-Aug-2014  tls Rebase.
 1.5.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.4 30-Oct-2015  christos Add tzgetgmtoff() prototype I forgot to commit.
 1.3 16-Dec-2010  christos Provide a re-entrant and thread-safe set of timezone API's that
don't require locking and can operate on user-specified timezones
as opposed to having to alter the environment to change a timezone.
This work was presented to the tzcode folks and it was generally
accepted, but there seems to be a lot of inertia.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 13-Sep-2005  christos branches: 1.1.28;
compat core reorg.
 1.1.28.3 10-Nov-2008  christos version tzet{,wall}
 1.1.28.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.5 20-May-2024  christos finish renaming __dup3110 to __dup3100
 1.4 19-May-2024  christos version dup3
 1.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file unistd.h was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file utime.h was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 23-Nov-2008  christos branches: 1.1.2;
file utmp.h was initially added on branch christos-time_t.
 1.1.2.2 28-Dec-2008  christos move conversion functions to inlines so that libutil can use them.
 1.1.2.1 23-Nov-2008  christos fix utmp{,x} issues:
- add old utmp format support. Ugly and difficult to get right. For now
try to deal by detecting the size of the file and seeing if it is a
multiple of sizeof(struct utmp50).
- fix NULL pointer in cvt.
- version the UTMPX database, and detect if we have an old or new one
and act accordingly.
 1.3 11-Jan-2009  christos merge christos-time_t
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.3 28-Dec-2008  christos move conversion functions to inlines so that libutil can use them.
 1.2.8.2 08-Nov-2008  christos time_t changes
 1.2.8.1 28-Apr-2008  christos file utmpx.h was added on branch christos-time_t on 2008-11-08 21:45:38 +0000
 1.2 12-Mar-2011  christos Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
the buffer is not large enough, instead of silently truncating.
 1.1 13-Sep-2005  christos compat core reorg.
 1.2 11-Jan-2009  christos add another directory the cvs did not merge.
 1.1 08-Nov-2008  christos branches: 1.1.2;
file pmap_clnt.h was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2 11-Jan-2009  christos add another directory the cvs did not merge.
 1.1 08-Nov-2008  christos branches: 1.1.2;
file rpcb_clnt.h was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.1 07-Jun-2010  tnozaki 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 13-Sep-2013  joerg Redo the locale cache to be constant. It now contains the localeconv()
data and which LC_MONETARY and LC_NUMERIC values it is derived from.
In newlocale(3) and setlocale(3), check for the existing entries and on
miss, create a new entry. This is currently not using a lock for the
list as the worst case is a small memory leak.
 1.1 07-Jun-2010  tnozaki branches: 1.1.6; 1.1.12;
1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.1.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.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 06-Mar-2013  yamt comment and assertion
 1.1 07-Jun-2010  tnozaki branches: 1.1.6; 1.1.12;
1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.1.12.1 23-Jun-2013  tls resync from head
 1.1.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.3 07-Jun-2024  riastradh libc: Pacify lint on aarch64.
 1.2 20-Jan-2012  joerg Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
 1.1 26-Aug-2006  matt branches: 1.1.42;
Move ns_addr and ns_ntoa to compat libc. Add a stripped version of
<netns/ns.h> which only include struct ns_addr and the ns_addr and ns_ntoa
function prototypes.
 1.1.42.1 17-Apr-2012  yamt sync with head
 1.2 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.1 20-Jan-2012  joerg branches: 1.1.4;
Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 20-Jan-2012  yamt file __cmsg_alignbytes.c was added on branch yamt-pagecache on 2012-04-17 00:05:17 +0000
 1.4 07-Nov-2021  andvar fix various typos, mainly s/prefered/preferred/
 1.3 15-Oct-2012  msaitoh -Wstrict-overflow
 1.2 20-Mar-2012  matt branches: 1.2.2;
Switch to C89 definitions.
Remove use of __P
 1.1 26-Aug-2006  matt branches: 1.1.42;
Move ns_addr and ns_ntoa to compat libc. Add a stripped version of
<netns/ns.h> which only include struct ns_addr and the ns_addr and ns_ntoa
function prototypes.
 1.1.42.2 30-Oct-2012  yamt sync with head
 1.1.42.1 17-Apr-2012  yamt sync with head
 1.2.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2 20-Mar-2012  matt Switch to C89 definitions.
Remove use of __P
 1.1 26-Aug-2006  matt branches: 1.1.42;
Move ns_addr and ns_ntoa to compat libc. Add a stripped version of
<netns/ns.h> which only include struct ns_addr and the ns_addr and ns_ntoa
function prototypes.
 1.1.42.1 17-Apr-2012  yamt sync with head
 1.2 11-Jan-2009  christos cvs does not -j new directories, do it manually.
 1.1 08-Nov-2008  christos branches: 1.1.2;
file Makefile.inc was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2 11-Jan-2009  christos cvs does not -j new directories, do it manually.
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_pmap_rmtcall.c was initially added on branch christos-time_t.
 1.1.2.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2 11-Jan-2009  christos cvs does not -j new directories, do it manually.
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_rpcb.c was initially added on branch christos-time_t.
 1.1.2.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2 20-Oct-2025  nat New port: mac68ksf - Macintosh 68k softfloat.

This commit is all the Makefile glue for the new port which is the mac68k
port with MKSOFTFLOAT set to "yes".

As posted here:
https://mail-index.netbsd.org/port-mac68k/2025/10/14/msg001037.html
 1.1 22-Jan-2012  christos branches: 1.1.4;
From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 22-Jan-2012  yamt file Makefile.inc was added on branch yamt-pagecache on 2012-04-17 00:05:17 +0000
 1.1 22-Jan-2012  christos branches: 1.1.4;
From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 22-Jan-2012  yamt file compat_fgetpos.c was added on branch yamt-pagecache on 2012-04-17 00:05:17 +0000
 1.2 17-Oct-2012  drochner fix trivial typo in warning msg
 1.1 22-Jan-2012  christos branches: 1.1.4; 1.1.8;
From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
 1.1.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.4.3 30-Oct-2012  yamt sync with head
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 22-Jan-2012  yamt file compat_fsetpos.c was added on branch yamt-pagecache on 2012-04-17 00:05:17 +0000
 1.4 12-Jun-2014  christos fix srandom and initstate signatures (from enh at google)
 1.3 20-Apr-2012  christos branches: 1.3.2; 1.3.8;
PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
 1.2 11-Mar-2006  christos branches: 1.2.44; 1.2.46;
Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.1 13-Sep-2005  christos compat core reorg.
 1.2.46.1 07-May-2012  riz Pull up following revision(s) (requested by christos in ticket #222):
include/stdlib.h: revision 1.98
lib/libc/compat/stdlib/Makefile.inc: revision 1.3
lib/libc/compat/include/stdlib.h: revision 1.5
lib/libc/compat/stdlib/compat_putenv.c: revision 1.1
lib/libc/compat/stdlib/compat_putenv.c: revision 1.2
PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
use setenv so that we don't leak memory.
 1.2.44.1 23-May-2012  yamt sync with head.
 1.3.8.1 10-Aug-2014  tls Rebase.
 1.3.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 20-Jan-2015  christos Fix non _REENTRANT build.
 1.2 22-Apr-2012  christos branches: 1.2.2; 1.2.4;
use setenv so that we don't leak memory.
 1.1 20-Apr-2012  christos PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
 1.2.4.2 23-May-2012  yamt sync with head.
 1.2.4.1 22-Apr-2012  yamt file compat_putenv.c was added on branch yamt-pagecache on 2012-05-23 10:07:30 +0000
 1.2.2.2 07-May-2012  riz Pull up following revision(s) (requested by christos in ticket #222):
include/stdlib.h: revision 1.98
lib/libc/compat/stdlib/Makefile.inc: revision 1.3
lib/libc/compat/include/stdlib.h: revision 1.5
lib/libc/compat/stdlib/compat_putenv.c: revision 1.1
lib/libc/compat/stdlib/compat_putenv.c: revision 1.2
PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
copying the passed string (which is not ToG compliant), instead of using
it directly in the environment arrat as it should. Needs to be pulled up
to NetBSd-6.
use setenv so that we don't leak memory.
 1.2.2.1 22-Apr-2012  riz file compat_putenv.c was added on branch netbsd-6 on 2012-05-07 16:47:22 +0000
 1.3 20-Jan-2015  christos Fix non _REENTRANT build.
 1.2 12-Jun-2014  christos branches: 1.2.2; 1.2.6;
rename to 60
 1.1 12-Jun-2014  christos fix srandom and initstate signatures (from enh at google)
 1.2.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 12-Jun-2014  tls file compat_random.c was added on branch tls-maxphys on 2014-08-20 00:02:14 +0000
 1.2.2.2 10-Aug-2014  tls Rebase.
 1.2.2.1 12-Jun-2014  tls file compat_random.c was added on branch tls-earlyentropy on 2014-08-10 06:51:50 +0000
 1.4 20-Jan-2015  christos Fix non _REENTRANT build.
 1.3 14-Nov-2010  tron Improve and simplify implementation of *env(3) functions:
- Use RB tree to keep track of memory allocated via setenv(3) as
suggested by Enami Tsugutomo in private e-mail.
This simplifies the code a lot as we no longer need to keep the size
of "environ" in sync with an array of allocated environment variables.
It also makes it possible to free environment variables in unsetenv(3)
if something has changed the order of the "environ" array.
- Fix a bug in getenv(3) and getenv_r(3) which would return bogus
results e.g. for " getenv("A=B") " if an environment variable "A"
with value "B=C" exists.
- Clean up the internal functions:
- Don't expose the read/write lock for the environment to other parts
of "libc". Provide locking functions instead.
- Use "bool" to report success or failure.
- Use "ssize_t" or "size_t" instead of "int" for indexes.
- Provide internal functions with simpler interfaces e.g. don't
combine return values and reference arguments.
- Don't copy "environ" into an allocated block unless we really need
to grow it.

Code reviewed by Joerg Sonnenberger and Christos Zoulas, tested by
Joerg Sonnenberger and me. These changes also fix problems in
zsh 4.3.* and pam_ssh according to Joerg.
 1.2 23-Sep-2010  christos Use a bit array to keep track of malloced environment entries so we can
free them.
 1.1 13-Sep-2005  christos compat core reorg.
 1.3 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.2 20-Jan-2024  christos branches: 1.2.2;
Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.1 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.12 19-May-2024  christos version dup3
 1.11 01-Nov-2021  thorpej Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
 1.10 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.9 29-Mar-2013  christos branches: 1.9.28;
Compat glue for lwp park, but does not use the new syscall yet.
 1.8 11-Jan-2009  christos branches: 1.8.8; 1.8.14;
merge christos-time_t
 1.7 14-Jul-2007  dsl branches: 1.7.20;
Change libc system callstub from 'mount' to '__mount50', add compat call.
 1.6 31-Jul-2006  martin Make filehandles opaque to userland
 1.5 13-Jul-2006  martin Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
 1.4 26-Jun-2006  mrg version the socket(2) syscall. for compat30 socket, we use
EPROTONOSUPPORT instead of EAFNOSUPPORT.

from pavel@ with a little bit of clean up from myself.

XXX: netbsd32 (and perhaps other emulations) should be able
XXX: to call the standard socket calls for this i think, but
XXX: revisit this at another time.
 1.3 29-May-2006  drochner support the new ntp_gettime() syscall and add compatibility for the old one
 1.2 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.1 13-Sep-2005  christos compat core reorg.
 1.7.20.7 05-Jan-2009  christos add compat for sched_rr_get_interval.
 1.7.20.6 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.7.20.5 09-Nov-2008  christos add mqueue stuff, fix _sys aliases.
 1.7.20.4 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.7.20.3 09-Nov-2008  christos fix fhstat.
 1.7.20.2 08-Nov-2008  christos add more stuff.
 1.7.20.1 08-Nov-2008  christos time_t changes
 1.8.14.1 23-Jun-2013  tls resync from head
 1.8.8.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.9.28.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.5 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.4 11-Jan-2009  christos branches: 1.4.8; 1.4.14;
merge christos-time_t
 1.3 28-Apr-2008  martin branches: 1.3.8;
Remove clause 3 and 4 from TNF licenses
 1.2 04-Aug-2006  yamt branches: 1.2.18;
remove the support of variable-sized filehandle from compat version of
syscalls. (strictly speaking, it breaks abi. i don't think it's a problem
because this feature is short-lived and there are no affected in-tree
filesystems.)
 1.1 31-Jul-2006  martin Make filehandles opaque to userland
 1.2.18.1 18-May-2008  yamt sync with head.
 1.3.8.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.3.8.1 28-Apr-2008  christos file compat___fhstat30.c was added on branch christos-time_t on 2008-11-10 00:13:02 +0000
 1.4.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.8.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.1 22-Sep-2019  christos branches: 1.1.4;
Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 22-Sep-2019  martin file compat___fhstatvfs140.c was added on branch phil-wifi on 2020-04-13 08:03:09 +0000
 1.1 22-Sep-2019  christos branches: 1.1.4;
Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 22-Sep-2019  martin file compat___fhstatvfs40.c was added on branch phil-wifi on 2020-04-13 08:03:09 +0000
 1.3 26-Dec-2017  christos Fix const argument inconsistency (found by lint(1))
 1.2 31-Jan-2014  christos branches: 1.2.4;
expose __lwp_park60
 1.1 29-Mar-2013  christos branches: 1.1.2;
Compat glue for lwp park, but does not use the new syscall yet.
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 23-Jun-2013  tls resync from head
 1.1.2.1 29-Mar-2013  tls file compat___lwp_park50.c was added on branch tls-maxphys on 2013-06-23 06:21:04 +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 31-Jan-2014  yamt file compat___lwp_park50.c was added on branch yamt-pagecache on 2014-05-22 11:36:51 +0000
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 10-Nov-2008  christos branches: 1.1.2;
file compat___msgctl13.c was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 10-Nov-2008  christos branches: 1.1.2;
file compat___ntp_gettime30.c was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.6 29-Jan-2015  joerg Remove va_arg hack for Clang/PPC.
 1.5 13-Aug-2014  joerg Use the lint path as workaround for Clang on 32bit PPC for now.
Document this hack.
 1.4 10-Aug-2014  joerg If LINT code path uses memcpy, it should also include string.h.
 1.3 31-Jan-2011  christos branches: 1.3.10;
Fix emulation issue of SETVAL, and make the code look the same between the
two different versions.
 1.2 11-Jan-2009  christos branches: 1.2.4;
merge christos-time_t
 1.1 10-Nov-2008  christos branches: 1.1.2;
file compat___semctl13.c was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.2.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.3.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 10-Nov-2008  christos branches: 1.1.2;
file compat___shmctl13.c was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.2 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.1 01-Nov-2021  thorpej Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
 1.6 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.5 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.4 11-Jan-2009  christos branches: 1.4.8; 1.4.14;
merge christos-time_t
 1.3 31-Jul-2006  martin branches: 1.3.28;
Make filehandles opaque to userland
 1.2 04-May-2006  christos Adjust for the fhstat() compat kernel change.
 1.1 13-Sep-2005  christos compat core reorg.
 1.3.28.2 09-Nov-2008  christos fix fhstat.
 1.3.28.1 08-Nov-2008  christos time_t changes
 1.4.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.8.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 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat___stat30.c was initially added on branch christos-time_t.
 1.1.2.2 09-Nov-2008  christos fix fhstat.
 1.1.2.1 08-Nov-2008  christos add more stuff.
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.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.3 01-Jun-2024  thorpej Don't include both <lwp.h> and <compat/include/lwp.h>.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 10-Nov-2008  christos branches: 1.1.2;
file compat__lwp_park.c was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 09-Nov-2008  christos branches: 1.1.2;
file compat_adjtime.c was initially added on branch christos-time_t.
 1.1.2.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.1.2.1 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 09-Nov-2008  christos branches: 1.1.2;
file compat_aio_suspend.c was initially added on branch christos-time_t.
 1.1.2.2 09-Nov-2008  christos add mqueue stuff, fix _sys aliases.
 1.1.2.1 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_clock.c was initially added on branch christos-time_t.
 1.1.2.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.4 06-Aug-2025  kre Clean up sources (remove temporary hack)

Remove the temporary hack added so these could build before
O_CLOFORK (etc) became visible to userland.

NFCI.
 1.3 17-Jul-2025  kre Libc functions which need to know about O_CLOFORK.

These are Ricardo Branco's libc updates for affected functions
that use O_CLOFORK &/or FD_CLOFORK.

These are currently padded (by me) with temporary additions so
they build while the O_CLOFORK/FD_CLOFORK definitions remain hidden
to userland.
 1.2 20-May-2024  christos branches: 1.2.2;
finish renaming __dup3110 to __dup3100
 1.1 19-May-2024  christos version dup3
 1.2.2.1 02-Aug-2025  perseant Sync with HEAD
 1.5 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.4 28-Apr-2008  martin branches: 1.4.8;
Remove clause 3 and 4 from TNF licenses
 1.3 04-Aug-2006  yamt branches: 1.3.18;
add missing const.
 1.2 04-Aug-2006  yamt remove the support of variable-sized filehandle from compat version of
syscalls. (strictly speaking, it breaks abi. i don't think it's a problem
because this feature is short-lived and there are no affected in-tree
filesystems.)
 1.1 31-Jul-2006  martin Make filehandles opaque to userland
 1.3.18.1 18-May-2008  yamt sync with head.
 1.4.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4.8.1 28-Apr-2008  martin file compat_fhopen.c was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.5 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.4 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 04-Aug-2006  yamt branches: 1.2.18;
remove the support of variable-sized filehandle from compat version of
syscalls. (strictly speaking, it breaks abi. i don't think it's a problem
because this feature is short-lived and there are no affected in-tree
filesystems.)
 1.1 31-Jul-2006  martin Make filehandles opaque to userland
 1.2.18.1 18-May-2008  yamt sync with head.
 1.3.64.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3.8.1 28-Apr-2008  martin file compat_fhstatvfs.c was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.5 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.4 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 04-Aug-2006  yamt branches: 1.2.18;
remove the support of variable-sized filehandle from compat version of
syscalls. (strictly speaking, it breaks abi. i don't think it's a problem
because this feature is short-lived and there are no affected in-tree
filesystems.)
 1.1 31-Jul-2006  martin Make filehandles opaque to userland
 1.2.18.1 18-May-2008  yamt sync with head.
 1.3.64.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3.8.1 28-Apr-2008  martin file compat_fhstatvfs1.c was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.6 13-Mar-2012  joerg Add missing includes.
 1.5 13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.4 20-Jun-2011  mrg branches: 1.4.2;
various build fixes for gcc 4.5. from chuq. XXX i'm not sure all of
these work properly wtf pointer aliasing, but there are no casts at
least...

the lib/libpuffs/puffs_priv.h is definately a real bug fix.

from chuq.
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.22;
Remove clause 3 and 4 from TNF licenses
 1.2 02-Mar-2007  nakayama branches: 1.2.10;
PR lib/34210: Avoid bus error (unaligned 64-bit access) on sparc64.
 1.1 13-Sep-2005  christos branches: 1.1.4;
compat core reorg.
 1.1.4.1 04-Mar-2007  bouyer Pull up following revision(s) (requested by nakayama in ticket #485):
lib/libc/compat/sys/compat_getdents.c: revision 1.2
PR lib/34210: Avoid bus error (unaligned 64-bit access) on sparc64.
 1.2.10.1 18-May-2008  yamt sync with head.
 1.3.22.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3.8.1 28-Apr-2008  martin file compat_getdents.c was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.3 20-Mar-2012  matt Switch to C89 definitions.
Remove use of __P
 1.2 22-Feb-2009  dholland branches: 1.2.6;
Add __warn_references to getdirentries(), per PR 37730. Okayed by Christos
a while back.
 1.1 13-Sep-2005  christos branches: 1.1.30;
compat core reorg.
 1.1.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.2.6.1 17-Apr-2012  yamt sync with head
 1.7 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.6 28-Apr-2008  martin branches: 1.6.8;
Remove clause 3 and 4 from TNF licenses
 1.5 04-Aug-2006  yamt branches: 1.5.18;
remove the support of variable-sized filehandle from compat version of
syscalls. (strictly speaking, it breaks abi. i don't think it's a problem
because this feature is short-lived and there are no affected in-tree
filesystems.)
 1.4 31-Jul-2006  martin Make filehandles opaque to userland
 1.3 27-Jul-2006  christos fts_data is defined to be something else now. Avoid syntax error.
 1.2 13-Jul-2006  martin Lint insists on this.
 1.1 13-Jul-2006  martin Ooops, forgot to add this with the last commit
 1.5.18.1 18-May-2008  yamt sync with head.
 1.6.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6.8.1 28-Apr-2008  martin file compat_getfh.c was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.5 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.4 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_getrusage.c was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.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 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_gettimeofday.c was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.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-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_itimer.c was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.4 29-Jul-2023  rin libc: Warn of __kevent50 when itself (not kevent) is referenced
 1.3 28-Jul-2023  christos Add epoll(2) from Theodore Preduta as part of GSoC 2023
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 10-Nov-2008  christos branches: 1.1.2;
file compat_kevent.c was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 10-Nov-2008  christos branches: 1.1.2;
file compat_lfs_segwait.c was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.5 18-Jun-2019  kamil Fix warning message for mknod symbol linkage

The correct reference for mknod(2) is in <sys/stat.h>
 1.4 04-Oct-2013  christos branches: 1.4.26;
prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 09-Nov-2008  christos branches: 1.1.2;
file compat_mknod.c was initially added on branch christos-time_t.
 1.1.2.1 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.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.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 18-Jul-2007  dsl branches: 1.2.16;
Fix the return value so the MNT_GETARGS returns 0, not the buffer length.
 1.1 14-Jul-2007  dsl Change libc system callstub from 'mount' to '__mount50', add compat call.
 1.2.16.2 18-Jul-2007  dsl Fix the return value so the MNT_GETARGS returns 0, not the buffer length.
 1.2.16.1 18-Jul-2007  dsl file compat_mount.c was added on branch matt-mips64 on 2007-07-18 20:10:48 +0000
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 09-Nov-2008  christos branches: 1.1.2;
file compat_mqueue.c was initially added on branch christos-time_t.
 1.1.2.2 04-Jan-2009  christos fix return type.
 1.1.2.1 09-Nov-2008  christos add mqueue stuff, fix _sys aliases.
 1.2 20-Mar-2012  matt Switch to C89 definitions.
Remove use of __P
 1.1 13-Sep-2005  christos branches: 1.1.44;
compat core reorg.
 1.1.44.1 17-Apr-2012  yamt sync with head
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_nanosleep.c was initially added on branch christos-time_t.
 1.1.2.3 09-Nov-2008  christos add mqueue stuff, fix _sys aliases.
 1.1.2.2 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 29-May-2006  drochner branches: 1.1.28;
support the new ntp_gettime() syscall and add compatibility for the old one
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 05-Jan-2009  christos branches: 1.1.2;
file compat_sched.c was initially added on branch christos-time_t.
 1.1.2.1 05-Jan-2009  christos add compat for sched_rr_get_interval.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_select.c was initially added on branch christos-time_t.
 1.1.2.3 09-Nov-2008  christos add mqueue stuff, fix _sys aliases.
 1.1.2.2 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.6 29-Jan-2015  joerg Remove va_arg hack for Clang/PPC.
 1.5 13-Aug-2014  joerg Use the lint path as workaround for Clang on 32bit PPC for now.
Document this hack.
 1.4 10-Aug-2014  joerg If LINT code path uses memcpy, it should also include string.h.
 1.3 31-Jan-2011  christos branches: 1.3.10;
Fix emulation issue of SETVAL, and make the code look the same between the
two different versions.
 1.2 11-Jan-2009  christos branches: 1.2.4;
merge christos-time_t
 1.1 13-Sep-2005  christos branches: 1.1.28;
compat core reorg.
 1.1.28.1 05-Jan-2009  christos previous version was too naive. Convert struct explictly like we do in the
kernel.
 1.2.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.3.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_settimeofday.c was initially added on branch christos-time_t.
 1.1.2.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.5 20-Mar-2012  matt Switch to C89 definitions.
Remove use of __P
 1.4 13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.3 11-Jan-2009  christos branches: 1.3.8;
merge christos-time_t
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 13-Sep-2005  christos branches: 1.1.18;
compat core reorg.
 1.1.18.1 18-May-2008  yamt sync with head.
 1.2.8.2 08-Nov-2008  christos time_t changes
 1.2.8.1 28-Apr-2008  christos file compat_sigaltstack.c was added on branch christos-time_t on 2008-11-08 21:45:38 +0000
 1.3.8.1 17-Apr-2012  yamt sync with head
 1.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_sigtimedwait.c was initially added on branch christos-time_t.
 1.1.2.3 05-Jan-2009  christos fix prototype.
 1.1.2.2 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.1 26-Jun-2006  mrg version the socket(2) syscall. for compat30 socket, we use
EPROTONOSUPPORT instead of EAFNOSUPPORT.

from pavel@ with a little bit of clean up from myself.

XXX: netbsd32 (and perhaps other emulations) should be able
XXX: to call the standard socket calls for this i think, but
XXX: revisit this at another time.
 1.4 04-Oct-2013  christos prefix compat with __ in case __dso_hidden is not available
 1.3 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.2 11-Jan-2009  christos branches: 1.2.8; 1.2.14;
merge christos-time_t
 1.1 13-Sep-2005  christos branches: 1.1.28;
compat core reorg.
 1.1.28.1 08-Nov-2008  christos time_t changes
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.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.9 04-Oct-2019  christos deduplicate the conversion function from statvfs -> statfs12
 1.8 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.7 04-Oct-2013  christos branches: 1.7.26;
prefix compat with __ in case __dso_hidden is not available
 1.6 04-Oct-2013  christos avoid linker warning for compat symbols that are used internally in libc,
by introducing a hidden compat_foo() function, using that internally in
libc, and exposing foo as a strong alias to compat_foo(). I am open for
better ideas.
 1.5 03-Feb-2009  lukem branches: 1.5.8; 1.5.14;
sign-compare fix
 1.4 28-Apr-2008  martin branches: 1.4.8;
Remove clause 3 and 4 from TNF licenses
 1.3 04-Aug-2006  yamt branches: 1.3.18;
remove the support of variable-sized filehandle from compat version of
syscalls. (strictly speaking, it breaks abi. i don't think it's a problem
because this feature is short-lived and there are no affected in-tree
filesystems.)
 1.2 31-Jul-2006  martin Make filehandles opaque to userland
 1.1 13-Sep-2005  christos compat core reorg.
 1.3.18.1 18-May-2008  yamt sync with head.
 1.4.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4.8.1 28-Apr-2008  martin file compat_statfs.c was added on branch christos-time_t on 2008-04-28 20:23:00 +0000
 1.5.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.8.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.7.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 22-Sep-2019  christos branches: 1.1.4;
Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.1.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.4.1 22-Sep-2019  martin file compat_statvfs.c was added on branch phil-wifi on 2020-04-13 08:03:09 +0000
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_timer.c was initially added on branch christos-time_t.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.3 01-Aug-2023  mrg fix simple mis-matched function prototype and definitions.

most of these are like, eg

void foo(int[2]);

with either of these

void foo(int*) { ... }
void foo(int[]) { ... }

in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.

found by GCC 12.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_utimes.c was initially added on branch christos-time_t.
 1.1.2.2 10-Jan-2009  christos *utimes can take a NULL second arg.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.4 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.3 26-Mar-2015  justin Return type of compat wait functions should be pid_t not int.
 1.2 11-Jan-2009  christos merge christos-time_t
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_wait4.c was initially added on branch christos-time_t.
 1.1.2.4 23-Nov-2008  christos don't deal with rusage if the one passed was NULL.
 1.1.2.3 09-Nov-2008  christos add mqueue stuff, fix _sys aliases.
 1.1.2.2 09-Nov-2008  christos version some more stuff and add sys_foo aliases.
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.1 13-Sep-2005  christos compat core reorg.
 1.3 16-Sep-2023  christos Update tzcode from 2022g to 2023c:

Release 2023c - 2023-03-28 12:42:14 -0700

Release 2023b - 2023-03-23 19:50:38 -0700

Release 2023a - 2023-03-22 12:39:33 -0700

Changes to code

You can now tell tzselect local time, to simplify later choices.
Select the 'time' option in its first prompt.

You can now compile with -DTZNAME_MAXIMUM=N to limit time zone
abbreviations to N bytes (default 255). The reference runtime
library now rejects POSIX-style TZ strings that contain longer
abbreviations, treating them as UTC. Previously the limit was
platform dependent and abbreviations were silently truncated to
16 bytes even when the limit was greater than 16.

The code by default is now designed for C99 or later. To build in
a C89 environment, compile with -DPORT_TO_C89. To support C89
callers of the tzcode library, compile with -DSUPPORT_C89. The
two new macros are transitional aids planned to be removed in a
future version, when C99 or later will be required.

The code now builds again on pre-C99 platforms, if you compile
with -DPORT_TO_C89. This fixes a bug introduced in 2022f.

On C23-compatible platforms tzcode no longer uses syntax like
'static [[noreturn]] void usage(void);'. Instead, it uses
'[[noreturn]] static void usage(void);' as strict C23 requires.
(Problem reported by Houge Langley.)

The code's functions now constrain their arguments with the C
'restrict' keyword consistently with their documentation.
This may allow future optimizations.

zdump again builds standalone with ckdadd and without setenv,
fixing a bug introduced in 2022g. (Problem reported by panic.)

leapseconds.awk can now process a leap seconds file that never
expires; this might be useful if leap seconds are discontinued.

Changes to commentary

tz-link.html has a new section "Coordinating with governments and
distributors". (Thanks to Neil Fuller for some of the text.)

To improve tzselect diagnostics, zone1970.tab's comments column is
now limited to countries that have multiple timezones.

Note that leap seconds are planned to be discontinued by 2035.
 1.2 11-Jan-2009  christos merge another directory that cvs missed.
 1.1 08-Nov-2008  christos branches: 1.1.2;
file Makefile.inc was initially added on branch christos-time_t.
 1.1.2.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.1 16-Sep-2023  christos Update tzcode from 2022g to 2023c:

Release 2023c - 2023-03-28 12:42:14 -0700

Release 2023b - 2023-03-23 19:50:38 -0700

Release 2023a - 2023-03-22 12:39:33 -0700

Changes to code

You can now tell tzselect local time, to simplify later choices.
Select the 'time' option in its first prompt.

You can now compile with -DTZNAME_MAXIMUM=N to limit time zone
abbreviations to N bytes (default 255). The reference runtime
library now rejects POSIX-style TZ strings that contain longer
abbreviations, treating them as UTC. Previously the limit was
platform dependent and abbreviations were silently truncated to
16 bytes even when the limit was greater than 16.

The code by default is now designed for C99 or later. To build in
a C89 environment, compile with -DPORT_TO_C89. To support C89
callers of the tzcode library, compile with -DSUPPORT_C89. The
two new macros are transitional aids planned to be removed in a
future version, when C99 or later will be required.

The code now builds again on pre-C99 platforms, if you compile
with -DPORT_TO_C89. This fixes a bug introduced in 2022f.

On C23-compatible platforms tzcode no longer uses syntax like
'static [[noreturn]] void usage(void);'. Instead, it uses
'[[noreturn]] static void usage(void);' as strict C23 requires.
(Problem reported by Houge Langley.)

The code's functions now constrain their arguments with the C
'restrict' keyword consistently with their documentation.
This may allow future optimizations.

zdump again builds standalone with ckdadd and without setenv,
fixing a bug introduced in 2022g. (Problem reported by panic.)

leapseconds.awk can now process a leap seconds file that never
expires; this might be useful if leap seconds are discontinued.

Changes to commentary

tz-link.html has a new section "Coordinating with governments and
distributors". (Thanks to Neil Fuller for some of the text.)

To improve tzselect diagnostics, zone1970.tab's comments column is
now limited to countries that have multiple timezones.

Note that leap seconds are planned to be discontinued by 2035.
 1.2 11-Jan-2009  christos merge another directory that cvs missed.
 1.1 10-Nov-2008  christos branches: 1.1.2;
file compat_difftime.c was initially added on branch christos-time_t.
 1.1.2.1 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.4 11-Sep-2024  christos Merge tzcode-2024b

Release 2024b - 2024-09-04 12:27:47 -0700

Changes to code

localtime.c now always uses a TZif file's time type 0 to handle
timestamps before the file's first transition. Formerly,
localtime.c sometimes inferred a different time type, in order to
handle problematic data generated by zic 2018e or earlier. As it
is now safe to assume more recent versions of zic, there is no
longer a pressing need to fail to conform RFC 8536 section 3.2,
which requires using time type 0 in this situation. This change
does not affect behavior when reading TZif files generated by zic
2018f and later.

POSIX.1-2024 removes asctime_r and ctime_r and does not let
libraries define them, so remove them except when needed to
conform to earlier POSIX. These functions are dangerous as they
can overrun user buffers. If you still need them, add
-DSUPPORT_POSIX2008 to CFLAGS.

The SUPPORT_C89 option now defaults to 1 instead of 0, fixing a
POSIX-conformance bug introduced in 2023a.

tzselect now supports POSIX.1-2024 proleptic TZ strings. Also, it
assumes POSIX.2-1992 or later, as practical porting targets now
all support that, and it uses some features from POSIX.1-2024 if
available.

Changes to build procedure

'make check' no longer requires curl and Internet access.

The build procedure now assumes POSIX.2-1992 or later, to simplify
maintenance. To build on Solaris 10, the only extant system still
defaulting to pre-POSIX, prepend /usr/xpg4/bin to PATH.

Changes to documentation

The documentation now reflects POSIX.1-2024.

Changes to commentary

Commentary about historical transitions in Portugal and her former
colonies has been expanded with links to many relevant legislation.
(Thanks to Tim Parenti.)
 1.3 21-Feb-2011  christos branches: 1.3.56;
remove duplicate weak aliases
 1.2 11-Jan-2009  christos branches: 1.2.4;
merge another directory that cvs missed.
 1.1 08-Nov-2008  christos branches: 1.1.2;
file compat_localtime.c was initially added on branch christos-time_t.
 1.1.2.3 10-Nov-2008  christos version tzet{,wall}
 1.1.2.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.1.2.1 08-Nov-2008  christos new files for time_t
 1.2.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.3.56.1 02-Aug-2025  perseant Sync with HEAD

RSS XML Feed