* About stdlib/strto* change
@ 2007-08-13 14:56 Kaz Kojima
2007-08-13 15:28 ` Jakub Jelinek
0 siblings, 1 reply; 6+ messages in thread
From: Kaz Kojima @ 2007-08-13 14:56 UTC (permalink / raw)
To: libc-hacker
Hi,
There is a build failure for SH during compiling stdlib/strtold_l.c:
strtold_l.c:61: error: 'strtold_l' aliased to undefined symbol '__strtold_l'
In Aug 6 Roland's change, libc_hidden_proto (__strtold_l) is added
to include/stdlib.h and weak_alias (__STRTOLD, STRTOLD) is added to
stdlib/strtold_l.c. It seems that libc_hedden_def is needed also
for __strtold_l just before the above weak_alias statement. Is it
right? x86 uses sysdeps/ieee754/ldbl-96/strtold_l.c which includes
stdlib/strtod_l.c instead of stdlib/strtold_l.c and the corresponding
libc_hedden_def was added to stdlib/strtod_l.c at that time.
The attached patch works for me, though I suspect that I've missed
something.
Regards,
kaz
--
* stdlib/strtold.c: Add libc_hidden_def.
--- ORIG/libc/stdlib/strtold_l.c 2005-12-14 20:14:13.000000000 +0900
+++ LOCAL/libc/stdlib/strtold_l.c 2007-08-13 20:43:24.000000000 +0900
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -55,4 +55,7 @@ __STRTOLD (const STRING_TYPE *nptr, STRI
{
return INTERNAL (__STRTOD) (nptr, endptr, 0, loc);
}
+#if defined _LIBC && !defined USE_WIDE_CHAR
+libc_hidden_def (__STRTOLD)
+#endif
weak_alias (__STRTOLD, STRTOLD)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About stdlib/strto* change
2007-08-13 14:56 About stdlib/strto* change Kaz Kojima
@ 2007-08-13 15:28 ` Jakub Jelinek
2007-08-13 15:45 ` Kaz Kojima
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2007-08-13 15:28 UTC (permalink / raw)
To: Kaz Kojima; +Cc: libc-hacker
On Mon, Aug 13, 2007 at 11:56:06PM +0900, Kaz Kojima wrote:
> There is a build failure for SH during compiling stdlib/strtold_l.c:
>
> strtold_l.c:61: error: 'strtold_l' aliased to undefined symbol '__strtold_l'
>
> In Aug 6 Roland's change, libc_hidden_proto (__strtold_l) is added
> to include/stdlib.h and weak_alias (__STRTOLD, STRTOLD) is added to
> stdlib/strtold_l.c. It seems that libc_hedden_def is needed also
> for __strtold_l just before the above weak_alias statement. Is it
> right? x86 uses sysdeps/ieee754/ldbl-96/strtold_l.c which includes
> stdlib/strtod_l.c instead of stdlib/strtold_l.c and the corresponding
> libc_hedden_def was added to stdlib/strtod_l.c at that time.
> The attached patch works for me, though I suspect that I've missed
> something.
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.
Jakub
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About stdlib/strto* change
2007-08-13 15:28 ` Jakub Jelinek
@ 2007-08-13 15:45 ` Kaz Kojima
2007-08-13 15:54 ` Jakub Jelinek
0 siblings, 1 reply; 6+ messages in thread
From: Kaz Kojima @ 2007-08-13 15:45 UTC (permalink / raw)
To: jakub; +Cc: libc-hacker
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About stdlib/strto* change
2007-08-13 15:45 ` Kaz Kojima
@ 2007-08-13 15:54 ` Jakub Jelinek
2007-08-13 22:11 ` Kaz Kojima
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2007-08-13 15:54 UTC (permalink / raw)
To: Kaz Kojima; +Cc: libc-hacker
On Tue, Aug 14, 2007 at 12:44:45AM +0900, Kaz Kojima wrote:
> 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'
Either stdlib/strtold_l.c, or wcsmbs/wcstold_l.c then needs to
#include <wchar.h>
Jakub
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About stdlib/strto* change
2007-08-13 15:54 ` Jakub Jelinek
@ 2007-08-13 22:11 ` Kaz Kojima
2007-08-14 14:37 ` Ulrich Drepper
0 siblings, 1 reply; 6+ messages in thread
From: Kaz Kojima @ 2007-08-13 22:11 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Ulrich Drepper, libc-hacker
Jakub Jelinek <jakub@redhat.com> wrote:
>> 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'
>
> Either stdlib/strtold_l.c, or wcsmbs/wcstold_l.c then needs to
> #include <wchar.h>
Ah, I see. With copying
#if defined _LIBC || defined HAVE_WCHAR_H
# include <wchar.h>
#endif
lines from stdlib/strtod_l.c to strtold_l.c, the error went away.
Thanks for your suggenstions! The attached patch is the revised
one. Uli, does it look Ok?
--
2007-08-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* stdlib/strtold_l.c: Include wchar.h if needed. Add
libc_hidden_def.
--- ORIG/libc/stdlib/strtold_l.c 2005-12-14 20:14:13.000000000 +0900
+++ LOCAL/libc/stdlib/strtold_l.c 2007-08-14 06:50:14.000000000 +0900
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,10 @@
#include <stdlib.h>
#include <xlocale.h>
+#if defined _LIBC || defined HAVE_WCHAR_H
+# include <wchar.h>
+#endif
+
#ifdef USE_WIDE_CHAR
# define STRING_TYPE wchar_t
# define STRTOLD wcstold_l
@@ -55,4 +59,8 @@ __STRTOLD (const STRING_TYPE *nptr, STRI
{
return INTERNAL (__STRTOD) (nptr, endptr, 0, loc);
}
+#if defined _LIBC
+libc_hidden_def (__STRTOLD)
+libc_hidden_ver (__STRTOLD, STRTOLD)
+#endif
weak_alias (__STRTOLD, STRTOLD)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About stdlib/strto* change
2007-08-13 22:11 ` Kaz Kojima
@ 2007-08-14 14:37 ` Ulrich Drepper
0 siblings, 0 replies; 6+ messages in thread
From: Ulrich Drepper @ 2007-08-14 14:37 UTC (permalink / raw)
To: Kaz Kojima; +Cc: libc-hacker
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Applied.
- --
â§ Ulrich Drepper â§ Red Hat, Inc. â§ 444 Castro St â§ Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFGwb4s2ijCOnn/RHQRArtHAJ9KWI4+X5oO/TirMK9JRL6FD2fEbgCdFn+8
/tOQCgNqxDKw5d5TYAEILQ0=
=RrDT
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-14 14:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-13 14:56 About stdlib/strto* change Kaz Kojima
2007-08-13 15:28 ` Jakub Jelinek
2007-08-13 15:45 ` Kaz Kojima
2007-08-13 15:54 ` Jakub Jelinek
2007-08-13 22:11 ` Kaz Kojima
2007-08-14 14:37 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).