bsd/os does not have intmax_t;

define long long intmax_t;