From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31059 invoked by alias); 1 Oct 2012 18:01:36 -0000 Received: (qmail 31045 invoked by uid 22791); 1 Oct 2012 18:01:35 -0000 X-SWARE-Spam-Status: No, hits=-8.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Oct 2012 18:01:27 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q91I1MN3007162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Oct 2012 14:01:25 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q91I1KfS006542; Mon, 1 Oct 2012 14:01:20 -0400 Message-ID: <5069DA6F.6070806@redhat.com> Date: Mon, 01 Oct 2012 18:01:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Eli Zaretskii CC: jan.kratochvil@redhat.com, brobecker@adacore.com, gdb@sourceware.org, siddhesh@redhat.com Subject: Re: Old OSes compatibility [Re: 64-bit (>4GB) inferior data types rules; TYPE_LENGTH: unsigned -> ULONGEST] References: <20120928173229.GA10406@host2.jankratochvil.net> <20120930165630.GA30746@adacore.com> <20121001164833.GA20592@host2.jankratochvil.net> <5069D06D.5070101@redhat.com> <83bogmay9z.fsf@gnu.org> In-Reply-To: <83bogmay9z.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00010.txt.bz2 On 10/01/2012 06:38 PM, Eli Zaretskii wrote: >> From: Pedro Alves >> Older mingw versions would be a host I recall whose libc didn't >> use to support %z until a couple years ago. It used to last I looked, but not by default. See below. > > I don't think MinGW can support %z even today, because the CRT DLL > doesn't. See my other message. > >> I believe Eli (like many, due to some technical limitations of gcc >> 4.x) for example stills uses a mingw with a 3.x gcc. > > That's true, but the main issue here is the library, not the compiler. > >> Not sure whether people are combining newer mingw runtime releases >> with the 3.x based compilers. > > MinGW runtime does not replace the format conversion engine, it uses > the MS provided one, AFAIK. It does augment the MS runtime with > several functions of the printf family, but AFAIK they do not include > replacement of the format-conversion code. If you know otherwise, > please tell which MinGW source file includes this replacement. In the old mingw sources copy I have here (2009), I see under mingwex/stdio/ a printf.c file, which provides the __mingw_printf replacement. The format conversion engine is in pformat.c, and it does implement '%z' (look for "case 'z':"). See for how to enable the replacements. E.g., #define _GNU_SOURCE or __USE_MINGW_ANSI_STDIO to 1 should be enough (it defines printf to __mingw_printf). I tried looking for the current sources, but the mingw.org frontpage has a news item mentioning that the sources have moved to git, without giving a pointer to where the repository is... Then, after wasting some minutes trying to find a pointer (and failing; in the end google found it) I found that http://sourceforge.net/projects/mingw/develop points at "git clone git://mingw.git.sourceforge.net/gitroot/mingw/mingw", but cloning that yields an empty repo. WTH? Is the project actively trying to hide itself in some dark internet corner? -- Pedro Alves