From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19246 invoked by alias); 17 Jul 2010 12:29:28 -0000 Received: (qmail 19231 invoked by uid 22791); 17 Jul 2010 12:29:27 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Jul 2010 12:29:22 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o6HCSpeg015370; Sat, 17 Jul 2010 14:28:51 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o6HCSnd8017188; Sat, 17 Jul 2010 14:28:49 +0200 (CEST) Date: Sat, 17 Jul 2010 12:29:00 -0000 Message-Id: <201007171228.o6HCSnd8017188@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: vapier@gentoo.org CC: gdb-patches@sourceware.org, sezeroz@gmail.com, tromey@redhat.com In-reply-to: <201007170537.44785.vapier@gentoo.org> (message from Mike Frysinger on Sat, 17 Jul 2010 05:37:43 -0400) Subject: Re: [PATCH] [Windows] fix format string for 64 bit var in gdbserver References: <201007170537.44785.vapier@gentoo.org> 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: 2010-07/txt/msg00260.txt.bz2 > From: Mike Frysinger > Date: Sat, 17 Jul 2010 05:37:43 -0400 > > On Friday, July 16, 2010 16:10:23 Ozkan Sezer wrote: > > For windows targets, (x86_64-w64-mingw32, i686-w64-mingw32) > > gcc complains: > >=20 > > ../../../gdb-cvs/gdb/gdbserver/server.c: In function 'handle_query': > > ../../../gdb-cvs/gdb/gdbserver/server.c:1542: warning: unknown > > conversion type character 'l' in format > > ../../../gdb-cvs/gdb/gdbserver/server.c:1542: warning: too many > > arguments for format > > ../../../gdb-cvs/gdb/gdbserver/server.c:1566: warning: unknown > > conversion type character 'l' in format > > ../../../gdb-cvs/gdb/gdbserver/server.c:1566: warning: too many > > arguments for format > >=20 > > This is due to the fact that MS printf doesn't support %lld, it uses > > its own %I64d which gcc already knows about. The attached patch > > changes that. OK for apply? > > ugh, no. why not use a sane define like PRIx64 from inttypes.h ? "sane" isn't the word I'd use. Not only do I find them to make printf format strings to become unreadable, they also cause i18n issues. How on earth can people take this 64-bit Windows crap seriously? Choosing LLP64 over LP64 when has been de de-facto standard for well over a decade is, well, a bit odd. But if "long long", which was standardized with C99, is your only 64-bit integer type, but your printf doesn't understand the C99 standard %ll format specifier, you're shipping a crippled system. To me that screams "we don't care about portable software". And my answer to that would be that I don't care about Microsoft Windows.