touint must return unsigned ints