From 909b87d2bb3d6330d39c48e43f7f50f4d086cc41 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 12 Apr 2020 13:59:31 -0500 Subject: closes bpo-39953: Generate ifdefs around library code definitions. (GH-19490) --- Modules/_ssl_data.h | 54 +++++++++++++++++++++++++++++++++++++++++++++- Tools/ssl/make_ssl_data.py | 2 ++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/Modules/_ssl_data.h b/Modules/_ssl_data.h index f01c019..e22f827 100644 --- a/Modules/_ssl_data.h +++ b/Modules/_ssl_data.h @@ -1,33 +1,85 @@ /* File generated by Tools/ssl/make_ssl_data.py */ -/* Generated on 2020-04-11T14:59:43.709585 */ +/* Generated on 2020-04-12T13:38:13.871723 */ static struct py_ssl_library_code library_codes[] = { +#ifdef ERR_LIB_ASN1 {"ASN1", ERR_LIB_ASN1}, +#endif +#ifdef ERR_LIB_ASYNC {"ASYNC", ERR_LIB_ASYNC}, +#endif +#ifdef ERR_LIB_BIO {"BIO", ERR_LIB_BIO}, +#endif +#ifdef ERR_LIB_BN {"BN", ERR_LIB_BN}, +#endif +#ifdef ERR_LIB_CMS {"CMS", ERR_LIB_CMS}, +#endif +#ifdef ERR_LIB_COMP {"COMP", ERR_LIB_COMP}, +#endif +#ifdef ERR_LIB_CONF {"CONF", ERR_LIB_CONF}, +#endif +#ifdef ERR_LIB_CRYPTO {"CRYPTO", ERR_LIB_CRYPTO}, +#endif +#ifdef ERR_LIB_CT {"CT", ERR_LIB_CT}, +#endif +#ifdef ERR_LIB_DH {"DH", ERR_LIB_DH}, +#endif +#ifdef ERR_LIB_DSA {"DSA", ERR_LIB_DSA}, +#endif +#ifdef ERR_LIB_EC {"EC", ERR_LIB_EC}, +#endif +#ifdef ERR_LIB_ENGINE {"ENGINE", ERR_LIB_ENGINE}, +#endif +#ifdef ERR_LIB_EVP {"EVP", ERR_LIB_EVP}, +#endif +#ifdef ERR_LIB_KDF {"KDF", ERR_LIB_KDF}, +#endif +#ifdef ERR_LIB_OCSP {"OCSP", ERR_LIB_OCSP}, +#endif +#ifdef ERR_LIB_PEM {"PEM", ERR_LIB_PEM}, +#endif +#ifdef ERR_LIB_PKCS12 {"PKCS12", ERR_LIB_PKCS12}, +#endif +#ifdef ERR_LIB_PKCS7 {"PKCS7", ERR_LIB_PKCS7}, +#endif +#ifdef ERR_LIB_RAND {"RAND", ERR_LIB_RAND}, +#endif +#ifdef ERR_LIB_RSA {"RSA", ERR_LIB_RSA}, +#endif +#ifdef ERR_LIB_SSL {"SSL", ERR_LIB_SSL}, +#endif +#ifdef ERR_LIB_TS {"TS", ERR_LIB_TS}, +#endif +#ifdef ERR_LIB_UI {"UI", ERR_LIB_UI}, +#endif +#ifdef ERR_LIB_X509 {"X509", ERR_LIB_X509}, +#endif +#ifdef ERR_LIB_X509V3 {"X509V3", ERR_LIB_X509V3}, +#endif { NULL } }; diff --git a/Tools/ssl/make_ssl_data.py b/Tools/ssl/make_ssl_data.py index 1c7a5a9..a8562a2 100755 --- a/Tools/ssl/make_ssl_data.py +++ b/Tools/ssl/make_ssl_data.py @@ -76,7 +76,9 @@ if __name__ == "__main__": w("static struct py_ssl_library_code library_codes[] = {") for mnemo, (libcode, _, _) in sorted(error_libraries.items()): + w(f'#ifdef {libcode}') w(' {"%s", %s},' % (mnemo, libcode)) + w('#endif') w(' { NULL }') w('};') w("") -- cgit v0.12