[c] Are types like uint32, int32, uint64, int64 defined in any stdlib header?

I often see source code using types like uint32, uint64 and I wonder if they should be defined by the programmer in the application code or if they are defined in a standard lib header.

What's the best way to have these types on my application source code?

This question is related to c libc

The answer is


Those integer types are all defined in stdint.h


If you are using C99 just include stdint.h. BTW, the 64bit types are there iff the processor supports them.


The questioner actually asked about int16 (etc) rather than (ugly) int16_t (etc).

There are no standard headers - nor any in Linux's /usr/include/ folder that define them without the "_t".