From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13844 invoked by alias); 15 Mar 2004 23:11:55 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 13828 invoked from network); 15 Mar 2004 23:11:54 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sources.redhat.com with SMTP; 15 Mar 2004 23:11:54 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i2FL2Vki031585; Mon, 15 Mar 2004 22:02:31 +0100 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i2FL2UMA031581; Mon, 15 Mar 2004 22:02:30 +0100 Date: Mon, 15 Mar 2004 23:11:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix strtold_l/wcstold_l, plus one warning fix Message-ID: <20040315210230.GT3822@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2004-03/txt/msg00081.txt.bz2 Hi! Recent *{str,wcs}told* changes broke arches where double == long double. Fixed thusly, plus one warning fix. 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. --- libc/sysdeps/generic/strtold_l.c 14 Mar 2004 20:56:09 -0000 1.1 +++ libc/sysdeps/generic/strtold_l.c 15 Mar 2004 22:35:41 -0000 @@ -20,21 +20,39 @@ #include #include +#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 -extern double ____strtod_l_internal (const char *, char **, int, __locale_t); +#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) --- libc/inet/getnameinfo.c 13 Mar 2004 08:46:13 -0000 1.31 +++ libc/inet/getnameinfo.c 15 Mar 2004 23:01:01 -0000 @@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI #include #include #include +#include #include #include #include Jakub