3 ms·
> stdint.h is nearing 20 years old now, I don't think it counts as a "newfangled thing" anymore. In the world of C, it is. Custom compilers for particular embe
by beefhash 8y ago
> stdint.h is nearing 20 years old now, I don't think it counts as a "newfangled thing" anymore.
In the world of C, it is. Custom compilers for particular embedded systems, such as MCUs, often only speak C89 and nothing else. C99 still hasn't found complete and widespread acceptance.
- kllrnohj 8y agoThe compiler is irrelevant here as stdint.h can come from a variety of sources. There's no reason to not have stdint.h, even on ancient as dirt embedded systems stuck on C89. Even in the worst case of there's no vendor-provided one you can still just define it yourself using a copy from almost anywhere else, there's very little to it.
- beefhash 8y agostdint.h can't be reliably be premade. A compiler is completely free to, say, define sizeof(unsigned int) to anything as long as it can represent at least 65535. stdint.h has to work with the C base types, so it does have to be customized for a particular compiler.