From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9866 invoked by alias); 10 Jan 2006 16:04:27 -0000 Received: (qmail 9849 invoked by uid 22791); 10 Jan 2006 16:04:27 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Jan 2006 16:04:24 +0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k0AG4EmW010000; Tue, 10 Jan 2006 17:04:14 +0100 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id k0AG4Eqb009966; Tue, 10 Jan 2006 17:04:14 +0100 Date: Tue, 10 Jan 2006 16:04:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix vswprintf Message-ID: <20060110160413.GA4625@sunsite.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.4.1i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00044.txt.bz2 Hi! #define _GNU_SOURCE #include #include #include void foo (wchar_t *p, va_list ap) { vswprintf (p, 16, L"abc%p", ap); } doesn't compile with: gcc -S -O2 a.c -D_FORTIFY_SOURCE=1 /usr/include/bits/wchar2.h: In function 'foo': /usr/include/bits/wchar2.h:223: sorry, unimplemented: inlining failed in call to 'vswprintf': recursive inlining /usr/include/bits/wchar2.h:227: sorry, unimplemented: called from here Fixed thusly: 2006-01-10 Jakub Jelinek * wcsmbs/bits/wchar2.h (vswprintf): Call __vswprintf_alias rather than vswprintf recursively. --- libc/wcsmbs/bits/wchar2.h.jj 2005-09-12 09:21:43.000000000 +0200 +++ libc/wcsmbs/bits/wchar2.h 2006-01-10 16:59:02.000000000 +0100 @@ -1,5 +1,5 @@ /* Checking macros for wchar functions. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 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 @@ -224,7 +224,7 @@ __NTH (vswprintf (wchar_t *__s, size_t _ if (__bos (__s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1) return __vswprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, __bos (__s), __format, __arg); - return vswprintf (__s, __n, __format, __arg); + return __vswprintf_alias (__s, __n, __format, __arg); } Jakub