From 04982f7b6bacc7ef552dc5afafc3c3adb980813e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Mon, 21 Jun 2021 14:40:51 +0200 Subject: [PATCH] Move version defines to build_info.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bence Szépkúti --- include/mbedtls/build_info.h | 23 +++++++++++++++++++++++ include/mbedtls/version.h | 22 +++------------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/include/mbedtls/build_info.h b/include/mbedtls/build_info.h index e4a89c60e6..2f34365e20 100644 --- a/include/mbedtls/build_info.h +++ b/include/mbedtls/build_info.h @@ -26,6 +26,29 @@ #ifndef MBEDTLS_BUILD_INFO_H #define MBEDTLS_BUILD_INFO_H +/* + * This set of compile-time defines can be used to determine the version number + * of the mbed TLS library used. Run-time variables for the same can be found in + * version.h + */ + +/** + * The version number x.y.z is split into three parts. + * Major, Minor, Patchlevel + */ +#define MBEDTLS_VERSION_MAJOR 2 +#define MBEDTLS_VERSION_MINOR 26 +#define MBEDTLS_VERSION_PATCH 0 + +/** + * The single version number has the following structure: + * MMNNPP00 + * Major version | Minor version | Patch version + */ +#define MBEDTLS_VERSION_NUMBER 0x021A0000 +#define MBEDTLS_VERSION_STRING "2.26.0" +#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.26.0" + #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) #define _CRT_SECURE_NO_DEPRECATE 1 #endif diff --git a/include/mbedtls/version.h b/include/mbedtls/version.h index cdd3ca6344..648db7ed62 100644 --- a/include/mbedtls/version.h +++ b/include/mbedtls/version.h @@ -20,31 +20,15 @@ * limitations under the License. */ /* - * This set of compile-time defines and run-time variables can be used to - * determine the version number of the mbed TLS library used. + * This set of run-time variables can be used to determine the version number of + * the mbed TLS library used. Compile-time version defines for the same can be + * found in build_info.h */ #ifndef MBEDTLS_VERSION_H #define MBEDTLS_VERSION_H #include "mbedtls/build_info.h" -/** - * The version number x.y.z is split into three parts. - * Major, Minor, Patchlevel - */ -#define MBEDTLS_VERSION_MAJOR 2 -#define MBEDTLS_VERSION_MINOR 26 -#define MBEDTLS_VERSION_PATCH 0 - -/** - * The single version number has the following structure: - * MMNNPP00 - * Major version | Minor version | Patch version - */ -#define MBEDTLS_VERSION_NUMBER 0x021A0000 -#define MBEDTLS_VERSION_STRING "2.26.0" -#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.26.0" - #if defined(MBEDTLS_VERSION_C) #ifdef __cplusplus