Commit Graph

21179 Commits

Author SHA1 Message Date
christos 9ba017e662 more extern decls 2024-01-19 19:31:41 +00:00
christos a88bd0da18 declare _libc_init() in header. 2024-01-19 19:22:17 +00:00
christos cd771ab073 add lint flags for compiler_rt 2024-01-19 18:45:01 +00:00
christos 689fdc5827 add some const 2024-01-19 18:41:38 +00:00
christos 2072232780 Add lint flags for jemalloc 2024-01-19 18:41:30 +00:00
rin b1652dc39b fixunstf[sd]i_ieee754: Explicitly include stddef.h for size_t
Fix build for mips{,n}64. Note that stddef.h has been implicitly
included via eabi.h for aarch64, on the other hand.
2024-01-05 09:41:58 +00:00
christos 4be2f99d7b tidy up some extern declarations 2024-01-03 18:41:53 +00:00
christos 53e64a7779 pass lint. 2024-01-02 19:27:26 +00:00
christos 559c967b97 Import tzcode 2023d:
localtime.c no longer mishandles TZif files that contain a single
    transition into a DST regime.  Previously, it incorrectly assumed
    DST was in effect before the transition too.  (Thanks to Alois
    Treindl for debugging help.)

    localtime.c's timeoff no longer collides with OpenBSD 7.4.

    The C code now uses _Generic only if __STDC_VERSION__ says the
    compiler is C11 or later.

    tzselect now optionally reads zonenow.tab, to simplify when
    configuring only for timestamps dated from now on.

    tzselect no longer creates temporary files.

    tzselect no longer mishandles the following:

      Spaces and most other special characters in BUGEMAIL, PACKAGE,
      TZDIR, and VERSION.

      TZ strings when using mawk 1.4.3, which mishandles regular
      expressions of the form /X{2,}/.

      ISO 6709 coordinates when using an awk that lacks the GNU
      extension of newlines in -v option-arguments.

      Non UTF-8 locales when using an iconv command that lacks the GNU
      //TRANSLIT extension.

    zic no longer mishandles data for Palestine after the year 2075.
    Previously, it incorrectly omitted post-2075 transitions that are
    predicted for just before and just after Ramadan.  (Thanks to Ken
    Murchison for debugging help.)

    zic now works again on Linux 2.6.16 and 2.6.17 (2006).
2023-12-23 20:48:38 +00:00
jklos b56afa4dc8 Fix building with M68040 and M68060 options. 2023-12-21 06:32:20 +00:00
mrg 6b3ee451d6 make malloc_usable_size() visible with old jemalloc.
it's in <malloc.h> and applications like firefox expect it.

XXX: pullup-10
2023-12-13 23:53:50 +00:00
mlelstv 2d9177bfbe pathconf needs to return EINVAL when the variable is invalid
or cannot be associated with a file. This also needs to be true
when the node doesn't implement the pathconf function at all.
2023-12-11 12:42:18 +00:00
kre 9473af8f9a Fix yet another wording (editing) botch noticed by uwe@ 2023-12-07 23:42:28 +00:00
uwe b03d4c66a4 zic(8): missed a .Ql 2023-12-07 23:21:21 +00:00
kre 058a868134 Fix a couple of (not very likely) memory leaks, reported by enh@google.com
who attributed them:

  the malloc one was reported to Android (as
  https://android-review.googlesource.com/c/platform/bionic/+/2856549)
  by wuhaitao3 <wuhaitao3@xiaomi.corp-partner.google.com>; Chris Ferris
  <cferris@google.com> then spotted the goto nospc one.
2023-12-07 22:33:49 +00:00
kre c62a59b56e Fix a wording botch noticed by uwe@ (and one more smaller one), and
a few more markup issues.   While here, consistemntly use minus when
minus is meant, rather that just using a hyphen.
2023-12-07 20:13:37 +00:00
riastradh 57b4a3d756 pthread: Document the setstack vs setguardsize bug.
Suggest the safe, compatible workaround.
2023-12-07 16:55:01 +00:00
uwe 2f0b3b676b zic(8): more markup fixes
Still need to go over the tables.
2023-12-07 16:16:03 +00:00
kre 82a0628ec4 A couple more (relatively minor) markup fixes. 2023-12-06 21:45:11 +00:00
kre 52b305fe69 More markup fixes. This man page remains exceedingly ugly (particularly
relating to vertical space - which often is missing where it would be
better if it weren't, or is present and wasteful/ugly).
2023-12-06 21:42:01 +00:00
christos 8b64b36896 PR/57757: Izumi Tsutsui: Fix markup errors 2023-12-06 20:01:44 +00:00
riastradh 20941a42e9 pthread: Don't adjust user-allocated stack addresses by guardsize.
PR lib/57721

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-11-28 02:54:33 +00:00
christos 82eb5ce2b3 Restore original code now that the broken test has been fixed. 2023-11-27 19:46:14 +00:00
christos d5d5b72237 minimize diffs with FreeBSD. 2023-11-19 18:57:11 +00:00
christos 4e48317f57 don't expose extra symbols. 2023-11-15 03:35:04 +00:00
christos 21fd2bf912 provide materialized functions for the ssp overriden inlines 2023-11-15 03:15:28 +00:00
rin 79de40626c libc/compiler_rt: Consistently use LIBC_MACHINE_{ARCH,CPU}
Instead of MACHINE_{ARCH,CPU}, respectively.

With this change, unnecessary comparetf2.c is no longer
compiled in for 32-bit compat libc on aarch64.
2023-11-09 07:29:26 +00:00
simonb bcb621d402 Add
#include <cdbr.h>
to the synopsis.
2023-10-27 04:05:55 +00:00
riastradh 91811c4fb2 mremap(2): Use .Lk for links in text.
.%U is only for links in reference sections.
2023-10-25 18:23:10 +00:00
simonb d750207ba0 Add _SC_AVPHYS_PAGES.
getconf(1) add this and SC_PHYS_PAGES.
libc: Use vm.uvmexp2 over vm.meter is it's twice as fast on my setup.
getconf.3: Tidy up wording for SC_PHYS_PAGES.
2023-10-25 08:19:34 +00:00
jschauma a374ef689d document S_ISWHT, sort these macros 2023-10-15 20:37:04 +00:00
ad a3628a9150 A few more branch hints. 2023-10-14 19:39:33 +00:00
ad 57fcbaebb4 Cherry pick a fix from FreeBSD:
commit 80bc871bdd4a8254ce19a65a54c8c918dd3ddd11
Author: Konstantin Belousov <kib@FreeBSD.org>
Date:   Sat Sep 12 18:16:46 2009 +0000

    MFC r196861:
    Handle zero size for posix_memalign. Return NULL or unique address
    according to the 'V' option.
2023-10-14 19:38:51 +00:00
ad 13122b2822 Cherry pick a fix from FreeBSD:
commit 52d7a117c0fe8bd0226d964f4272131700035f12
Author: Jason Evans <jasone@FreeBSD.org>
Date:   Thu Aug 14 17:03:29 2008 +0000

    Re-order the terms of an expression in arena_run_reg_dalloc() to correctly
    detect whether the integer division table is large enough to handle the
    divisor.  Before this change, the last two table elements were never used,
    thus causing the slow path to be used for those divisors.
2023-10-14 19:37:24 +00:00
ad a52713e5b5 Fix a bug in the rbtree conversion. 2023-10-14 19:36:17 +00:00
mrg 744309c52c fix compile error on 32-bit platforms. 2023-10-14 06:29:10 +00:00
ad 562025fdfe Convert to use Matt Thomas's rbtree, which the env code probably already
pulls into libc.  amd64 object size before and after:

	   text    data     bss     dec     hex filename
	  21001      88     365   21454    53ce jemalloc.po
	  14991     184     429   15604    3cf4 jemalloc.po

libmicro on AMD Athlon Silver 3050e comparing this and the revision before
previous (i.e. the old code, versus arena changes + rbtree changes):

	exit_10_nolibc	135.168300	128.07790[   +5.5%]
        fork_100        180.539040      149.63721[  +20.7%]
        fork_1000       200.421650      167.09660[  +19.9%]
	mallocT2_10	0.132920	0.13317[   -0.2%]
	mallocT2_100	0.136350	0.13635[   +0.0%]
	mallocT2_100k	0.258690	0.26641[   -3.0%]
	mallocT2_10k	0.223340	0.22733[   -1.8%]
	mallocT2_1k	0.137170	0.14254[   -3.9%]
	malloc_10	0.100540	0.10849[   -7.9%]
	malloc_100	0.107290	0.10753[   -0.2%]
	malloc_100k	0.193560	0.19355[   +0.0%]
	malloc_10k	0.173250	0.17454[   -0.7%]
	malloc_1k	0.113490	0.11335[   +0.1%]
2023-10-13 20:57:30 +00:00
ad bf5f78d57d Minor changes to jemalloc100 (the old one that only vax etc currently uses).
- Don't use TLS nor pretend to hash out arenas to reduce lock contention,
  because NetBSD uses thr_curcpu() to choose arena (i.e. per-CPU arenas).

- In a single threaded process, don't prepare "ncpus" worth of arenas,
  allocate only one.

- Use getpagesize() since it caches the return.

- Sprinkle branch hints.

- Make MALLOC_TRACE and MALLOC_DEBUG work again.
2023-10-13 19:30:28 +00:00
skrll ea952cb848 Consistently pass 0 as first and ignored argument to sigprocmask in the
setjmp implementations.

NFCI.
2023-10-11 09:12:20 +00:00
skrll 1068717982 Trailing whitespace 2023-10-11 06:15:36 +00:00
blymn 8fb09d041c Correct the fd closed check so we actually check the outfd as per
the comment.  Thanks for jdc@netbsd.org for catching this one.
2023-10-09 21:14:29 +00:00
he 0274baaaaf libm Makefile: add fma() functions for mips.
This pushed the ramdisk size, so that needed to be bumped as well.
Otherwise, there were no build issues for either 32 or 64 bit mips.
Sort-of OK'ed by simonb@.
2023-10-08 13:47:51 +00:00
rin 7c76c2272e Drop -O[01] hacks for vax; no longer necessary for patched GCC 10
PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton

XXXRO: GCC 12 may require hacks for a while, but it turned out that
GCC 12 should be treated differently from older versions; a lot of new
files need -O[01] flags, while some may no longer require it.

I will take a look later.

Note that these hacks are not required if Kalvis's patches for GCC 12
are applied.

Keep doc/HACKS entries for a while (will be sync with update for GCC 12).

diff --git a/crypto/external/bsd/openssh/lib/Makefile b/crypto/external/bsd/openssh/lib/Makefile
index 96a93f5e396..4e38be1b642 100644
--- a/crypto/external/bsd/openssh/lib/Makefile
+++ b/crypto/external/bsd/openssh/lib/Makefile
@@ -117,12 +117,6 @@ COPTS.${f}.c+=	-Wno-pointer-sign
 # XXX
 COPTS.channels.c+=	-fno-strict-aliasing

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.poly1305.c+=	-O0
-COPTS.umac.c+=		-O0
-.endif
-
 COPTS.hostfile.c+=	${CC_WNO_FORMAT_TRUNCATION}
 COPTS.sshkey.c+=	${CC_WNO_FORMAT_TRUNCATION}
 COPTS.cipher.c+=	-Wno-error=deprecated-declarations
diff --git a/distrib/utils/x_ping/Makefile b/distrib/utils/x_ping/Makefile
index f1c452a0d60..8ee77580a3f 100644
--- a/distrib/utils/x_ping/Makefile
+++ b/distrib/utils/x_ping/Makefile
@@ -12,10 +12,6 @@ CPPFLAGS+=	-I${SRCDIR} -DCRUNCHOPS
 DPADD=		${LIBM}
 LDADD=		-lm

-.if ${MACHINE_ARCH} == "vax"
-COPTS.ping.c=-O0
-.endif
-
 .include <bsd.prog.mk>

 .PATH:		${SRCDIR}
diff --git a/external/apache2/argon2/lib/libargon2/Makefile.inc b/external/apache2/argon2/lib/libargon2/Makefile.inc
index d3f4470c6c7..6a1dd146d7d 100644
--- a/external/apache2/argon2/lib/libargon2/Makefile.inc
+++ b/external/apache2/argon2/lib/libargon2/Makefile.inc
@@ -16,7 +16,3 @@ CFLAGS+=	-pthread
 LDADD+=-lpthread
 DPADD+=${LIBPTHREAD}
 .endif
-
-.if ${MACHINE} == "vax"
-COPTS.blake2b.c+=	-O0
-.endif
diff --git a/external/bsd/jemalloc/lib/Makefile.inc b/external/bsd/jemalloc/lib/Makefile.inc
index 2f524358f46..d5da774f293 100644
--- a/external/bsd/jemalloc/lib/Makefile.inc
+++ b/external/bsd/jemalloc/lib/Makefile.inc
@@ -53,12 +53,6 @@ COPTS.ctl.c+=-Wno-error=stack-protector
 COPTS.stats.c+=-Wno-error=stack-protector
 COPTS.tcache.c+=-Wno-error=stack-protector

-.if ${MACHINE_ARCH} == "vax"
-# in merge_overlapping_regs, at regrename.c
-COPTS.arena.c+=-O0
-COPTS.extent.c+=-O0
-.endif
-
 SRCS+=${JEMALLOC_SRCS}

 jemalloc.d jemalloc.pico jemalloc.o jemalloc.ln jemalloc.po jemalloc.go: \
diff --git a/external/bsd/mdocml/lib/libmandoc/Makefile b/external/bsd/mdocml/lib/libmandoc/Makefile
index 40d7e29ae88..dfd3077a2c7 100644
--- a/external/bsd/mdocml/lib/libmandoc/Makefile
+++ b/external/bsd/mdocml/lib/libmandoc/Makefile
@@ -39,11 +39,6 @@ tbl_opts.c

 MAN=	mandoc.3

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.mdoc_macro.c+=-O0
-.endif
-
 COPTS.man_validate.c+=-Wno-error=array-bounds

 .include <bsd.lib.mk>
diff --git a/external/gpl3/binutils.old/lib/libbfd/Makefile b/external/gpl3/binutils.old/lib/libbfd/Makefile
index 03477232b55..74a354532fa 100644
--- a/external/gpl3/binutils.old/lib/libbfd/Makefile
+++ b/external/gpl3/binutils.old/lib/libbfd/Makefile
@@ -41,10 +41,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \
 		-DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \
 		-DBINDIR=\"${BINDIR}\"

-.if (${BFD_MACHINE_ARCH} == "vax")
-CPPFLAGS.elf.c +=	-O0
-.endif
-
 COPTS.pei-x86_64.c+=	-Wno-stack-protector
 COPTS.elfxx-mips.c+=	-Wno-stack-protector
 COPTS.elf.c+=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :}
diff --git a/external/gpl3/binutils/lib/libbfd/Makefile b/external/gpl3/binutils/lib/libbfd/Makefile
index 00cb2b20081..a3f0c25fd35 100644
--- a/external/gpl3/binutils/lib/libbfd/Makefile
+++ b/external/gpl3/binutils/lib/libbfd/Makefile
@@ -41,10 +41,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \
 		-DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \
 		-DBINDIR=\"${BINDIR}\"

-.if (${BFD_MACHINE_ARCH} == "vax")
-CPPFLAGS.elf.c +=	-O0
-.endif
-
 COPTS.pei-x86_64.c+=	-Wno-stack-protector
 COPTS.elfxx-mips.c+=	-Wno-stack-protector
 COPTS.elf.c+=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :}
diff --git a/external/gpl3/gcc.old/lib/Makefile.sanitizer b/external/gpl3/gcc.old/lib/Makefile.sanitizer
index efd36ae4bee..5173a5109a0 100644
--- a/external/gpl3/gcc.old/lib/Makefile.sanitizer
+++ b/external/gpl3/gcc.old/lib/Makefile.sanitizer
@@ -88,22 +88,3 @@ COPTS+=-fno-builtin -fno-exceptions -fno-rtti -funwind-tables

 # Can't profile without it`
 #-fomit-frame-pointer
-
-.if ${MACHINE_ARCH} == "vax"
-COPTS.sanitizer_allocator.cc += -O1
-COPTS.sanitizer_common.cc += -O1
-COPTS.sanitizer_common_libcdep.cc += -O1
-COPTS.sanitizer_coverage_libcdep.cc += -O1
-COPTS.sanitizer_coverage_mapping_libcdep.cc += -O1
-COPTS.sanitizer_deadlock_detector1.cc += -O1
-COPTS.sanitizer_mac.cc += -O1
-COPTS.sanitizer_netbsd.cc += -O1
-COPTS.sanitizer_posix.cc += -O1
-COPTS.sanitizer_printf.cc += -O1
-COPTS.sanitizer_procmaps_common.cc += -O1
-COPTS.sanitizer_stackdepot.cc += -O1
-COPTS.sanitizer_symbolizer_libcdep.cc += -O1
-COPTS.sanitizer_symbolizer_report.cc += -O1
-COPTS.ubsan_diag.cc += -O1
-COPTS.ubsan_init.cc += -O1
-.endif
diff --git a/external/gpl3/gcc.old/lib/libasan/Makefile b/external/gpl3/gcc.old/lib/libasan/Makefile
index 1e6f9608abe..3da7bbf2f58 100644
--- a/external/gpl3/gcc.old/lib/libasan/Makefile
+++ b/external/gpl3/gcc.old/lib/libasan/Makefile
@@ -49,14 +49,6 @@ LIBDPLIBS+= m  ${NETBSDSRCDIR}/lib/libm
 LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
 CPPFLAGS+=-DCAN_SANITIZE_UB=0

-.if ${MACHINE_ARCH} == "vax"
-COPTS.asan_allocator.cc += -O1
-COPTS.asan_report.cc += -O1
-COPTS.sanitizer_file.cc += -O1
-COPTS.ubsan_diag.cc += -O1
-COPTS.ubsan_init.cc += -O1
-.endif
-
 .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
 COPTS.asan_interceptors.cc += -O1
 .endif
diff --git a/external/gpl3/gcc.old/lib/liblsan/Makefile b/external/gpl3/gcc.old/lib/liblsan/Makefile
index 4578544a9a8..ddb7981077c 100644
--- a/external/gpl3/gcc.old/lib/liblsan/Makefile
+++ b/external/gpl3/gcc.old/lib/liblsan/Makefile
@@ -16,11 +16,6 @@ LSAN_SRCS+= \
 	lsan_linux.cc \
 	lsan_thread.cc

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lsan_allocator.cc += -O1
-COPTS.sanitizer_file.cc += -O1
-.endif
-
 LIB=	lsan
 SRCS+=	${LSAN_SRCS}
 LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
diff --git a/external/gpl3/gcc.old/lib/libubsan/Makefile b/external/gpl3/gcc.old/lib/libubsan/Makefile
index 2e2faca7b1c..9de82550d14 100644
--- a/external/gpl3/gcc.old/lib/libubsan/Makefile
+++ b/external/gpl3/gcc.old/lib/libubsan/Makefile
@@ -26,10 +26,6 @@ UBSAN_SRCS= \
 COPTS.${_s}.cc+=-frtti
 .endfor

-.if ${MACHINE_ARCH} == "vax"
-COPTS.sanitizer_file.cc += -O1
-.endif
-
 LIB=	ubsan
 SRCS+=	${UBSAN_SRCS}
 LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
diff --git a/external/gpl3/gcc.old/usr.bin/cc1/Makefile b/external/gpl3/gcc.old/usr.bin/cc1/Makefile
index c55e292ee8e..ff12a5be524 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1/Makefile
@@ -46,17 +46,6 @@ CPPFLAGS.default-c.c+=	-I${BACKENDOBJ}
 BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh-c.cc sh-c.c
 .endif

-.if ${MACHINE_CPU} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1-checksum.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
index 3123ee0d60b..aab82ad3448 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
@@ -44,16 +44,8 @@ COPTS.objc-act.c+=			-Wno-stack-protector
 COPTS.objc-gnu-runtime-abi-01.c+=	-Wno-stack-protector
 COPTS.objc-next-runtime-abi-01.c+=	-Wno-stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1obj-checksum.c+=-O0
-.endif
+COPTS.c-cppbuiltin.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
+COPTS.c-typeck.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}

 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
diff --git a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
index b9c108251c5..e04e8fc7f53 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
@@ -69,18 +69,6 @@ COPTS.objc-act.c+=			-Wno-stack-protector
 COPTS.objc-gnu-runtime-abi-01.c+=	-Wno-stack-protector
 COPTS.objc-next-runtime-abi-01.c+=	-Wno-stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1obj-checksum.c+=-O0
-COPTS.decl.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
index 7936efd3a5e..7c54559e21a 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
@@ -31,23 +31,6 @@ CHECKSUM_OBJS= ${LIBBACKTRACEOBJ}/libbacktrace.a \

 CFLAGS+=	-Wno-error=stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.call.c+=-O0
-COPTS.decl.c+=-O0
-COPTS.typeck2.c+=-O0
-COPTS.class.c+=-O0
-COPTS.typeck.c+=-O0
-COPTS.init.c+=-O0
-COPTS.semantics.c+=-O0
-COPTS.mangle.c+=-O0
-COPTS.constexpr.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1plus-checksum.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/gcc/Makefile b/external/gpl3/gcc.old/usr.bin/gcc/Makefile
index 7a66d77ffc7..a5a4b1c3adf 100644
--- a/external/gpl3/gcc.old/usr.bin/gcc/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/gcc/Makefile
@@ -25,9 +25,6 @@ ${SRCS}: ${GCCARCH}/defs.mk
 .include <bsd.info.mk>

 COPTS.gcc.c=	-Wno-stack-protector
-.if ${MACHINE_ARCH} == "vax"
-COPTS.dse.c=	-O1
-.endif

 .PATH: ${DIST}/gcc ${DIST}/gcc/doc ${DIST}/gcc/c

diff --git a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
index 751d1513eec..33aeb1c9898 100644
--- a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
@@ -14,10 +14,6 @@ SRCS=		decNumber.c decContext.c decimal32.c decimal64.c decimal128.c
 CPPFLAGS+=	-I${.CURDIR}/arch/${GCC_MACHINE_ARCH} -I${DIST}/libdecnumber
 CPPFLAGS+=	-I${DIST}/libgcc

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .include <bsd.lib.mk>

 # Force using C++ for this
diff --git a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
index 90f44a9fcf6..fd251464fb7 100644
--- a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
@@ -24,11 +24,6 @@ COPTS.lto-common.c+=	-Wno-stack-protector
 .include "../Makefile.backtrace"
 .include "../Makefile.libdecnumber"

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lto-lang.c+=-O0
-COPTS.lto-symtab.c+=-O0
-.endif
-
 LDADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm
 DPADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM}

diff --git a/external/gpl3/gcc.old/usr.bin/lto1/Makefile b/external/gpl3/gcc.old/usr.bin/lto1/Makefile
index 4c49161a64c..340d3c6124f 100644
--- a/external/gpl3/gcc.old/usr.bin/lto1/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/lto1/Makefile
@@ -21,11 +21,6 @@ COPTS.lto-common.c+=	-Wno-stack-protector
 .include "../Makefile.libcpp"
 .include "../Makefile.libdecnumber"

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lto-lang.c+=-O0
-COPTS.lto-symtab.c+=-O0
-.endif
-
 LDADD+= ${LIBIBERTYOBJ}/libiberty.a
 DPADD+= ${LIBIBERTYOBJ}/libiberty.a
 LDADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm
diff --git a/external/gpl3/gdb.old/lib/libdecnumber/Makefile b/external/gpl3/gdb.old/lib/libdecnumber/Makefile
index bcd4ae5b222..ce28811526b 100644
--- a/external/gpl3/gdb.old/lib/libdecnumber/Makefile
+++ b/external/gpl3/gdb.old/lib/libdecnumber/Makefile
@@ -18,10 +18,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \

 SRCS=		${G_OBJS:.o=.c} ${G_SOURCES}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd

 .include <bsd.lib.mk>
diff --git a/external/gpl3/gdb/lib/libdecnumber/Makefile b/external/gpl3/gdb/lib/libdecnumber/Makefile
index c95d36e3dfa..e3169865304 100644
--- a/external/gpl3/gdb/lib/libdecnumber/Makefile
+++ b/external/gpl3/gdb/lib/libdecnumber/Makefile
@@ -18,10 +18,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \

 SRCS=		${G_OBJS:.o=.c} ${G_SOURCES}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd ${DIST}/libdecnumber/bid

 .include <bsd.lib.mk>
diff --git a/external/gpl3/gdb/lib/libgdb/Makefile b/external/gpl3/gdb/lib/libgdb/Makefile
index b87a515d13a..c118c363975 100644
--- a/external/gpl3/gdb/lib/libgdb/Makefile
+++ b/external/gpl3/gdb/lib/libgdb/Makefile
@@ -66,12 +66,6 @@ CFLAGS:=		${CXXFLAGS} -std=gnu++17 -Wno-error=stack-protector

 ada-exp.c: ada-lex.c

-.if ${MACHINE} == "vax"
-. if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8
-COPTS.read.c+=	-O0
-. endif
-.endif
-
 # These are generated by implicit rules and are not easy to generate
 CLEANDIRFILES+= \
 	ada-exp.c ada-lex.c \
diff --git a/external/mit/xorg/lib/gallium.old/Makefile b/external/mit/xorg/lib/gallium.old/Makefile
index 55b2fe3d1c1..bfa40c8974f 100644
--- a/external/mit/xorg/lib/gallium.old/Makefile
+++ b/external/mit/xorg/lib/gallium.old/Makefile
@@ -1211,10 +1211,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL
 COPTS+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.nir.c += -O1
-.endif
-
 # XXXGCC12
 .if ${MACHINE_ARCH} == "m68k"
 COPTS.st_glsl_to_tgsi.cpp += -O1
diff --git a/external/mit/xorg/lib/gallium/Makefile b/external/mit/xorg/lib/gallium/Makefile
index 6778a8c11c8..9f1422080fe 100644
--- a/external/mit/xorg/lib/gallium/Makefile
+++ b/external/mit/xorg/lib/gallium/Makefile
@@ -1428,10 +1428,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL
 COPTS+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.nir.c += -O1
-.endif
-
 COPTS.u_atomic.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-builtin-declaration-mismatch :}

 .include <bsd.lib.mk>
diff --git a/external/mit/xorg/lib/libX11/Makefile.libx11 b/external/mit/xorg/lib/libX11/Makefile.libx11
index e103d9ace12..0e55c2a4732 100644
--- a/external/mit/xorg/lib/libX11/Makefile.libx11
+++ b/external/mit/xorg/lib/libX11/Makefile.libx11
@@ -471,11 +471,6 @@ COPTS.OpenDis.c+=	-Wno-error	# XXX xf86bigfstr.h
 COPTS.XlibInt.c+=	-Wno-error	# XXX xcmiscstr.h
 COPTS.XKBBind.c+=	-Wno-deprecated-declarations	# uses XKeycodeToKeysym

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.lcWrap.c+=	-O0
-.endif
-
 CWARNFLAGS.clang+=	-Wno-string-plus-int

 .include "${NETBSDSRCDIR}/external/mit/xorg/tools/makekeys/Makefile.makekeys"
diff --git a/games/gomoku/Makefile b/games/gomoku/Makefile
index e86a63aaea7..678537066ed 100644
--- a/games/gomoku/Makefile
+++ b/games/gomoku/Makefile
@@ -9,10 +9,6 @@ LDADD=	-lcurses -lterminfo
 HIDEGAME=hidegame
 CPPFLAGS+=	${DEBUG:D-DDEBUG}

-.if ${MACHINE} == "vax"
-COPTS.pickmove.c += -O0
-.endif
-
 #WARNS=		6	# would produce warnings about small integer types
 LINTFLAGS+=	-w	# treat warnings as errors
 LINTFLAGS+=	-T	# strict bool mode
diff --git a/games/phantasia/Makefile b/games/phantasia/Makefile
index e9c53f23ae5..b919dac17c6 100644
--- a/games/phantasia/Makefile
+++ b/games/phantasia/Makefile
@@ -52,7 +52,3 @@ map: map.c
 	./map | plot > /dev/tty

 .include <bsd.prog.mk>
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.misc.c+=	-O0
-.endif
diff --git a/lib/i18n_module/UTF7/Makefile b/lib/i18n_module/UTF7/Makefile
index 712c1515d42..7136f7f0cc3 100644
--- a/lib/i18n_module/UTF7/Makefile
+++ b/lib/i18n_module/UTF7/Makefile
@@ -3,6 +3,3 @@
 SRCPRE=citrus_
 .include <bsd.lib.mk>

-.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC)
-COPTS.citrus_utf7.c+=	-O0
-.endif
diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile
index b2aea1e04b0..e60a2862d48 100644
--- a/lib/libbz2/Makefile
+++ b/lib/libbz2/Makefile
@@ -15,11 +15,6 @@ SRCS=		blocksort.c huffman.c crctable.c randtable.c compress.c \
 INCS=		bzlib.h
 INCSDIR=	/usr/include

-# XXX huffman.c gets mis-compiled with 2.95.3
-.if ${MACHINE_ARCH} == "vax"
-COPTS+=		-O0
-.endif
-
 COPTS+=		${CC_WNO_IMPLICIT_FALLTHROUGH}

 # XXX blocksort.c gets mis-compiled with 4.1
diff --git a/lib/libc/gdtoa/Makefile.inc b/lib/libc/gdtoa/Makefile.inc
index 132686fc33d..609da919803 100644
--- a/lib/libc/gdtoa/Makefile.inc
+++ b/lib/libc/gdtoa/Makefile.inc
@@ -44,10 +44,3 @@ SRCS+=	dmisc.c \
 .if ${MACHINE_ARCH} != "vax"
 SRCS+=	strtord.c
 .endif
-
-# XXX revisit with newer GCC.
-# Ensure numbers like 0xffff319f5fa95963 print correctly
-# ("999999999999999.98", not garbage like "?A>C>@>C:BA;A><.:<")
-.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC)
-COPTS.misc.c+=	-O0
-.endif
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index cb3f89d6d09..e9c8be820da 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -30,9 +30,6 @@ SRCS+=		crypt-argon2.c
 SRCS+=		${src}
 COPTS.${src}+=	-fvisibility=hidden
 .  endfor
-.  if ${MACHINE} == "vax"
-COPTS.blake2b.c+=	-O0
-.  endif
 .endif

 WARNS?=	5
diff --git a/libexec/ld.elf_so/Makefile b/libexec/ld.elf_so/Makefile
index f5baae1e883..24f7e1121e5 100644
--- a/libexec/ld.elf_so/Makefile
+++ b/libexec/ld.elf_so/Makefile
@@ -141,10 +141,6 @@ CPPFLAGS+=	-DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\"
 COPTS.rtld.c+=	-Wno-stack-protector
 COPTS.symbol.c+=-Wno-stack-protector

-.if ${MACHINE_CPU} == "vax"
-COPTS.rtld.c+=	-O0
-.endif
-
 LDADD+=		-Wl,--version-script=${.CURDIR}/symbols.map
 LDADD+=		-L${CLIBOBJ} -L${DESTDIR}${LIBDIR}
 .if ${MKPICLIB} != "no"
diff --git a/sbin/fsck_ffs/Makefile.common b/sbin/fsck_ffs/Makefile.common
index 765638b2801..824e3bf2628 100644
--- a/sbin/fsck_ffs/Makefile.common
+++ b/sbin/fsck_ffs/Makefile.common
@@ -36,7 +36,3 @@ COPTS.ffs_appleufs.c+=	-Wno-pointer-sign
 .if ${MACHINE_ARCH} == "m68000"
 COPTS.pass1.c+=	-fno-tree-fre -fno-tree-lrs
 .endif
-.if ${MACHINE_ARCH} == "vax"
-COPTS.pass1.c+=	-O0
-COPTS.inode.c+=	-O0
-.endif
diff --git a/sbin/fsdb/Makefile b/sbin/fsdb/Makefile
index c039f73a1eb..3b0331e5880 100644
--- a/sbin/fsdb/Makefile
+++ b/sbin/fsdb/Makefile
@@ -39,12 +39,6 @@ COPTS.${f}.c+=	-Wno-pointer-sign
 COPTS.pass1.c+=	-fno-tree-fre -fno-tree-lrs
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.pass1.c+=	-O0
-COPTS.inode.c+=	-O0
-COPTS.fsdb.c+=	-O0
-.endif
-
 CWARNFLAGS.gcc+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}

 .include <bsd.prog.mk>
diff --git a/sbin/newfs_ext2fs/Makefile b/sbin/newfs_ext2fs/Makefile
index 40a44b9a038..ecfdbff4d3a 100644
--- a/sbin/newfs_ext2fs/Makefile
+++ b/sbin/newfs_ext2fs/Makefile
@@ -20,8 +20,4 @@ DPADD+=${LIBPROP}

 .PATH:	${NETBSDSRCDIR}/sys/ufs/ext2fs ${FSCK}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.mke2fs.c=-O0
-.endif
-
 .include <bsd.prog.mk>
diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile
index 4f33501ea7a..1f7f56e3ea5 100644
--- a/sbin/ping/Makefile
+++ b/sbin/ping/Makefile
@@ -12,8 +12,4 @@ CPPFLAGS+=	-DIPSEC
 LDADD+= -lipsec
 DPADD+= ${LIBIPSEC}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.ping.c=-O0
-.endif
-
 .include <bsd.prog.mk>
diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax
index cf095d54a86..c483eaa644a 100644
--- a/sys/arch/vax/conf/Makefile.vax
+++ b/sys/arch/vax/conf/Makefile.vax
@@ -34,7 +34,6 @@ GENASSYM_CONF=	${VAX}/vax/genassym.cf
 CPPFLAGS+=	-D_VAX_INLINE_
 AFLAGS+=	-x assembler-with-cpp -fno-pic
 CFLAGS+=	-fno-pic
-COPTS.wsmux.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -O1 :}


 ##
diff --git a/sys/lib/libsa/Makefile b/sys/lib/libsa/Makefile
index 718c97ce857..4ef3840c753 100644
--- a/sys/lib/libsa/Makefile
+++ b/sys/lib/libsa/Makefile
@@ -96,7 +96,3 @@ SRCS+=	ufs.c
 lib${LIB}.o:: ${OBJS:O} __buildstdlib

 CPPFLAGS+=	-Wno-pointer-sign
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.bootp.c+=	-O0
-.endif
diff --git a/sys/lib/libz/Makefile b/sys/lib/libz/Makefile
index 6945c0da6c6..61fb7d4f652 100644
--- a/sys/lib/libz/Makefile
+++ b/sys/lib/libz/Makefile
@@ -25,7 +25,3 @@ CLEANFILES+= lib${LIB}.o
 .include <bsd.lib.mk>

 lib${LIB}.o:: ${OBJS:O} __buildstdlib
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.inftrees.c+=	-O0
-.endif
diff --git a/sys/modules/lfs/Makefile b/sys/modules/lfs/Makefile
index 962538821a5..ea8f187e160 100644
--- a/sys/modules/lfs/Makefile
+++ b/sys/modules/lfs/Makefile
@@ -18,9 +18,4 @@ SRCS+=	ulfs_bmap.c ulfs_dirhash.c ulfs_inode.c ulfs_lookup.c \

 WARNS=	3

-.if ${MACHINE} == "vax"
-# GCC 6.5 and 7.4 cannot compile this with -DDIAGNOSTIC and -O2/-O1
-COPTS.lfs_inode.c+=	-O0
-.endif
-
 .include <bsd.kmodule.mk>
diff --git a/sys/rump/fs/lib/liblfs/Makefile b/sys/rump/fs/lib/liblfs/Makefile
index abade3767d9..68b74c62502 100644
--- a/sys/rump/fs/lib/liblfs/Makefile
+++ b/sys/rump/fs/lib/liblfs/Makefile
@@ -17,9 +17,6 @@ SRCS+=	ulfs_bmap.c ulfs_dirhash.c ulfs_extattr.c 			\


 CFLAGS+=        -DLFS_KERNEL_RFW
-.if ${MACHINE_ARCH} == "vax"
-COPTS.lfs_inode.c+=-O0
-.endif

 .include <bsd.lib.mk>
 .include <bsd.klinks.mk>
diff --git a/usr.sbin/mtrace/Makefile b/usr.sbin/mtrace/Makefile
index aef09db6198..9c125c15265 100644
--- a/usr.sbin/mtrace/Makefile
+++ b/usr.sbin/mtrace/Makefile
@@ -12,10 +12,6 @@ PROG=	mtrace
 SRCS=	igmp.c inet.c kern.c mtrace.c
 MAN=	mtrace.8

-.if ${MACHINE_ARCH} == "vax"
-COPTS.mtrace.c=-O0
-.endif
-
 BINMODE=4555
 BINOWN= root

diff --git a/external/gpl3/gcc.old/usr.bin/backend/Makefile b/external/gpl3/gcc.old/usr.bin/backend/Makefile
index d69a26fe619..99e881c783d 100644
--- a/external/gpl3/gcc.old/usr.bin/backend/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/backend/Makefile
@@ -533,68 +533,9 @@ COPTS.insn-recog.c+=-Wno-error

 .if ${GCC_MACHINE_ARCH} == "vax"
 CPPFLAGS+=-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${GCC_MACHINE_ARCH}
-COPTS.builtins.c+=-O0
-COPTS.calls.c+=-O0
-COPTS.convert.c+=-O0
-COPTS.data-streamer-out.c+=-O0
-COPTS.dse.c+=-O0					# XXX port-vax/51967
-COPTS.dwarf2out.c+=-O0
-COPTS.expmed.c+=-O0
-COPTS.expr.c+=-O0 -Wno-error=tautological-compare
-COPTS.fixed-value.c+=-O0
-COPTS.fold-const.c+=-O0
-COPTS.generic-match.c+=-O0
-COPTS.gimple-fold.c+=-O0
-COPTS.gimple-match.c+=-O0
-COPTS.gimple-ssa-strength-reduction.c+=-O0
-COPTS.gimple-ssa-warn-restrict.c+=-O0
-COPTS.gimple.c+=-O0
-COPTS.internal-fn.c+=-O0
-COPTS.lto-streamer-out.c+=-O0
-COPTS.omp-low.c+=-O0
-COPTS.predict.c+=-O0
-COPTS.range-op.cc+=-O0
-COPTS.recog.c+=-O0
-COPTS.sanopt.c+=-O0
-COPTS.stmt.c+=-O0
-COPTS.stor-layout.c+=-O0
-COPTS.targhooks.c+=-O0
-COPTS.tree-affine.c+=-O0
-COPTS.tree-cfg.c+=-O0
-COPTS.tree-data-ref.c+=-O0
-COPTS.tree-eh.c+=-O0
-COPTS.tree-if-conv.c+=-O0
-COPTS.tree-object-size.c+=-O0
-COPTS.tree-parloops.c+=-O0
-COPTS.tree-predcom.c+=-O0
-COPTS.tree-pretty-print.c+=-O0
-COPTS.tree-ssa-alias.c+=-O0
-COPTS.tree-ssa-ccp.c+=-O0
-COPTS.tree-ssa-forwprop.c+=-O0
-COPTS.tree-ssa-loop-ivopts.c+=-O0
-COPTS.tree-ssa-loop-manip.c+=-O0
-COPTS.tree-ssa-loop-niter.c+=-O0
-COPTS.tree-ssa-math-opts.c+=-O0
-COPTS.tree-ssa-phiopt.c+= -O0
-COPTS.tree-ssa-pre.c+=-O0
-COPTS.tree-ssa-reassoc.c+=-O0
-COPTS.tree-ssa-strlen.c+=-O0
-COPTS.tree-ssa-uninit.c+=-O0
-COPTS.tree-ssa.c+=-O0
-COPTS.tree-switch-conversion.c+=-O0
-COPTS.tree-vect-data-refs.c+=-O0
-COPTS.tree-vect-loop-manip.c+=-O0
-COPTS.tree-vect-loop.c+=-O0
-COPTS.tree-vect-patterns.c+=-O0
-COPTS.tree-vect-stmts.c+=-O0
-COPTS.tree-vrp.c+=-O0
-COPTS.tree.c+=-O0
-COPTS.ubsan.c+=-O0
-COPTS.varasm.c+=-O0
-COPTS.vr-values.c+=-O0
-COPTS.web.c+=-O0
-COPTS.wide-int-range.cc+=-O0
-COPTS.wide-int.cc+=-O0
+
+COPTS.expmed.c+=-Wno-error=tautological-compare
+COPTS.expr.c+=-Wno-error=tautological-compare
 .else
 COPTS.tree.c=	${${ACTIVE_CC} == "clang" :? -O0 :}
 .endif
2023-10-07 12:15:49 +00:00
blymn 95dcd6ac86 Fix for install/56467
Set x to 0 before calling scroll based on a  proposed fix by RVP (thanks!)
2023-10-05 06:15:03 +00:00
martin d5535d78b7 Fix padding for formats with mutliple padded values.
PR lib/57633, fix from FreeBSD.
2023-09-28 10:03:41 +00:00
riastradh 5e725db5ff pam_krb5: Fix PR lib/57631.
Loose ends in the fix for NetBSD-SA2023-006 that weren't caught by
review or, somehow, by my own testing.  Evidently we need automatic
tests for this pam business.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-09-28 02:31:04 +00:00
martin 3fd84419c8 PR kern/57626: instead of an (arbitrary) FAKE_PAGE_SHIFT (and always
using 4k pages), query the hypervisor for the real page size of the host
kernel and use that for architectures that do not have compile time
constant page sizes.
2023-09-24 09:33:26 +00:00
shm 6f4b1613b1 Fix memory leak in getent()
Memory was not freed if record was not found
2023-09-21 13:46:12 +00:00
christos 89098d2011 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.
2023-09-16 18:40:26 +00:00
rin eab3f8e648 libc/arch: Fix copy-paste; or1k, powerpc64, riscv are not powerpc ;) 2023-09-14 03:58:50 +00:00
rin ea48808d5f libpthread/Makefile: trailing whitespace 2023-09-14 03:17:02 +00:00
dholland bd3bb89429 ctime.3: fix merge mistake
The paragraphs about the *_r and *_z/rz functions belong at the end of
the section (or somewhere like that), not affixed to the description of
difftime in the middle of the list of functions.
2023-09-12 21:56:05 +00:00
uwe 01a19e2f71 sparc_v8.S: fix v8 .mul/.umul versions to conform to psABI
Both .mul and .umul are defined to return the most significant 32 bits
of the result in %o1, but v8 multiplication instructions put them in
%y.  Move them to %o1.  Nothing in the gcc generated code depends on
this, but hand-written assembly can rely on this and e.g. Self does.
2023-09-11 12:00:45 +00:00
christos 03645a16a3 PR/57609: Carl Engvall: Add salen checks but accept larger sizes
(upto sockaddr_storage)
2023-09-08 18:17:41 +00:00
ad 340135473f raise() has understood threads for a long time, don't reimplment it. 2023-09-07 19:59:20 +00:00
riastradh 83df26257c pam_ksu(8): Allow homedir access during kuserok.
Otherwise, the default kuserok logic to look at ~targetuser/.k5login
would be blocked by the security measure to thwart NetBSD-SA2023-005.

(There are other ways, e.g. setting SYSTEM-K5LOGIN in /etc/krb5.conf
so the file is /etc/k5login.d/user instead of ~user/.k5login, but
that's not the default configuration and there are plenty of
deployments that rely on ~user/.k5login today.)

I reviewed libkrb5 for homedir access checks.  There are three:

1. krb5_config_parse_file_multi, called only by:
   - verify_krb5_conf -- not relevant
   - krb5_config_parse_file -- not used here as far as I can tell,
     only by libhdb ldap logic and test code in heimdal
   - krb5_set_config_files -- used here only via krb5_init_context,
     which is done at this point

2. plugin_get_hosts in krbhst.c, used to look up hosts for KDC I/O,
   which shouldn't be happening at this point, so this is almost
   certainly unreachable; also it only appears to control whether
   some old plugin API can be used, long after we have read the krb5
   config controlling which plugins are available, so this is
   probably harmless

3. krb5_kuserok, which is the one we want to allow

Note: This will have to be updated again in the next Heimdal update,
which eliminates the global homedir access flag in favour of making
the default per-context homedir access flag conditional on !issuid.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-09-07 11:27:57 +00:00
riastradh 40ca0b4614 lib: Handle various external lib directories with build_install.
This way, update builds track shlib major bumps correctly.

For example, suppose you had built Heimdal's libkrb5.so.27 and
libgssapi.so.11 linked against it, and then you updated past the recent
shlib major bump raising them to libkrb5.so.28 and libgssapi.so.12.

Without this change, the build will make the following sequence of
targets (interleaved with some others):

1. make dependall in libkrb5
2. make dependall in libgssapi
3. make install in libkrb5
4. make install in libgssapi

The existing .WAIT tags in SUBDIR ensure that (1) happens before (2)
and (3) happens before (4).  Unfortunately, this sequence is wrong,
because it will produce the following effect:

1. make dependall in libkrb5 builds libkrb5.so.28
2. make dependall in libgssapi builds libgssapi.so.12, linked against
   libkrb5.so.27
3. make install in libkrb5 installs libkrb5.so.28
4. make install in libgssapi installs libgssapi.so.12

Why the out-of-date libkrb5.so.27 in step (2)?  Because we just pass
-L${DESTDIR}/usr/lib -lkrb5 to the linker (or the equivalent with
--sysroot and implied -L/usr/lib), and ${DESTDIR}/usr/lib still has
only libkrb5.so.27 by the time of step (2), not libkrb5.so.28.

Now any applications that link against libkrb5.so _and_ libgssapi.so
will get libkrb5.so.28 and libgssapi.so.12 -- but transitively, via
libgssapi.so.12, they will also get libkrb5.so.27, which is a recipe
for disaster.

Splicing the Heimdal library subdirectories into lib/Makefile, as
this does, ensures that we run make dependall _and_ make install in
libkrb5 _before_ make dependall in libgssapi, giving the following
correct sequence:

1. make dependall in libkrb5 builds libkrb5.so.28
2. make install in libkrb5 installs libkrb5.so.28
3. make dependall in libgssapi builds libgssapi.so.12, linked against
   libkrb5.so.28
4. make install in libgssapi installs libgssapi.so.12

Note that LIBDPLIBS isn't enough here, as implemented.  LIBDPLIBS
ensures that the incremental build will remake libgssapi.so.  But it
doesn't ensure that the new libkrb5.so.28 is available before then,
so it doesn't prevent this problem.

We use the same mechanism for crypto/external/bsd/openssl/lib
already; this just extends it to other external library collections.

As an alternative, in principle perhaps we could teach LIBDPLIBS to
ensure that libkrb5.so comes out of the libkrb5 objdir, and not out
of ${DESTDIR}/usr/lib.  But that requires some work to make happen,
and make it reliable, whereas this approach we've already confirmed
works without other adverse consequences (besides leaving
grody-looking mechanism lying around) for the libcrypto major bump
already.  We need to get this pulled up to the branch so all the
other major bumps it required are handled correctly by update builds.

XXX pullup-10
2023-09-06 23:44:42 +00:00
ad 22b5550884 Node that aarch64 implements CAS. 2023-09-06 20:17:42 +00:00
riastradh 4604ab506a */shlib_version: Ensure a boring line between RCS id and all else.
This makes cherry-picks easier by avoiding conflicts between the RCS
id and the interesting changes.
2023-09-06 12:48:15 +00:00
mrg c580d690fa apply -Wno-dangling-pointer to callcontext.c.
puffs_cc_getcc() uses a mask against a stack variable to find the
struct puffs_cc stashed below the stack, triggering the dangling
pointer problem.
2023-09-05 00:12:14 +00:00
mrg 407611763a apply ${CC_WNO_STRINGOP_OVERFLOW} for crypt.c.
init_perm() takes a larger array than IE3264[] is, but it doesn't use more
for this instance.
2023-09-04 23:00:48 +00:00
mrg 0ad391080c fix pointer vs array function definition issues.
for the backend End and Data functions, use "char buf[HASH_STRLEN]"
instead of "char *buf", to match the public functions.

fixes GCC 12 warning.
2023-09-04 20:51:39 +00:00
riastradh 3587d6f89c libc_aligned, libc_fp: Add missing close-paren.
Did this ever work?
2023-09-04 18:16:53 +00:00
riastradh 76060e8bb2 libss, liblwres: Delete makefiles for long-dead external libraries.
No functional change intended -- these haven't been used in years.
2023-09-04 18:16:42 +00:00
riastradh ad69f62aa2 Recursively revbump all dependents of libcrypto.
Otherwise any existing software linked against the openssl11
libcrypto.so.14 and any of these libraries will suddenly start
pulling in libcrypto.so.15 at the same time, leading to mayhem in the
address space.

PR lib/57603

XXX pullup-10
2023-09-04 18:12:44 +00:00
mrg 377714d879 avoid array-bounds issues by using more complete types.
also, don't cast to a type that includes an extra, unused, member.

while here, replace the hard coded offsets in setjmp.S and some
asserts in longjmp.c with assym.h and shared structures for all
the movings parts, and asserts based upon those structures.

avoids GCC 12 warnings.
2023-09-03 21:41:45 +00:00
christos d5c6fca106 - cast GETNEXT to unsigned where it is being promoted to int to prevent
sign-extension (really it would have been better for PEEK*() and GETNEXT()
  to return unsigned char; this would have removed a ton of (uch) casts, but
  it is too intrusive for now).
- fix an isalpha that should have been iswalpha
2023-08-30 20:37:24 +00:00
rin 916b154777 libkvm: whitespace 2023-08-23 14:00:11 +00:00
rin 6c2fafb153 libexecinfo: whitespace, missing RCSID, no binary changes 2023-08-23 12:24:59 +00:00
rin c0141d3aff lib/Makefile: Hook libgmp also for MKGDB=yes build
Now, gdb 13 can be built by clang, at least on amd64.
2023-08-20 02:07:54 +00:00
andvar e616cf290c s/logigally/logically/. 2023-08-17 14:21:18 +00:00
rin 12ff6354c6 libcrypt: trailing white space 2023-08-14 02:22:35 +00:00
riastradh 03840421c9 vis(3): Per KNF, sys/param.h comes before sys/types.h.
Which is nice because that's also lexicographic.
2023-08-13 15:20:37 +00:00
riastradh dbb433e7d2 vis(3): Need <stdint.h> for SIZE_MAX, per C standard.
From Kyle Evans <kevans@FreeBSD.org>.

Followup to PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-13 15:19:24 +00:00
riastradh 5f1a044720 vis(3): Sort includes. No functional change intended.
Prompted by PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-13 15:19:13 +00:00
riastradh 45c2d29183 strncpy(3): More on how strlcpy is not a safe strncpy replacement. 2023-08-13 11:27:22 +00:00
wiz dde43aa723 memcpy: consistency in prototype and fix sentence 2023-08-13 04:20:07 +00:00
riastradh 8a22324f3b vis(3): Fix one more buffer overrun in an edge case.
PR lib/57573

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:48:52 +00:00
riastradh 6d340e9776 vis(3): Fix main part of PR lib/57573.
From Kyle Evans <kevans@FreeBSD.org>.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:48:37 +00:00
riastradh c0d7be47dd vis(3): Avoid potential arithmetic overflow in maxolen.
Can't easily prove that this overflow is impossible, so let's add a
check.

Prompted by PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:48:17 +00:00
riastradh 5bc0959c19 vis(3): Call wcslen(start) only once.
It had better not change between these two times!

Prompted by PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:48:01 +00:00
riastradh 4476814b92 vis(3): Avoid arithmetic overflow before calloc(3).
Prompted by PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:47:17 +00:00
riastradh 0da31b0324 vis(3): Make mbslength unsigned.
Sprinkle assertions and comments justifying the proposition that it
would never go negative if signed.

Obviates need to worry about mblength > SSIZE_MAX.

Prompted by PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:46:50 +00:00
riastradh 292538aef5 vis(3): Make maxolen unsigned size_t, not ssize_t.
It is initialized once either to *dlen, which is unsigned size_t, or
to wcslen(start) * MB_MAX_LEN + 1, and wcslen returns unsigned size_t
too.  So there appears to have never been any reason for this to be
signed.

Part of PR lib/57573.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-12 12:46:33 +00:00
riastradh 8663f611f9 strncpy(3): Fix column sizing. 2023-08-11 21:32:26 +00:00
riastradh f9ab7ea1fa strlcpy(3): Tweak markup. 2023-08-11 21:30:32 +00:00
riastradh 1e1d50bc3a strlcpy(3), strncpy(3): Omit needless (void) casts in examples.
The return values are not critical.
2023-08-11 21:20:39 +00:00
riastradh 13b8c448a3 strcpy(3), strlcpy(3), strncpy(3): Just say `byte', not `character'. 2023-08-11 21:17:16 +00:00
riastradh 312767bb97 strncpy(3): Tiny wording tweak. 2023-08-11 21:12:10 +00:00
riastradh 59f2c9f1d8 strncpy(3): Reword to make sentence structure parallel. 2023-08-11 21:11:21 +00:00
riastradh 0c12668de1 strncpy(3): Fix typo -- stpncpy, not stpcpy which is different. 2023-08-11 21:10:26 +00:00
riastradh 71bfa8b23f strncpy(3): Take another whack at clarifying this.
Emphasize the fixed-buffer nature of it, and that NUL-termination is
neither required on input nor guaranteed on output.
2023-08-11 21:09:11 +00:00
riastradh f6905a9fb3 strlcpy(3): Nix stray space between `NUL' and `-terminating'. 2023-08-11 16:34:28 +00:00
uwe cfbafd895b strlcpy(3): don't use \*[Ge] for >= - it's wrong for source code
In the PostScript output it produces the single mathematical "greater
or equal" symbol, not the ">=".
2023-08-11 16:06:10 +00:00
riastradh 86913c27a1 strcpy(3): Note that strlcpy(3) is a safer replacement for strcpy(3).
Suggest snprintf("%s") as a more portable alternative too.

Note that both strlcpy and snprintf still require the input to be
NUL-terminated.
2023-08-11 16:05:56 +00:00
riastradh 8d073134df strncpy(3): Rework the example in an attempt to improve exposition. 2023-08-11 16:04:25 +00:00
riastradh 970f82730a strncpy(3): Note strcpy(3) man page revision this forked from. 2023-08-11 15:37:55 +00:00
riastradh 79c9375f5b strcpy(3), strlcpy(3), strncpy(3): Use `.Tn NUL' for the zero byte.
Let's be consistent within these man pages.  (If someone else really
likes the unpronounceable `.Ql \e0' better, that's fine, you can go
through and systematically change all the man pages to use that after
we're done clarifying strcpy(3), strncpy(3), and strlcpy(3).)
2023-08-11 15:36:17 +00:00
uwe 21d6631bb6 strncpy(3): markup tweaks
NUL is a character name, not a defined name, use .Tn
.Ns has implicit .No effect
Use \*q for ASCII quotes (.Dq uses fancy typographical ones)
2023-08-11 13:18:24 +00:00
uwe ea622231f9 strncpy(3): use .Sm off/on around a fancy expression to avoid lots of Ns 2023-08-11 13:10:59 +00:00
ryoon 7bd94317cb Install strncpy.3 to fix build 2023-08-11 13:07:17 +00:00
riastradh dfb89f3791 strncpy(3): Slightly more consistency about NUL vs '\0' in the text. 2023-08-11 12:26:59 +00:00
riastradh 6a5dfcb3ba strncpy(3): Qualify example of strlcpy(3) with a major caveat. 2023-08-11 11:51:54 +00:00
riastradh d3fccc7122 strncpy(3), stpncpy(3): Split man page out of strcpy(3), stpcpy(3).
These are for substantively different purposes (fixed-width fields
with optional NUL padding vs NUL-terminated strings), so they don't
belong together.

Be more specific about the security issues.
2023-08-11 09:39:39 +00:00
riastradh f69a667415 strlcpy(3): Rework man page to clarify relation to strncpy(3).
Add caveats explaining when strlcpy(3) and strlcat(3) are dangerously
inadequate or inappropriate.

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-08-11 08:15:30 +00:00
mrg 45c979d21c remove the -O0 force for _int_strtod_l() and GCC 9, it's fixed in GCC 10 and 12.
this was triggering sh3 GCC 12 to fail compiles because of ssp.h's memcpy()
frontend having the always_inline attribute that didn't match -O0 or so.

tested with pkgsrc gcc9 to confirm it hangs there, but newer versions are fine.

also known as PR#55668, which now has a real fix (gcc 10 :-).
2023-08-11 06:02:46 +00:00
mrg aec4d439cd avoid various use-after-free issues.
create a ptrdiff_t offset between the start of an allocation region and
some interesting pointer, so it can be adjusted with this offset after
realloc() returns.

found by GCC 12.
2023-08-10 20:38:00 +00:00
riastradh 33ce193df2 libc/resolv/res_debug.c: Minor whitespace fixes. 2023-08-09 07:01:09 +00:00
riastradh b3b6b684eb libnpf(3): No need for weird padding any more.
cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.
2023-08-08 10:36:04 +00:00
riastradh 72254be91c cdbw(3): Make cdbw_output descr parameter type less confusing.
This is a string of _up to_ 16 bytes, used with strncpy(..., 16).
Specifying `const char descr[16]', while formally equivalent to
`const char *descr' in standard C, now provokes the ire of gcc when
the caller does not provide a buffer of at least 16 bytes.
2023-08-08 10:34:08 +00:00
mrg 195e7a0895 avoid uninitialised variable accesses.
if __kernel_rem_pio2() or __kernel_rem_pio2f() are called with "nx" less
than 2, the local variable fq[0] may be accessed uninitialised.

__kernel_rem_pio2() has direct calls with nx = 1, and __kernel_rem_pio2f()
is called with a value starting at 3, but may be decreased to less than 2,
implied by this code , if not actually avoided by the tx[] setup above:
	nx = 3;
	while(tx[nx-1]==zero) nx--;     /* skip zero term */
	n  =  __kernel_rem_pio2f(tx,y,e0,nx,2,two_over_pi);

found by GCC 12.
2023-08-08 06:31:17 +00:00
rin 54684bbd74 libm: Add fma(3) and friends to m68k 2023-08-08 02:09:42 +00:00
riastradh a8b57fa134 libm: Add dummy remainderl and remquol.
These are pretty bad -- these aren't transcendental functions; not
rocket science to make them correctly rounded -- but let's just make
sure they're available in libm for netbsd-10.

XXX pullup-10
2023-08-07 08:54:40 +00:00
andvar 506971ff58 fix typos in comments and one definition, mainly s/sucket/socket/. 2023-08-03 20:45:49 +00:00
rin 03675fcefd Revert CC_WNO_USE_AFTER_FREE from Makefile's (thanks uwe@) 2023-08-03 14:56:36 +00:00
rin 91f8ac6d30 Sprinkle CC_WNO_USE_AFTER_FREE for GCC 12
All of them are blamed for idiom equivalent to:
	newbuf = realloc(buf, size);
	p = newbuf + (p - buf);
2023-08-03 13:36:08 +00:00
nia e6ea867424 Revert addition of epoll to libc until discussion concludes 2023-08-03 12:24:46 +00:00
gutteridge b60029512a select.2: note when pselect(2) was added 2023-08-01 23:33:04 +00:00
andvar 1e7139f024 fix RCSIDs. 2023-08-01 20:09:12 +00:00
christos b515b5959a Add companion mempcpy to wmempcpy, bump. 2023-08-01 17:51:24 +00:00
mrg f386908b27 convert explicit length check before unchecked snprintf() with just a
overflow checked snprintf().  for res_debug.c and res_query.c, convert
from sprintf() to snprintf().

tested scp and rcp fail properly with too-long paths.
tested getaddrinfo fails as expected for too-long domains.
tested dig and ping for similar (res_debug.c/res_query.c).
created a temporary fs with quotas to test edquota with a long EDITOR.
did not test ypserv directly, but it's the same pattern.

avoids GCC 12 snprintf() warnings, and reduces total code size.
2023-08-01 08:47:24 +00:00
mrg 1115bcb541 cdbw_output()'s 3rd argument must be a 16-byte char array, so pad the
string literals passed to it with enough nuls to make this true.

found by GCC 12.
2023-08-01 07:57:17 +00:00
mrg a916878419 pass the struct size to malloc(), not the pointer size.
found by GCC 12.
2023-08-01 07:56:23 +00:00
mrg f8570f8a97 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.
2023-08-01 07:04:14 +00:00
christos 6a8ddfc018 new gdb needs wmempcpy, give it to it. 2023-07-31 17:38:28 +00:00
rin fb68413f18 librump*: Require 10.99.7 or higher for __kevent100 2023-07-31 04:37:04 +00:00
rin 437217c4cf libc: Warn of __kevent50 when itself (not kevent) is referenced 2023-07-29 10:01:24 +00:00
wiz 6805bcc8e7 Fix some macro( usage)s 2023-07-28 23:41:16 +00:00
wiz f9cde7647a Remove Pp that have no effect. 2023-07-28 23:41:02 +00:00
christos d11110f473 Add epoll(2) from Theodore Preduta as part of GSoC 2023 2023-07-28 18:18:59 +00:00
rin af16b93898 vax/csu: __start: Use 0x0000 as entry mask instead of 0x0101 (two NOPs)
This was a quite common trick to able to load executables with a.out
headers stripped. Now, the system boots successfully into multi-user
mode without this trick.

Thanks ragge@ for kind explanation:
https://mail-index.netbsd.org/port-vax/2023/07/28/msg004397.html
2023-07-28 11:22:43 +00:00
rin e38ad7bbb4 vax/csu: Use register name provided by asm.h. No binary changes. 2023-07-28 07:17:30 +00:00
rin da4387c8fe vax/csu: __do_global_ctors_aux: Save actually-used r8, instead of r11
Thanks Kalvis Duckmanton for report and patch on tech-toolchain:
https://mail-index.netbsd.org/tech-toolchain/2023/07/28/msg004321.html
2023-07-28 07:04:41 +00:00
rin 09a8fdebe9 Fix formatting corruption for manpages from tzcode.
Comment out .TH macros, that cause mandoc(1) to run into man(7) mode.
2023-07-26 09:17:20 +00:00
skrll bf81166fc6 ENTRY / END indentation. NFCI. 2023-07-23 07:25:04 +00:00
skrll aa878f8760 Indentation consistency. NFCI. 2023-07-23 07:24:20 +00:00
gutteridge a20ee0c592 socket.2: simplify and improve some phrasing 2023-07-20 23:28:44 +00:00
riastradh 6df7a1dc79 libc: Use RB_TREE_INITIALIZER to nix initfini.c/_env.c coupling.
Doesn't actually help to remove _env.c from programs that don't use
it, though, because various internal things like __diagassert13 still
call getenv.
2023-07-18 11:44:32 +00:00
lukem 94b016701c librumpuser/configure: regen for URL fixes 2023-07-15 09:22:44 +00:00
lukem 9d506c2f2d librumpuser/configure: fix missing directory warning
Use "build-aux" instead of the non-existant "m4" as the
directory for AC_CONFIG_MACRO_DIR.

Avoids autoreconf warning:
  aclocal: warning: couldn't open directory 'm4': No such file or directory

No change to generated files.
2023-07-15 09:21:36 +00:00
lukem cfee6e9176 fix rump URLs
Link to https://github.com/rumpkernel/ instead of
a site now taken over by an SEO squatter.

Per discussion on github.com/rumpkernel issues with pooka.

PR misc/57501
2023-07-14 23:28:01 +00:00
pho 5261503048 refuse(3): Fix broken 3.5, 3.6, and 3.7 APIs
These API versions were completely missing from refuse/fs.c. User programs
could request these versions and build fine, but they couldn't even
initialize a FUSE context at run time.
2023-07-14 02:43:50 +00:00
christos 7eace3da0c Add memfd_create(2) from GSoC 2023 by Theodore Preduta 2023-07-10 02:31:54 +00:00
rin 124e9063d8 libm: Add missing fma(3) and friends for sh3. 2023-07-09 03:57:09 +00:00
simonb 2a7583869f Make mstats() decl match prototype so this compiles with -DMSTATS. 2023-07-08 04:09:26 +00:00
riastradh 67e5e79509 select(2), poll(2): Clarify return values. 2023-07-07 01:31:25 +00:00
uwe 5c44d8113a bsdmalloc(3): fix malloc() signature 2023-07-06 01:32:52 +00:00
riastradh d5888fcbdb libbsdmalloc: Use a multiply-overflow that clang supports too.
XXX pullup-10
2023-07-05 22:13:20 +00:00
lukem 0ae90b729a mk.conf(5): document rump variables
Update mk.conf(5) with the rump variables from
- lib/librumpuser/README.compileopts
- sys/rump/README.compileopts

Add cross-references back to mk.conf(5) in those files.

Ensure that the Default: is listed last in a description,
for consistency with the convention in this file.
2023-07-05 16:40:33 +00:00
riastradh 9e6ac21a6f libbsdmalloc: Make aligned_alloc(A, S) actually align when A > S.
XXX pullup-10
2023-07-05 12:08:49 +00:00
riastradh c9e3880ca2 libbsdmalloc: Lift C11 divisibility restriction on aligned_alloc.
Restriction was lifted in C17.

XXX pullup-10
2023-07-05 10:57:44 +00:00
rillig 3cc9538e51 bsdmalloc.3: fix typos in function parameters 2023-07-05 07:13:56 +00:00
riastradh 4651d9e04b libbsdmalloc: Fix build with DEBUG.
Nix __P while here.

XXX pullup-10
2023-07-05 01:15:47 +00:00
riastradh aeee56d1a9 libc: Fix missing membar_consumer in dl_iterate_phdr.
Pairs with the existing membar_producer.

XXX pullup-8
XXX pullup-9
XXX pullup-10
2023-07-04 19:24:25 +00:00
riastradh 6c3f4940f3 libbsdmalloc: Nix K&R definitions. Bump WARNS to 3. 2023-07-04 18:40:14 +00:00
riastradh 2daa8bfe20 libbsdmalloc: New man page.
XXX pullup-10
2023-07-04 16:23:15 +00:00
riastradh 77b23e4e0e libbsdmalloc: Bump shlib minor.
New symbols, new minor.

XXX pullup-10
2023-07-04 16:22:10 +00:00
riastradh d95fa52655 libbsdmalloc: Nix trailing whitespace.
No functional change intended.

XXX pullup-10
2023-07-04 15:09:04 +00:00
riastradh d6f78684fe libbsdmalloc: Provide all allocator front ends and fork hooks.
Front ends:

- aligned_alloc
- calloc
- posix_memalign

Fork hooks:

- _malloc_prefork
- _malloc_postfork
- _malloc_postfork_child

Otherwise these will pull in the jemalloc definitions from libc,
which (a) defeats the purpose, and (b) won't work correctly with
fork and threads.

Thanks to kre@ and the thread on tech-userlevel for pointing me in
the right direction to making this actually work to override
jemalloc:

https://mail-index.netbsd.org/tech-userlevel/2023/06/30/msg013957.html

Note: libbsdmalloc doesn't set errno=ENOMEM on malloc failure, but
these front ends do (even aligned_alloc, which is from C11, which
doesn't define ENOMEM at all, but this pacifies our aligned_alloc
tests in t_posix_memalign.c).  Might want to fix that.

XXX pullup-10
2023-07-04 15:08:55 +00:00
riastradh 437cf891b2 getrandom(2): Reduce editorializing tone in man page.
XXX pullup-10
2023-07-02 13:25:52 +00:00
dholland 4d2a6699db libc/shlib_version: note that *rand48* should be punted to libcompat 2023-07-02 00:52:04 +00:00
uwe 31f1ed95bf getentropy(3): use .Sx to xref CAVEATS 2023-06-30 22:15:14 +00:00
riastradh b36d83c44f getrandom(2), getentropy(3): Rework man pages.
Make supportable promises.  Omit needless verbiage.  Give caveats
with cross-references to entropy(7).  Emphasize that security is
necessarily relative to system configuration.

XXX pullup-10
2023-06-30 21:44:22 +00:00
riastradh d378359a95 vis(3): Avoid nonportable MIN in portable code. 2023-06-29 16:11:31 +00:00
msaitoh 37a23ecf39 Fix typo in comment. 2023-06-24 05:18:12 +00:00
wiz c8799c5889 libedit: fix pkg-config to really provide readline directory as intended 2023-06-21 21:44:31 +00:00
wiz c093f0b69f install pkg-config file for libedit
version number matches portable libedit
--cflags output matches portable libedit, since users probably want the
readline interface
2023-06-20 23:09:13 +00:00
riastradh ed4af7289b pam_krb5: Refuse to operate without a key to verify tickets.
New allow_kdc_spoof overrides this to restore previous behaviour
which was vulnerable to KDC spoofing, because without a host or
service key, pam_krb5 can't distinguish the legitimate KDC from a
spoofed one.

This way, having pam_krb5 enabled isn't dangerous even if you create
an empty /etc/krb5.conf to use client SSO without any host services.

Perhaps this should use krb5_verify_init_creds(3) instead, and
thereby respect the rather obscurely named krb5.conf option
verify_ap_req_nofail like the Linux pam_krb5 does, but:

- verify_ap_req_nofail is default-off (i.e., vulnerable by default),
- changing verify_ap_req_nofail to default-on would probably affect
  more things and therefore be riskier,
- allow_kdc_spoof is a much clearer way to spell the idea,
- this patch is a smaller semantic change and thus less risky, and
- a security change with compatibility issues shouldn't have a
  workaround that might introduce potentially worse security issues
  or more compatibility issues.

Perhaps this should use krb5_verify_user(3) with secure=1 instead,
for simplicity, but it's not clear how to do that without first
prompting for the password -- which we shouldn't do at all if we
later decide we won't be able to use it anyway -- and without
repeating a bunch of the logic here anyway to pick the service name.

References about verify_ap_req_nofail:
- mit-krb5 discussion about verify_ap_req_nofail:
  https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html
- Oracle has the default-secure setting in their krb5 system:
  https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html
  https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4
  https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/
- Heimdal issue on verify_ap_req_nofail default:
  https://github.com/heimdal/heimdal/issues/1129
2023-06-20 22:17:18 +00:00
riastradh f9fe2f8c36 pam_ksu: No need for homedir access. 2023-06-20 22:17:09 +00:00
msaitoh 4e7cd69809 Fix typo. unknwon -> unknown 2023-06-19 08:40:29 +00:00
msaitoh 305f6951ac Fix typo in the document. From FreeBSD. 2023-06-19 08:24:21 +00:00
christos 85e497af98 Include the OpenSSL Makefile fragment so that build_install works on each
OpenSSL subdirectory.
2023-06-17 15:47:31 +00:00
andvar afc0aa83d8 fix typos in comments. 2023-06-16 20:01:20 +00:00
christos a3782680c6 Correct history (Brad Smith) 2023-06-11 15:28:21 +00:00
uwe 1ff3daa17a socket(2): change type flags list back to -tag
On second thought, convert the list of type flags back to -tag, but
don't make it -compact.  This way it's easier to see that it's related
to the list above.
2023-06-08 00:27:34 +00:00
uwe a9c3dfdd0a socket(2): fix macro invocation in a column 2023-06-06 23:31:01 +00:00
uwe eeed5a7d12 socket(2): use "provides" consistently in "type" descriptions 2023-06-06 23:29:16 +00:00
uwe 0c11cebb87 socket(2): use .Bl -column where appropriate 2023-06-06 23:27:15 +00:00
riastradh 9bf974fbd5 socket(2): Move prose list of socket type summaries into a table. 2023-06-06 09:14:27 +00:00
riastradh 98fb5a3b9b socket(2): Tidy up markup a bit.
Use a tag list, not a literal block with hand-formatted text, for
protocols and socket type flags.
2023-06-06 09:10:08 +00:00
lukem 230c41e44c adapt to ${CC_WNO_IMPLICIT_FALLTHROUGH}
Use ${CC_WNO_IMPLICIT_FALLTHROUGH} instead of
the older style more complex expressions.
2023-06-03 21:30:20 +00:00
andvar 11688feb47 fix various typos in comments and messages. 2023-06-03 20:41:44 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
lukem f937c412f3 bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER
Provide a single variable
	CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
	CLANG_NO_ADDR_OF_PACKED_MEMBER
	CC_NO_ADDR_OF_PACKED_MEMBER
	GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 08:52:53 +00:00
uwe 71118f0693 stat_flags(3): try to improve the descriptions
List all alternative forms recognized by string_to_flags(3).
Both "dump" and "nonodump" are the negative of "nodump".
string_to_flags does not recognize "snap".
Provide xrefs for flag descriptions where applicable.
2023-05-31 21:49:39 +00:00
christos f3bd495543 Fix some const qual (Piotr Pawel Stefaniak) 2023-05-30 11:53:40 +00:00
lukem c1aa87e38c libc: fix typo in comments: NO_SRSC -> NO_SRCS 2023-05-29 18:25:52 +00:00
riastradh 2a673dcfdb libpthread: New pthread__smt_wait to put CPU in low power for spin.
This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:

- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register

- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.

PR port-arm/57437

XXX pullup-10
2023-05-25 14:30:02 +00:00
riastradh 21ee6fc127 libpthread: Use __nothing, not /* nothing */, for empty macros.
No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.

PR port-arm/57437 (pthread__smt_pause/wake issue)

XXX pullup-10
2023-05-25 14:29:45 +00:00
skrll d0ff2affc8 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.
2023-05-19 06:50:07 +00:00
skrll 6d1cc151b5 No need for double semi-colon
Indent END the same as ENTRY.

NFCI.
2023-05-19 06:41:41 +00:00
skrll 83b9ddad41 KNF 2023-05-19 06:31:01 +00:00
andvar 7bca8c8e2e fix typos in comments. 2023-05-13 11:19:19 +00:00
christos c563a46740 fix cross references (from Anon Ymous) 2023-05-08 01:28:35 +00:00
skrll 75b842b847 RISC-V support that works on QEMU with a single hart.
Thanks for Simon Burge for plic(4).
2023-05-07 12:41:45 +00:00
uwe fadf4dba80 Fix spelling of Kurt Shoens surname.
PR misc/57389
2023-05-04 11:30:25 +00:00
uwe d13ac07234 pthread_create(3): minor markup tweaks 2023-04-29 21:37:07 +00:00
jschauma 9f411f7283 delete spurious space 2023-04-29 20:51:45 +00:00
blymn 3aed864489 Don't set the clear_to_eol variable in doupdate to NULL, this was a
leftover from previous code that makes no sense and makes worms(6)
crash randomly.  Thanks to kre@ for reporting this.
2023-04-28 07:12:39 +00:00
christos 4ee547369c pass lint. 2023-04-25 17:51:32 +00:00
christos 12863d4d79 PR/57376: Jorge Giner: readline file completion does not quote; do the same. 2023-04-24 20:02:53 +00:00
abs 384f6a9e2e Fix incorrect test for FUSE_USE_VERSION 34
(Thanks to Mark Davies for report)
2023-04-21 19:29:31 +00:00
christos ef8fd1897c Align types with readline-8.2 (wiz@) 2023-04-21 14:56:13 +00:00
mlelstv 9d5943131b Fix parsing a locale string with multiple components.
Also check for truncation of a long locale string.
2023-04-16 20:37:59 +00:00
rillig 597c9f09f2 libm: suppress lint warning about '>>' on signed integer
GCC has implementation-defined behavior for that case.
2023-04-10 19:23:02 +00:00
christos c41e469284 PR/57250: Martin Husemann: dtoa mishandles infinite doubles on 32bit big
endian machines. When long double support was added, the old code was kept
for the regular double code. This code was never used because WIDE_DOUBLE
was always defined in the Makefile. Remove that old code, and conditionalize
the WIDE_DOUBLE code based on if long doubles are different than doubles on
the specific platform.
2023-04-04 19:26:06 +00:00
skrll 85c3279dc2 Trailing whitespace 2023-04-02 07:26:17 +00:00
dholland d3728fec90 Fix lying comment. 2023-04-01 23:44:11 +00:00
rillig 5f84f05b9b libkvm: suppress lint warnings about extern declarations for now
This should be properly fixed by someone who is familiar with libkvm, as
it affects <sys/cpu_data.h> as well.
2023-04-01 09:08:11 +00:00
rillig cb5396addb libpuffs: ignore lint warning about nested extern for now
This should be properly fixed by someone familiar with puffs.
2023-03-31 04:51:32 +00:00
rillig b2baa50111 lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
2023-03-28 14:44:34 +00:00
joerg a2c7f636a9 Use snprintf_ss in pthread__assertfunc and update comment in
pthread__errorfunc. snprintf can use locks in some code paths and we
only care about the restricted subset here.
2023-03-24 14:18:18 +00:00
riastradh 40028e8037 libm: Bump minor for new long double transcendental functions.
XXX Still missing: remquol, remainderl.
2023-03-23 12:38:13 +00:00
kre f1eb86a44f Add (newly added): expm1l log1pl log2l lgammal tgammal
so that the library gets the correct symbols defined in it.
2023-03-14 05:49:03 +00:00
riastradh 7739de6469 libm: Need <math.h> for __HAVE_LONG_DOUBLE.
Fixes missing definitions of lrintl, llrintl on various platforms.
2023-03-13 18:26:32 +00:00
riastradh 91f6ee0820 libm: Fill in more dummy long double transcendental functions.
This should cover everything from C99.
2023-03-13 18:18:36 +00:00
thorpej 8ff22ec6c6 Document the error code when O_REGULAR is specified and the last
path component is not a regular file.
2023-03-05 16:24:31 +00:00
riastradh 0670f81a19 mremap(2): Note MAP_REMAPDUP bug.
XXX pullup-10, unless we fix the bug first
2023-03-03 12:53:04 +00:00
riastradh 0119a38611 mremap(2): Fix example to use MAP_PRIVATE.
It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.

XXX pullup-9
XXX pullup-10
2023-03-01 20:08:41 +00:00
uwe af2cb705a7 mmap(2): minor markup tweaks 2023-03-01 15:11:28 +00:00
rillig 17359e5a32 hcreate.3: fix typo 2023-02-21 19:27:14 +00:00
gutteridge d6bd763cb8 intro.5: fix typo and grammar and simplify a phrase 2023-02-20 02:05:47 +00:00
andvar 2773222a6c s/chracter/character/ in documentation. 2023-02-13 23:02:27 +00:00
christos 7a0279c013 Remove unused stuff, and limit the scope of some of the used ones.
(from des@freebsd)
2023-02-04 14:34:28 +00:00
christos 3ce4aa662f Add a entry point for the complete function for FreeBSD compatibility with sh. 2023-02-03 22:01:42 +00:00
christos 0428f1e1b1 Don't clear the handle to el "sel" and set it earlier to prevent handling
a signal before the handle is set. (From: des at FreeBSD)
2023-02-03 19:47:38 +00:00
andvar 96dad784b6 fix few typos in comments. 2023-01-31 21:11:24 +00:00
simonb a411c1a557 Note that strchrnul() first appeared in glibc 2.1.1 and appeared in
FreeBSD 10 before it appeared in NetBSD 8.
2023-01-31 01:42:32 +00:00
rillig 2f7da51144 fmtmsg.3: fix typo 2023-01-22 13:38:48 +00:00
riastradh e10add6b30 inet(3): Fix typo in description of size argument.
This is the size of dst, not of src.  The size of src is determined
by the address family.

Fix markup while here: .Fa for function arguments, not .Ar which is
for command arguments.
2023-01-18 23:16:05 +00:00
simonb 1daaca1c6c KNF nit: opening brace of a function on next line. 2023-01-18 08:07:22 +00:00
uwe 3268a4e25e crypt(3): Minor markup tweaks 2023-01-17 14:27:11 +00:00
msaitoh 997fd87f7e s/charater/character/ in comment. 2023-01-17 14:13:48 +00:00
christos e42273ba0d put attributes first for c23 compliance. 2023-01-17 13:18:03 +00:00
riastradh 642ce581b2 crypt(3): Call it password hashing, not `encrypting'.
Tidy up some of the markup while here, and be consistent about
calling the neatly formatted US-ASCII string an `encoded password
hash').
2023-01-17 01:56:43 +00:00
christos 20fbed3887 Apply 9cfe9507fcc22cd4a0c4da486ea1c7f0de6b075f for C23 attribute compliance.
Requested by Jan-Benedict Glaw.
2023-01-15 18:12:37 +00:00
kre b666381035 Add errc() and verrc() to the list of functions which do not return,
but exit() instead.

This was omitted when the *c() set of functions were added in 2014.
2023-01-05 15:13:57 +00:00
nia 4afdaab748 setlocale.3: Reflect state of NetBSD locale support in the 21st century
Don't use LC_COLLATE in a real code example, since a real call to set
LC_COLLATE will fail. Mention this.

Inconsistencies noticed by khw on IRC.
2022-12-31 14:35:56 +00:00
riastradh ddb0a7e7a7 swab(3): Rewrite this to be understandable.
And make the tests work, and exercise all lengths up to 100.

Evidently the previous definition, presumably tightly optimized for
1980s-era compilers and CPUs, was too hard to understand, because it
was incorrectly tested for two decades and broken for years.

PR lib/57141

XXX pullup-8
XXX pullup-9
XXX pullup-10
2022-12-28 15:34:19 +00:00
kre aab5fac668 PR lib/57141 - never decrement len without actually performing a STEP. 2022-12-28 14:32:04 +00:00
wiz eb7b4f7765 Remove unneeded -D_OPENBSD_SOURCE 2022-12-21 17:44:15 +00:00
blymn 0d33635b3c Add more debug so a call to waddbytes can be traced to the caller. 2022-12-21 06:18:01 +00:00
blymn 9c6a0e327d Backout change to addnstr that broke other applications as n should be
the number of bytes to add - for multibyte characters n will be > 1.

Fix __slk_draw to pass in the actual length of the label instead of
the default label length because wide characters may make the
actual string length longer than the slk display length.
2022-12-20 04:57:01 +00:00
christos 93664a940b Handle the case the code originally intended to handle; systems where:
SIZE_MAX < PTRDIFF_MAX
2022-12-13 19:08:42 +00:00
skrll e311a492a7 Trailing whitespace 2022-12-13 12:43:32 +00:00
blymn 7c304c7fb1 Default the character width to 1 if wcwidth fails. 2022-12-12 21:14:15 +00:00
christos fa7b09b795 Merge in 2022g:
Although tzcode still works with C89, bugs found in recent routine
    maintenance indicate that bitrot has set in and that in practice
    C89 is no longer used to build tzcode.  As it is a maintenance
    burden, support for C89 is planned to be removed soon.  Instead,
    please use compilers compatible with C99, C11, C17, or C23.

    timegm, which tzcode implemented in 1989, will finally be
    standardized 34 years later as part of C23, so timegm is now
    supported even if STD_INSPIRED is not defined.

    Fix bug in zdump's tzalloc emulation on hosts that lack tm_zone.
    (Problem reported by Đoàn Trần Công Danh.)

    Fix bug in zic on hosts where malloc(0) yields NULL on success.
    (Problem reported by Tim McBrayer for AIX 6.1.)

    Fix zic configuration to avoid linkage failures on some platforms.
    (Problems reported by Gilmore Davidson and Igor Ivanov.)

    Work around MS-Windows nmake incompatibility with POSIX.
    (Problem reported by Manuela Friedrich.)

    Port mktime and strftime to debugging platforms where accessing
    uninitialized data has undefined behavior (strftime problem
    reported by Robert Elz).

    Check more carefully for unlikely integer overflows, preferring
    C23 <stdckdint.h> to overflow checking by hand, as the latter has
    had obscure bugs.
2022-12-11 17:57:23 +00:00
uwe 710059bb9f editrc(5): Markup fixes 2022-12-06 00:59:20 +00:00
uwe 1c9bc64659 getbsize(3): Use .Ev for BLOCKSIZE 2022-12-06 00:13:17 +00:00
blymn 5a712dcba0 Revert previous change, it is not correct. 2022-12-05 21:14:25 +00:00