Reorganize and simplify the libpreopen code#110
Merged
sunfishcode merged 1 commit intomasterfrom Nov 4, 2019
Merged
Conversation
4e4d6ca to
6a4d18f
Compare
Member
Author
|
I've now simplified this PR, by removing two followup optimizations (which I'll submit separately), to make it easier to review. |
wasi-libc's copy of libpreopen has evolved so many local changes that it's no longer worth keeping the upstream code structure and marking changes with __wasilibc_unmodified_upstream. This PR merges the source files into a single file, removes all __wasilibc_unmodified_upstream code, eliminates the ability to allocate multiple preopen lists, eliminates the need for __wasilibc_init_preopen, eliminates the non-standard eaccess, and makes several other cleanups. It also enables NDEBUG so that internal assertions are disabled in release builds.
sbc100
approved these changes
Nov 4, 2019
Member
sbc100
left a comment
There was a problem hiding this comment.
Maybe worth moving into sources now that its just single C file. Fine with this change as is though.
Member
Author
|
It still is derived from libpreopen code, so it's still useful to keep it in its own directory since it has a different license from the code in |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
wasi-libc's copy of libpreopen has evolved so many local changes that it's no longer worth keeping the upstream code structure and marking changes with
__wasilibc_unmodified_upstream.This PR merges the source files into a single file, removes all
__wasilibc_unmodified_upstreamcode, eliminates the ability to allocate multiple preopen lists, eliminates the need for__wasilibc_init_preopen, eliminates the non-standardeaccess, and makes several other cleanups. It also enablesNDEBUGso that internal assertions are disabled in release builds.