-
Notifications
You must be signed in to change notification settings - Fork 689
Add more cfg aliases #2205
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
Merged
Merged
Add more cfg aliases #2205
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
74477b4
Add more cfg aliases
asomers f213f2d
Use apple_targets in build.rs
asomers b63d467
whitespace
asomers 5a82728
Define a "solarish" target alias.
asomers 22bf682
Describe cfg aliases in CONVENTIONS.md
asomers 4ae74be
solarish in line 803
SteveLauC c8ab005
solarish in line 845
SteveLauC 3a887d3
Merge branch 'master' into cfg-aliases2
SteveLauC 4cc3185
fix fmt
SteveLauC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ cfg_if! { | |
unsafe fn errno_location() -> *mut c_int { | ||
unsafe { libc::__errno_location() } | ||
} | ||
} else if #[cfg(any(target_os = "illumos", target_os = "solaris"))] { | ||
} else if #[cfg(solarish)] { | ||
unsafe fn errno_location() -> *mut c_int { | ||
unsafe { libc::___errno() } | ||
} | ||
|
@@ -501,7 +501,7 @@ fn desc(errno: Errno) -> &'static str { | |
))] | ||
EBADMSG => "Not a data message", | ||
|
||
#[cfg(any(target_os = "illumos", target_os = "solaris"))] | ||
#[cfg(solarish)] | ||
EBADMSG => "Trying to read unreadable message", | ||
|
||
#[cfg(any( | ||
|
@@ -745,7 +745,7 @@ fn desc(errno: Errno) -> &'static str { | |
))] | ||
EOWNERDEAD => "Owner died", | ||
|
||
#[cfg(any(target_os = "illumos", target_os = "solaris"))] | ||
#[cfg(solarish)] | ||
EOWNERDEAD => "Process died with lock", | ||
|
||
#[cfg(any( | ||
|
@@ -756,7 +756,7 @@ fn desc(errno: Errno) -> &'static str { | |
))] | ||
ENOTRECOVERABLE => "State not recoverable", | ||
|
||
#[cfg(any(target_os = "illumos", target_os = "solaris"))] | ||
#[cfg(solarish)] | ||
ENOTRECOVERABLE => "Lock is not recoverable", | ||
|
||
#[cfg(any( | ||
|
@@ -794,25 +794,10 @@ fn desc(errno: Errno) -> &'static str { | |
#[cfg(target_os = "freebsd")] | ||
ECAPMODE => "Not permitted in capability mode", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(bsd)] | ||
ENEEDAUTH => "Need authenticator", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
target_os = "redox", | ||
target_os = "illumos", | ||
target_os = "solaris" | ||
))] | ||
#[cfg(any(bsd, target_os = "redox", solarish))] | ||
EOVERFLOW => "Value too large to be stored in data type", | ||
|
||
#[cfg(any( | ||
|
@@ -825,36 +810,13 @@ fn desc(errno: Errno) -> &'static str { | |
))] | ||
EILSEQ => "Illegal byte sequence", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
target_os = "haiku" | ||
))] | ||
#[cfg(any(bsd, target_os = "haiku"))] | ||
ENOATTR => "Attribute not found", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
target_os = "redox", | ||
target_os = "haiku" | ||
))] | ||
#[cfg(any(bsd, target_os = "redox", target_os = "haiku"))] | ||
EBADMSG => "Bad message", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
target_os = "redox", | ||
target_os = "haiku" | ||
))] | ||
#[cfg(any(bsd, target_os = "redox", target_os = "haiku"))] | ||
EPROTO => "Protocol error", | ||
|
||
#[cfg(any( | ||
|
@@ -873,46 +835,17 @@ fn desc(errno: Errno) -> &'static str { | |
))] | ||
EOWNERDEAD => "Previous owner died", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
target_os = "aix", | ||
target_os = "illumos", | ||
target_os = "solaris", | ||
target_os = "haiku" | ||
))] | ||
#[cfg(any(bsd, target_os = "aix", solarish, target_os = "haiku"))] | ||
ENOTSUP => "Operation not supported", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "aix", | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(any(bsd, target_os = "aix"))] | ||
EPROCLIM => "Too many processes", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "aix", | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
target_os = "redox" | ||
))] | ||
#[cfg(any(bsd, target_os = "aix", target_os = "redox"))] | ||
EUSERS => "Too many users", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
bsd, | ||
target_os = "redox", | ||
target_os = "aix", | ||
target_os = "illumos", | ||
|
@@ -922,11 +855,7 @@ fn desc(errno: Errno) -> &'static str { | |
EDQUOT => "Disc quota exceeded", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
bsd, | ||
target_os = "redox", | ||
target_os = "aix", | ||
target_os = "illumos", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be: |
||
|
@@ -935,89 +864,31 @@ fn desc(errno: Errno) -> &'static str { | |
))] | ||
ESTALE => "Stale NFS file handle", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "aix", | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
target_os = "redox" | ||
))] | ||
#[cfg(any(bsd, target_os = "aix", target_os = "redox"))] | ||
EREMOTE => "Too many levels of remote in path", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(bsd)] | ||
EBADRPC => "RPC struct is bad", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(bsd)] | ||
ERPCMISMATCH => "RPC version wrong", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(bsd)] | ||
EPROGUNAVAIL => "RPC prog. not avail", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(bsd)] | ||
EPROGMISMATCH => "Program version wrong", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(bsd)] | ||
EPROCUNAVAIL => "Bad procedure for program", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(bsd)] | ||
EFTYPE => "Inappropriate file type or format", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
))] | ||
#[cfg(bsd)] | ||
EAUTH => "Authentication error", | ||
|
||
#[cfg(any( | ||
target_os = "freebsd", | ||
target_os = "dragonfly", | ||
apple_targets, | ||
target_os = "aix", | ||
target_os = "openbsd", | ||
target_os = "netbsd", | ||
target_os = "redox" | ||
))] | ||
#[cfg(any(bsd, target_os = "aix", target_os = "redox"))] | ||
ECANCELED => "Operation canceled", | ||
|
||
#[cfg(apple_targets)] | ||
|
@@ -1099,13 +970,13 @@ fn desc(errno: Errno) -> &'static str { | |
#[cfg(target_os = "dragonfly")] | ||
EASYNC => "Async", | ||
|
||
#[cfg(any(target_os = "illumos", target_os = "solaris"))] | ||
#[cfg(solarish)] | ||
EDEADLOCK => "Resource deadlock would occur", | ||
|
||
#[cfg(any(target_os = "illumos", target_os = "solaris"))] | ||
#[cfg(solarish)] | ||
ELOCKUNMAPPED => "Locked lock was unmapped", | ||
|
||
#[cfg(any(target_os = "illumos", target_os = "solaris"))] | ||
#[cfg(solarish)] | ||
ENOTACTIVE => "Facility is not active", | ||
} | ||
} | ||
|
@@ -2688,7 +2559,7 @@ mod consts { | |
} | ||
} | ||
|
||
#[cfg(any(target_os = "illumos", target_os = "solaris"))] | ||
#[cfg(solarish)] | ||
mod consts { | ||
#[derive(Clone, Copy, Debug, Eq, PartialEq)] | ||
#[repr(i32)] | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another place where we can use
solarish