Path: blob/master/Utilities/cmliblzma/liblzma/api/lzma/version.h
3158 views
/* SPDX-License-Identifier: 0BSD */12/**3* \file lzma/version.h4* \brief Version number5* \note Never include this file directly. Use <lzma.h> instead.6*/78/*9* Author: Lasse Collin10*/1112#ifndef LZMA_H_INTERNAL13# error Never include this file directly. Use <lzma.h> instead.14#endif151617/** \brief Major version number of the liblzma release. */18#define LZMA_VERSION_MAJOR 51920/** \brief Minor version number of the liblzma release. */21#define LZMA_VERSION_MINOR 62223/** \brief Patch version number of the liblzma release. */24#define LZMA_VERSION_PATCH 32526/**27* \brief Version stability marker28*29* This will always be one of three values:30* - LZMA_VERSION_STABILITY_ALPHA31* - LZMA_VERSION_STABILITY_BETA32* - LZMA_VERSION_STABILITY_STABLE33*/34#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE3536/** \brief Commit version number of the liblzma release */37#ifndef LZMA_VERSION_COMMIT38# define LZMA_VERSION_COMMIT ""39#endif404142/*43* Map symbolic stability levels to integers.44*/45#define LZMA_VERSION_STABILITY_ALPHA 046#define LZMA_VERSION_STABILITY_BETA 147#define LZMA_VERSION_STABILITY_STABLE 2484950/**51* \brief Compile-time version number52*53* The version number is of format xyyyzzzs where54* - x = major55* - yyy = minor56* - zzz = revision57* - s indicates stability: 0 = alpha, 1 = beta, 2 = stable58*59* The same xyyyzzz triplet is never reused with different stability levels.60* For example, if 5.1.0alpha has been released, there will never be 5.1.0beta61* or 5.1.0 stable.62*63* \note The version number of liblzma has nothing to with64* the version number of Igor Pavlov's LZMA SDK.65*/66#define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \67+ LZMA_VERSION_MINOR * UINT32_C(10000) \68+ LZMA_VERSION_PATCH * UINT32_C(10) \69+ LZMA_VERSION_STABILITY)707172/*73* Macros to construct the compile-time version string74*/75#if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA76# define LZMA_VERSION_STABILITY_STRING "alpha"77#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA78# define LZMA_VERSION_STABILITY_STRING "beta"79#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE80# define LZMA_VERSION_STABILITY_STRING ""81#else82# error Incorrect LZMA_VERSION_STABILITY83#endif8485#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \86#major "." #minor "." #patch stability commit8788#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \89LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)909192/**93* \brief Compile-time version as a string94*95* This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable96* versions don't have any "stable" suffix). In future, a snapshot built97* from source code repository may include an additional suffix, for example98* "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form99* in LZMA_VERSION macro.100*/101#define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \102LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \103LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \104LZMA_VERSION_COMMIT)105106107/* #ifndef is needed for use with windres (MinGW-w64 or Cygwin). */108#ifndef LZMA_H_INTERNAL_RC109110/**111* \brief Run-time version number as an integer112*113* This allows an application to compare if it was built against the same,114* older, or newer version of liblzma that is currently running.115*116* \return The value of LZMA_VERSION macro at the compile time of liblzma117*/118extern LZMA_API(uint32_t) lzma_version_number(void)119lzma_nothrow lzma_attr_const;120121122/**123* \brief Run-time version as a string124*125* This function may be useful to display which version of liblzma an126* application is currently using.127*128* \return Run-time version of liblzma129*/130extern LZMA_API(const char *) lzma_version_string(void)131lzma_nothrow lzma_attr_const;132133#endif134135136