commit:     47480684c450205b54de2bc83e1b31e5b525b30a
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Jan 30 03:05:31 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb  6 01:45:14 2026 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=47480684

Document that POSIX-1.2024 is the target environment

Have the "functions.sh" unit indicate that the the functions shall be
compatible with POSIX-1.2024, rather than POSIX-1.2018. Consequently,
there is no longer a need to indicate that the former is required by a
given function, nor for the invocation of a given utility.

Only the comments are touched. Measures of backward compatibility shall
continue to be implemented and commented upon, where appropriate.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 functions.sh     | 20 +++++---------------
 functions/rc.sh  |  5 -----
 functions/tty.sh |  1 -
 3 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/functions.sh b/functions.sh
index 3cda0d9..0e57224 100644
--- a/functions.sh
+++ b/functions.sh
@@ -9,7 +9,7 @@
 # intended for internal use shall be prefixed with "genfun_" to indicate so,
 # and to reduce the probability of name space conflicts.
 
-# The functions shall be compatible with the POSIX-1.2018 Shell and Utilities
+# The functions shall be compatible with the POSIX-1.2024 Shell and Utilities
 # (XCU), except where otherwise noted and with the exception that the use of
 # the local utility is permitted, despite the results of its invocation being
 # formally unspecified. Should any of the errexit, pipefail or nounset options
@@ -305,10 +305,6 @@ is_anyof()
 # This constraint is expected to be eliminated by a future amendment to the
 # function, once support for read -d becomes sufficiently widespread.
 #
-# The test utility is required to support the -nt primary, per POSIX-1.2024.
-# However, measures are in place to to achieve compatibility with shells that
-# implement the primary without yet fully adhering to the specification.
-#
 newest()
 {
        local path newest
@@ -351,9 +347,6 @@ get_nprocs()
                # advantage of acknowledging the effect of sched_setaffinity(2).
                true
        elif getconf _NPROCESSORS_ONLN 2>/dev/null; then
-               # This constant is standard as of POSIX-1.2024 and was already
-               # supported by glibc, musl-utils, macOS, FreeBSD, NetBSD and
-               # OpenBSD.
                true
        else
                warn "get_nprocs: failed to determine the number of processors"
@@ -379,8 +372,6 @@ get_nprocs()
 # This constraint is expected to be eliminated by a future amendment to the
 # function, once support for read -d becomes sufficiently widespread.
 #
-# The test utility is required to support the -ot primary, per POSIX-1.2024.
-#
 oldest()
 {
        local path oldest
@@ -470,11 +461,10 @@ parallel_run()
 #
 # If any such bytes are found, the value shall instead be requoted in a manner
 # that conforms with section 2.2.4 of the Shell Command Language, wherein the
-# the use of dollar-single-quotes sequences is described. Such sequences are
-# standard as of POSIX-1.2024. However, as of August 2024, many implementations
-# lack support for this feature. So as to mitigate this state of affairs, the
-# use of dollar-single-quotes may be suppressed by setting POSIXLY_CORRECT as a
-# non-empty string.
+# the use of dollar-single-quotes sequences is described. As of August 2024,
+# many implementations lack support for this feature. So as to mitigate this
+# state of affairs, the use of dollar-single-quotes may be suppressed by
+# setting POSIXLY_CORRECT as a non-empty string.
 #
 quote_args()
 {

diff --git a/functions/rc.sh b/functions/rc.sh
index c6d3d00..6e0dc10 100644
--- a/functions/rc.sh
+++ b/functions/rc.sh
@@ -136,7 +136,6 @@ esyslog()
                shift 2
                msg=$*
                if _is_visible "${msg}"; then
-                       # The -p and -t options are standard as of POSIX-1.2024.
                        logger -p "${pri}" -t "${tag}" -- "${msg}"
                fi
        fi
@@ -204,10 +203,6 @@ get_bootparam()
 # Takes the first parameter as a reference file/directory then determines
 # whether any of the following parameters refer to newer files/directories.
 #
-# The test utility is required to support the -nt primary, per POSIX-1.2024.
-# However, measures are in place to to achieve compatibility with shells that
-# implement the primary without yet fully adhering to the specification.
-#
 is_older_than()
 {
        local path ref

diff --git a/functions/tty.sh b/functions/tty.sh
index 6c47003..5bdaf05 100644
--- a/functions/tty.sh
+++ b/functions/tty.sh
@@ -63,7 +63,6 @@ _update_columns()
                # Preserve the cached number of columns for up to 1 second.
                return
        else
-               # This use of stty(1) is portable as of POSIX-1.2024.
                IFS=' '
                # shellcheck disable=2046
                set -- $(stty size 2>/dev/null)

Reply via email to