diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2021-02-06 22:13:21 +0100 |
---|---|---|
committer | Dr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com> | 2021-02-10 23:20:57 +0100 |
commit | d59068bd145ad6def4cd0cff2ea2acae28543e8a (patch) | |
tree | 96538acd9fc4802e9a5a4a02a9310acefee64113 /include | |
parent | 80ce21fe1a425738eb0151ef9fdb975ba3050273 (diff) |
include/openssl: add a few missing #pragma once directives
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/14096)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/cmp_util.h | 1 | ||||
-rw-r--r-- | include/openssl/configuration.h.in | 1 | ||||
-rw-r--r-- | include/openssl/core.h | 1 | ||||
-rw-r--r-- | include/openssl/core_dispatch.h | 1 | ||||
-rw-r--r-- | include/openssl/core_names.h | 1 | ||||
-rw-r--r-- | include/openssl/core_object.h | 1 | ||||
-rw-r--r-- | include/openssl/crypto.h.in | 1 | ||||
-rw-r--r-- | include/openssl/ess.h.in | 8 | ||||
-rw-r--r-- | include/openssl/fips_names.h | 1 | ||||
-rw-r--r-- | include/openssl/fipskey.h.in | 1 | ||||
-rw-r--r-- | include/openssl/kdferr.h | 6 | ||||
-rw-r--r-- | include/openssl/macros.h | 6 | ||||
-rw-r--r-- | include/openssl/obj_mac.h | 8 | ||||
-rw-r--r-- | include/openssl/opensslconf.h | 5 | ||||
-rw-r--r-- | include/openssl/param_build.h | 17 | ||||
-rw-r--r-- | include/openssl/params.h | 1 | ||||
-rw-r--r-- | include/openssl/provider.h | 1 | ||||
-rw-r--r-- | include/openssl/self_test.h | 1 | ||||
-rw-r--r-- | include/openssl/trace.h | 1 | ||||
-rw-r--r-- | include/openssl/types.h | 7 |
20 files changed, 56 insertions, 14 deletions
diff --git a/include/openssl/cmp_util.h b/include/openssl/cmp_util.h index becbc9208e..5de50d7a9a 100644 --- a/include/openssl/cmp_util.h +++ b/include/openssl/cmp_util.h @@ -11,6 +11,7 @@ #ifndef OPENSSL_CMP_UTIL_H # define OPENSSL_CMP_UTIL_H +# pragma once # include <openssl/opensslconf.h> # ifndef OPENSSL_NO_CMP diff --git a/include/openssl/configuration.h.in b/include/openssl/configuration.h.in index 00a4fc0aa3..c1a5f8c485 100644 --- a/include/openssl/configuration.h.in +++ b/include/openssl/configuration.h.in @@ -11,6 +11,7 @@ #ifndef OPENSSL_CONFIGURATION_H # define OPENSSL_CONFIGURATION_H +# pragma once # ifdef __cplusplus extern "C" { diff --git a/include/openssl/core.h b/include/openssl/core.h index 80ba32d9bf..9a183da4e8 100644 --- a/include/openssl/core.h +++ b/include/openssl/core.h @@ -9,6 +9,7 @@ #ifndef OPENSSL_CORE_H # define OPENSSL_CORE_H +# pragma once # include <stddef.h> # include <openssl/types.h> diff --git a/include/openssl/core_dispatch.h b/include/openssl/core_dispatch.h index a8e9e52151..1689778c72 100644 --- a/include/openssl/core_dispatch.h +++ b/include/openssl/core_dispatch.h @@ -9,6 +9,7 @@ #ifndef OPENSSL_CORE_NUMBERS_H # define OPENSSL_CORE_NUMBERS_H +# pragma once # include <stdarg.h> # include <openssl/core.h> diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h index ff2d1a03f9..a9ab57dbff 100644 --- a/include/openssl/core_names.h +++ b/include/openssl/core_names.h @@ -9,6 +9,7 @@ #ifndef OPENSSL_CORE_NAMES_H # define OPENSSL_CORE_NAMES_H +# pragma once # ifdef __cplusplus extern "C" { diff --git a/include/openssl/core_object.h b/include/openssl/core_object.h index 395279d7bc..6b31a6b421 100644 --- a/include/openssl/core_object.h +++ b/include/openssl/core_object.h @@ -9,6 +9,7 @@ #ifndef OPENSSL_CORE_OBJECT_H # define OPENSSL_CORE_OBJECT_H +# pragma once # ifdef __cplusplus extern "C" { diff --git a/include/openssl/crypto.h.in b/include/openssl/crypto.h.in index 0b9aeefe04..356eaaabf1 100644 --- a/include/openssl/crypto.h.in +++ b/include/openssl/crypto.h.in @@ -14,7 +14,6 @@ use OpenSSL::stackhash qw(generate_stack_macros); -} - #ifndef OPENSSL_CRYPTO_H # define OPENSSL_CRYPTO_H # pragma once diff --git a/include/openssl/ess.h.in b/include/openssl/ess.h.in index 185bdd8f8b..2522912f2f 100644 --- a/include/openssl/ess.h.in +++ b/include/openssl/ess.h.in @@ -15,16 +15,18 @@ use OpenSSL::stackhash qw(generate_stack_macros); #ifndef OPENSSL_ESS_H # define OPENSSL_ESS_H +# pragma once # include <openssl/opensslconf.h> -# ifdef __cplusplus -extern "C" { -# endif # include <openssl/safestack.h> # include <openssl/x509.h> # include <openssl/esserr.h> +# ifdef __cplusplus +extern "C" { +# endif + typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL; typedef struct ESS_cert_id ESS_CERT_ID; diff --git a/include/openssl/fips_names.h b/include/openssl/fips_names.h index b42fe503f9..4bd579cb3a 100644 --- a/include/openssl/fips_names.h +++ b/include/openssl/fips_names.h @@ -9,6 +9,7 @@ #ifndef OPENSSL_FIPS_NAMES_H # define OPENSSL_FIPS_NAMES_H +# pragma once # ifdef __cplusplus extern "C" { diff --git a/include/openssl/fipskey.h.in b/include/openssl/fipskey.h.in index eaa1798772..367fe20471 100644 --- a/include/openssl/fipskey.h.in +++ b/include/openssl/fipskey.h.in @@ -11,6 +11,7 @@ #ifndef OPENSSL_FIPSKEY_H # define OPENSSL_FIPSKEY_H +# pragma once # ifdef __cplusplus extern "C" { diff --git a/include/openssl/kdferr.h b/include/openssl/kdferr.h index d339871f6a..52d8e14a26 100644 --- a/include/openssl/kdferr.h +++ b/include/openssl/kdferr.h @@ -7,4 +7,10 @@ * https://www.openssl.org/source/license.html */ +#ifndef OPENSSL_KDFERR_H +# define OPENSSL_KDFERR_H +# pragma once + #include <openssl/cryptoerr_legacy.h> + +#endif /* !defined(OPENSSL_KDFERR_H) */ diff --git a/include/openssl/macros.h b/include/openssl/macros.h index d22bab91dc..4de30968d2 100644 --- a/include/openssl/macros.h +++ b/include/openssl/macros.h @@ -7,11 +7,13 @@ * https://www.openssl.org/source/license.html */ +#ifndef OPENSSL_MACROS_H +# define OPENSSL_MACROS_H +# pragma once + #include <openssl/opensslconf.h> #include <openssl/opensslv.h> -#ifndef OPENSSL_MACROS_H -# define OPENSSL_MACROS_H /* Helper macros for CPP string composition */ # define OPENSSL_MSTR_HELPER(x) #x diff --git a/include/openssl/obj_mac.h b/include/openssl/obj_mac.h index 9bf4e3b86f..367f72f3c3 100644 --- a/include/openssl/obj_mac.h +++ b/include/openssl/obj_mac.h @@ -9,6 +9,10 @@ * https://www.openssl.org/source/license.html */ +#ifndef OPENSSL_OBJ_MAC_H +# define OPENSSL_OBJ_MAC_H +# pragma once + #define SN_undef "UNDEF" #define LN_undef "undefined" #define NID_undef 0 @@ -5420,6 +5424,8 @@ #define LN_aes_256_siv "aes-256-siv" #define NID_aes_256_siv 1200 +#endif /* OPENSSL_OBJ_MAC_H */ + #ifndef OPENSSL_NO_DEPRECATED_3_0 #define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm SN_magma_ctr_acpkm @@ -5464,4 +5470,4 @@ #define SN_grasshopper_mac SN_kuznyechik_mac #define NID_grasshopper_mac NID_kuznyechik_mac -#endif +#endif /* OPENSSL_NO_DEPRECATED_3_0 */ diff --git a/include/openssl/opensslconf.h b/include/openssl/opensslconf.h index 9a49bceea3..6a2de489b0 100644 --- a/include/openssl/opensslconf.h +++ b/include/openssl/opensslconf.h @@ -9,8 +9,9 @@ #ifndef OPENSSL_OPENSSLCONF_H # define OPENSSL_OPENSSLCONF_H +# pragma once -#include <openssl/configuration.h> -#include <openssl/macros.h> +# include <openssl/configuration.h> +# include <openssl/macros.h> #endif /* OPENSSL_OPENSSLCONF_H */ diff --git a/include/openssl/param_build.h b/include/openssl/param_build.h index 58ad9be732..eec500d340 100644 --- a/include/openssl/param_build.h +++ b/include/openssl/param_build.h @@ -8,8 +8,16 @@ * https://www.openssl.org/source/license.html */ -#include <openssl/params.h> -#include <openssl/types.h> +#ifndef OPENSSL_PARAM_BUILD_H +# define OPENSSL_PARAM_BUILD_H +# pragma once + +# include <openssl/params.h> +# include <openssl/types.h> + +# ifdef __cplusplus +extern "C" { +# endif OSSL_PARAM_BLD *OSSL_PARAM_BLD_new(void); OSSL_PARAM *OSSL_PARAM_BLD_to_param(OSSL_PARAM_BLD *bld); @@ -49,3 +57,8 @@ int OSSL_PARAM_BLD_push_octet_string(OSSL_PARAM_BLD *bld, const char *key, const void *buf, size_t bsize); int OSSL_PARAM_BLD_push_octet_ptr(OSSL_PARAM_BLD *bld, const char *key, void *buf, size_t bsize); + +# ifdef __cplusplus +} +# endif +#endif /* OPENSSL_PARAM_BUILD_H */ diff --git a/include/openssl/params.h b/include/openssl/params.h index 8c14ca227f..ee592189a1 100644 --- a/include/openssl/params.h +++ b/include/openssl/params.h @@ -10,6 +10,7 @@ #ifndef OPENSSL_PARAMS_H # define OPENSSL_PARAMS_H +# pragma once # include <openssl/core.h> # include <openssl/bn.h> diff --git a/include/openssl/provider.h b/include/openssl/provider.h index 80a1b412ed..3f2ce38701 100644 --- a/include/openssl/provider.h +++ b/include/openssl/provider.h @@ -9,6 +9,7 @@ #ifndef OPENSSL_PROVIDER_H # define OPENSSL_PROVIDER_H +# pragma once # include <openssl/core.h> diff --git a/include/openssl/self_test.h b/include/openssl/self_test.h index 17a78052d5..11722c3163 100644 --- a/include/openssl/self_test.h +++ b/include/openssl/self_test.h @@ -9,6 +9,7 @@ #ifndef OPENSSL_SELF_TEST_H # define OPENSSL_SELF_TEST_H +# pragma once # include <openssl/core.h> /* OSSL_CALLBACK */ diff --git a/include/openssl/trace.h b/include/openssl/trace.h index a0894ee2a4..8bdc08b037 100644 --- a/include/openssl/trace.h +++ b/include/openssl/trace.h @@ -9,6 +9,7 @@ #ifndef OPENSSL_TRACE_H # define OPENSSL_TRACE_H +# pragma once # include <stdarg.h> diff --git a/include/openssl/types.h b/include/openssl/types.h index 2dc3606a90..bf5846db05 100644 --- a/include/openssl/types.h +++ b/include/openssl/types.h @@ -9,12 +9,13 @@ #ifndef OPENSSL_TYPES_H # define OPENSSL_TYPES_H +# pragma once -#include <limits.h> +# include <limits.h> -#ifdef __cplusplus +# ifdef __cplusplus extern "C" { -#endif +# endif # include <openssl/e_os2.h> # include <openssl/safestack.h> |