OSX: Multiple libedit/readline fixes#585
Merged
pwpiwi merged 2 commits intoProxmark:masterfrom Mar 21, 2018
Merged
Conversation
Contributor
|
Promising! Looking forward to @Kaicastledine and @digitalentropy tests. |
Closed
Contributor
|
Wouldn't it be better to have |
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.
Extracted from PR #463, this addresses issues when using libedit's compatibility mode for readline, which is used on BSD and OSX. This patch set has been tested with Linux (using GNU readline), OSX 10.13 (using both libedit and GNU readline).
Using libedit over readline avoids needing to swap in readline over the top of system libraries (
brew link --force readline), and removes the need to explicitly install readline (as libedit is included on OSX).If compiler optimisations are disabled in OSX, and the user is using libedit, then a link failure occurs, as the second
if (need_hack)is no longer optimised out.I've got another branch where I've been attempting to get libedit to have the same functionality as GNU readline. It mostly works, but arrow keys don't work correctly after a
PrintAndLogoutput. See: master...micolous:osx-libedit-compatThere have been other changes to libedit recently, and in particular NetBSD PR/51518 may be enable resolving this issue properly.
Reverted per @iceman1001 in Issues with after --head flash #497
Explicitly initialise readline on application start. This avoids a null pointer dereference using libedit (exposed in branchosx-libedit-compat).Adds documentation about what the
need_hackactually does, and what expected behaviour is.Test instructions (OSX):
brew unlink readlinebrew link --force readlineOther platforms:
Build as normal.