You can check that:
UINT64_MAX
macro is defined after including stdint.h
.
If you are not sure if c99 or higher is supported you can also enclose it in a check to __STDC_VERSION__
to be >= 199901L
. Note that also that __STDC_VERSION__
macro is not present in C89/C90.
From the Standard (emphasis mine):
(C99, 7.18p4) "For each type described herein that the implementation provides,224) shall declare that typedef name and define the associated macros. Conversely, for each type described herein that the implementation does not provide, shall not declare that typedef name nor shall it define the associated macros."