endian support for int and short