summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.c1
-rw-r--r--lib/lz4.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 8512452..39bf5d6 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -414,6 +414,7 @@ typedef enum { full = 0, partial = 1 } earlyEnd_directive;
* Local Utils
**************************************/
int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; }
+const char* LZ4_versionString (void) { return LZ4_VERSION_STRING; }
int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); }
int LZ4_sizeofState() { return LZ4_STREAMSIZE; }
diff --git a/lib/lz4.h b/lib/lz4.h
index 96e25a6..ff5a571 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -50,9 +50,16 @@ extern "C" {
#define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */
#define LZ4_VERSION_MINOR 7 /* for new (non-breaking) interface capabilities */
#define LZ4_VERSION_RELEASE 2 /* for tweaks, bug-fixes, or development */
+
#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
int LZ4_versionNumber (void);
+#define LZ4_STR(str) #str
+#define LZ4_XSTR(str) LZ4_STR(str)
+#define LZ4_VERSION_STRING LZ4_XSTR(LZ4_VERSION_MAJOR) "." \
+ LZ4_XSTR(LZ4_VERSION_MINOR) "." LZ4_XSTR(LZ4_VERSION_RELEASE)
+const char* LZ4_versionString (void);
+
/**************************************
* Tuning parameter
**************************************/