"Portable C" doesn't exist.
in C++ you'd just add
static_assert(sizeof(int) < sizeof(int64_t), "fix your types");
"Portable C" doesn't exist.