From: Joel Brobecker <brobecker@adacore.com>
To: Kai Tietz <Kai.Tietz@onevision.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
Subject: Re: [RFC] convert a host address to a string
Date: Fri, 09 Jan 2009 09:57:00 -0000 [thread overview]
Message-ID: <20090109095705.GA24105@adacore.com> (raw)
In-Reply-To: <OFBDE5015B.92ADB522-ONC1257538.0059DAD5-C1257538.0059F7F0@onevision.de>
Kai,
> > > Please be aware that %llx isn't valid for x86_64 windows (as it isn't
> for
> > > 32-bit standard). The options 'I' or 'I64' have to be used for
> > > those targets (at least for _WIN64).
> >
> > Are you serious? Wow, that's unbelievable. %llx is defined by ISO
> > C99, and you're saying that even the 64-bit editions of Windows that
> > were introduced several years after the standard was ratified (and
> > almost a decade after the first drafts were circulated) don't
> > implement that bit of the standard?
> >
>
> Sadly, yes. IIRC they implemented it in their newer runtimes, but it
> didn't made it into msvcrt.dll even on 64-bit systems.
I don't doubt that you are right, but I was wondering whether configure
was (apparently incorrectly) defining PRINTF_HAS_LONG_LONG.
| #include <stdio.h>
|
| int
| main (void)
| {
| long long addr = 0xdeadbeeffeedfaceLL;
|
| printf ("addr = 0x%llx.\n", addr);
| return 0;
| }
I compiled the program above on our x86_64 Vista, and it compiled and
worked like a charm. The check in configure is actually of the same
nature.
On 32bit systems:
- XP: PRINTF_HAS_LONG_LONG is not defined.
- Vista: All works fine.
I don't have access to an x86_64 XP install, but I'm going to make
a guess that PRINTF_HAS_LONG_LONG is not defined there.
What I will do is send a patch that implements what Mark suggested.
This should work on all our supported platforms, with the addition
of x86_64 Vista, but to the exclusion of x86_64 XP. I am OK with
the idea of adding a extra #if WIN64_ branch that allows us to build
on x86_64 XP, but you'll have to convince others as well.
--
Joel
next prev parent reply other threads:[~2009-01-09 9:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 12:19 Joel Brobecker
2009-01-07 16:17 ` Mark Kettenis
2009-01-08 10:19 ` Joel Brobecker
2009-01-08 10:25 ` Kai Tietz
2009-01-08 10:48 ` Joel Brobecker
2009-01-08 11:02 ` Kai Tietz
2009-01-08 11:25 ` Joel Brobecker
2009-01-08 11:31 ` Kai Tietz
2009-01-08 12:49 ` Mark Kettenis
2009-01-08 12:54 ` Joel Brobecker
2009-01-08 13:04 ` Kai Tietz
2009-01-08 13:12 ` Mark Kettenis
2009-01-08 13:26 ` Mark Kettenis
2009-01-08 13:35 ` Kai Tietz
2009-01-08 13:42 ` Joel Brobecker
2009-01-08 14:04 ` Kai Tietz
2009-01-08 16:18 ` Mark Kettenis
2009-01-08 16:23 ` Kai Tietz
2009-01-09 9:57 ` Joel Brobecker [this message]
2009-01-09 10:05 ` Kai Tietz
2009-01-09 13:12 ` Joel Brobecker
2009-01-09 14:28 ` Kai Tietz
2009-01-10 7:12 ` Joel Brobecker
2009-01-10 13:31 ` Kai Tietz
2009-01-10 13:34 ` Kai Tietz
2009-01-10 13:58 ` Mark Kettenis
2009-01-10 14:04 ` Mark Kettenis
2009-01-10 14:15 ` Kai Tietz
2009-01-10 14:22 ` Mark Kettenis
2009-01-10 14:25 ` Kai Tietz
2009-01-11 13:31 ` Joel Brobecker
2009-01-11 13:53 ` Mark Kettenis
2009-01-13 12:09 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090109095705.GA24105@adacore.com \
--to=brobecker@adacore.com \
--cc=Kai.Tietz@onevision.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox