Skip to content

Add support for BYTE and CHAR to VARIANT#451

Merged
twall merged 3 commits intojava-native-access:masterfrom
mitkola:patch-1
Aug 30, 2015
Merged

Add support for BYTE and CHAR to VARIANT#451
twall merged 3 commits intojava-native-access:masterfrom
mitkola:patch-1

Conversation

@mitkola
Copy link
Copy Markdown
Contributor

@mitkola mitkola commented Jun 2, 2015

Propose support for BYTE and CHAR type of VARIANT.

mitkola added 2 commits June 2, 2015 10:14
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
Copy Markdown
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