From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13492 invoked by alias); 12 Oct 2006 10:09:04 -0000 Received: (qmail 13483 invoked by uid 22791); 12 Oct 2006 10:09:03 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-04.spheriq.net (HELO fra-del-04.spheriq.net) (195.46.51.100) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 12 Oct 2006 10:08:55 +0000 Received: from fra-out-02.spheriq.net (fra-out-02.spheriq.net [195.46.51.130]) by fra-del-04.spheriq.net with ESMTP id k9CA8lMl000452 for ; Thu, 12 Oct 2006 10:08:47 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-02.spheriq.net with ESMTP id k9CA8kju000705 for ; Thu, 12 Oct 2006 10:08:46 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id k9CA8gCD015911 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 12 Oct 2006 10:08:45 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1599BDA57; Thu, 12 Oct 2006 10:08:22 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DD33847320; Thu, 12 Oct 2006 10:08:20 +0000 (GMT) Received: from [164.129.15.13] (bri1043.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CIC30959 (AUTH stubbsa); Thu, 12 Oct 2006 11:08:18 +0100 (BST) Message-ID: <452E1412.6050008@st.com> Date: Thu, 12 Oct 2006 10:09:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Mark Kettenis Cc: GDB Patches Subject: Re: [PATCH] long long for printf on MinGW References: <452CCE2D.8070806@st.com> <10959.82.92.89.47.1160598501.squirrel@webmail.xs4all.nl> In-Reply-To: <10959.82.92.89.47.1160598501.squirrel@webmail.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00137.txt.bz2 Mark Kettenis wrote: >> Hi, >> >> Windows/MinGW printf does support printing of long long types, but it >> does not do using %lld etc. >> >> This patch converts %ll (or %...ll) to %I64 as required by Windows. > > What! Seven years after ISO C99 was ratified, Microsoft still ships a libc > that doesn't support %ll? I'm still using Win2K, so I don't think you can count all of those seven years. So are many of our customers and, no doubt, other users. The MSDN I have is dated 2002. > Sigh, I don't see why we need to treat MINGW special here. We should > probably > just print an error if PRINTF_HAS_LONG_LONG isn't defined. That's what it does, and what I don't want it to do. Why shouldn't I be able to see long long values, as supported by the target, just because I happen to use a Windows host. It isn't a difficult fixup and doesn't break or even affect any other host. Please don't point out some other way of displaying the value, that isn't the point and is just proof that it ought to work. > Actually I think the way we support size modifiers in gdb's printf are > completely broken. Do they refer to the host types, or the target types? 'Completely' broken or not, they work for most peoples' needs, but in this respect they don't work for Windows users' needs. Andrew