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

Add support for BYTE and CHAR to VARIANT #451

Merged
merged 3 commits into from
Aug 30, 2015

Conversation

mitkola
Copy link
Contributor

@mitkola mitkola commented Jun 2, 2015

Propose support for BYTE and CHAR type of VARIANT.

Add support for VT_UI1 and BYTE constructor.
Another thing to consider is that UCHAR type which must match to "unsigned char" for VT_UI1, cant be set.
Because bVal is of BYTE class while UCHAR is ancestor of BYTE. Can't assign to bVal UCHAR object instance.
In this case it is not possible to make VARIANT(UCHAR value) constructor.
@twall
Copy link
Contributor

twall commented Jun 2, 2015

Corresponding tests?

These are tests for constructor of variants of CHAR and BYTE
twall added a commit that referenced this pull request Aug 30, 2015
Add support for BYTE and CHAR to VARIANT
@twall twall merged commit c4b033f into java-native-access:master Aug 30, 2015
twall added a commit that referenced this pull request Aug 30, 2015
mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
…e-access#451)

Motivation::

Previously, the native library would fail to load on older macos versions since the target macos version was not specified correctly. Now, the generated dylib correctly targets macos 10.12. This can be verified with `otool -l codec-native-quic/target/native-build/target/lib/libnetty_quiche_osx_x86_64.jnilib | grep LC_VERSION_MIN_MACOSX -A4` (the output will contain a `version 10.12` line).

Modifications:

The `-mmacosx-version-min` option is manually added to `cmakeAsmFlags` since cmake doesn't take `MACOSX_DEPLOYMENT_TARGET` into account for asm compilation. The flag is manually added to `extraCflags` and `extraLdflags` since that is the best way I could find to pass the option to hawtjni.

Result:

This builds and all tests pass on my macbook running macos High Sierra (10.13). I tried running the cross compile profile (though it's not actually cross compiling) and that also build correctly, however I would still suggest testing this on a aarch64 machine.
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