Use uintmax_t instead of long long for bitmasks.