Support PNaCl/NaCl.

This commit is contained in:
Richard Diamond 2014-11-09 23:07:59 -06:00
parent f32940294d
commit 019e47020a
2 changed files with 27 additions and 20 deletions

View File

@ -26,11 +26,12 @@ sslv2 = []
git = "https://github.com/alexcrichton/openssl-sys" git = "https://github.com/alexcrichton/openssl-sys"
[target.x86_64-unknown-freebsd.dependencies.openssl-sys] [target.x86_64-unknown-freebsd.dependencies.openssl-sys]
git = "https://github.com/alexcrichton/openssl-sys" git = "https://github.com/alexcrichton/openssl-sys"
[target.le32-unknown-nacl.dependencies.openssl-sys]
git = "https://github.com/alexcrichton/openssl-sys" [target.le32-unknown-nacl.dependencies.libressl-pnacl-sys]
[target.arm-unknown-nacl.dependencies.openssl-sys] git = "https://github.com/DiamondLovesYou/libressl-pnacl-sys.git"
git = "https://github.com/alexcrichton/openssl-sys" [target.arm-unknown-nacl.dependencies.libressl-pnacl-sys]
[target.i686-unknown-nacl.dependencies.openssl-sys] git = "https://github.com/DiamondLovesYou/libressl-pnacl-sys.git"
git = "https://github.com/alexcrichton/openssl-sys" [target.i686-unknown-nacl.dependencies.libressl-pnacl-sys]
[target.x86_64-unknown-nacl.dependencies.openssl-sys] git = "https://github.com/DiamondLovesYou/libressl-pnacl-sys.git"
git = "https://github.com/alexcrichton/openssl-sys" [target.x86_64-unknown-nacl.dependencies.libressl-pnacl-sys]
git = "https://github.com/DiamondLovesYou/libressl-pnacl-sys.git"

View File

@ -176,20 +176,26 @@ pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45;
pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53; pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53;
pub const X509_V_OK: c_int = 0; pub const X509_V_OK: c_int = 0;
#[cfg( any( all(target_os = "macos", feature = "tlsv1_1"),all(target_os = "macos", feature = "tlsv1_2")))] #[cfg(not(target_os = "nacl"))]
#[link(name="ssl.1.0.0")] mod link {
#[link(name="crypto.1.0.0")] #[cfg( any( all(target_os = "macos", feature = "tlsv1_1"),
extern {} all(target_os = "macos", feature = "tlsv1_2")))]
#[link(name="ssl.1.0.0")]
#[link(name="crypto.1.0.0")]
extern {}
#[cfg(any( not( target_os = "macos"), all(target_os = "macos", not(feature = "tlsv1_1"), not(feature = "tlsv1_2"))))] #[cfg(any( not( target_os = "macos"),
#[link(name="ssl")] all(target_os = "macos", not(feature = "tlsv1_1"),
#[link(name="crypto")] not(feature = "tlsv1_2"))))]
extern {} #[link(name="ssl")]
#[link(name="crypto")]
extern {}
#[cfg(target_os = "win32")] #[cfg(target_os = "win32")]
#[link(name="gdi32")] #[link(name="gdi32")]
#[link(name="wsock32")] #[link(name="wsock32")]
extern { } extern { }
}
static mut MUTEXES: *mut Vec<NativeMutex> = 0 as *mut Vec<NativeMutex>; static mut MUTEXES: *mut Vec<NativeMutex> = 0 as *mut Vec<NativeMutex>;