-
Notifications
You must be signed in to change notification settings - Fork 7
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 32bit arches #18
Open
Grimler91
wants to merge
8
commits into
aeolwyr:master
Choose a base branch
from
termux:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All entries in token_info array should be c_ulong, based on definition of CK_TOKEN_INFO in opencryptoki's pkcs11types.h.
Otherwise we get an overflow: error: literal out of range for `isize` --> src/pkcs11/object_class.rs:18:21 | 18 | VendorDefined = 0x80000000, | ^^^^^^^^^^ | = note: `#[deny(overflowing_literals)]` on by default = note: the literal `0x80000000` (decimal `2147483648`) does not fit into the type `isize` and will become `-2147483648isize`
Instead use macros to check size of pointers, and thereby determine if we are on 32bit or 64bit platform. On 32bit platforms c_ulong is u32, and otherwise u64. This works well for android, but I suppose there might be other exotic platforms where size of c_ulong and size of pointers do not necessarily follow each other.
Grimler91
added a commit
to termux/termux-packages
that referenced
this pull request
Jun 3, 2022
Tested on aarch64 as well as arm. Upstream PR: aeolwyr/tergent#18
Grimler91
added a commit
to termux/termux-packages
that referenced
this pull request
Jun 3, 2022
Tested on aarch64 as well as arm. Upstream PR: aeolwyr/tergent#18
Hi, thank you very much for your contribution! I have not had time to work on this project in a long while, and unfortunately I still don't, so I will grant permissions and leave it up to you if you still would like to merge this or not. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, this PR adds support for arm and i686.
Issue has been that c_ulong is u32 on arm and i686, and u64 on aarch64 and x86_64. By replacing some u64 types with c_ulong where applicable the issue is solved.
Also update dependencies while we are at it