Fix definition of c::long
for 64-bit non-Windows platforms.
This commit is contained in:
parent
f014d94af6
commit
dcba8a845f
10
src/c.rs
10
src/c.rs
@ -81,9 +81,19 @@ macro_rules! define_metrics_tests {
|
||||
|
||||
define_type!(int, i32, test_int_metrics, GFp_int_align, GFp_int_size,
|
||||
"The C `int` type. Equivalent to `libc::c_int`.");
|
||||
|
||||
#[cfg(any(target_os = "windows", target_pointer_width = "32"))]
|
||||
define_type!(long, i32, test_long_metrics, GFp_long_align, GFp_long_size,
|
||||
"The C `long` type. Equivalent to `libc::c_long`.");
|
||||
|
||||
#[cfg(not(any(target_os = "windows", target_pointer_width = "32")))]
|
||||
type long = i64;
|
||||
|
||||
#[cfg(not(any(target_os = "windows", target_pointer_width = "32")))]
|
||||
define_metrics_tests!(long, test_long_metrics, GFp_long_align,
|
||||
GFp_long_size, SIXTY_FOUR_BIT_ALIGNMENT_FACTOR);
|
||||
|
||||
|
||||
define_type!(
|
||||
size_t, usize, test_size_t_metrics, GFp_size_t_align, GFp_size_t_size,
|
||||
"The C `size_t` type from `<stdint.h>`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user