Bump version and soname for 5.2.5.
[xz/debian.git] / src / liblzma / api / lzma / version.h
blob2bf3eaed24fad3eecce147f02e1d2e890ca14aa0
1 /**
2 * \file lzma/version.h
3 * \brief Version number
4 */
6 /*
7 * Author: Lasse Collin
9 * This file has been put into the public domain.
10 * You can do whatever you want with this file.
12 * See ../lzma.h for information about liblzma as a whole.
15 #ifndef LZMA_H_INTERNAL
16 # error Never include this file directly. Use <lzma.h> instead.
17 #endif
21 * Version number split into components
23 #define LZMA_VERSION_MAJOR 5
24 #define LZMA_VERSION_MINOR 2
25 #define LZMA_VERSION_PATCH 5
26 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
28 #ifndef LZMA_VERSION_COMMIT
29 # define LZMA_VERSION_COMMIT ""
30 #endif
34 * Map symbolic stability levels to integers.
36 #define LZMA_VERSION_STABILITY_ALPHA 0
37 #define LZMA_VERSION_STABILITY_BETA 1
38 #define LZMA_VERSION_STABILITY_STABLE 2
41 /**
42 * \brief Compile-time version number
44 * The version number is of format xyyyzzzs where
45 * - x = major
46 * - yyy = minor
47 * - zzz = revision
48 * - s indicates stability: 0 = alpha, 1 = beta, 2 = stable
50 * The same xyyyzzz triplet is never reused with different stability levels.
51 * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta
52 * or 5.1.0 stable.
54 * \note The version number of liblzma has nothing to with
55 * the version number of Igor Pavlov's LZMA SDK.
57 #define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
58 + LZMA_VERSION_MINOR * UINT32_C(10000) \
59 + LZMA_VERSION_PATCH * UINT32_C(10) \
60 + LZMA_VERSION_STABILITY)
64 * Macros to construct the compile-time version string
66 #if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
67 # define LZMA_VERSION_STABILITY_STRING "alpha"
68 #elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
69 # define LZMA_VERSION_STABILITY_STRING "beta"
70 #elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
71 # define LZMA_VERSION_STABILITY_STRING ""
72 #else
73 # error Incorrect LZMA_VERSION_STABILITY
74 #endif
76 #define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
77 #major "." #minor "." #patch stability commit
79 #define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
80 LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
83 /**
84 * \brief Compile-time version as a string
86 * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable
87 * versions don't have any "stable" suffix). In future, a snapshot built
88 * from source code repository may include an additional suffix, for example
89 * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
90 * in LZMA_VERSION macro.
92 #define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
93 LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
94 LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
95 LZMA_VERSION_COMMIT)
98 /* #ifndef is needed for use with windres (MinGW or Cygwin). */
99 #ifndef LZMA_H_INTERNAL_RC
102 * \brief Run-time version number as an integer
104 * Return the value of LZMA_VERSION macro at the compile time of liblzma.
105 * This allows the application to compare if it was built against the same,
106 * older, or newer version of liblzma that is currently running.
108 extern LZMA_API(uint32_t) lzma_version_number(void)
109 lzma_nothrow lzma_attr_const;
113 * \brief Run-time version as a string
115 * This function may be useful if you want to display which version of
116 * liblzma your application is currently using.
118 extern LZMA_API(const char *) lzma_version_string(void)
119 lzma_nothrow lzma_attr_const;
121 #endif