Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:19:23

0001 /* SPDX-License-Identifier: 0BSD */
0002 
0003 /**
0004  * \file        lzma/version.h
0005  * \brief       Version number
0006  * \note        Never include this file directly. Use <lzma.h> instead.
0007  */
0008 
0009 /*
0010  * Author: Lasse Collin
0011  */
0012 
0013 #ifndef LZMA_H_INTERNAL
0014 #   error Never include this file directly. Use <lzma.h> instead.
0015 #endif
0016 
0017 
0018 /** \brief Major version number of the liblzma release. */
0019 #define LZMA_VERSION_MAJOR 5
0020 
0021 /** \brief Minor version number of the liblzma release. */
0022 #define LZMA_VERSION_MINOR 6
0023 
0024 /** \brief Patch version number of the liblzma release. */
0025 #define LZMA_VERSION_PATCH 3
0026 
0027 /**
0028  * \brief Version stability marker
0029  *
0030  * This will always be one of three values:
0031  *   - LZMA_VERSION_STABILITY_ALPHA
0032  *   - LZMA_VERSION_STABILITY_BETA
0033  *   - LZMA_VERSION_STABILITY_STABLE
0034  */
0035 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
0036 
0037 /** \brief Commit version number of the liblzma release */
0038 #ifndef LZMA_VERSION_COMMIT
0039 #   define LZMA_VERSION_COMMIT ""
0040 #endif
0041 
0042 
0043 /*
0044  * Map symbolic stability levels to integers.
0045  */
0046 #define LZMA_VERSION_STABILITY_ALPHA 0
0047 #define LZMA_VERSION_STABILITY_BETA 1
0048 #define LZMA_VERSION_STABILITY_STABLE 2
0049 
0050 
0051 /**
0052  * \brief       Compile-time version number
0053  *
0054  * The version number is of format xyyyzzzs where
0055  *  - x = major
0056  *  - yyy = minor
0057  *  - zzz = revision
0058  *  - s indicates stability: 0 = alpha, 1 = beta, 2 = stable
0059  *
0060  * The same xyyyzzz triplet is never reused with different stability levels.
0061  * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta
0062  * or 5.1.0 stable.
0063  *
0064  * \note        The version number of liblzma has nothing to with
0065  *              the version number of Igor Pavlov's LZMA SDK.
0066  */
0067 #define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
0068         + LZMA_VERSION_MINOR * UINT32_C(10000) \
0069         + LZMA_VERSION_PATCH * UINT32_C(10) \
0070         + LZMA_VERSION_STABILITY)
0071 
0072 
0073 /*
0074  * Macros to construct the compile-time version string
0075  */
0076 #if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
0077 #   define LZMA_VERSION_STABILITY_STRING "alpha"
0078 #elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
0079 #   define LZMA_VERSION_STABILITY_STRING "beta"
0080 #elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
0081 #   define LZMA_VERSION_STABILITY_STRING ""
0082 #else
0083 #   error Incorrect LZMA_VERSION_STABILITY
0084 #endif
0085 
0086 #define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
0087         #major "." #minor "." #patch stability commit
0088 
0089 #define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
0090         LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
0091 
0092 
0093 /**
0094  * \brief       Compile-time version as a string
0095  *
0096  * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable
0097  * versions don't have any "stable" suffix). In future, a snapshot built
0098  * from source code repository may include an additional suffix, for example
0099  * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
0100  * in LZMA_VERSION macro.
0101  */
0102 #define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
0103         LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
0104         LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
0105         LZMA_VERSION_COMMIT)
0106 
0107 
0108 /* #ifndef is needed for use with windres (MinGW-w64 or Cygwin). */
0109 #ifndef LZMA_H_INTERNAL_RC
0110 
0111 /**
0112  * \brief       Run-time version number as an integer
0113  *
0114  * This allows an application to compare if it was built against the same,
0115  * older, or newer version of liblzma that is currently running.
0116  *
0117  * \return The value of LZMA_VERSION macro at the compile time of liblzma
0118  */
0119 extern LZMA_API(uint32_t) lzma_version_number(void)
0120         lzma_nothrow lzma_attr_const;
0121 
0122 
0123 /**
0124  * \brief       Run-time version as a string
0125  *
0126  * This function may be useful to display which version of liblzma an
0127  * application is currently using.
0128  *
0129  * \return      Run-time version of liblzma
0130  */
0131 extern LZMA_API(const char *) lzma_version_string(void)
0132         lzma_nothrow lzma_attr_const;
0133 
0134 #endif