From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12696 invoked by alias); 23 Apr 2008 11:52:36 -0000 Received: (qmail 12687 invoked by uid 22791); 23 Apr 2008 11:52:35 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 23 Apr 2008 11:52:15 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 040CC983E4; Wed, 23 Apr 2008 11:52:14 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id DB343980F7; Wed, 23 Apr 2008 11:52:13 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JodWH-0004Df-2n; Wed, 23 Apr 2008 07:52:13 -0400 Date: Wed, 23 Apr 2008 12:18:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: GDB Patches Subject: Re: [PATCH] long long for printf on MinGW Message-ID: <20080423115213.GA16165@caradoc.them.org> Mail-Followup-To: Andrew STUBBS , GDB Patches References: <452CCE2D.8070806@st.com> <20061011130330.GA24187@nevyn.them.org> <452D09E8.5090005@st.com> <20080422180204.GA20664@caradoc.them.org> <480F0146.7090103@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <480F0146.7090103@st.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00512.txt.bz2 On Wed, Apr 23, 2008 at 10:28:38AM +0100, Andrew STUBBS wrote: > That said, selfishly speaking, it's overkill for _my_ problem, and I > don't know of any other problems in this area - apart from hosts that > just plain don't have long long, and you seem to suggest that gnulib > won't solve that? You can't pass a long long by C varargs if your compiler doesn't support it, and GDB won't do anything sensible anyway - LONGEST will be a long. > Unless I'm mistaken, the code reserves enough space for every character > to be in it's own nul-terminated substring, but since the minimum length > %-spec is two characters, that's impossible. In this specific example, > there would be 8 bytes reserved for the string "%lld" - enough for > "%\0l\0l\0d\0", but "%I64d\0" only uses 6. Right. Go ahead with the patch. We can rip it out if we switch to gnulib's printf. -- Daniel Jacobowitz CodeSourcery