From a699b8e4ca106a1aade0cc741eca63a61d44b90f Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Thu, 8 Feb 2018 18:47:30 -0500 Subject: [PATCH] Small simplification in mkerr.pl As suggested in https://github.com/openssl/openssl/pull/5275 Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5288) --- crypto/ocsp/ocsp_err.c | 5 +++-- include/internal/dsoerr.h | 5 +---- include/openssl/asn1err.h | 7 ++----- include/openssl/asyncerr.h | 7 ++----- include/openssl/bioerr.h | 7 ++----- include/openssl/bnerr.h | 7 ++----- include/openssl/buffererr.h | 7 ++----- include/openssl/cmserr.h | 5 +---- include/openssl/comperr.h | 5 +---- include/openssl/conferr.h | 7 ++----- include/openssl/cryptoerr.h | 7 ++----- include/openssl/cterr.h | 5 +---- include/openssl/dherr.h | 5 +---- include/openssl/dsaerr.h | 5 +---- include/openssl/ecerr.h | 5 +---- include/openssl/engineerr.h | 5 +---- include/openssl/evperr.h | 5 +---- include/openssl/kdferr.h | 7 ++----- include/openssl/objectserr.h | 7 ++----- include/openssl/ocsperr.h | 5 +---- include/openssl/pemerr.h | 7 ++----- include/openssl/pkcs12err.h | 7 ++----- include/openssl/pkcs7err.h | 7 ++----- include/openssl/randerr.h | 5 +---- include/openssl/rsaerr.h | 7 ++----- include/openssl/sslerr.h | 5 +---- include/openssl/storeerr.h | 7 ++----- include/openssl/tserr.h | 5 +---- include/openssl/uierr.h | 7 ++----- include/openssl/x509err.h | 7 ++----- include/openssl/x509v3err.h | 7 ++----- util/mkerr.pl | 5 +---- 32 files changed, 51 insertions(+), 143 deletions(-) diff --git a/crypto/ocsp/ocsp_err.c b/crypto/ocsp/ocsp_err.c index a97177e958..660e193665 100644 --- a/crypto/ocsp/ocsp_err.c +++ b/crypto/ocsp/ocsp_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -18,7 +18,8 @@ static const ERR_STRING_DATA OCSP_str_functs[] = { {ERR_PACK(ERR_LIB_OCSP, OCSP_F_OCSP_BASIC_ADD1_STATUS, 0), "OCSP_basic_add1_status"}, {ERR_PACK(ERR_LIB_OCSP, OCSP_F_OCSP_BASIC_SIGN, 0), "OCSP_basic_sign"}, - {ERR_PACK(ERR_LIB_OCSP, OCSP_F_OCSP_BASIC_SIGN_CTX, 0), "OCSP_basic_sign_ctx"}, + {ERR_PACK(ERR_LIB_OCSP, OCSP_F_OCSP_BASIC_SIGN_CTX, 0), + "OCSP_basic_sign_ctx"}, {ERR_PACK(ERR_LIB_OCSP, OCSP_F_OCSP_BASIC_VERIFY, 0), "OCSP_basic_verify"}, {ERR_PACK(ERR_LIB_OCSP, OCSP_F_OCSP_CERT_ID_NEW, 0), "OCSP_cert_id_new"}, {ERR_PACK(ERR_LIB_OCSP, OCSP_F_OCSP_CHECK_DELEGATED, 0), diff --git a/include/internal/dsoerr.h b/include/internal/dsoerr.h index 7017990083..a54a18545e 100644 --- a/include/internal/dsoerr.h +++ b/include/internal/dsoerr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_DSO # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_DSO_strings(void); -# ifdef __cplusplus -} -# endif /* * DSO function codes. diff --git a/include/openssl/asn1err.h b/include/openssl/asn1err.h index c02bb0f322..7da927f6bf 100644 --- a/include/openssl/asn1err.h +++ b/include/openssl/asn1err.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_ASN1ERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_ASN1_strings(void); -# ifdef __cplusplus -} -# endif /* * ASN1 function codes. diff --git a/include/openssl/asyncerr.h b/include/openssl/asyncerr.h index a9bb86ead9..5fcddaf27a 100644 --- a/include/openssl/asyncerr.h +++ b/include/openssl/asyncerr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_ASYNCERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_ASYNC_strings(void); -# ifdef __cplusplus -} -# endif /* * ASYNC function codes. diff --git a/include/openssl/bioerr.h b/include/openssl/bioerr.h index 2510230779..b0dee2bc34 100644 --- a/include/openssl/bioerr.h +++ b/include/openssl/bioerr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_BIOERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_BIO_strings(void); -# ifdef __cplusplus -} -# endif /* * BIO function codes. diff --git a/include/openssl/bnerr.h b/include/openssl/bnerr.h index b63af9df42..c9a21c77a6 100644 --- a/include/openssl/bnerr.h +++ b/include/openssl/bnerr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_BNERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_BN_strings(void); -# ifdef __cplusplus -} -# endif /* * BN function codes. diff --git a/include/openssl/buffererr.h b/include/openssl/buffererr.h index 9007586d60..3aee132323 100644 --- a/include/openssl/buffererr.h +++ b/include/openssl/buffererr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_BUFERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_BUF_strings(void); -# ifdef __cplusplus -} -# endif /* * BUF function codes. diff --git a/include/openssl/cmserr.h b/include/openssl/cmserr.h index 7cb224290f..7b9daedb0f 100644 --- a/include/openssl/cmserr.h +++ b/include/openssl/cmserr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_CMS # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_CMS_strings(void); -# ifdef __cplusplus -} -# endif /* * CMS function codes. diff --git a/include/openssl/comperr.h b/include/openssl/comperr.h index 96a4ce62f5..5a1c8df97b 100644 --- a/include/openssl/comperr.h +++ b/include/openssl/comperr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_COMP # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_COMP_strings(void); -# ifdef __cplusplus -} -# endif /* * COMP function codes. diff --git a/include/openssl/conferr.h b/include/openssl/conferr.h index 4348e62871..d623cea6d5 100644 --- a/include/openssl/conferr.h +++ b/include/openssl/conferr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_CONFERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_CONF_strings(void); -# ifdef __cplusplus -} -# endif /* * CONF function codes. diff --git a/include/openssl/cryptoerr.h b/include/openssl/cryptoerr.h index 98fc2789a4..12684eac55 100644 --- a/include/openssl/cryptoerr.h +++ b/include/openssl/cryptoerr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_CRYPTOERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_CRYPTO_strings(void); -# ifdef __cplusplus -} -# endif /* * CRYPTO function codes. diff --git a/include/openssl/cterr.h b/include/openssl/cterr.h index 7f0a7d8b98..764e1a2204 100644 --- a/include/openssl/cterr.h +++ b/include/openssl/cterr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_CT # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_CT_strings(void); -# ifdef __cplusplus -} -# endif /* * CT function codes. diff --git a/include/openssl/dherr.h b/include/openssl/dherr.h index f225cc392b..0a071b6f3a 100644 --- a/include/openssl/dherr.h +++ b/include/openssl/dherr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_DH # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_DH_strings(void); -# ifdef __cplusplus -} -# endif /* * DH function codes. diff --git a/include/openssl/dsaerr.h b/include/openssl/dsaerr.h index d54642fdf6..a5248ab700 100644 --- a/include/openssl/dsaerr.h +++ b/include/openssl/dsaerr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_DSA # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_DSA_strings(void); -# ifdef __cplusplus -} -# endif /* * DSA function codes. diff --git a/include/openssl/ecerr.h b/include/openssl/ecerr.h index 6dc16c017f..289cd8c5ae 100644 --- a/include/openssl/ecerr.h +++ b/include/openssl/ecerr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_EC # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_EC_strings(void); -# ifdef __cplusplus -} -# endif /* * EC function codes. diff --git a/include/openssl/engineerr.h b/include/openssl/engineerr.h index f6025f62f3..64efc2fd04 100644 --- a/include/openssl/engineerr.h +++ b/include/openssl/engineerr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_ENGINE # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_ENGINE_strings(void); -# ifdef __cplusplus -} -# endif /* * ENGINE function codes. diff --git a/include/openssl/evperr.h b/include/openssl/evperr.h index ff46657ef0..45e9fcfffb 100644 --- a/include/openssl/evperr.h +++ b/include/openssl/evperr.h @@ -12,12 +12,9 @@ # define HEADER_EVPERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_EVP_strings(void); -# ifdef __cplusplus -} -# endif /* * EVP function codes. diff --git a/include/openssl/kdferr.h b/include/openssl/kdferr.h index 8f045f06ce..ea30fb9c9f 100644 --- a/include/openssl/kdferr.h +++ b/include/openssl/kdferr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_KDFERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_KDF_strings(void); -# ifdef __cplusplus -} -# endif /* * KDF function codes. diff --git a/include/openssl/objectserr.h b/include/openssl/objectserr.h index a6051c838d..4f3156e94a 100644 --- a/include/openssl/objectserr.h +++ b/include/openssl/objectserr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_OBJERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_OBJ_strings(void); -# ifdef __cplusplus -} -# endif /* * OBJ function codes. diff --git a/include/openssl/ocsperr.h b/include/openssl/ocsperr.h index f78f232bcd..7d93b12d49 100644 --- a/include/openssl/ocsperr.h +++ b/include/openssl/ocsperr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_OCSP # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_OCSP_strings(void); -# ifdef __cplusplus -} -# endif /* * OCSP function codes. diff --git a/include/openssl/pemerr.h b/include/openssl/pemerr.h index 12eb5cb34f..d0b8a9c3cc 100644 --- a/include/openssl/pemerr.h +++ b/include/openssl/pemerr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_PEMERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_PEM_strings(void); -# ifdef __cplusplus -} -# endif /* * PEM function codes. diff --git a/include/openssl/pkcs12err.h b/include/openssl/pkcs12err.h index 6bbd232dcc..ba8204385a 100644 --- a/include/openssl/pkcs12err.h +++ b/include/openssl/pkcs12err.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_PKCS12ERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_PKCS12_strings(void); -# ifdef __cplusplus -} -# endif /* * PKCS12 function codes. diff --git a/include/openssl/pkcs7err.h b/include/openssl/pkcs7err.h index 5e5f708e74..0ba418d780 100644 --- a/include/openssl/pkcs7err.h +++ b/include/openssl/pkcs7err.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_PKCS7ERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_PKCS7_strings(void); -# ifdef __cplusplus -} -# endif /* * PKCS7 function codes. diff --git a/include/openssl/randerr.h b/include/openssl/randerr.h index 50c1a38fd4..ae5a2ea992 100644 --- a/include/openssl/randerr.h +++ b/include/openssl/randerr.h @@ -12,12 +12,9 @@ # define HEADER_RANDERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_RAND_strings(void); -# ifdef __cplusplus -} -# endif /* * RAND function codes. diff --git a/include/openssl/rsaerr.h b/include/openssl/rsaerr.h index 94bfd93fc7..c1b826ae73 100644 --- a/include/openssl/rsaerr.h +++ b/include/openssl/rsaerr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_RSAERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_RSA_strings(void); -# ifdef __cplusplus -} -# endif /* * RSA function codes. diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h index a84a62d30f..1a02268846 100644 --- a/include/openssl/sslerr.h +++ b/include/openssl/sslerr.h @@ -12,12 +12,9 @@ # define HEADER_SSLERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_SSL_strings(void); -# ifdef __cplusplus -} -# endif /* * SSL function codes. diff --git a/include/openssl/storeerr.h b/include/openssl/storeerr.h index cffe8dea18..5476d007bd 100644 --- a/include/openssl/storeerr.h +++ b/include/openssl/storeerr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_OSSL_STOREERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_OSSL_STORE_strings(void); -# ifdef __cplusplus -} -# endif /* * OSSL_STORE function codes. diff --git a/include/openssl/tserr.h b/include/openssl/tserr.h index 01ebfef7d4..3e04925657 100644 --- a/include/openssl/tserr.h +++ b/include/openssl/tserr.h @@ -16,12 +16,9 @@ # ifndef OPENSSL_NO_TS # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_TS_strings(void); -# ifdef __cplusplus -} -# endif /* * TS function codes. diff --git a/include/openssl/uierr.h b/include/openssl/uierr.h index f7c77f2ed1..3e4b297906 100644 --- a/include/openssl/uierr.h +++ b/include/openssl/uierr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_UIERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_UI_strings(void); -# ifdef __cplusplus -} -# endif /* * UI function codes. diff --git a/include/openssl/x509err.h b/include/openssl/x509err.h index 4b57c3df88..08692a5bc9 100644 --- a/include/openssl/x509err.h +++ b/include/openssl/x509err.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_X509ERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_X509_strings(void); -# ifdef __cplusplus -} -# endif /* * X509 function codes. diff --git a/include/openssl/x509v3err.h b/include/openssl/x509v3err.h index 5349d9dd6f..e8308efc2f 100644 --- a/include/openssl/x509v3err.h +++ b/include/openssl/x509v3err.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,12 +12,9 @@ # define HEADER_X509V3ERR_H # ifdef __cplusplus -extern "C" { +extern "C" # endif int ERR_load_X509V3_strings(void); -# ifdef __cplusplus -} -# endif /* * X509V3 function codes. diff --git a/util/mkerr.pl b/util/mkerr.pl index 1740e40427..0ea02961a5 100755 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -471,12 +471,9 @@ EOF } print OUT <<"EOF"; #${indent}ifdef __cplusplus -extern \"C\" { +extern \"C\" #${indent}endif int ERR_load_${lib}_strings(void); -#${indent}ifdef __cplusplus -} -#${indent}endif EOF } else { print OUT <<"EOF"; -- 2.25.1