Skip to content
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

Switch Fuchsia to readdir (instead of readdir_r) #40024

Merged
merged 3 commits into from
Feb 25, 2017

Conversation

raphlinus
Copy link
Contributor

The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.

Fixes #40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.

The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.

Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.
@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@raphlinus
Copy link
Contributor Author

Note: this PR is dependent on rust-lang/libc#533 being merged. It will almost certainly cause build breakages until then.

Also, as per discussion, I'd be happy for this change to be applied to other targets, in which case this PR is not sufficient. Hopefully, it's still useful, if for no other reason than to show what needs to change.

Tested with recent Fuchsia, and also seems to build correctly on MacOS (the latter is not obvious because of the readdir$INODE64 name mangling - if the underlying libc patch was wrong, I'd expect problems).

@alexcrichton
Copy link
Member

Looks good to me! I guess though we should hold off until rust-lang/libc#533 is merged?

Update the implementation of name_bytes to use the owned string (which
is thread safe). Also bump the src/liblibc submodule now that's merged.
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 22, 2017

📌 Commit 81b9b3c has been approved by alexcrichton

@alexcrichton
Copy link
Member

er,

@bors: r-

Looks like a merge conflict?

@raphlinus
Copy link
Contributor Author

I think I just need to git pull from master, will upload another version as soon as I locally confirm it works.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 22, 2017

📌 Commit b3ee249 has been approved by alexcrichton

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 22, 2017
Switch Fuchsia to readdir (instead of readdir_r)

The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.

Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.
eddyb added a commit to eddyb/rust that referenced this pull request Feb 25, 2017
Switch Fuchsia to readdir (instead of readdir_r)

The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.

Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.
eddyb added a commit to eddyb/rust that referenced this pull request Feb 25, 2017
Switch Fuchsia to readdir (instead of readdir_r)

The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.

Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.
bors added a commit that referenced this pull request Feb 25, 2017
@bors bors merged commit b3ee249 into rust-lang:master Feb 25, 2017
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.

4 participants