(Walter Roberson) writes:
> This practice -often- leads to instances where a particular header
> file gets included, and then later down in the translation unit,
> something includes it again. That's usually a big waste of compilation
> resources... how many times do you need to #define NULL anyhow?
>
> To avoid that waste, the convention was adopted that headers that
> only need to be included once, are configured in such a way that
> after the first time they get included, a symbol gets defined, and
> then the next time they get included, the header looks and sees that
> that symbol is already defined and so knows to skip everything it
> would have defined.
It's not just for compilation performance. (If it were, then I'd
probably omit them in my header files, because they're ugly.)
It's also to avoid compilation errors due to redefinitions:
structures, unions, and enumerations (and some other kinds of
entities?) may not be defined more than once.
--
Bite me! said C.