Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(any(feature = "force-inprocess", target_os = "windows", target_os = "android"),
#![cfg_attr(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios"),
feature(mpsc_select))]
#![cfg_attr(all(feature = "unstable", test), feature(specialization))]

Expand All @@ -18,7 +18,7 @@ extern crate bincode;
extern crate libc;
extern crate rand;
extern crate serde;
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android"))]
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios"))]
extern crate uuid;
#[cfg(all(not(feature = "force-inprocess"), any(target_os = "linux",
target_os = "freebsd")))]
Expand Down
4 changes: 2 additions & 2 deletions src/platform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ mod os {
pub use super::macos::*;
}

#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android"))]
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios"))]
mod inprocess;
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android"))]
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios"))]
mod os {
pub use super::inprocess::*;
}
Expand Down
10 changes: 5 additions & 5 deletions src/platform/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use std::time::{Duration, Instant};
use std::thread;

use platform::{OsIpcSender, OsIpcOneShotServer};
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
use libc::{kill, SIGSTOP, SIGCONT};
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
use test::{fork, Wait};

#[test]
Expand Down Expand Up @@ -396,7 +396,7 @@ fn receiver_set() {
}

#[test]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
fn receiver_set_eintr() {
let (server, name) = OsIpcOneShotServer::new().unwrap();
let child_pid = unsafe {
Expand Down Expand Up @@ -644,7 +644,7 @@ fn server_connect_first() {
(data, vec![], vec![]));
}

#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
#[test]
fn cross_process() {
let (server, name) = OsIpcOneShotServer::new().unwrap();
Expand All @@ -662,7 +662,7 @@ fn cross_process() {
(data, vec![], vec![]));
}

#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
#[test]
fn cross_process_sender_transfer() {
let (server, name) = OsIpcOneShotServer::new().unwrap();
Expand Down
10 changes: 5 additions & 5 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// except according to those terms.

use ipc::{self, IpcReceiverSet, IpcSender, IpcSharedMemory};
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
use ipc::IpcReceiver;
use router::ROUTER;
use libc;
Expand All @@ -20,13 +20,13 @@ use std::sync::Arc;
use std::sync::mpsc::{self, Sender};
use std::thread;

#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
use ipc::IpcOneShotServer;

#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
use std::io::Error;

#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
// I'm not actually sure invoking this is indeed unsafe -- but better safe than sorry...
pub unsafe fn fork<F: FnOnce()>(child_func: F) -> libc::pid_t {
match libc::fork() {
Expand Down Expand Up @@ -135,7 +135,7 @@ fn select() {
}
}

#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
#[test]
fn cross_process_embedded_senders() {
let person = ("Patrick Walton".to_owned(), 29);
Expand Down