From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116618 invoked by alias); 26 Mar 2018 15:28:10 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 116605 invoked by uid 89); 26 Mar 2018 15:28:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=2010, HX-Envelope-From:sk:gabriel, H*F:D*br X-HELO: mo19.mail-out.ovh.net Date: Mon, 26 Mar 2018 15:28:00 -0000 From: "Gabriel F. T. Gomes" To: Zack Weinberg CC: Subject: Re: [PATCH 2/9] Add __vfscanf_internal and __vfwscanf_internal with flags arguments. Message-ID: <20180326122752.64b6591b@tereshkova> In-Reply-To: <20180307193205.4751-3-zackw@panix.com> References: <20180307193205.4751-1-zackw@panix.com> <20180307193205.4751-3-zackw@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: EX2.emp.local (172.16.2.2) To EX3.emp.local (172.16.2.3) X-Ovh-Tracer-Id: 1262415273803370061 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrvdeigdeklecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-SW-Source: 2018-03/txt/msg00549.txt.bz2 On Wed, 07 Mar 2018, Zack Weinberg wrote: >(It was necessary to introduce ldbl_compat_symbol for _IO_vfscanf. >Please check that part of the patch very carefully, I am still not >confident I understand all of the details of ldbl-opt.) It looks good on powerpc64... Oldest symbol (where long double had the same format as double) is still there as a compat symbol with version GLIBC_2.3... The newer symbol, is a bit different, in the sense that it is now a compat symbol (it was a default symbol previously). Here's what readelf has to tell us: Before the patch set: 1355: 00000000001eea70 124 FUNC GLOBAL DEFAULT 27 _IO_vfscanf@GLIBC_2.3 1356: 00000000001f0a98 23552 FUNC GLOBAL DEFAULT 27 _IO_vfscanf@@GLIBC_2.4 After the patch set: 1355: 00000000001f0bd0 136 FUNC GLOBAL DEFAULT 27 _IO_vfscanf@GLIBC_2.4 1356: 00000000001ee968 136 FUNC GLOBAL DEFAULT 27 _IO_vfscanf@GLIBC_2.3 For the static library, I think that Adhemerval is right (see comment below). > * libio/libioP.h (SCANF_LDBL_IS_DBL, SCANF_ISOC99_A): New constants. > (__vfscanf_internal, __vfwscanf_internal): New function prototypes. > * libio/libio.h: Remove libc_hidden_proto for _IO_vfscanf. ~~~~~~~~ Spaces instead of tabs. > * libio/strfile.h: Add multiple inclusion guard. Perhaps mention the removal of stdio.h inclusion? > * stdio-common/Versions: Mention GLIBC_2.28, so that > it can be used in SHLIB_COMPAT expressions. ~~~~~~~~ Spaces instead of tabs. >+extern int __vfscanf_internal (FILE *fp, const char *format, va_list argp, >+ unsigned int flags); ~~~~~~~~~~~~~~~~~~~~~~~~ >+extern int __vfwscanf_internal (FILE *fp, const wchar_t *format, va_list argp, >+ unsigned int flags); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Spaces instead of tabs. >+/* Initialize an _IO_strfile SF and _IO_wide_data WD to read from wide >+ string STRING, and return the corresponding FILE object. It is not >+ necessary to fclose the FILE when it is no longer needed. */ >+static inline FILE * >+_IO_strfile_readw (_IO_strfile *sf, struct _IO_wide_data *wd, >+ const wchar_t *string) ~~~~~~~~~~~~~~~~ Spaces instead of tabs. >--- /dev/null >+++ b/stdio-common/iovfscanf.c >@@ -0,0 +1,34 @@ >+/* Copyright (C) 1991-2018 Free Software Foundation, Inc. Should this (and other new files) be copyright 2018, since they're new? >--- a/stdio-common/vfscanf.c >+++ b/stdio-common/vfscanf-internal.c >-_IO_vfwscanf (FILE *s, const wchar_t *format, va_list argptr, >- int *errp) >+__vfwscanf_internal (FILE *s, const wchar_t *format, va_list argptr, >+ unsigned int mode_flags) ~~~~~~~~~~~~~~~~ Spaces instead of tabs. >-_IO_vfscanf_internal (FILE *s, const char *format, va_list argptr, >- int *errp) >+__vfscanf_internal (FILE *s, const char *format, va_list argptr, >+ unsigned int mode_flags) ~~~~~~~~~~~~~~~~ Spaces instead of tabs. >--- a/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h >+++ b/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h >@@ -20,10 +20,14 @@ > long_double_symbol (libc, __GL_##name##_##aliasname, aliasname); > # define long_double_symbol_1(lib, local, symbol, version) \ > versioned_symbol (lib, local, symbol, version) >+# define ldbl_compat_symbol(lib, local, symbol, version) \ >+ compat_symbol (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION) > #else > # define ldbl_hidden_def(local, name) libc_hidden_def (name) > # define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname) > # define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname) >+# define ldbl_compat_symbol(lib, local, symbol, version) \ >+ compat_symbol (lib, local, symbol, version) I believe that Adhemerval's comment is correct and ldbl_compat_symbol should translate to nothing when building static libraries.