Re: [RFC] convert a host address to a string

Mark Kettenis
2009-01-08T13:12:06Z

> Date: Thu, 8 Jan 2009 16:54:30 +0400
> From: Joel Brobecker <brobecker@adacore.com>
>
> > 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 <inttypes.h> 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.