Mailing List Archive

Developers: How to get around system's typedef's?
Re: Developers: How to get around system's typedef's? [ In reply to ]
Steffen Beyer writes:

> On some systems, there are header-files which predefine certain types
> with "typedef", for instance "uint", "u_int" and "unint" (with analogues
> for other scalar types) for the "unsigned" version of that type.
>
> Is there another way around this problem (which leads to compiler warnings
> or even fatal compiler errors on some systems) than choosing names as
> unusual as possible (maybe "grglblrgh" would be best! ;-) )?

You may try to bracket system includes with
#define uint uint_go_to_hell
#undef uint

or

#define uint uint_realy_really_real

after system includes.

Looks stupid, though.

Ilya