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

Fix calls to varargs C function fcntl #494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nrdmn
Copy link

@nrdmn nrdmn commented Jan 5, 2021

The ccall calling convention doesn't support varargs functions, so
switch to capi instead. See
https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/ffi.html#varargs-not-supported-by-ccall-calling-convention

Related PR: haskellari/lukko#23

@kazu-yamamoto kazu-yamamoto self-requested a review January 13, 2021 00:22
Copy link
Collaborator

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.
May I ask you to add a comment like "varargs requires capi instead of ccall"?

@kazu-yamamoto
Copy link
Collaborator

It seems to me that capi breaks doctest:

bytecode compiler can't handle some foreign calling conventions

@eborden
Copy link
Collaborator

eborden commented May 18, 2021

@nrdmn do you have an interest in fixing this PR?

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.

3 participants