@@ -1,3 +1,4 @@
#define OPENLIBM_USE_HOST_FENV_H 1
#include <openlibm.h>
#undef I
+#undef complex
@@ -728,7 +728,9 @@ pub fn convert_integer(s: *const c_char, base: c_int) -> Option<(c_ulong, isize,
let mut overflowed = false;
loop {
- let val = unsafe { LOOKUP_TABLE[*s.offset(idx) as usize] };
+ // `-1 as usize` is -1
+ // `-1 as u8 as usize` is 255
+ let val = unsafe { LOOKUP_TABLE[*s.offset(idx) as u8 as usize] };
if val == -1 || val as c_int >= base {
break;
} else {
@@ -48,4 +48,5 @@ pub const CLOCK_MONOTONIC: clockid_t = 1;
pub(crate) const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
pub(crate) const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
-pub(crate) const CLOCKS_PER_SEC: time_t = 1_000_000;
+// Can't be time_t because cbindgen UGH
+pub(crate) const CLOCKS_PER_SEC: c_long = 1_000_000;