wip: Support Apple tvOS in libstd
This commit is contained in:
@@ -63,7 +63,13 @@ extern "C" {
|
||||
#[cfg_attr(any(target_os = "solaris", target_os = "illumos"), link_name = "___errno")]
|
||||
#[cfg_attr(target_os = "nto", link_name = "__get_errno_ptr")]
|
||||
#[cfg_attr(
|
||||
any(target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "watchos"),
|
||||
any(
|
||||
target_os = "macos",
|
||||
target_os = "ios",
|
||||
target_os = "tvos",
|
||||
target_os = "freebsd",
|
||||
target_os = "watchos"
|
||||
),
|
||||
link_name = "__error"
|
||||
)]
|
||||
#[cfg_attr(target_os = "haiku", link_name = "_errnop")]
|
||||
@@ -375,7 +381,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
|
||||
Ok(PathBuf::from(OsString::from_vec(e)))
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))]
|
||||
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))]
|
||||
pub fn current_exe() -> io::Result<PathBuf> {
|
||||
unsafe {
|
||||
let mut sz: u32 = 0;
|
||||
@@ -609,6 +615,7 @@ pub fn home_dir() -> Option<PathBuf> {
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
target_os = "ios",
|
||||
target_os = "tvos",
|
||||
target_os = "watchos",
|
||||
target_os = "emscripten",
|
||||
target_os = "redox",
|
||||
@@ -623,6 +630,7 @@ pub fn home_dir() -> Option<PathBuf> {
|
||||
#[cfg(not(any(
|
||||
target_os = "android",
|
||||
target_os = "ios",
|
||||
target_os = "tvos",
|
||||
target_os = "watchos",
|
||||
target_os = "emscripten",
|
||||
target_os = "redox",
|
||||
|
||||
Reference in New Issue
Block a user