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

Modify the FFI library, apply to loongson platform #421

Open
wants to merge 29 commits into
base: gh-241
Choose a base branch
from
Open

Conversation

212dandan
Copy link

@212dandan 212dandan commented Oct 9, 2017

TooTallNate and others added 22 commits September 18, 2015 23:10
…ument

The bug really lies in `ref`'s CString type (the `set()`
function specifically), but this is a good test case to
ensure the desired behavior through node-ffi.

See #169.
No strlcpy() apparently :\
It's still failing due to #239.
The fix probably won't be backported, so let's just
call v3 a no-go.
It's more low-level than Cocoa, and contains NSException directly.
This isn't a great way to do this.
We need to set up better bechmarks.
Except for on Windows where going native makes it return
0 every time for some reason I can't quite figure out.
Leaving the previous logic works though.

Fixes #273.
Closes #284.
Closes #314.

Squashed commit of the following:

commit d13bbe0
Author: Lee, SungUk <sulee@ea.com>
Date:   Fri Feb 19 14:31:21 2016 +0900

    Add `node_ffi_errno` function and recover old `lib/errno.js` code

    V8 native of the some platform(like Windows) will clear errno,
    `ffi.errno()` always return `0`.

    1. now wrap function is just function pointer
    2. windows system must require to use direct ffi binding.
       If not use ffi foreign function binding, `v8` or `uv` will clear
       `errno` value.

commit d27d9aa
Author: Lee, SungUk <sulee@ea.com>
Date:   Thu Feb 18 22:04:12 2016 +0900

    Move `errno` method implement to C++ side

    `errno` value depend on the platform and libc library.
    For example, `glibc` and `musl` differ `errno.h`

    So, Sometimes `lib/errno.js` implement cannot be use.

    Reference:
    - http://sourceware.org/git/?p=glibc.git;a=blob;f=include/errno.h;h=7df41dfc3#l35
    - http://git.musl-libc.org/cgit/musl/tree/include/errno.h?id=2d0290de#n13
Seems to be working as expected
Causing builds to fail on MacOS Sierra.
Fixes #337.
@212dandan
Copy link
Author

Need nan library and node-gyp library to support,before compilation.
Can you try again,we need to integrate the node-ffi library in out platform.

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.

None yet

7 participants