View | Details | Raw Unified | Return to bug 241411
Collapse All | Expand All

(-)vendor/openssl-sys/build/main.rs (-15 / +21 lines)
Lines 183-209 Link Here
183
    if let Some(libressl_version) = libressl_version {
183
    if let Some(libressl_version) = libressl_version {
184
        println!("cargo:libressl_version_number={:x}", libressl_version);
184
        println!("cargo:libressl_version_number={:x}", libressl_version);
185
185
186
        let major = (libressl_version >> 28) as u8;
186
        let minor = (libressl_version >> 20) as u8;
187
        let minor = (libressl_version >> 20) as u8;
187
        let fix = (libressl_version >> 12) as u8;
188
        let fix = (libressl_version >> 12) as u8;
188
        let (minor, fix) = match (minor, fix) {
189
        let (major, minor, fix) = match (major, minor, fix) {
189
            (5, 0) => ('5', '0'),
190
            (2, 5, 0) => ('2', '5', '0'),
190
            (5, 1) => ('5', '1'),
191
            (2, 5, 1) => ('2', '5', '1'),
191
            (5, 2) => ('5', '2'),
192
            (2, 5, 2) => ('2', '5', '2'),
192
            (5, _) => ('5', 'x'),
193
            (2, 5, _) => ('2', '5', 'x'),
193
            (6, 0) => ('6', '0'),
194
            (2, 6, 0) => ('2', '6', '0'),
194
            (6, 1) => ('6', '1'),
195
            (2, 6, 1) => ('2', '6', '1'),
195
            (6, 2) => ('6', '2'),
196
            (2, 6, 2) => ('2', '6', '2'),
196
            (6, _) => ('6', 'x'),
197
            (2, 6, _) => ('2', '6', 'x'),
197
            (7, _) => ('7', 'x'),
198
            (2, 7, _) => ('2', '7', 'x'),
198
            (8, 0) => ('8', '0'),
199
            (2, 8, 0) => ('2', '8', '0'),
199
            (8, 1) => ('8', '1'),
200
            (2, 8, 1) => ('2', '8', '1'),
200
            (8, _) => ('8', 'x'),
201
            (2, 8, _) => ('2', '8', 'x'),
201
            (9, 0) => ('9', '0'),
202
            (2, 9, 0) => ('2', '9', '0'),
203
            (2, 9, _) => ('2', '9', 'x'),
204
            (3, 0, 0) => ('3', '0', '0'),
205
            (3, 0, 1) => ('3', '0', '1'),
206
            (3, 0, 2) => ('3', '0', '2'),
207
            (3, 0, _) => ('3', '0', 'x'),
202
            _ => version_error(),
208
            _ => version_error(),
203
        };
209
        };
204
210
205
        println!("cargo:libressl=true");
211
        println!("cargo:libressl=true");
206
        println!("cargo:libressl_version=2{}{}", minor, fix);
212
        println!("cargo:libressl_version={}{}{}", major, minor, fix);
207
        println!("cargo:version=101");
213
        println!("cargo:version=101");
208
        Version::Libressl
214
        Version::Libressl
209
    } else {
215
    } else {

Return to bug 241411