Skip to content

Correct solaris libc definitions: #516

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 2 commits into from
Feb 10, 2017
Merged

Conversation

binarycrusader
Copy link
Contributor

  • pthread_t is defined as uint_t, so must be c_uint, not uintptr_t, just
    as pthread_key_t is already defined
  • fd_set is defined as long, so must be i32/i64 based on
    target_pointer_width; this also fixes an indirect endianness issue
    encountered on sparc
  • FD_SETSIZE should be defined as 65536 when target_pointer_width = 64

Fixes #515

* pthread_t is defined as uint_t, so must be c_uint, not uintptr_t, just
  as pthread_key_t is already defined
* fd_set is defined as long, so must be i32/i64 based on
  target_pointer_width; this also fixes an indirect endianness issue
  encountered on sparc
* FD_SETSIZE should be defined as 65536 when target_pointer_width = 64

Fixes rust-lang#515
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Feb 8, 2017

📌 Commit 8304e06 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Feb 8, 2017

⌛ Testing commit 8304e06 with merge 1970db7...

bors added a commit that referenced this pull request Feb 8, 2017
Correct solaris libc definitions:

* pthread_t is defined as uint_t, so must be c_uint, not uintptr_t, just
  as pthread_key_t is already defined
* fd_set is defined as long, so must be i32/i64 based on
  target_pointer_width; this also fixes an indirect endianness issue
  encountered on sparc
* FD_SETSIZE should be defined as 65536 when target_pointer_width = 64

Fixes #515
@bors
Copy link
Contributor

bors commented Feb 8, 2017

💔 Test failed - status-travis

@binarycrusader
Copy link
Contributor Author

I don't understand the test failures; I ran python x.py test src/tools/tidy from the top-level rust.git clone and it doesn't show libc in the output or any new messages that I can see.

@alexcrichton
Copy link
Member

Oh the tidy script in this repo is different, it's ci/style.rs instead of ./x.py (which doesn't exist in this repo)

@binarycrusader
Copy link
Contributor Author

This is a trap for new contributors; any chance of either updating the contributing document so that it points out that submodules have different contribution guidelines?

Also, it seems unfortunate that the same rules for the main rust repo don't apply to submodules; a unified contribution process would simplify things for new contributors.

I will try style.rs and see what's wrong, thanks.

@alexcrichton
Copy link
Member

@bors: r+

Oh right yeah the contributing document is intended for rust-lang/rust and basically just got copied over here unfotunately :(

@bors
Copy link
Contributor

bors commented Feb 10, 2017

📌 Commit 86b0cab has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Feb 10, 2017

⌛ Testing commit 86b0cab with merge 0056dbe...

bors added a commit that referenced this pull request Feb 10, 2017
Correct solaris libc definitions:

* pthread_t is defined as uint_t, so must be c_uint, not uintptr_t, just
  as pthread_key_t is already defined
* fd_set is defined as long, so must be i32/i64 based on
  target_pointer_width; this also fixes an indirect endianness issue
  encountered on sparc
* FD_SETSIZE should be defined as 65536 when target_pointer_width = 64

Fixes #515
@bors
Copy link
Contributor

bors commented Feb 10, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 0056dbe to master...

@bors bors merged commit 86b0cab into rust-lang:master Feb 10, 2017
binarycrusader added a commit to binarycrusader/libc that referenced this pull request Feb 10, 2017
Auto merge of rust-lang#516 - binarycrusader:master, r=alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

some libc solaris definitions are not correct
4 participants