NetBSD's strtoi and strtoimax seem like the better alternative to strtonum.
1. It is defined for intmax_t instead of long long.
2. It supports various bases. (At least I regularly need hex or base36)
3. It can deal with trailing characters.
4. There are matching strtou and strtoumax operations
It's of course bad if NetBSD introduces an strtonum, which behaves differently from the OpenBSD one. But maybe the OpenBSD folks should look into strtoi and strtoimax instead of blindly following their "invented here" principle...