Re: Delay Routine: Fully-portable C89 if possible

Everett M. Greene wrote:

Does anyone have a public domain copy of stdint.h?

Impossible. The interface provided by <stdint.h> is standardized --- but it's actual content isn't, and can't be.

If portable code could define uint32_t itself, there would be no point for <stdint.h> to exist. This header *has* to be either provided by the compiler writer, or tailored to a particular compiler by an informed programmer.

Any number of people speak of rolling their own, but that seems a
little silly if it's advocated that as many people as possible use

The point is that you should only roll your own if the compiler authors didn't provide on. But if you *are* going to roll your own, it's a good idea to roll your own along the lines of the standard version, rather than inventing yet another set of my_u32 types.

One of the problems this would avoid involves libraries from several independent vendors all used in the same project, who each thought they should roll their own type names for this, instead of following the C99 guidelines. The inevitable result is that two of them chose the *same* names, and now you get to resolve type redefinitions among other people's header files. Great fun --- not!