]> git.ipfire.org Git - thirdparty/glibc.git/commit
stdio-common: Add scanf integer data for ILP32 targets
authorMaciej W. Rozycki <macro@redhat.com>
Tue, 25 Mar 2025 09:40:20 +0000 (09:40 +0000)
committerMaciej W. Rozycki <macro@redhat.com>
Tue, 25 Mar 2025 09:40:20 +0000 (09:40 +0000)
commitd7584e4d367ccb281ecf68980995e9b5ca0aff46
tree5470fcd4cd6c397c5f868e8fd845744a86b2498f
parentd1a621b735247ba0f7bf288e35a1b172cb6803f6
stdio-common: Add scanf integer data for ILP32 targets

Add Makefile infrastructure and `int' and `long' integer input data,
signed and unsigned, for ILP32 targets.

While the size of `int' data is the same between ILP32 and LP64 targets,
resulting scanf output is different between them for out of range input
data and while ISO C and POSIX both say that the behavior is undefined
if the result of the conversion cannot be represented we want to keep
track of our output to prevent inadvertent changes.  Hence the use of
distinct `int' integer input data between ILP32 and LP64 targets.

Keep input data disabled and referring to BZ #12701 for entries that are
are currently incorrectly accepted as valid data, such as '0b' or '0x'.

Reviewed-by: Joseph Myers <josmyers@redhat.com>
15 files changed:
sysdeps/wordsize-32/Makefile [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-int-d.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-int-i.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-long-d.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-long-i.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-uint-b.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-uint-o.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-uint-u.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-uint-x.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-uint-xx.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-ulong-b.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-ulong-o.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-ulong-u.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-ulong-x.input [new file with mode: 0644]
sysdeps/wordsize-32/tst-scanf-format-ulong-xx.input [new file with mode: 0644]