From 8d19819781318c6ba24240af4b0038b692dd627f Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Sun, 31 Oct 2021 13:01:57 -0700 Subject: [PATCH] Re-add `std::os::raw::c_ssize_t`, with more accurate documentation --- library/std/src/os/raw/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/std/src/os/raw/mod.rs b/library/std/src/os/raw/mod.rs index e25eaf63bcd..01392ffab79 100644 --- a/library/std/src/os/raw/mod.rs +++ b/library/std/src/os/raw/mod.rs @@ -171,3 +171,10 @@ pub type c_size_t = usize; /// platforms where this is not the case. #[unstable(feature = "c_size_t", issue = "88345")] pub type c_ptrdiff_t = isize; + +/// Equivalent to C's `ssize_t` (on POSIX) or `SSIZE_T` (on Windows) type. +/// +/// This type is currently always [`isize`], however in the future there may be +/// platforms where this is not the case. +#[unstable(feature = "c_size_t", issue = "88345")] +pub type c_ssize_t = isize;