From f7d8b6514383ec82483ddc4adbf7c0db0109c184 Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Wed, 19 Aug 2026 22:15:56 -0400 Subject: [PATCH] Minor documentation improvements (RHEL-158699) Resolves: RHEL-158699 --- glibc-RHEL-158699-1.patch | 31 ++++++++++++++++++++++++++++++ glibc-RHEL-158699-2.patch | 22 +++++++++++++++++++++ glibc-RHEL-158699-3.patch | 32 +++++++++++++++++++++++++++++++ glibc-RHEL-158699-4.patch | 21 ++++++++++++++++++++ glibc-RHEL-158699-5.patch | 33 ++++++++++++++++++++++++++++++++ glibc-RHEL-158699-6.patch | 26 +++++++++++++++++++++++++ glibc-RHEL-158699-7.patch | 40 +++++++++++++++++++++++++++++++++++++++ glibc-RHEL-158699-8.patch | 19 +++++++++++++++++++ glibc-RHEL-158699-9.patch | 24 +++++++++++++++++++++++ 9 files changed, 248 insertions(+) create mode 100644 glibc-RHEL-158699-1.patch create mode 100644 glibc-RHEL-158699-2.patch create mode 100644 glibc-RHEL-158699-3.patch create mode 100644 glibc-RHEL-158699-4.patch create mode 100644 glibc-RHEL-158699-5.patch create mode 100644 glibc-RHEL-158699-6.patch create mode 100644 glibc-RHEL-158699-7.patch create mode 100644 glibc-RHEL-158699-8.patch create mode 100644 glibc-RHEL-158699-9.patch diff --git a/glibc-RHEL-158699-1.patch b/glibc-RHEL-158699-1.patch new file mode 100644 index 0000000..fd96141 --- /dev/null +++ b/glibc-RHEL-158699-1.patch @@ -0,0 +1,31 @@ +commit 7c1ec1b7d0b476610c811b0babeab831e626c088 +Author: Paul Eggert +Date: Sat Jun 15 08:40:41 2024 -0700 + + Minor code improvement to timespec_subtract example + + This saves a few instructions. + BORROW cannot be -1, since NSEC_DIFF is at most 999999999. + Idea taken from Gnulib, here: + https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=fe33f943054b93af8b965ce6564b8713b0979a21 + +diff --git a/manual/examples/timespec_subtract.c b/manual/examples/timespec_subtract.c +index 380d173aab..26607409c8 100644 +--- a/manual/examples/timespec_subtract.c ++++ b/manual/examples/timespec_subtract.c +@@ -22,12 +22,12 @@ + + bool + timespec_subtract (struct timespec *r, +- struct timespec x, struct timespec y) ++ struct timespec x, struct timespec y) + { +- /* Compute nanoseconds, setting @var{borrow} to 1, 0, or -1 ++ /* Compute nanoseconds, setting @var{borrow} to 1 or 0 + for propagation into seconds. */ + long int nsec_diff = x.tv_nsec - y.tv_nsec; +- int borrow = (nsec_diff < 0) - ! (nsec_diff < 1000000000); ++ bool borrow = nsec_diff < 0; + r->tv_nsec = nsec_diff + 1000000000 * borrow; + + /* Compute seconds, returning true if this overflows. */ diff --git a/glibc-RHEL-158699-2.patch b/glibc-RHEL-158699-2.patch new file mode 100644 index 0000000..83a1ff1 --- /dev/null +++ b/glibc-RHEL-158699-2.patch @@ -0,0 +1,22 @@ +commit 41d6461484d6d456fb07f495fb595e06b44758c4 +Author: Andreas K. Hüttel +Date: Sat Jun 15 15:41:22 2024 +0200 + + manual: minor language fix (bz 31340) + + Resolves: https://sourceware.org/bugzilla/show_bug.cgi?id=31340 + Signed-off-by: Andreas K. Hüttel + +diff --git a/manual/resource.texi b/manual/resource.texi +index 37462abc9e..c9b21dedeb 100644 +--- a/manual/resource.texi ++++ b/manual/resource.texi +@@ -1193,7 +1193,7 @@ nice (int increment) + On a multi-processor system the operating system usually distributes + the different processes which are runnable on all available CPUs in a + way which allows the system to work most efficiently. Which processes +-and threads run can be to some extend be control with the scheduling ++and threads run can to some extend be controlled with the scheduling + functionality described in the last sections. But which CPU finally + executes which process or thread is not covered. + diff --git a/glibc-RHEL-158699-3.patch b/glibc-RHEL-158699-3.patch new file mode 100644 index 0000000..e98e2fa --- /dev/null +++ b/glibc-RHEL-158699-3.patch @@ -0,0 +1,32 @@ +commit f47596fcfe32ef96ba9b322a414803b25b8ce608 +Author: Florian Weimer +Date: Fri Sep 27 11:41:12 2024 +0200 + + manual: Document that feof and ferror are mutually exclusive + + This is not completely clear from the C standard (although there + is footnote number 289 in C11), but I assume that our implementation + works this way. + + Reviewed-by: DJ Delorie + +diff --git a/manual/stdio.texi b/manual/stdio.texi +index 8590ae955a..c7a2b4a9a1 100644 +--- a/manual/stdio.texi ++++ b/manual/stdio.texi +@@ -4168,6 +4168,15 @@ check indicators that are part of the internal state of the stream + object, indicators set if the appropriate condition was detected by a + previous I/O operation on that stream. + ++The end of file and error conditions are mutually exclusive. For a ++narrow oriented stream, end of file is not considered an error. For ++wide oriented streams, reaching the end of the underlying file can ++result an error if the underlying file ends with an incomplete multibyte ++sequence. This is reported as an error by @code{ferror}, and not as an ++end of file by @code{feof}. End of file on wide oriented streams that ++does not fall into the middle of a multibyte sequence is reported via ++@code{feof}. ++ + @deftypevr Macro int EOF + @standards{ISO, stdio.h} + This macro is an integer value that is returned by a number of narrow diff --git a/glibc-RHEL-158699-4.patch b/glibc-RHEL-158699-4.patch new file mode 100644 index 0000000..f3dc1f6 --- /dev/null +++ b/glibc-RHEL-158699-4.patch @@ -0,0 +1,21 @@ +commit bc4202521c2aaf587690ea6cbb67c22ee578c86e +Author: Maciej W. Rozycki +Date: Fri May 30 15:01:50 2025 +0100 + + manual: Fix duplicate 'consult' erratum + + Remove 'consult' duplication appearing in Extensible Scheduling section. + +diff --git a/manual/resource.texi b/manual/resource.texi +index 39df1c4cb6..1fd0310c6b 100644 +--- a/manual/resource.texi ++++ b/manual/resource.texi +@@ -977,7 +977,7 @@ multiple parameters (not just priority and niceness). + It is expected that these interfaces will be compatible with all future + scheduling policies. + +-For additional information about scheduling policies, consult consult ++For additional information about scheduling policies, consult + the manual pages @manpageurl{sched,7} and @manpageurl{sched_setattr,2}. + + @strong{Note:} Calling the @code{sched_setattr} function is incompatible diff --git a/glibc-RHEL-158699-5.patch b/glibc-RHEL-158699-5.patch new file mode 100644 index 0000000..3bcf3cc --- /dev/null +++ b/glibc-RHEL-158699-5.patch @@ -0,0 +1,33 @@ +commit 62fba6d9807fc12334d7c5513407715d59539611 +Author: Maciej W. Rozycki +Date: Fri Jun 6 18:14:34 2025 +0100 + + manual: Add a comparative example of 'clock_nanosleep' use + + Add an illustrative example of how to express 'nanosleep' in terms of + 'clock_nanosleep'. + +diff --git a/manual/time.texi b/manual/time.texi +index 697a6287f2..d003ddb637 100644 +--- a/manual/time.texi ++++ b/manual/time.texi +@@ -3241,6 +3241,19 @@ different from @code{nanosleep}, which returns @math{-1} upon failure and + sets the global variable @code{errno} according to the error encountered + instead. + ++Except for the return value convention and the way to communicate an error ++condition the call: ++ ++@smallexample ++nanosleep (@var{requested_time}, @var{remaining_time}) ++@end smallexample ++ ++is analogous to: ++ ++@smallexample ++clock_nanosleep (CLOCK_REALTIME, 0, @var{requested_time}, @var{remaining_time}) ++@end smallexample ++ + The @var{clock} argument specifies the clock to use. + @xref{Getting the Time}, for the @code{clockid_t} type and possible values + of @var{clock}. Not all clocks listed are supported for use with diff --git a/glibc-RHEL-158699-6.patch b/glibc-RHEL-158699-6.patch new file mode 100644 index 0000000..6887c60 --- /dev/null +++ b/glibc-RHEL-158699-6.patch @@ -0,0 +1,26 @@ +commit 53ea6db9fd25af7486b14cd2bf3b0ae1046e0e98 +Author: Jitka Obselkova +Date: Sat Jun 14 11:19:46 2025 +0200 + + manual: Clarify renameat documentation + + Clarify the meaning of renameat arguments. + + Reviewed-by: Collin Funk + +diff --git a/manual/filesys.texi b/manual/filesys.texi +index f21f218042..e1c7be867e 100644 +--- a/manual/filesys.texi ++++ b/manual/filesys.texi +@@ -1940,7 +1940,10 @@ file systems. + @comment Unaudited and therefore marked AC-Unsafe and AS-Unsafe by default + @safety{@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{}}} + This function is a descriptor-relative version of the @code{rename} +-function above. @xref{Descriptor-Relative Access}. ++function above. @xref{Descriptor-Relative Access}. If @var{oldname} or ++@var{newname} is a relative path, it is interpreted relative to the ++directory associated with @var{oldfiledes} or @var{newfiledes}, ++respectively. Absolute paths are interpreted in the usual way. + + Compared to @code{rename}, some additional error conditions can occur. + @xref{Descriptor-Relative Access}. diff --git a/glibc-RHEL-158699-7.patch b/glibc-RHEL-158699-7.patch new file mode 100644 index 0000000..4f407bf --- /dev/null +++ b/glibc-RHEL-158699-7.patch @@ -0,0 +1,40 @@ +commit b96031cb5662f0b7a086c869ea265de922b4de7e +Author: Yury Khrustalev +Date: Fri Jun 20 13:37:34 2025 +0100 + + manual: describe syscall numbers not supported via syscall() + + The syscall() function allows to make system calls directly, however, + in the case of system calls that affect internal state of process or + thread, the caller would have to take care of extensive setup necessary + for the internals of Glibc to work correctly in the child threads. This + may make using syscall() with these syscall numbers impractical and + prone to undefined behaviour. + + Reviewed-by: Adhemerval Zanella + +diff --git a/manual/startup.texi b/manual/startup.texi +index 9545fcc526..11fe58c5a6 100644 +--- a/manual/startup.texi ++++ b/manual/startup.texi +@@ -737,6 +737,12 @@ anyway. + @code{syscall} does not provide cancellation logic, even if the system + call you're calling is listed as cancellable above. + ++Using @code{syscall} with system calls that affect the internal state of ++process of thread will likely result in undefined behavior. For this reason, ++at least the following system call numbers are not supported when invoked via ++@code{syscall}: @code{SYS_clone}, @code{SYS_clone2}, @code{SYS_clone3}, ++@code{SYS_rt_sigreturn}, @code{SYS_sigreturn}, @code{SYS_vfork}. ++ + @code{syscall} is declared in @file{unistd.h}. + + @deftypefun {long int} syscall (long int @var{sysno}, @dots{}) +@@ -804,7 +810,6 @@ if (rc == -1) + + @end deftypefun + +- + @node Program Termination + @section Program Termination + @cindex program termination diff --git a/glibc-RHEL-158699-8.patch b/glibc-RHEL-158699-8.patch new file mode 100644 index 0000000..40dc609 --- /dev/null +++ b/glibc-RHEL-158699-8.patch @@ -0,0 +1,19 @@ +commit f0b88eb78416ec822b4c1fd43b85525594dc054f +Author: Yury Khrustalev +Date: Thu Sep 11 10:50:43 2025 +0100 + + manual: fix typo + +diff --git a/manual/startup.texi b/manual/startup.texi +index c444750479..9545fcc526 100644 +--- a/manual/startup.texi ++++ b/manual/startup.texi +@@ -668,7 +668,7 @@ defined in @file{elf.h}. If a matching entry is found, the value is + returned; if the entry is not found, zero is returned and @code{errno} + is set to @code{ENOENT}. + +-@strong{Note:} There is no relationship between the @samp{AT_} contants ++@strong{Note:} There is no relationship between the @samp{AT_} constants + defined in @file{elf.h} and the file name lookup flags in + @file{fcntl.h}. @xref{Descriptor-Relative Access}. + @end deftypefun diff --git a/glibc-RHEL-158699-9.patch b/glibc-RHEL-158699-9.patch new file mode 100644 index 0000000..ad68de7 --- /dev/null +++ b/glibc-RHEL-158699-9.patch @@ -0,0 +1,24 @@ +commit fcfbc3ee310519f600b712c699e2f411c6a5c7d6 +Author: Collin Funk +Date: Sat Oct 4 00:52:57 2025 -0700 + + manual: check the correct variable in SIOCATMARK example [BZ #33093] + + * manual/socket.texi (Out-of-Band Data): Check the atmark variable which + is set by the ioctl instead of the undefined result variable. + + Reviewed-by: Adhemerval Zanella + +diff --git a/manual/socket.texi b/manual/socket.texi +index 56948073d5..2ed8112344 100644 +--- a/manual/socket.texi ++++ b/manual/socket.texi +@@ -2999,7 +2999,7 @@ discard_until_mark (int socket) + success = ioctl (socket, SIOCATMARK, &atmark); + if (success < 0) + perror ("ioctl"); +- if (result) ++ if (atmark) + return; + + /* @r{Otherwise, read a bunch of ordinary data and discard it.}