libc: indicate existing functions that are POSIX 2024
Reviewed by: brooks, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47581
cdefs.h: Document the _XOPEN_SOURCE - 0 construct
Various System V Interface Definition editions, as well as the X/Open
group portability guide issue 4, recommend defining _XOPEN_SOURCE and
broadly intimating it means the same thing as _POSIX_SOURCE == 2.
Starting in X/Open issue 5 (1995), _XOPEN_SOURCE needs to be defined to
be 500 to bring in the newer interfaces. However, it is still common hat
sources define _XOPEN_SOURCE to be blank. To deal with that, we subtract
0 from _XOPEN_SOURCE to make the other expressions well formed.
While here, document that we should define _POSIX_C_SOURCE to be 199209
based on the SVID, the first version of the Single Unix Specification,
and X/Open CAE issue 4, version 2. Also document that historically this
has been a NOP. Any value of _XOPEN_SOURCE < 500 (including it being
blank) was not viewed as a request for a restricted namespace.
Reviewed by: brooks (earlier version)
Differential Revision: https://reviews.freebsd.org/D47584
Sponsored by: Netflix
cdefs: Bump the defaults for 'all'
Bump default to POSIX at 202405, C at 2023 and xopen at 800...
Sponsored by: Netflix
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D47578
cdefs: update for C23 and POSIX24
Also tweak a few placs where we can now use macros for C23 and POSIX24.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D47580
cdefs: Support _ISOC23_SOURCE and --std=c23
If either _ISOC23_SOURCE is defined or --std=c23 (or higher) is
specified, then default to the making the ISO C visibility to 2023.
This mirrors what glibc does, so update the comment for this change to
_ISOCxx_SOURCE values. We currently implement xx = 11 or 23. C17 added
no new defines or symbols, so we follow glibc's lead and ommit it.
However, we don't implement the C95, C99 or C2y versions. These are
non-standard and the first two don't seem to be relevant, and the latter
is also experimental.
Sponsored by: Netflix
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D47576
cdesf: Support _POSIX_C_SOURCE 202405 for POSIX 2024
Allow applications to request a strict POSIX 2024 by setting
_POSIX_C_SOURCE to 202405 or higher. The rest of the system needs tweaks
to be compliant, so this is a work in progress.
Sponsored by: Netflix
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D47575
cdefs: Allow _XOPEN_SOURCE >= 800
When the user asks for XOPEN_SOURCE >= 800, set __XSI_VISIBLE to 800 for
POSIX 2024.
Sponsored by: Netflix
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D47574
ena.4: optimize apropos and hardware
Remove "FreeBSD kernel driver for" and "family", and
add "AWS EC2" and "driver" to the document description
for better search discoveribility and consistency with
other driver manuals.
Rewrite the introductory sentance to the HARDWARE section
with driver name for inclusion in hardware release notes.
MFC after: 3 days
Reviewed by: osamaabb
Sponsored by: Google
Sponsored by: Amazon
release: Exclude container images from globs
We use a *.txz glob to get all of the "distributions" which comprise
the FreeBSD release, but we now (optionally) also build container
images which are .txz files. Grep those out from the distribution
lists.
A better long-term fix would probably be to generate an explicit list
of the .txz files we want rather than using an overbroad glob and
filtering out the files we *don't* want.
Fixes: d03c82c28da8 ("release: add optional OCI images")
MFC after: 1 minute
Sponsored by: Amazon
(cherry picked from commit 47866cdcc7278faa27250dcea16374231c676050)
release: Exclude container images from globs
We use a *.txz glob to get all of the "distributions" which comprise
the FreeBSD release, but we now (optionally) also build container
images which are .txz files. Grep those out from the distribution
lists.
A better long-term fix would probably be to generate an explicit list
of the .txz files we want rather than using an overbroad glob and
filtering out the files we *don't* want.
Fixes: d03c82c28da8 ("release: add optional OCI images")
MFC after: 1 minute
Sponsored by: Amazon
manuals: fix "PP after SS | SH" warnings
The full mandoc warnings were:
skipping paragraph macro: PP after SS
skipping paragraph macro: PP after SH
The rendered output (in ascii and html) is not affected by this commit.
Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts
Signed-off-by: Graham Percival <gperciva at tarsnap.com>
Reviewed by: jlduran, mhorne
MFC after: 1 week
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1524
man: Misc syntax fixes
- loader.efi.8: use proper way of printing a backslash.
- usr.bin/gzip/gzip.1: contained a non-breaking space (in utf-8, 0xC2A0).
- lib/libpmc/pmc.*.3: remove two duplicate .Xr lines
Signed-off-by: Graham Percival <gperciva at tarsnap.com>
Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla at runbox.com>
MFC after: 3 days
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1523
bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation
Not all of the tree is happy for realinstall to be done in parallel. In
particular, Makefile.inc1 uses .WAIT to force etc to be installed after
earlier subdirectories, since etc calls into share/man's makedb to run
makewhatis on the tree and needs all manpages to have been installed.
Also, libexec/Makefile doesn't set SUBDIR_PARALLEL, and the link from
ld-elf32.1 to ld-elf.1 relies on rtld-elf having been installed before
rtld-elf32, otherwise creating the link will fail.
In general, core behavioural differences like this between NO_ROOT and
"normal" builds are also dangerous and confusing.
If this optimisation is deemed important, it should be reintroduced in a
more limited and robust manner that doesn't break the above situations.
Until then value correctness over slight efficiency gains on high core
count machines, the same machines where you're more likely to encounter
issues from this optimisation.
[12 lines not shown]
Improve reliability of stdout tests.
If the test runner is under heavy load, the command we are testing may
succeed in printing to stdout before the dummy receiver has terminated.
Add a short delay to reduce the likelihood of this happening.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47572
tcp: remove the looping on pcb count in tcp_destroy()
This was useful when TCP timers were not able to reliably stop. Note that
in_pcbinfo_destroy() called later asserts that V_tcbinfo.ipi_count is 0.
This reverts 806929d514234, b54e08e11ac15.
Revert "sound: Make device registration more intuitive"
These KPI changes will break out-of-tree drivers. Keep the commit only
in -CURRENT.
This reverts commit 5aece3be1c84f6786f89894efeca1219a282f3f3.
inpcb: Make some cosmetic improvements to in_pcbbind()
- Use the local var "laddr" instead of sin->sin_addr in one block.
- Use in_nullhost() instead of explicit comparisons with INADDR_ANY.
- Combine multiple socket options checks into one.
- Fix indentation.
- Remove some unhelpful comments.
This is in preparation for some simplification and bug-fixing.
No functional change intended.
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D47451