make memcmp return a value of c_int_width instead of i32

This commit is contained in:
David Morrison
2021-11-10 20:14:23 -08:00
parent 8f96ef4bb5
commit aa67016624
7 changed files with 22 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
//! Comparison traits for `[T]`.
use crate::cmp::{self, Ordering};
use crate::ffi;
use crate::mem;
use super::from_raw_parts;
@@ -13,8 +14,7 @@ extern "C" {
///
/// Returns 0 for equal, < 0 for less than and > 0 for greater
/// than.
// FIXME(#32610): Return type should be c_int
fn memcmp(s1: *const u8, s2: *const u8, n: usize) -> i32;
fn memcmp(s1: *const u8, s2: *const u8, n: usize) -> ffi::c_int;
}
#[stable(feature = "rust1", since = "1.0.0")]