format string cast ptrdiff on 32bit arch (#747262)

Cast ptrdiff (diff between two pointers) to long to fix printfs.
This fixes FTBFS on 32bit architectures.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>