| Age | Commit message (Collapse) | Author |
|
Add strtonumx(), a companion to strtonum(3) that preserves its safety
and error-reporting semantics while allowing the caller to specify a
conversion base, similar to the strtol(3) family of functions.
Reviewed by: emaste, kib, ziaee
Obtained from: https://www.illumos.org/issues/15365
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54270
|
|
As reported on the freebsd-announce mailing list[1] FreeBSD is
continuing to retire 32-bit support. Remove powerpcspe from build
infrastructure.
[1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: jhibbits, emaste
Pull request: https://github.com/freebsd/freebsd-src/pull/1914
|
|
When a compiler with C23 or higher is detected, builtin bool, true,
and false are used to conform the C23 standard.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44664
|
|
The function clears the whole tree.
Relnotes: yes
Reviewed by: alc, emaste
Discussed with: dougm
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54365
|
|
Define _ALIGNBYTES using sizeof(void *) (no functional change on any
existing architecture) which will allow it to work with CHERI were we
must align things up to capability alignment.
In _ALIGN, replace integer manipulation which does not preserve pointer
provenance with a type and provenance preserving builtin. This requires
modest changes in code which assumes _ALIGN returns an integer, but
those are relatively rare.
Reviewed by: kib, markj
Effort: CHERI upstreaming
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D53947
|
|
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54066
|
|
Seems like a number of ports are *really* unhappy with this new
macro. These ports will have to be fixed and the patch reworked
to perhaps not affect C++ (see D54041). A general discussion on
how we expose new language features may also need to take place.
Reported by: many people
Approved by: markj (mentor)
This reverts commit b381d0980221b476cadbef862a8e5973d675fb7a.
|
|
This new header complies with ISO/IEC 9899:2024 (C23).
Contrary to glibc, we do not provide inline definitions in
<stdbit.h> as we expect our system compiler to soon recognise
these as builtins anyway.
Relnotes: yes
MFC after: 1 month
Reviewed by: adrian
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D53657
|
|
unreachable() is a hint to the compiler that it is unreachable.
Add a new man page unreachable(3) to document this macro.
Reviewed by: imp
Approved by: markj (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D53967
|
|
A type similar to char16 and char32_t, for compliance with C23.
The related type atomic_char8_t is added to stdatomic.h.
As char8_t is always unsigned char, I've skipped adding __char8_t.
This can be added, too, if desired.
Reviewed by: imp
Approved by: markj (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D53952
|
|
This function is part of ISO/IEC 9899:2024 (C23) and was forgotten in D47856.
Reviewed by: imp
Approved by: markj (mentor)
See also: D47856
Fixes: 59677aecb67bbedcfa2ee5d7d2b189193cdc4af7
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D53951
|
|
Reviewed by: brooks
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D53791
|
|
This new function computes the alignment of a pointer.
It is part of ISO/IEC 9899:2024, the new C standard.
If the pointer is a null pointer, null is returned.
I have tried to write an implementation that can cope
with traditional address-based architectures, even if
size_t and uintptr_t are of different length. Adjustments
may be needed for CHERI though.
A man page is provided, too. No unit test for now.
Reviewed by: kib, imp, ziaee (manpages), pauamma@gundo.com
Approved by: markj (mentor)
MFC after: 1 month
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D53673
|
|
by removing the cast to _Bool. The _Bool type is not defined for C++,
and the specification from the gcc info doc states that the return
type of the __builtin_{add,sub,mul}_overflow() is bool already.
This is done instead of including stdbool.h to avoid namespace
pollution, since defining bool from stdckdint.h simingly is not
sanctioned by ISO/IEC 9899:2024.
PR: 290299
Reviewed by: des
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53149
|
|
MD5 is used by libc/resolv to generate a random sequence id from a
current time stamp. Replace this convoluted mechanism with a call
to arc4random(). This permits us to entirely drop MD5 from libc,
simplifying the MD5 rework proposed in D45670.
Approved by: markj
Reviewed by: kevans, markj
See also: D45670
Event: EuroBSDcon 2025
Differential Revision: https://reviews.freebsd.org/D52784
|
|
This function from OpenBSD is a hybrid of reallocarray() and calloc().
It reallocates an array, clearing any newly allocated items.
reallocarray() ultimately originates from OpenBSD.
The source is taken from lib/libopenbsd, which now no longer has the
function unless when bootstrapping (needed for mandoc).
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52863
|
|
This is part of audit, so use the new LIB_PACKAGE feature to name the
package audit-lib, rather than libbsm.
MFC after: 1 day
Reviewed by: bapt
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D52789
|
|
Includes diff reduction to upstream version of this patch.
MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: philip
Differential Revision: https://reviews.freebsd.org/D39715
|
|
This reverts commit d549de769055ae6116601e54e4c86dfb3e17f4c4.
|
|
This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. We
previously added a linker warning and annotated the prototype; now that
stable/15 has been branched, we can remove it from main.
Relnotes: yes
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52474
|
|
For MIT Kerberos, MK_GSSAPI has no meaning: GSSAPI is a required part of
Kerberos and is always built if MK_KERBEROS is enabled. Backport this
behaviour to Heimdal so it works the same way.
While here, change Heimdal's libcom_err and compile_et to be selected by
MK_KERBEROS, not MK_KERBEROS_SUPPORT, since these are part of Kerberos
and third-party users might need it even if Kerberos support is disabled
in the base system. This means MK_KERBEROS_SUPPORT installs the same
files with both MIT and Heimdal.
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D51859
|
|
This reverts commit 7ac276298b72982189ac1a5b17461936dc00163e.
Requested by: kib
|
|
Following the earlier removal of keyserv, none of this functionality
works since it requires keyserv.
Remove the relevant symbols from libc's Symbol.map. Leave compatibility
symbols for existing applications, but since the functions don't work
without keyserv, stub them out to return an error.
Remove some private symbols that were only used by keyserv; these don't
get compatibility symbols.
Remove the documentation for the old functions.
Remove rpc.ypupdated since it requires DES authentication.
Reviewed by: manu, des, emaste
Differential Revision: https://reviews.freebsd.org/D50442
|
|
lib/libgssapi is based on Heimdal. As on Linux systems, the MIT
libgssapi_krb5 replaces it. With both gssapi libraries and header files
installed results in broken buildworld (gssd) and ports that will not
build without modifications to support the MIT gssapi in an alternate
location.
73ed0c7992fd removed the MIT GSSAPI headers from /usr/include. Apps using
MIT KRB5 gssapi functions and structures will fail to build without this
patch.
This patch includes a temporary patch to usr.sbin/gssd to allow it
to build with this patch. rmacklem@ has a patch for this and for
kgssapi that uses this patch to resolve kgssapi issues for NFS with
Kerberos.
This patch is an updated version of D51661 to allow it to build following
additional patchs to the tree.
This should have been implmented with 7e35117eb07f.
Fixes: 7e35117eb07f, 73ed0c7992fd
Differential Revision: https://reviews.freebsd.org/D51661
|
|
This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. Add a
linker warning and annotate the prototype.
Sponsored by: Klara, Inc.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D51681
|
|
We won't be adding support for hardware DES. Remove the #ifdef notdef
block.
Sponsored by: The FreeBSD Foundation
|
|
This seems to fit the pattern better (e.g. fdopendir()).
I've added weak references to ease the transition, but since it's only
been a few days, we can remove them (and the ObsoleteFiles entries for
the manual pages) before we branch stable/15.
Fixes: deeebfdecab5
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D50980
|
|
While here, clean up scandir() a bit and improve the documentation.
MFC after: never
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D50935
|
|
Reported by: Herbert J. Skuhra (herbert gojira.at)
Fixes: 79d8a99ee583 ("runq: Deduce most parameters, remove machine headers")
MFC after: 1 month
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
|
|
We only define SIG2STR_MAX with careful visibility, but define the
fortified version unconditionally. It needs to have the same visibility
both places.
Fixes: 3d12567133bf
Reviewed by: jrtc27, kevans
Sponsored by: Netflix
|
|
sig2str(3)
Reviewed by: imp, kib, des, jilles
Pull Request: https://github.com/freebsd/freebsd-src/pull/1696
Closes: https://github.com/freebsd/freebsd-src/pull/1696
|
|
Signed-off-by: Ricardo Branco <rbranco@suse.de>
Reviewed by: imp, kib, des, jilles
Pull Request: https://github.com/freebsd/freebsd-src/pull/1696
|
|
Signed-off-by: Ricardo Branco <rbranco@suse.de>
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1710
Closes: https://github.com/freebsd/freebsd-src/pull/1710
|
|
While the type of va_list and implementation of va_*() psuedo functions
varies (sometimes greatly) by architecture, they will always be defined
by the compiler in a consistant way that does not require machine
dependent handling.
MFC after: 1 week
Reviewed by: imp
Exp-run by: antoine (PR 286274)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
|
|
Rely in sys/_visible for visibility macros and use __buitin_va_list
instead of __va_list everywere we declare va_list.
Reviewed by: imp
Exp-run by: antoine (PR 286274)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
|
|
Switch to sys/_visible.h for visibility macros.
Prefer __builtin_offsetof over __offset. sys/cdefs.h always defines
__offsetof to __builtin_offsetof so just use the latter to remove a
dependency on sys/cdefs.h. Realistically, we're never going to care
about a compiler that doesn't supply this builtin.
Add a somewhat questionable guard around the offsetof() definition
because the compiler no longer thinks it the same as a number of other
redundent definitions scattered around (e.g., in the openzfs codebase).
It is actually the same and those defintions likely shouldn't exist at
all, but it's easy to add a guard for now.
Reviewed by: imp
Exp-run by: antoine (PR 286274)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
|
|
These headers relied in __BEGIN_DECS/__END_DECLS being defined when
sys/_types.h was included, but there's not a requirement that this be
the case.
Reviewed by: imp
Exp-run by: antoine (PR 286274)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
|
|
Hide glob_b behind __BSD_VISIBLE as it is not a POSIX function.
Reported by: kib
Reviewed by: kib
Fixes: 1e0743f54d2d ("glob: Add blocks support")
Differential Revision: https://reviews.freebsd.org/D50670
|
|
This change introduces the `glob_b` function which takes a block instead
of a function pointer.
Relnotes: yes
Sponsored by: Klara, Inc.
Inspired by: https://github.com/apple-oss-distributions/Libc
Differential Revision: https://reviews.freebsd.org/D50485
|
|
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D50483
|
|
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D50483
|
|
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50377
|
|
The interface is not functional with libthr and returns not supported
error always. There is no point in providing it to userspace or document.
The symbols are kept for ABI compatibility, of course.
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50376
|
|
MFC after: never
Relnotes: yes
Sponsored by: Klara, Inc.
Reviewed by: kevans, imp
Differential Revision: https://reviews.freebsd.org/D50233
|
|
Reviewed by: bapt, kevans, olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50166
|
|
This is a calque of the NetBSD function of the same name.
MFC after: never
Relontes: yes
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D49979
|
|
This adds an `fts_open_b()` variant of `fts_open()` which takes a block
instead of a function pointer.
This was inspired by, and is intended to be compatible with, Apple's
implementation; however, although our FTS and theirs share a common
ancestor, they have diverged significantly. That and the fact that
we still target compilers which don't support blocks means Apple's
implementation was not directly reusable.
This is the second use case for blocks in FreeBSD (the first being
`qsort_b()`, which we use here). This suggest we might want to add
a `COMPILER_FEATURE` for blocks to avoid hardcoding any further
`COMPILER_TYPE` checks.
MFC after: never
Relnotes: yes
Sponsored by: Klara, Inc.
Reviewed by: kevans, theraven, imp
Differential Revision: https://reviews.freebsd.org/D49877
|
|
Signed-off-by: Ricardo Branco <rbranco@suse.de>
PR: 286133
MFC after: 1 week
Github PR: https://github.com/freebsd/freebsd-src/pull/1666
|
|
Renumber the private flags so there is a sizeable gap between them and
the public flags, making it easier to add public flags in the future.
These private flags are only ever set or read by FTS itself, so there
is no compatibility issue.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D49711
|
|
Summary:
This reverts commit d7efac1be1441c122f7fb9de51a409172f21326c.
This reverts commit 9d0eea9422d075c8a6924b33161d2d5abfb4072a.
Some ports (specifically Python) define __BSD_VISIBLE themselves, so
the change from __BSD_VISIBLE to __POSIX_VISIBLE >= 202405 makes them
fail.
Reported by: jrtc27, cperciva
|