Use long instead of int everywhere

Signed-off-by: Stefan Marr <git@stefan-marr.de>