This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Old OSes compatibility [Re: 64-bit (>4GB) inferior data types rules; TYPE_LENGTH: unsigned -> ULONGEST]
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: jan dot kratochvil at redhat dot com, brobecker at adacore dot com, gdb at sourceware dot org, siddhesh at redhat dot com
- Date: Mon, 01 Oct 2012 19:01:19 +0100
- 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>
On 10/01/2012 06:38 PM, Eli Zaretskii wrote:
>> From: Pedro Alves <palves@redhat.com>
>> 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 <http://sourceforge.net/project/shownotes.php?release_id=24832>
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