fix type mess by using stdint.h types

there was a plethora of uint, uchar, ushort etc macros used,
which caused build issues in a number of cases, for example when
compiling against musl libc.
this ifneq was not properly aligned with the endif on line 60 (now 63), so i fixed it
(note how the next ifneq statement is on the same indent level, but there's no endif)