About stdlib/strto* change

Kaz Kojima kkojima@rr.iij4u.or.jp
Mon Aug 13 15:45:00 GMT 2007


Jakub Jelinek <jakub@redhat.com> wrote:
> I believe you should match what has been added to strtod_l.c, i.e.:
>  {
>    return INTERNAL (__STRTOD) (nptr, endptr, 0, loc);
>  }
> +#if defined _LIBC
> +libc_hidden_def (__STRTOLD)
> +libc_hidden_ver (__STRTOLD, STRTOLD)
> +#endif
>  weak_alias (__STRTOLD, STRTOLD)
> 
> otherwise calls to strtold_l from within libc.so will go through
> PLT.  stdlib/strtold_l.c is only used on
> sizeof (double) == sizeof (long double) arches, which I'm afraid
> I don't have access to any.

I've tried your patch and got

In file included from wcstold_l.c:32:
../stdlib/strtold_l.c:60: error: 'wcstold_l' undeclared here (not in a function)../stdlib/strtold_l.c:60: warning: type defaults to 'int' in declaration of '__EI_wcstold_l'
../stdlib/strtold_l.c:60: warning: type defaults to 'int' in declaration of '__EI_wcstold_l'

So perhaps, is the patch

 {
   return INTERNAL (__STRTOD) (nptr, endptr, 0, loc);
 }
+#if defined _LIBC && !defined USE_WIDE_CHAR
+libc_hidden_def (__STRTOLD)
+libc_hidden_ver (__STRTOLD, STRTOLD)
+#endif
 weak_alias (__STRTOLD, STRTOLD)

ok?

Regards,
	kaz



More information about the Libc-hacker mailing list