Skip to content

GNU/Hurd build fixes#316

Merged
chqrlie merged 3 commits intobellard:masterfrom
pinotree:hurd
Jul 21, 2024
Merged

GNU/Hurd build fixes#316
chqrlie merged 3 commits intobellard:masterfrom
pinotree:hurd

Conversation

@pinotree
Copy link
Copy Markdown
Contributor

@pinotree pinotree commented Jun 9, 2024

This PR fixes the build of quickjs on GNU/Hurd:

  • use malloc_usable_size() when using glibc
  • use ftello() & fseeko() when using glibc (they could be used more, I took a conservative approach)
  • provide a fallback PATH_MAX if not available

See the messages of the various commits for longer explanations.

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
pinotree added 3 commits July 19, 2024 19:34
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.
@chqrlie chqrlie merged commit 012451d into bellard:master Jul 21, 2024
@pinotree pinotree deleted the hurd branch July 21, 2024 08:42
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.

2 participants