diff options
| author | Jethro Beekman <[email protected]> | 2015-06-22 22:28:07 -0700 |
|---|---|---|
| committer | Jethro Beekman <[email protected]> | 2015-07-01 21:49:27 -0700 |
| commit | 6a725acf4ddb949dbc3b1365ebc340b5066bebad (patch) | |
| tree | 50fc24a3261fa442e2bc480aec280e4261d43d06 | |
| parent | Decouple C SSL Option bit flags from Rust version (diff) | |
| download | rust-openssl-6a725acf4ddb949dbc3b1365ebc340b5066bebad.tar.xz rust-openssl-6a725acf4ddb949dbc3b1365ebc340b5066bebad.zip | |
Remove #ifs for same-value shimmed SSL options. Depend on compiler optimization instead.
| -rw-r--r-- | openssl-sys/build.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index 841c7eec..b4a00566 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -101,9 +101,7 @@ fn generate_options_shim() -> PathBuf { writeln!(shim,"long rust_openssl_ssl_ctx_options_rust_to_c(uint64_t rustval) {{").unwrap(); writeln!(shim," long cval=rustval©_MASK;").unwrap(); for &(name,_) in options { - writeln!(shim,"#if RUST_{0}!={0}",name).unwrap(); writeln!(shim," if (rustval&RUST_{0}) cval|={0};",name).unwrap(); - writeln!(shim,"#endif").unwrap(); } writeln!(shim," return cval;").unwrap(); writeln!(shim,"}}").unwrap(); @@ -111,9 +109,7 @@ fn generate_options_shim() -> PathBuf { writeln!(shim,"uint64_t rust_openssl_ssl_ctx_options_c_to_rust(long cval) {{").unwrap(); writeln!(shim," uint64_t rustval=cval©_MASK;").unwrap(); for &(name,_) in options { - writeln!(shim,"#if RUST_{0}!={0}",name).unwrap(); writeln!(shim," if (cval&{0}) rustval|=RUST_{0};",name).unwrap(); - writeln!(shim,"#endif").unwrap(); } writeln!(shim," return rustval;").unwrap(); writeln!(shim,"}}").unwrap(); |