]> git.ipfire.org Git - thirdparty/glibc.git/commit
stdio-common: Add scanf integer data for LP64 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)
commita2bacea239c1780b20a1b23a9c3c836ef61c6172
treef0b8bacfc73eafe303320ebcc3d41be77132d99e
parentd7584e4d367ccb281ecf68980995e9b5ca0aff46
stdio-common: Add scanf integer data for LP64 targets

Add Makefile infrastructure and `int' and `long' integer input data,
signed and unsigned, for LP64 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-64/Makefile
sysdeps/wordsize-64/tst-scanf-format-int-d.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-int-i.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-long-d.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-long-i.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-uint-b.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-uint-o.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-uint-u.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-uint-x.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-uint-xx.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-ulong-b.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-ulong-o.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-ulong-u.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-ulong-x.input [new file with mode: 0644]
sysdeps/wordsize-64/tst-scanf-format-ulong-xx.input [new file with mode: 0644]