-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add types for newlib on Xtensa. #1748
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
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
pub type clock_t = ::c_ulong; | ||
pub type c_char = i8; | ||
pub type wchar_t = u32; | ||
|
||
pub type c_long = i32; | ||
pub type c_ulong = u32; | ||
|
||
s! { | ||
pub struct cmsghdr { | ||
pub cmsg_len: ::socklen_t, | ||
pub cmsg_level: ::c_int, | ||
pub cmsg_type: ::c_int, | ||
} | ||
|
||
pub struct msghdr { | ||
pub msg_name: *mut ::c_void, | ||
pub msg_namelen: ::socklen_t, | ||
pub msg_iov: *mut ::iovec, | ||
pub msg_iovlen: ::c_int, | ||
pub msg_control: *mut ::c_void, | ||
pub msg_controllen: ::socklen_t, | ||
pub msg_flags: ::c_int, | ||
} | ||
|
||
pub struct sockaddr_un { | ||
pub sun_family: ::sa_family_t, | ||
pub sun_path: [::c_char; 108], | ||
} | ||
|
||
pub struct sockaddr { | ||
pub sa_len: u8, | ||
pub sa_family: ::sa_family_t, | ||
pub sa_data: [::c_char; 14], | ||
} | ||
|
||
pub struct sockaddr_in6 { | ||
pub sin6_len: u8, | ||
pub sin6_family: ::sa_family_t, | ||
pub sin6_port: ::in_port_t, | ||
pub sin6_flowinfo: u32, | ||
pub sin6_addr: ::in6_addr, | ||
pub sin6_scope_id: u32, | ||
} | ||
|
||
pub struct sockaddr_in { | ||
pub sin_len: u8, | ||
pub sin_family: ::sa_family_t, | ||
pub sin_port: ::in_port_t, | ||
pub sin_addr: ::in_addr, | ||
pub sin_zero: [::c_char; 8], | ||
} | ||
|
||
pub struct sockaddr_storage { | ||
pub s2_len: u8, | ||
pub ss_family: ::sa_family_t, | ||
pub s2_data1: [::c_char; 2], | ||
pub s2_data2: [u32; 3], | ||
pub s2_data3: [u32; 3], | ||
} | ||
} | ||
|
||
pub const AF_UNIX: ::c_int = 1; | ||
|
||
pub const FIONBIO: ::c_ulong = 2147772030; | ||
|
||
pub const POLLIN: ::c_short = 1 << 0; | ||
pub const POLLRDNORM: ::c_short = 1 << 1; | ||
pub const POLLRDBAND: ::c_short = 1 << 2; | ||
pub const POLLPRI: ::c_short = POLLRDBAND; | ||
pub const POLLOUT: ::c_short = 1 << 3; | ||
pub const POLLWRNORM: ::c_short = POLLOUT; | ||
pub const POLLWRBAND: ::c_short = 1 << 4; | ||
pub const POLLERR: ::c_short = 1 << 5; | ||
pub const POLLHUP: ::c_short = 1 << 6; | ||
|
||
pub const SOL_SOCKET: ::c_int = 0xfff; | ||
|
||
extern "C" { | ||
pub fn sendmsg( | ||
s: ::c_int, | ||
msg: *const ::msghdr, | ||
flags: ::c_int, | ||
) -> ::ssize_t; | ||
pub fn recvmsg( | ||
s: ::c_int, | ||
msg: *mut ::msghdr, | ||
flags: ::c_int, | ||
) -> ::ssize_t; | ||
|
||
pub fn writev(s: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) | ||
-> ::c_int; | ||
pub fn readv( | ||
fd: ::c_int, | ||
iov: *const ::iovec, | ||
iovcnt: ::c_int, | ||
) -> ::ssize_t; | ||
} |
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.
Uh oh!
There was an error while loading. Please reload this page.