diff --git a/src/libpar2.h b/src/libpar2.h index e99711fd..0366ed61 100644 --- a/src/libpar2.h +++ b/src/libpar2.h @@ -70,9 +70,13 @@ typedef signed long long i64; #else // HAVE_CONFIG_H typedef unsigned char u8; +typedef signed char i8; typedef unsigned short u16; +typedef signed short i16; typedef unsigned int u32; +typedef signed int i32; typedef unsigned long long u64; +typedef signed long long i64; #endif #endif diff --git a/src/par2cmdline.cpp b/src/par2cmdline.cpp index 14a59f44..8d5fddca 100644 --- a/src/par2cmdline.cpp +++ b/src/par2cmdline.cpp @@ -56,10 +56,10 @@ int main(int argc, char* argv[]) #endif // check sizeof integers - static_assert(sizeof(u8) == 1 || sizeof(i8) == 1 - || sizeof(u16) == 2 || sizeof(i16) == 1 - || sizeof(u32) == 4 || sizeof(i32) == 1 - || sizeof(u64) == 8 || sizeof(i64) == 1, + static_assert(sizeof(u8) == 1 && sizeof(i8) == 1 + && sizeof(u16) == 2 && sizeof(i16) == 2 + && sizeof(u32) == 4 && sizeof(i32) == 4 + && sizeof(u64) == 8 && sizeof(i64) == 8, "Error: the assumed sizes of integers is wrong!");