guile-devel
[Top][All Lists]
Advanced

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

Thoughts about using inttypes.h


From: Rob Browning
Subject: Thoughts about using inttypes.h
Date: Sun, 16 Feb 2003 16:29:25 -0600
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

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?

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4




reply via email to

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