-
Notifications
You must be signed in to change notification settings - Fork 711
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
bindgen fails to correctly convert the ~0ul
constant on i368 architecture
#2965
Comments
This is a workaround for a bindgen, not setting the correct value for unsigned long constants: rust-lang/rust-bindgen#2965 Remove when the above issue is fixed. Signed-off-by: Jakub Jelen <[email protected]>
This is a workaround for a bindgen, not setting the correct value for unsigned long constants: rust-lang/rust-bindgen#2965 Remove when the above issue is fixed. Signed-off-by: Jakub Jelen <[email protected]>
any luck when using the |
Interesting. When using CLI of the bindgen 0.70.1, it looks like I am getting different results than what we get from the crate invocation during build process. This looks ok regardless the use of
So it sounds like this is not caused by the bindgen defaults, but by one of our callbacks, which looks like coming into the way: https://github.com/latchset/kryoptic/blob/9e11dca89e8df270420e5c42aa51e1528c6799b3/build.rs#L23-L27 When I try to change this callback to the internal ULong, I am getting again the wrong value:
So I assume this is not an issue of the default bindgen behavior, but the callbacks. Adding just the following (hopefully correctly):
does not make a difference in the output. |
We have header files with the following definition, which should use the largest unsigned long value:
These are different on 32b and 64b architectures (not our choice of types)
When bindgen processes this inptut, it generates the following line of rust code:
which is obviously wrong as the rust compiler will very soon figure out:
This happens both with 0.69 and 0.70 versions.
The text was updated successfully, but these errors were encountered: