mbox series

[v2,0/2] Make __nldbl__IO_vfscanf a compat symbol [BZ #31776]

Message ID 20240524204844.3322444-1-hjl.tools@gmail.com
Headers show
Series Make __nldbl__IO_vfscanf a compat symbol [BZ #31776] | expand

Message

H.J. Lu May 24, 2024, 8:48 p.m. UTC
Changes in v2:

1. No need to include <nldbl-abi.h> in nldbl-compat.c.
2. Don't protect the __nldbl__IO_vfscanf compat symbol with

#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)

--
__nldbl__IO_vfscanf is only needed in libnldbl_nonshared.a to define
_IO_vfscanf.  But _IO_vfscanfis a compat symbol and shouldn't be in
libnldbl_nonshared.a.  We can make __nldbl__IO_vfscanf a compat symbol
by

1. Remove _IO_vfscanf from libnldbl_nonshared.a.
2. Change libnldbl_nonshared.a to call __nldbl_vfscanf, instead of
__nldbl__IO_vfscanf.

H.J. Lu (2):
  Add scanf/vfscanf/vscanf tests of long double without <stdio.h>
  Make __nldbl__IO_vfscanf a compat symbol [BZ #31776]

 stdio-common/test-fscanf.c                    | 55 ++++++++++++++++++-
 stdio-common/test-fscanf.input                |  3 +
 sysdeps/ieee754/ldbl-opt/Makefile             | 12 +++-
 sysdeps/ieee754/ldbl-opt/nldbl-compat.c       |  4 ++
 sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c       |  2 +-
 sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c    | 13 -----
 sysdeps/ieee754/ldbl-opt/nldbl-scanf.c        |  2 +-
 sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c      |  2 +-
 sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c       |  2 +-
 .../test-nldbl-fscanf-redirect-static.c       |  1 +
 .../test-nldbl-fscanf-redirect-static.input   |  4 ++
 .../ldbl-opt/test-nldbl-fscanf-redirect.c     | 21 +++++++
 .../ldbl-opt/test-nldbl-fscanf-redirect.input |  4 ++
 13 files changed, 105 insertions(+), 20 deletions(-)
 delete mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-opt/test-nldbl-fscanf-redirect-static.c
 create mode 100644 sysdeps/ieee754/ldbl-opt/test-nldbl-fscanf-redirect-static.input
 create mode 100644 sysdeps/ieee754/ldbl-opt/test-nldbl-fscanf-redirect.c
 create mode 100644 sysdeps/ieee754/ldbl-opt/test-nldbl-fscanf-redirect.input