This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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)
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |