glibc/glibc-upstream-2.39-93.patch
Arjun Shankar 2118accf25 Sync with glibc-2.39-22.fc40 (RHEL-45522)
Resolves: RHEL-45522

Fedora 40 commit: 9404e14f4d
Upstream commit: 4bdcc1963bc2b5ba5f8e319e402d9eb2cb6096c1

Fedora 40 changes:

- Backport /etc/resolv.conf enhancements to thelp with RHEL-18039 testing

Related: RHEL-50663

- Support --without testsuite builds without perl installed (#2292195)
- Use release instead of baserelease for glibc32 conflict
- Add Conflicts:/Obsoletes: for glibc32 to glibc.i686

- ppc64le: Build early startup code with -mcpu=power8

Resolves: RHEL-43456

- Move ANSI_X3.110-1983 support from main package to glibc-gconv-extra.

Resolves: RHEL-41206

Upstream changes:

- manual: make setrlimit() description less ambiguous
- manual/stdio: Clarify putc and putwc
- malloc: add multi-threaded tests for aligned_alloc/calloc/malloc
- malloc: avoid global locks in tst-aligned_alloc-lib.c

- resolv: Track single-request fallback via _res._flags (bug 31476)
- resolv: Do not wait for non-existing second DNS response after error (bug 30081)
- resolv: Allow short error responses to match any query (bug 31890)

Resolves: RHEL-50663

- elf: Fix localplt.awk for DT_RELR-enabled builds (BZ 31978)
- Fix usage of _STACK_GROWS_DOWN and _STACK_GROWS_UP defines [BZ 31989]
- Linux: Make __rseq_size useful for feature detection (bug 31965)
- elf: Make dl-rseq-symbols Linux only
- nptl: fix potential merge of __rseq_* relro symbols

- s390x: Fix segfault in wcsncmp [BZ #31934]

Resolves: RHEL-49488

- stdlib: fix arc4random fallback to /dev/urandom (BZ 31612)
- math: Provide missing math symbols on libc.a (BZ 31781)
- math: Fix isnanf128 static build (BZ 31774)
- math: Fix i386 and m68k exp10 on static build (BZ 31775)
- math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488)
- posix: Fix pidfd_spawn/pidfd_spawnp leak if execve fails (BZ 31695)
2024-08-14 17:57:11 +02:00

53 lines
2.5 KiB
Diff

commit b71a51189d3e1a2f515d93c0444916293bd5221f
Author: Arjun Shankar <arjun@redhat.com>
Date: Mon Jul 29 14:30:59 2024 +0200
manual/stdio: Clarify putc and putwc
The manual entry for `putc' described what "most systems" do instead of
describing the glibc implementation and its guarantees. This commit
fixes that by warning that putc may be implemented as a macro that
double-evaluates `stream', and removing the performance claim.
Even though the current `putc' implementation does not double-evaluate
`stream', offering this obscure guarantee as an extension to what
POSIX allows does not seem very useful.
The entry for `putwc' is also edited to bring it in line with `putc'.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
(cherry picked from commit 10de4a47ef3f481592e3c62eb07bcda23e9fde4d)
diff --git a/manual/stdio.texi b/manual/stdio.texi
index 002fce7a10e97107..c11d37b363385531 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -903,21 +903,21 @@ This function is a GNU extension.
@deftypefun int putc (int @var{c}, FILE *@var{stream})
@standards{ISO, stdio.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @aculock{}}}
-This is just like @code{fputc}, except that most systems implement it as
+This is just like @code{fputc}, except that it may be implemented as
a macro, making it faster. One consequence is that it may evaluate the
@var{stream} argument more than once, which is an exception to the
-general rule for macros. @code{putc} is usually the best function to
-use for writing a single character.
+general rule for macros. Therefore, @var{stream} should never be an
+expression with side-effects.
@end deftypefun
@deftypefun wint_t putwc (wchar_t @var{wc}, FILE *@var{stream})
@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @aculock{}}}
-This is just like @code{fputwc}, except that it can be implement as
+This is just like @code{fputwc}, except that it may be implemented as
a macro, making it faster. One consequence is that it may evaluate the
@var{stream} argument more than once, which is an exception to the
-general rule for macros. @code{putwc} is usually the best function to
-use for writing a single wide character.
+general rule for macros. Therefore, @var{stream} should never be an
+expression with side-effects.
@end deftypefun
@deftypefun int putc_unlocked (int @var{c}, FILE *@var{stream})