From f5453462117e3deb4b077756e2d24edb2ff3b1af Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 17 Oct 2019 18:15:13 +0200 Subject: [PATCH] Move the version function declarations to include/openssl/crypto.h include/openssl/crypto.h is where older similar functions already live, and since opensslv.h became a template, it's no longer useful for parsing by util/mknum.pl. Affected declarations: unsigned int OPENSSL_version_major(void); unsigned int OPENSSL_version_minor(void); unsigned int OPENSSL_version_patch(void); const char *OPENSSL_version_pre_release(void); const char *OPENSSL_version_build_metadata(void); Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10205) --- doc/man3/OpenSSL_version.pod | 4 ++-- include/openssl/crypto.h | 11 +++++++++++ include/openssl/opensslv.h.in | 11 ----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/man3/OpenSSL_version.pod b/doc/man3/OpenSSL_version.pod index 18eaf4a9e9..7e9c36eb76 100644 --- a/doc/man3/OpenSSL_version.pod +++ b/doc/man3/OpenSSL_version.pod @@ -27,14 +27,14 @@ OPENSSL_VERSION_NUMBER, OpenSSL_version_num, OPENSSL_info #define OPENSSL_VERSION_TEXT "OpenSSL x.y.z xx XXX xxxx" + #include + unsigned int OPENSSL_version_major(void); unsigned int OPENSSL_version_minor(void); unsigned int OPENSSL_version_patch(void); const char *OPENSSL_version_pre_release(void); const char *OPENSSL_version_build_metadata(void); - #include - const char *OpenSSL_version(int t); const char *OPENSSL_info(int t); diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index 9fb2fa3925..7a74f3d4eb 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -164,6 +164,17 @@ int OPENSSL_hexchar2int(unsigned char c); # define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U<<(sizeof(int)*8-1))-1)/sizeof(type)) +/* + * These functions return the values of OPENSSL_VERSION_MAJOR, + * OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE + * and OPENSSL_VERSION_BUILD_METADATA, respectively. + */ +unsigned int OPENSSL_version_major(void); +unsigned int OPENSSL_version_minor(void); +unsigned int OPENSSL_version_patch(void); +const char *OPENSSL_version_pre_release(void); +const char *OPENSSL_version_build_metadata(void); + unsigned long OpenSSL_version_num(void); const char *OpenSSL_version(int type); # define OPENSSL_VERSION 0 diff --git a/include/openssl/opensslv.h.in b/include/openssl/opensslv.h.in index 856e8640b8..69ba8c657a 100644 --- a/include/openssl/opensslv.h.in +++ b/include/openssl/opensslv.h.in @@ -102,17 +102,6 @@ _____ # define OPENSSL_VERSION_PREREQ(maj,min) \ ((OPENSSL_VERSION_MAJOR << 16) + OPENSSL_VERSION_MINOR >= ((maj) << 16) + (min)) -/* - * These return the values of OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR, - * OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE and - * OPENSSL_VERSION_BUILD_METADATA, respectively. - */ -unsigned int OPENSSL_version_major(void); -unsigned int OPENSSL_version_minor(void); -unsigned int OPENSSL_version_patch(void); -const char *OPENSSL_version_pre_release(void); -const char *OPENSSL_version_build_metadata(void); - /* * Macros to get the version in easily digested string form, both the short * "MAJOR.MINOR.PATCH" variant (where MAJOR, MINOR and PATCH are replaced -- 2.25.1