-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Prefer raw::c_char or libc::c_char and fix arm #29775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,13 @@ | |
|
||
#![stable(feature = "raw_os", since = "1.1.0")] | ||
|
||
#[cfg(any(target_arch = "aarch64", target_os = "android"))] | ||
#[cfg(all(not(target_os = "ios"), not(target_os = "macos"), | ||
any(target_arch = "aarch64", target_arch = "arm", | ||
target_os = "android")))] | ||
#[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = u8; | ||
#[cfg(not(any(target_arch = "aarch64", target_os = "android")))] | ||
#[cfg(any(target_os = "ios", target_os = "macos", | ||
not(any(target_arch = "aarch64", target_arch = "arm", | ||
target_os = "android"))))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hope all this is correct... ugh. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At least going by the current definition of liblibc, the type is unsigned for linux arm, linux aarch64, and android everywhere. Perhaps the ios/macos clause could be turned into a linux-specific clause? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, k, so if I have the logic right... everything is signed, exceptions are: linux aarch64 and arm, and android? The main thing I wasn't sure about were ARM BSDs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I'm not entirely sure about BSDs, but they can always be fixed once we gain support! |
||
#[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = i8; | ||
#[stable(feature = "raw_os", since = "1.1.0")] pub type c_schar = i8; | ||
#[stable(feature = "raw_os", since = "1.1.0")] pub type c_uchar = u8; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably fine to omit the
os::raw::
in these two and just mentionc_char
.