From 6ac3639867e6ab13fa2d179cd5723483e5d92d60 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 16 Mar 2004 00:08:09 +0000 Subject: Update. 2004-03-15 Ulrich Drepper * sysdeps/sparc/fpu/bits/mathinline.h: Restore missing #ifdef. Patch by Richard Henderson. 2004-03-16 Jakub Jelinek * sysdeps/generic/strtold_l.c (STRING_TYPE, STRTOLD, __STRTOLD, __STRTOD, INTERNAL, INTERNAL1): Define, use them. [! USE_WIDE_CHAR] (INTERNAL (__STRTOLD)): Add libc_hidden_def. * inet/getnameinfo.c: Include stdlib.h. --- sysdeps/generic/strtold_l.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'sysdeps/generic/strtold_l.c') diff --git a/sysdeps/generic/strtold_l.c b/sysdeps/generic/strtold_l.c index e43654700f..690a8a92eb 100644 --- a/sysdeps/generic/strtold_l.c +++ b/sysdeps/generic/strtold_l.c @@ -20,21 +20,39 @@ #include #include - -extern double ____strtod_l_internal (const char *, char **, int, __locale_t); - +#ifdef USE_WIDE_CHAR +# define STRING_TYPE wchar_t +# define STRTOLD wcstold_l +# define __STRTOLD __wcstold_l +# define __STRTOD __wcstod_l +#else +# define STRING_TYPE char +# define STRTOLD strtold_l +# define __STRTOLD __strtold_l +# define __STRTOD __strtod_l +#endif + +#define INTERNAL(x) INTERNAL1(x) +#define INTERNAL1(x) __##x##_internal + +extern double INTERNAL (__STRTOD) (const STRING_TYPE *, STRING_TYPE **, + int, __locale_t); /* There is no `long double' type, use the `double' implementations. */ long double -____strtold_l_internal (const char *nptr, char **endptr, int group, - __locale_t loc) +INTERNAL (__STRTOLD) (const STRING_TYPE *nptr, STRING_TYPE **endptr, + int group, __locale_t loc) { - return ____strtod_l_internal (nptr, endptr, group, loc); + return INTERNAL (__STRTOD) (nptr, endptr, group, loc); } - +#ifndef USE_WIDE_CHAR +libc_hidden_def (INTERNAL (__STRTOLD)) +#endif long double -strtold (const char *nptr, char **endptr, __locale_t loc) +weak_function +__STRTOLD (const STRING_TYPE *nptr, STRING_TYPE **endptr, __locale_t loc) { - return ____strtod_l_internal (nptr, endptr, 0, loc); + return INTERNAL (__STRTOD) (nptr, endptr, 0, loc); } +weak_alias (__STRTOLD, STRTOLD) -- cgit v1.2.3