improve platform compatibility
This commit is contained in:
@@ -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) {
|
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)
|
if (len < 1)
|
||||||
return 0;
|
return 0;
|
||||||
else if (bit >= 64)
|
else if (bit >= 64)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
require 'mkmf'
|
require 'mkmf'
|
||||||
|
|
||||||
|
append_cppflags('-std=c11')
|
||||||
append_cppflags('-O3')
|
append_cppflags('-O3')
|
||||||
append_cppflags('-Wall')
|
append_cppflags('-Wall')
|
||||||
append_cppflags('-Wextra')
|
append_cppflags('-Wextra')
|
||||||
|
|||||||
Reference in New Issue
Block a user