2007-12-08 22:42:33 +00:00
|
|
|
/**
|
|
|
|
* \file lzma/version.h
|
|
|
|
* \brief Version number
|
2009-04-13 08:27:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Author: Lasse Collin
|
2007-12-08 22:42:33 +00:00
|
|
|
*
|
2009-04-13 08:27:40 +00:00
|
|
|
* This file has been put into the public domain.
|
|
|
|
* You can do whatever you want with this file.
|
2007-12-08 22:42:33 +00:00
|
|
|
*
|
2009-04-13 08:27:40 +00:00
|
|
|
* See ../lzma.h for information about liblzma as a whole.
|
2007-12-08 22:42:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LZMA_H_INTERNAL
|
|
|
|
# error Never include this file directly. Use <lzma.h> instead.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2009-02-13 16:00:03 +00:00
|
|
|
/*
|
|
|
|
* Version number splitted in components
|
|
|
|
*/
|
|
|
|
#define LZMA_VERSION_MAJOR 4
|
|
|
|
#define LZMA_VERSION_MINOR 999
|
|
|
|
#define LZMA_VERSION_PATCH 8
|
|
|
|
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_BETA
|
|
|
|
|
|
|
|
#ifndef LZMA_VERSION_COMMIT
|
|
|
|
# define LZMA_VERSION_COMMIT ""
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Map symbolic stability levels to integers.
|
|
|
|
*/
|
|
|
|
#define LZMA_VERSION_STABILITY_ALPHA 0
|
|
|
|
#define LZMA_VERSION_STABILITY_BETA 1
|
|
|
|
#define LZMA_VERSION_STABILITY_STABLE 2
|
|
|
|
|
|
|
|
|
2007-12-08 22:42:33 +00:00
|
|
|
/**
|
|
|
|
* \brief Compile-time version number
|
|
|
|
*
|
2008-04-25 10:32:35 +00:00
|
|
|
* The version number is of format xyyyzzzs where
|
|
|
|
* - x = major
|
|
|
|
* - yyy = minor
|
|
|
|
* - zzz = revision
|
2007-12-08 22:42:33 +00:00
|
|
|
* - s indicates stability: 0 = alpha, 1 = beta, 2 = stable
|
2008-04-25 10:32:35 +00:00
|
|
|
*
|
2008-12-31 15:15:03 +00:00
|
|
|
* The same xyyyzzz triplet is never reused with different stability levels.
|
|
|
|
* For example, if 5.1.0alpha has been released, there will never be 5.1.0beta
|
|
|
|
* or 5.1.0 stable.
|
2008-04-25 10:32:35 +00:00
|
|
|
*
|
2008-12-15 17:39:13 +00:00
|
|
|
* \note The version number of liblzma has nothing to with
|
|
|
|
* the version number of Igor Pavlov's LZMA SDK.
|
2007-12-08 22:42:33 +00:00
|
|
|
*/
|
2009-02-13 16:00:03 +00:00
|
|
|
#define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
|
|
|
|
+ LZMA_VERSION_MINOR * UINT32_C(10000) \
|
|
|
|
+ LZMA_VERSION_PATCH * UINT32_C(10) \
|
|
|
|
+ LZMA_VERSION_STABILITY)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Macros to construct the compile-time version string
|
|
|
|
*/
|
|
|
|
#if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
|
|
|
|
# define LZMA_VERSION_STABILITY_STRING "alpha"
|
|
|
|
#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
|
|
|
|
# define LZMA_VERSION_STABILITY_STRING "beta"
|
|
|
|
#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
|
|
|
|
# define LZMA_VERSION_STABILITY_STRING ""
|
|
|
|
#else
|
|
|
|
# error Incorrect LZMA_VERSION_STABILITY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
|
|
|
|
#major "." #minor "." #patch stability commit
|
|
|
|
|
|
|
|
#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
|
|
|
|
LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
|
2007-12-08 22:42:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2009-02-13 16:00:03 +00:00
|
|
|
* \brief Compile-time version as a string
|
|
|
|
*
|
|
|
|
* This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable
|
|
|
|
* versions don't have any "stable" suffix). In future, a snapshot built
|
|
|
|
* from source code repository may include an additional suffix, for example
|
|
|
|
* "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
|
|
|
|
* in LZMA_VERSION macro.
|
|
|
|
*/
|
|
|
|
#define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
|
|
|
|
LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
|
|
|
|
LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
|
|
|
|
LZMA_VERSION_COMMIT)
|
|
|
|
|
|
|
|
|
2009-08-27 07:13:46 +00:00
|
|
|
/* #ifndef is needed for use with windres (MinGW or Cygwin). */
|
2009-02-13 16:00:03 +00:00
|
|
|
#ifndef LZMA_H_INTERNAL_RC
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Run-time version number as an integer
|
2007-12-08 22:42:33 +00:00
|
|
|
*
|
2009-08-27 07:13:46 +00:00
|
|
|
* Return the value of LZMA_VERSION macro at the compile time of liblzma.
|
2007-12-08 22:42:33 +00:00
|
|
|
* This allows the application to compare if it was built against the same,
|
|
|
|
* older, or newer version of liblzma that is currently running.
|
|
|
|
*/
|
2009-08-27 07:13:46 +00:00
|
|
|
extern LZMA_API(uint32_t) lzma_version_number(void)
|
|
|
|
lzma_nothrow lzma_attr_const;
|
2007-12-08 22:42:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2009-02-13 16:00:03 +00:00
|
|
|
* \brief Run-time version as a string
|
2007-12-08 22:42:33 +00:00
|
|
|
*
|
|
|
|
* This function may be useful if you want to display which version of
|
2008-08-28 19:53:15 +00:00
|
|
|
* liblzma your application is currently using.
|
2007-12-08 22:42:33 +00:00
|
|
|
*/
|
2009-08-27 07:13:46 +00:00
|
|
|
extern LZMA_API(const char *) lzma_version_string(void)
|
|
|
|
lzma_nothrow lzma_attr_const;
|
2009-02-13 16:00:03 +00:00
|
|
|
|
|
|
|
#endif
|