{"action":"created","comment":{"url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/comments/82931580","pull_request_review_id":3803938,"id":82931580,"diff_hunk":"@@ -0,0 +1,111 @@\n+extern crate ctest;\n+\n+use std::env;\n+\n+fn main() {\n+    let mut cfg = ctest::TestGenerator::new();\n+    let target = env::var(\"TARGET\").unwrap();\n+\n+    if let Ok(out) = env::var(\"DEP_OPENSSL_INCLUDE\") {\n+        cfg.include(&out);\n+    }\n+\n+    // Needed to get OpenSSL to correctly undef symbols that are already on\n+    // Windows like X509_NAME\n+    if target.contains(\"windows\") {\n+        cfg.header(\"windows.h\");\n+\n+        // weird \"different 'const' qualifiers\" error on Windows, maybe a cl.exe\n+        // thing?\n+        if target.contains(\"msvc\") {\n+            cfg.flag(\"/wd4090\");\n+        }\n+    }\n+\n+    if env::var(\"DEP_OPENSSL_IS_101\").is_ok() {\n+        cfg.cfg(\"ossl101\", None);\n+    }\n+    if env::var(\"DEP_OPENSSL_IS_102\").is_ok() {\n+        cfg.cfg(\"ossl102\", None);\n+    }\n+    if env::var(\"DEP_OPENSSL_IS_110\").is_ok() {\n+        cfg.cfg(\"ossl110\", None);\n+    }\n+\n+    cfg.header(\"openssl/comp.h\")\n+       .header(\"openssl/dh.h\")\n+       .header(\"openssl/ossl_typ.h\")\n+       .header(\"openssl/stack.h\")\n+       .header(\"openssl/x509.h\")\n+       .header(\"openssl/bio.h\")\n+       .header(\"openssl/x509v3.h\")\n+       .header(\"openssl/safestack.h\")\n+       .header(\"openssl/hmac.h\")\n+       .header(\"openssl/ssl.h\")\n+       .header(\"openssl/err.h\")\n+       .header(\"openssl/rand.h\")\n+       .header(\"openssl/pkcs12.h\")\n+       .header(\"openssl/bn.h\");\n+    cfg.type_name(|s, is_struct| {\n+        // Add some `*` on some callback parameters to get function pointer to\n+        // typecheck in C, especially on MSVC.\n+        if s == \"PasswordCallback\" {\n+            format!(\"pem_password_cb*\")\n+        } else if s == \"bio_info_cb\" {\n+            format!(\"bio_info_cb*\")\n+        } else if s == \"_STACK\" {\n+            format!(\"struct stack_st\")\n+        } else if is_struct && s.chars().next().unwrap().is_lowercase() {\n+            format!(\"struct {}\", s)\n+        } else {\n+            format!(\"{}\", s)\n+        }\n+    });\n+    cfg.skip_type(|s| {\n+        // function pointers are declared without a `*` in openssl so their\n+        // sizeof is 1 which isn't what we want.\n+        s == \"PasswordCallback\" ||\n+            s == \"bio_info_cb\" ||\n+            s.starts_with(\"CRYPTO_EX_\")\n+    });\n+    cfg.skip_struct(|s| {\n+        s == \"ProbeResult\"\n+    });\n+    cfg.skip_fn(move |s| {\n+        s == \"CRYPTO_memcmp\" ||                 // uses volatile\n+            s == \"DH_new_from_params\" ||        // not defined\n+            s == \"X509V3_EXT_conf_nid\" ||       // weird lhash first param\n+            s == \"X509V3_EXT_conf\" ||           // weird lhash first param\n+\n+            // one parameter is `const` in OpenSSL 1.0.1, no need for a new\n+            // definition or a new file here.\n+            (s == \"BIO_new_mem_buf\" && env::var(\"DEP_OPENSSL_IS_101\").is_ok()) ||\n+\n+        // Skip some functions with function pointers on windows, not entirely\n+        // sure how to get them to work out...\n+        (target.contains(\"windows\") && {\n+            s == \"SSL_get_ex_new_index\" ||\n+            s == \"SSL_CTX_get_ex_new_index\" ||\n+            s == \"CRYPTO_get_ex_new_index\"\n+        })\n+    });\n+    cfg.skip_field_type(|s, field| {\n+        (s == \"EVP_PKEY\" && field == \"pkey\") ||      // union\n+            (s == \"GENERAL_NAME\" && field == \"d\")    // union\n+    });\n+    cfg.skip_signededness(|s| {","path":"systest/build.rs","position":96,"original_position":96,"commit_id":"8f07450c682c68be13786527981d5bdc1a92bac6","original_commit_id":"8f07450c682c68be13786527981d5bdc1a92bac6","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"body":"Oh this is either a bug or a feature in ctest depending on how you look at it. It tries to test the signedness of all `type foo = bar` items in Rust, but these types skipped are all function pointers, which have no signedness.","created_at":"2016-10-12T03:38:36Z","updated_at":"2016-10-12T03:38:36Z","html_url":"https://github.com/sfackler/rust-openssl/pull/464#discussion_r82931580","pull_request_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/464","_links":{"self":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/comments/82931580"},"html":{"href":"https://github.com/sfackler/rust-openssl/pull/464#discussion_r82931580"},"pull_request":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/464"}}},"pull_request":{"url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/464","id":88921804,"html_url":"https://github.com/sfackler/rust-openssl/pull/464","diff_url":"https://github.com/sfackler/rust-openssl/pull/464.diff","patch_url":"https://github.com/sfackler/rust-openssl/pull/464.patch","issue_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/464","number":464,"state":"open","locked":false,"title":"Add support for OpenSSL 1.1.0","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"body":"This commit is relatively major refactoring of the `openssl-sys` crate as well\r\nas the `openssl` crate itself. The end goal here was to support OpenSSL 1.1.0,\r\nand lots of other various tweaks happened along the way. The major new features\r\nare:\r\n\r\n* OpenSSL 1.1.0 is supported\r\n* OpenSSL 0.9.8 is no longer supported (aka all OSX users by default)\r\n* All FFI bindings are verified with the `ctest` crate (same way as the `libc`\r\n  crate)\r\n* CI matrixes are vastly expanded to include 32/64 of all platforms, more\r\n  OpenSSL version coverage, as well as ARM coverage on Linux\r\n* The `c_helpers` module is completely removed along with the `gcc` dependency.\r\n* The `openssl-sys` build script was completely rewritten\r\n  * Now uses `OPENSSL_DIR` to find the installation, not include/lib env vars.\r\n  * Better error messages for mismatched versions.\r\n  * Better error messages for failing to find OpenSSL on a platform (more can be\r\n    done here)\r\n  * Probing of OpenSSL build-time configuration to inform the API of the `*-sys`\r\n    crate.\r\n* Many Cargo features have been removed as they're now enabled by default.\r\n\r\nAs this is a breaking change to both the `openssl` and `openssl-sys` crates this\r\nwill necessitate a major version bump of both. There's still a few more API\r\nquestions remaining but let's hash that out on a PR!\r\n\r\nCloses #452","created_at":"2016-10-11T22:19:29Z","updated_at":"2016-10-12T03:38:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b82844331aa61d9e9dca9f0dc7424b04a03c3559","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/464/commits","review_comments_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/464/comments","review_comment_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/464/comments","statuses_url":"https://api.github.com/repos/sfackler/rust-openssl/statuses/8f07450c682c68be13786527981d5bdc1a92bac6","head":{"label":"alexcrichton:systest","ref":"systest","sha":"8f07450c682c68be13786527981d5bdc1a92bac6","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"repo":{"id":24693182,"name":"rust-openssl","full_name":"alexcrichton/rust-openssl","owner":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexcrichton/rust-openssl","description":"OpenSSL bindings for Rust","fork":true,"url":"https://api.github.com/repos/alexcrichton/rust-openssl","forks_url":"https://api.github.com/repos/alexcrichton/rust-openssl/forks","keys_url":"https://api.github.com/repos/alexcrichton/rust-openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexcrichton/rust-openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexcrichton/rust-openssl/teams","hooks_url":"https://api.github.com/repos/alexcrichton/rust-openssl/hooks","issue_events_url":"https://api.github.com/repos/alexcrichton/rust-openssl/issues/events{/number}","events_url":"https://api.github.com/repos/alexcrichton/rust-openssl/events","assignees_url":"https://api.github.com/repos/alexcrichton/rust-openssl/assignees{/user}","branches_url":"https://api.github.com/repos/alexcrichton/rust-openssl/branches{/branch}","tags_url":"https://api.github.com/repos/alexcrichton/rust-openssl/tags","blobs_url":"https://api.github.com/repos/alexcrichton/rust-openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexcrichton/rust-openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexcrichton/rust-openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexcrichton/rust-openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexcrichton/rust-openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/alexcrichton/rust-openssl/languages","stargazers_url":"https://api.github.com/repos/alexcrichton/rust-openssl/stargazers","contributors_url":"https://api.github.com/repos/alexcrichton/rust-openssl/contributors","subscribers_url":"https://api.github.com/repos/alexcrichton/rust-openssl/subscribers","subscription_url":"https://api.github.com/repos/alexcrichton/rust-openssl/subscription","commits_url":"https://api.github.com/repos/alexcrichton/rust-openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexcrichton/rust-openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexcrichton/rust-openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexcrichton/rust-openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexcrichton/rust-openssl/contents/{+path}","compare_url":"https://api.github.com/repos/alexcrichton/rust-openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexcrichton/rust-openssl/merges","archive_url":"https://api.github.com/repos/alexcrichton/rust-openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexcrichton/rust-openssl/downloads","issues_url":"https://api.github.com/repos/alexcrichton/rust-openssl/issues{/number}","pulls_url":"https://api.github.com/repos/alexcrichton/rust-openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/alexcrichton/rust-openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/alexcrichton/rust-openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexcrichton/rust-openssl/labels{/name}","releases_url":"https://api.github.com/repos/alexcrichton/rust-openssl/releases{/id}","deployments_url":"https://api.github.com/repos/alexcrichton/rust-openssl/deployments","created_at":"2014-10-01T19:58:05Z","updated_at":"2015-12-11T14:39:13Z","pushed_at":"2016-10-11T22:27:12Z","git_url":"git://github.com/alexcrichton/rust-openssl.git","ssh_url":"git@github.com:alexcrichton/rust-openssl.git","clone_url":"https://github.com/alexcrichton/rust-openssl.git","svn_url":"https://github.com/alexcrichton/rust-openssl","homepage":"","size":1800,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sfackler:master","ref":"master","sha":"c1e41349fbdf6d4ff942e236500c0d639203968d","user":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"repo":{"id":15500883,"name":"rust-openssl","full_name":"sfackler/rust-openssl","owner":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sfackler/rust-openssl","description":"OpenSSL bindings for Rust","fork":false,"url":"https://api.github.com/repos/sfackler/rust-openssl","forks_url":"https://api.github.com/repos/sfackler/rust-openssl/forks","keys_url":"https://api.github.com/repos/sfackler/rust-openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sfackler/rust-openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sfackler/rust-openssl/teams","hooks_url":"https://api.github.com/repos/sfackler/rust-openssl/hooks","issue_events_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/events{/number}","events_url":"https://api.github.com/repos/sfackler/rust-openssl/events","assignees_url":"https://api.github.com/repos/sfackler/rust-openssl/assignees{/user}","branches_url":"https://api.github.com/repos/sfackler/rust-openssl/branches{/branch}","tags_url":"https://api.github.com/repos/sfackler/rust-openssl/tags","blobs_url":"https://api.github.com/repos/sfackler/rust-openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sfackler/rust-openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sfackler/rust-openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/sfackler/rust-openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sfackler/rust-openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/sfackler/rust-openssl/languages","stargazers_url":"https://api.github.com/repos/sfackler/rust-openssl/stargazers","contributors_url":"https://api.github.com/repos/sfackler/rust-openssl/contributors","subscribers_url":"https://api.github.com/repos/sfackler/rust-openssl/subscribers","subscription_url":"https://api.github.com/repos/sfackler/rust-openssl/subscription","commits_url":"https://api.github.com/repos/sfackler/rust-openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/sfackler/rust-openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/sfackler/rust-openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/sfackler/rust-openssl/contents/{+path}","compare_url":"https://api.github.com/repos/sfackler/rust-openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sfackler/rust-openssl/merges","archive_url":"https://api.github.com/repos/sfackler/rust-openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sfackler/rust-openssl/downloads","issues_url":"https://api.github.com/repos/sfackler/rust-openssl/issues{/number}","pulls_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/sfackler/rust-openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/sfackler/rust-openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sfackler/rust-openssl/labels{/name}","releases_url":"https://api.github.com/repos/sfackler/rust-openssl/releases{/id}","deployments_url":"https://api.github.com/repos/sfackler/rust-openssl/deployments","created_at":"2013-12-28T23:56:50Z","updated_at":"2016-10-07T03:20:59Z","pushed_at":"2016-10-11T22:27:12Z","git_url":"git://github.com/sfackler/rust-openssl.git","ssh_url":"git@github.com:sfackler/rust-openssl.git","clone_url":"https://github.com/sfackler/rust-openssl.git","svn_url":"https://github.com/sfackler/rust-openssl","homepage":"","size":12576,"stargazers_count":216,"watchers_count":216,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":158,"mirror_url":null,"open_issues_count":43,"forks":158,"open_issues":43,"watchers":216,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/464"},"html":{"href":"https://github.com/sfackler/rust-openssl/pull/464"},"issue":{"href":"https://api.github.com/repos/sfackler/rust-openssl/issues/464"},"comments":{"href":"https://api.github.com/repos/sfackler/rust-openssl/issues/464/comments"},"review_comments":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/464/comments"},"review_comment":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/464/commits"},"statuses":{"href":"https://api.github.com/repos/sfackler/rust-openssl/statuses/8f07450c682c68be13786527981d5bdc1a92bac6"}}}}
{"actor":{"display_login":"alexcrichton"}}