Switch to specific integer widths

This commit is contained in:
David Tolnay 2022-07-06 22:12:50 -07:00
parent a99695f989
commit 3b26dd0b96
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
4 changed files with 12 additions and 5 deletions

View file

@ -1,5 +1,6 @@
#![warn(clippy::pedantic)]
#![allow(
clippy::cast_lossless,
clippy::cast_possible_truncation,
clippy::cast_possible_wrap,
clippy::cast_sign_loss,

View file

@ -1,6 +1,8 @@
#![warn(clippy::pedantic)]
#![allow(
clippy::cast_lossless,
clippy::cast_possible_truncation,
clippy::cast_possible_wrap,
clippy::cast_sign_loss,
clippy::items_after_statements,
clippy::let_underscore_drop,

View file

@ -28,9 +28,15 @@
use std::mem;
pub mod libc {
pub use std::os::raw::{
c_char, c_int, c_long, c_schar, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};
pub use std::os::raw::c_void;
pub type c_char = i8;
pub type c_int = i32;
pub type c_long = i64;
pub type c_schar = i8;
pub type c_uchar = u8;
pub type c_uint = u32;
pub type c_ulong = u64;
pub type c_ushort = u16;
}
#[macro_use]

View file

@ -1,7 +1,5 @@
use crate::libc;
pub type size_t = libc::c_ulong;
pub type __off_t = libc::c_long;
pub type __off64_t = libc::c_long;
pub type yaml_char_t = libc::c_uchar;
#[derive(Copy, Clone)]
#[repr(C)]