more updates for modern compilers / C versions.
ar_scan() takes a "void *" for both it's last arg, and the func's
last arg. adjust some callbacks to cope without casts.
in configure, use return instead of exit(3) to avoid wanting stdlib.h.
if wanting a void signal retsigtype, use the right function (XXX, maybe
just give up and remove all this now in 2026.)
remove checks for __GNU_LIBRARY__ before including stdlib.h or unistd.h,
so that valid prototypes are enabled, and remove incomplete prototypes
for them from these sources (eg, getenv(), getopt(), errno.)
avoid using bsd_signal entirely as a name, by defining it to
gmake_bsd_signal() after including signal.h.
fixes builds for me on netbsd using GCC 12, 14, and 15.
KERNEL_LOCK(9): Improve diagnostics when hogging kernel lock.
1. Log diagnostics unconditionally, even if !LOCKDEBUG -- only put the
_KERNEL_LOCK_ABORT("spinout") under LOCKDEBUG.
2. Spin up to ten seconds (not 0x0fffffff iterations of the loop), as
measured by getticks() and hz, before logging diagnostics.
3. Avoid printing anything if it was already printed in the last ten
seconds.
This uses a somewhat grody symbol alias hack to keep the declaration
of kernel_lock intact so it doesn't require changes in sys/lock.h or
its users.
kern/59870: kernel lock runtime diagnostics are difficult
rasops_allocattr_mono: fix regression from WSSCREEN_256COL
0xff was never a valid colormap index, but worked by accident
since the previous ATTR_FG implementation clamped the value.
Now it results in black text on black background.
Use named WSCOL_* constants instead.
curlwp_bind(9): tweak example's markup
`-offset indent` indents less than a literal tab. While here,
untabify the example, groff's PS output is slightly misaligned
otherwise (within the literal display itself).
urndis(4): Attach at usbifif, not usbdevif, in the if_urndis module.
We really ought to have a static type system for config(5) interface
attributes to catch mistakes like this!
Came up while trying to test a fix for:
PR kern/59872: urndis(4): missing support for some devices
urndis(4): Match more interface ids.
There are some others we should consider too, based on what OpenBSD,
FreeBSD, and Linux match, but I haven't tested with these devices:
class subclass protocol
1. 0x02 (CDC) 0x02 (abstract control model) 0xff (? rndis?)
2. 0xef (misc) 0x01 (sync) 0x01 (active)
3. 0xef (misc) 0x04 (rndis) 0x03 (wimax)
4. 0xef (misc) 0x04 (rndis) 0x04 (wwan)
Note: FreeBSD uses `UIPROTO_RNDIS' for (3) even though the USB-IF
registry lists class 0xef, subclass 0x04, protocol 0x04 as `RNDIS
over WiMAX'; likewise `UIPROTO_ACTIVESYNC' for (4) even though it's
listed as `RNDIS over WWAN'. My guess is that for class 0xef
subclass 0x04, _any_ protocol will really be RNDIS, and it was a
mistake for FreeBSD to use those protocol numbers (which context
suggests were supposed to apply to different subclasses).
PR kern/59872: urndis(4): missing support for some devices
Improve the rigor of function signatures and prototypes in gmake,
texinfo, and gmp sources in order to meet the C23 requirements of
gcc 15.2.1. (2nd try after the 1st try broke the build :( )
With these changes -current now also builds with gcc 15.2.1 on
Fedora 43 (using HOST_CFLAGS=-fpermissive). No functional changes
intended.
Patches are from (primarily) mrg@ and myself. Additional comments
and guidance from riastradh@ .
dev/pci/files.virtio: Note not to add more virtio drivers here.
virtio is not pci-specific and the drivers are not pci-specific so
they shouldn't be in a pci-specific place.