-
Notifications
You must be signed in to change notification settings - Fork 27
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
big-endian support #4
Comments
Is this what you were thinking? // build.rs
extern crate gcc;
fn main() {
let endianness = if cfg!(endian = "little") {
"0"
} else {
"1"
};
gcc::Config::new()
.include("decNumber")
.file("decNumber/decContext.c")
.file("decNumber/decDouble.c")
.file("decNumber/decNumber.c")
.file("decNumber/decPacked.c")
.file("decNumber/decQuad.c")
.file("decNumber/decSingle.c")
.file("decNumber/decimal128.c")
.file("decNumber/decimal32.c")
.file("decNumber/decimal64.c")
.define("DECNUMDIGITS", Some("34"))
.define("DECLITEND", Some(endianness))
.compile("libdecNumber.a");
} |
Is the endian feature something rust exports by default? |
Oh awesome! Thanks for the pointer :-) |
alkis
added a commit
that referenced
this issue
Dec 15, 2015
Add correct endianess support. Fixes #4.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently libdecNumber.a is compiled with little-endian support. build.rs needs to detect big or little endian target architecture and pass DECLITEND=0 (for little) or DECLITEND=1 (for big).
The text was updated successfully, but these errors were encountered: