#define SCNi32 "li" 

generic-integer scanf format for int32_t