C99 types in Xmd.h?

Joerg Sonnenberger joerg at britannica.bec.de
Wed Feb 6 08:32:17 PST 2008


On Tue, Feb 05, 2008 at 06:37:49PM -0800, Jesse Barnes wrote:
> On Tuesday, February 05, 2008 6:21 pm Joerg Sonnenberger wrote:
> > On Tue, Feb 05, 2008 at 05:18:59PM -0800, Jesse Barnes wrote:
> > > Anyone object to using C99 types (uint32_t etc.) in Xmd.h?  It would make
> > > portably printing bitfields and such a bit easier...  Alternately we
> > > could just kill CARD32 and many of the other types in there completely.
> >
> > Please keep CARD and friends, but use the C99 types to specify them.
> 
> For backward compat I assume?

There are two ways to approach this:
- define uintXX_t if necessary and just use them
- define CARDxx to uintXX_t or an integer type of the same size if they
don't exist.

The former approach is simpler, but makes it harder to recorrectly use
the headers as other parts might want to define the types as well.

Joerg



More information about the xorg mailing list