3 * \brief Version number
5 * \author Copyright (C) 1999-2006 Igor Pavlov
6 * \author Copyright (C) 2007 Lasse Collin
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
19 #ifndef LZMA_H_INTERNAL
20 # error Never include this file directly. Use <lzma.h> instead.
25 * Version number splitted in components
27 #define LZMA_VERSION_MAJOR 4
28 #define LZMA_VERSION_MINOR 999
29 #define LZMA_VERSION_PATCH 8
30 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_BETA
32 #ifndef LZMA_VERSION_COMMIT
33 # define LZMA_VERSION_COMMIT ""
38 * Map symbolic stability levels to integers.
40 #define LZMA_VERSION_STABILITY_ALPHA 0
41 #define LZMA_VERSION_STABILITY_BETA 1
42 #define LZMA_VERSION_STABILITY_STABLE 2
46 * \brief Compile-time version number
48 * The version number is of format xyyyzzzs where
52 * - s indicates stability: 0 = alpha, 1 = beta, 2 = stable
54 * The same xyyyzzz triplet is never reused with different stability levels.
55 * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta
58 * \note The version number of liblzma has nothing to with
59 * the version number of Igor Pavlov's LZMA SDK.
61 #define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
62 + LZMA_VERSION_MINOR * UINT32_C(10000) \
63 + LZMA_VERSION_PATCH * UINT32_C(10) \
64 + LZMA_VERSION_STABILITY)
68 * Macros to construct the compile-time version string
70 #if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
71 # define LZMA_VERSION_STABILITY_STRING "alpha"
72 #elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
73 # define LZMA_VERSION_STABILITY_STRING "beta"
74 #elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
75 # define LZMA_VERSION_STABILITY_STRING ""
77 # error Incorrect LZMA_VERSION_STABILITY
80 #define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
81 #major "." #minor "." #patch stability commit
83 #define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
84 LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
88 * \brief Compile-time version as a string
90 * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable
91 * versions don't have any "stable" suffix). In future, a snapshot built
92 * from source code repository may include an additional suffix, for example
93 * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
94 * in LZMA_VERSION macro.
96 #define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
97 LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
98 LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
102 /* #ifndef is needed for use with MinGW's windres. */
103 #ifndef LZMA_H_INTERNAL_RC
106 * \brief Run-time version number as an integer
108 * Returns the value of LZMA_VERSION macro at the compile time of liblzma.
109 * This allows the application to compare if it was built against the same,
110 * older, or newer version of liblzma that is currently running.
112 extern LZMA_API(uint32_t) lzma_version_number(void) lzma_attr_const;
116 * \brief Run-time version as a string
118 * This function may be useful if you want to display which version of
119 * liblzma your application is currently using.
121 extern LZMA_API(const char *) lzma_version_string(void) lzma_attr_const;