-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add powerpc64 and powerpc64le support #133
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
//! PowerPC64-specific definitions for 64-bit linux-like values | ||
|
||
pub type c_char = u8; | ||
pub type wchar_t = u32; | ||
pub type nlink_t = u64; | ||
pub type blksize_t = i64; | ||
|
||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; | ||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; | ||
|
||
pub const O_DIRECTORY: ::c_int = 0x4000; | ||
pub const O_NOFOLLOW: ::c_int = 0x8000; | ||
pub const O_DIRECT: ::c_int = 0x20000; | ||
|
||
pub const MAP_LOCKED: ::c_int = 0x00080; | ||
pub const MAP_NORESERVE: ::c_int = 0x00040; | ||
|
||
pub const EDEADLOCK: ::c_int = 58; | ||
|
||
pub const SO_PEERCRED: ::c_int = 21; | ||
pub const SO_RCVLOWAT: ::c_int = 16; | ||
pub const SO_SNDLOWAT: ::c_int = 17; | ||
pub const SO_RCVTIMEO: ::c_int = 18; | ||
pub const SO_SNDTIMEO: ::c_int = 19; | ||
|
||
pub const FIOCLEX: ::c_ulong = 0x20006601; | ||
pub const FIONBIO: ::c_ulong = 0x8004667e; | ||
|
||
s! { | ||
pub struct stat { | ||
pub st_dev: ::dev_t, | ||
pub st_ino: ::ino_t, | ||
pub st_nlink: ::nlink_t, | ||
pub st_mode: ::mode_t, | ||
pub st_uid: ::uid_t, | ||
pub st_gid: ::gid_t, | ||
__pad0: ::c_int, | ||
pub st_rdev: ::dev_t, | ||
pub st_size: ::off_t, | ||
pub st_blksize: ::blksize_t, | ||
pub st_blocks: ::blkcnt_t, | ||
pub st_atime: ::time_t, | ||
pub st_atime_nsec: ::c_long, | ||
pub st_mtime: ::time_t, | ||
pub st_mtime_nsec: ::c_long, | ||
pub st_ctime: ::time_t, | ||
pub st_ctime_nsec: ::c_long, | ||
__unused: [::c_long; 3], | ||
} | ||
|
||
pub struct stat64 { | ||
pub st_dev: ::dev_t, | ||
pub st_ino: ::ino64_t, | ||
pub st_nlink: ::nlink_t, | ||
pub st_mode: ::mode_t, | ||
pub st_uid: ::uid_t, | ||
pub st_gid: ::gid_t, | ||
__pad0: ::c_int, | ||
pub st_rdev: ::dev_t, | ||
pub st_size: ::off64_t, | ||
pub st_blksize: ::blksize_t, | ||
pub st_blocks: ::blkcnt64_t, | ||
pub st_atime: ::time_t, | ||
pub st_atime_nsec: ::c_long, | ||
pub st_mtime: ::time_t, | ||
pub st_mtime_nsec: ::c_long, | ||
pub st_ctime: ::time_t, | ||
pub st_ctime_nsec: ::c_long, | ||
__reserved: [::c_long; 3], | ||
} | ||
|
||
pub struct pthread_attr_t { | ||
__size: [u64; 7] | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could you change this to
target_pointer_width
? Looks like that may be what's in play hereThere 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.
Sounds good, will do.
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.
This hit an aarch64 fail, looks like it requires 8 byte alignment: https://travis-ci.org/rust-lang-nursery/libc/jobs/101784088
I'll back that change out
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.
lol of course, oh well