-
Notifications
You must be signed in to change notification settings - Fork 1.3k
newlib: fix definition of time_t and off_t
#5132
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -6,14 +6,14 @@ pub type blksize_t = i32; | |
| pub type clockid_t = c_ulong; | ||
|
|
||
| cfg_if! { | ||
| if #[cfg(any(target_os = "espidf"))] { | ||
| if #[cfg(any( | ||
| target_os = "espidf", | ||
| target_os = "vita", | ||
| target_arch = "aarch64" | ||
| ))] { | ||
| pub type dev_t = c_short; | ||
| pub type ino_t = c_ushort; | ||
| pub type off_t = c_long; | ||
| } else if #[cfg(any(target_os = "vita"))] { | ||
| pub type dev_t = c_short; | ||
| pub type ino_t = c_ushort; | ||
| pub type off_t = c_int; | ||
| } else { | ||
| pub type dev_t = u32; | ||
| pub type ino_t = u32; | ||
|
|
@@ -55,12 +55,12 @@ pub type useconds_t = u32; | |
|
|
||
| cfg_if! { | ||
| if #[cfg(any( | ||
| target_os = "horizon", | ||
| all(target_os = "espidf", not(espidf_time32)) | ||
| all(target_os = "espidf", espidf_time32), | ||
| target_os = "vita" | ||
| ))] { | ||
| pub type time_t = c_longlong; | ||
| } else { | ||
| pub type time_t = i32; | ||
| } else { | ||
| pub type time_t = i64; | ||
|
Comment on lines
+62
to
+63
Contributor
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. This one looks wrong for the vita, which uses 32-bit time, as The correct definition would be Sources in the top-level comment.
Contributor
Author
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. Thanks. That's fixed now. |
||
| } | ||
| } | ||
|
|
||
|
|
||
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.
For
vita, this one seems correct, as by looking at the definitions it seems to be defined as a long. There should also be no change in behavior as bothc_intandc_longare aliases toi32in this platform.Sources in the top level review comment.