GNU/Hurd build fixes#316
Merged
chqrlie merged 3 commits intobellard:masterfrom Jul 21, 2024
pinotree:hurd
Merged
Conversation
TooTallNate
pushed a commit
to TooTallNate/quickjs
that referenced
this pull request
Jul 3, 2024
* Improve string parsing and JSON parsing - fix JSON parsing of non ASCII string contents - more precise string parsing errors - more precise JSON parsing errors - add `JS_ParseState::buf_start` to compute line/column - fix HTML comment detection at start of source code - improve v8 Failure messages (pulled and modified `formatFailureText` from **mjsunit.js**) - ignore more v8 tests
malloc_usable_size() is a GNU extension in GNU libc; hence, use it every time GNU libc is used, rather than only on Linux.
Strictly speaking, they are available in POSIX.1-2008 [1][2], so they could be used on more platforms/OSes. To be cautious, enable them when using GNU libc, since they have been available with that libc for a very long time. [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftell.html [2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html
PATH_MAX is optional in POSIX, and it is not available on GNU/Hurd. While it could be possible to not rely on PATH_MAX, for now provide a fallback definition (which should be safe enough) to get quickjs built on GNU/Hurd.
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.
This PR fixes the build of quickjs on GNU/Hurd:
malloc_usable_size()when using glibcftello()&fseeko()when using glibc (they could be used more, I took a conservative approach)PATH_MAXif not availableSee the messages of the various commits for longer explanations.