>>>> "AK" == Aidan Kehoe
<kehoea(a)parhasard.net> writes:
AK> Ar an 9ú lá de mí 3, scríobh Martin Buchholz :
> In retrospect, it was a mistake (mine) for XEmacs to detect and
use
> inttypes.h. This header file never became part of a standard (instead
> stdint.h did) and implementation of these header files has been
> inconsistent and slow.
AK> All the information I've seen on C99 says that it includes <inttypes.h>;
AK> this includes the final committee draft of the standard (not the standard
AK> itself, admittedly),
http://www.dinkumware.com/htm_cl/inttypes.html , and
AK> various newsgroup postings from people who Should Know. If you have a copy
AK> of the standard itself, fair enough, but if not, do you have any reference
AK> for it not being there?
AK> (Yes, it would be nice if more of the OS implementors cleared this area up.)
I stand semi-corrected. I don't have the actual standard myself
either, but I now believe it refers to both stdint.h and inttypes.h.
In this message:
http://mail.gnu.org/archive/html/autoconf/2001-12/msg00032.html
Paul Eggert (who is very reliable) claims:
----------------------------------------------------------------
So, perhaps we should just include <stdint.h> and forget about
<inttypes.h>?
No, because:
Are there platforms that have <inttypes.h> but not
<stdint.h>?
Yes. Solaris 8, for example.
In my experience, <inttypes.h> is a bit more reliable than <stdint.h>
because it has been around longer. <stdint.h> is a creation of the
C99 committee, whereas <inttypes.h> exists on many pre-C99 platforms.
C99 says that freestanding C99 platforms must have <stdint.h> but may
lack <inttypes.h>, which is the only reason I'd worry about <stdint.h>
at all. I've never used such a platform, but I wouldn't be surprised
to come across one someday.
my guess is that turning off autoconf's use of <inttypes.h>
and
<stdint.h> durign configuration, and then dropping them from our
created include file, would be a good solution -- if we can easily
convince autoconf that's what we want to do.
OK, but I would suppress <inttypes.h> and/or <stdint.h> only if you
detect the header incompatibility. I think this will give you better
results on future platforms. On some platforms, for example, I
wouldn't be surprised if intmax_t is wider than long long.
----------------------------------------------------------------
Martin