Skip to content
Snippets Groups Projects
Commit 3e895791 authored by bors's avatar bors
Browse files

Auto merge of #483 - japaric:sparc64, r=alexcrichton

sparc64-linux support

This needs to be "cleaned" up to use modules instead of a bunch of `cfg`s ...

Sadly, sparc64 constants are very different from other architectures so cleaning this will result in a bunch of duplication, I think.

While working on this, I was wondering why the constants are not written like this:

``` rust
// linux/mod.rs
const COMMON: ::c_int = 3;

cfg_if! {
    if #[cfg(target_arch = "sparc64")] {
        const FOO: ::c_int = 1;
    } else if #[cfg(any(target_arch = "mips64", target_arch = "x86_64"))] {
        const FOO: ::c_int = 2;
    } else {
        // unsupported/unknown architecture
    }
}
```

I think this might result in less duplicated code. @alexcrichton Has something like that ^ been attempted before?
parents 21bf054c 67615b49
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment