improve platform compatibility

This commit is contained in:
Ishotihadus
2018-05-27 18:32:41 +09:00
parent cc383eb5de
commit c19aec52a3
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ static inline int getbits(const uint8_t *buf, const int bit, const int len) {
}
static inline uint_fast64_t getbits64(const uint8_t *buf, const int bit, const int len) {
uint_fast64_t mask = len == 64 ? -1 : (1ull << len) - 1;
uint_fast64_t mask = len == 64 ? 0xffffffffffffffff : (1ull << len) - 1;
if (len < 1)
return 0;
else if (bit >= 64)
+1
View File
@@ -1,5 +1,6 @@
require 'mkmf'
append_cppflags('-std=c11')
append_cppflags('-O3')
append_cppflags('-Wall')
append_cppflags('-Wextra')