2 fixes for x86_64 and ARM platforms

- using stdint.h, because of int and long types are arch specific
- using signed char explicitly instead of char because of C standard does not define char type signedness (see ISO 9899:1999, section "6.2.5 Types"). More over ARM gcc uses unsigned char by default