From 35537dfd8559b91102b79a3dfae780be8dc619ca Mon Sep 17 00:00:00 2001 From: Avi Weinstock Date: Thu, 8 Feb 2018 11:08:05 -0500 Subject: [PATCH] Change target_os="linux" to target_os="unix" to enable BSD support, as suggested in issue #49. --- Cargo.toml | 4 ++-- README.md | 2 +- src/lib.rs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 544fa9d..2869dc9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clipboard" -version = "0.4.2" +version = "0.4.3" authors = ["Avi Weinstock "] description = "rust-clipboard is a cross-platform library for getting and setting the contents of the OS-level clipboard." repository = "https://github.com/aweinstock314/rust-clipboard" @@ -15,5 +15,5 @@ objc = "0.2" objc_id = "0.1" objc-foundation = "0.1" -[target.'cfg(target_os = "linux")'.dependencies] +[target.'cfg(target_os = "unix")'.dependencies] x11-clipboard = "0.2" diff --git a/README.md b/README.md index 1be6824..51e38cf 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # rust-clipboard rust-clipboard is a cross-platform library for getting and setting the contents of the OS-level clipboard. -It has been tested on Windows, Mac OSX, and GNU/Linux. +It has been tested on Windows, Mac OSX, GNU/Linux, and FreeBSD. It is used in Mozilla Servo. [![](http://meritbadge.herokuapp.com/clipboard)](https://crates.io/crates/clipboard) diff --git a/src/lib.rs b/src/lib.rs index aa64b30..8ea7b1b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,7 +19,7 @@ limitations under the License. #![crate_type = "dylib"] #![crate_type = "rlib"] -#[cfg(target_os="linux")] +#[cfg(target_os="unix")] extern crate x11_clipboard as x11_clipboard_crate; #[cfg(windows)] @@ -36,7 +36,7 @@ extern crate objc_foundation; mod common; pub use common::ClipboardProvider; -#[cfg(target_os="linux")] +#[cfg(target_os="unix")] pub mod x11_clipboard; #[cfg(windows)] @@ -47,13 +47,13 @@ pub mod osx_clipboard; pub mod nop_clipboard; -#[cfg(target_os="linux")] +#[cfg(target_os="unix")] pub type ClipboardContext = x11_clipboard::X11ClipboardContext; #[cfg(windows)] pub type ClipboardContext = windows_clipboard::WindowsClipboardContext; #[cfg(target_os="macos")] pub type ClipboardContext = osx_clipboard::OSXClipboardContext; -#[cfg(not(any(target_os="linux", windows, target_os="macos")))] +#[cfg(not(any(target_os="unix", windows, target_os="macos")))] pub type ClipboardContext = nop_clipboard::NopClipboardContext; #[test]