guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thoughts about using inttypes.h


From: Mikael Djurfeldt
Subject: Re: Thoughts about using inttypes.h
Date: Mon, 17 Feb 2003 13:13:29 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

Rob Browning <address@hidden> writes:

> The new C99 standard requires inttypes.h:
>
>   - New <inttypes.h>, giving typedefs specifying integer types with
>
>       * exactly n bits
>       * at least n bits
>       * the fastest (whatever that means) type having at least n bits
>         where n in [8, 16, 32, 64]. Also defines for each of these
>         types macros expanding to the correct format specifiers for
>         the printf and scanf families, as well as macros expanding to
>         the correct suffixes for constants (e.g., UINT64_C (0x123)
>         might expand to 0x123ULL) and for the maximum and minimum
>         values of these types.
>
> I'm considering the possiblity of using this header, or at least some
> of the provided type names in Guile.  The idea would be to use this
> header on those platforms where whe find it, and to declare the
> relevant typedefs ourselves on platforms where we don't.
>
> The reason I bring this up is that I've come across some places in the
> code where we make assumptions about the sizes of various types (like
> char, int, etc.), and I'd like to fix that, but it would be a lot
> easier to fix without undue #ifdef and configure.in complexity, if we
> had some known size integral types.
>
> Anyone opposed?

I'm not.  It sounds excellent.

Mikael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]