From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8970 invoked by alias); 8 Jan 2009 13:12:06 -0000 Received: (qmail 8923 invoked by uid 22791); 8 Jan 2009 13:12:06 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Jan 2009 13:12:01 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id n08DBkxA022348; Thu, 8 Jan 2009 14:11:46 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id n08DBjg4006020; Thu, 8 Jan 2009 14:11:45 +0100 (CET) Date: Thu, 08 Jan 2009 13:12:00 -0000 Message-Id: <200901081311.n08DBjg4006020@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: mark.kettenis@xs4all.nl, Kai.Tietz@onevision.com, gdb-patches@sourceware.org In-reply-to: <20090108125430.GB20220@adacore.com> (message from Joel Brobecker on Thu, 8 Jan 2009 16:54:30 +0400) Subject: Re: [RFC] convert a host address to a string References: <200901081249.n08Cn6WB031507@brahms.sibelius.xs4all.nl> <20090108125430.GB20220@adacore.com> 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: 2009-01/txt/msg00155.txt.bz2 > Date: Thu, 8 Jan 2009 16:54:30 +0400 > From: Joel Brobecker > > > Well, the PRIxxx macros are ISO C99 inventions, so we can't assume > > they're generally available. Guess that could be mitigated by > > importing inttypes module from gnulib. > > It's mentioned in the C90 draft document that I have. Has it been > removed from the final revision? Are you sure you're looking at a C90 draft and not a C99 draft? The draft linked from the Wikipedia page: http://flash-gordon.me.uk/ansi.c.txt doesn't mention or the PRIxPTR define. I'm fairly sure they're not part of C90, since the uintptr_t typedef isn't either. > In any case, it doesn't work on Windows, because their definition > is screwed. How about some of my suggestions? Actually, I think their defenition is ok (but nonstandard). IIRC, %I64x is the way to print the __int64 type that Microsoft invented before long long was standardized by C99. So it seems the problem here is with gcc. I'll reply to your origional mail to discuss your alternative suggestions.