summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTakayuki MATSUOKA <takayuki.matsuoka@gmail.com>2015-04-14 17:59:51 (GMT)
committerTakayuki MATSUOKA <takayuki.matsuoka@gmail.com>2015-04-14 21:45:25 (GMT)
commit585bab81217ad2480803518140ed4956aad0459c (patch)
tree0f2868361a8b839c68bd94e891d25acca3b24120 /lib
parent081bcca33bba4f6ac3e913b3cf2bc2ba58b6b697 (diff)
downloadlz4-585bab81217ad2480803518140ed4956aad0459c.zip
lz4-585bab81217ad2480803518140ed4956aad0459c.tar.gz
lz4-585bab81217ad2480803518140ed4956aad0459c.tar.bz2
Issue#90 : Change old enum to macro to maximize compatibility
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4frame.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/lz4frame.h b/lib/lz4frame.h
index 1f13a07..d1501da 100644
--- a/lib/lz4frame.h
+++ b/lib/lz4frame.h
@@ -68,10 +68,19 @@ typedef enum { LZ4F_noContentChecksum=0, LZ4F_contentChecksumEnabled } LZ4F_cont
typedef enum { LZ4F_frame=0, LZ4F_skippableFrame } LZ4F_frameType_t;
#ifndef LZ4F_DISABLE_OLD_ENUMS
-typedef enum { /*LZ4F_default=0,*/ max64KB=4, max256KB=5, max1MB=6, max4MB=7 } blockSizeID_t;
-typedef enum { blockLinked=0, blockIndependent} blockMode_t;
-typedef enum { noContentChecksum=0, contentChecksumEnabled } contentChecksum_t;
-typedef enum { /*LZ4F_frame=0,*/ skippableFrame } frameType_t;
+# define max64KB LZ4F_max64KB
+# define max256KB LZ4F_max256KB
+# define max1MB LZ4F_max1MB
+# define max4MB LZ4F_max4MB
+# define blockSizeID_t LZ4F_blockSizeID_t
+# define blockLinked LZ4F_blockLinked
+# define blockIndependent LZ4F_blockIndependent
+# define blockMode_t LZ4F_blockMode_t
+# define noContentChecksum LZ4F_noContentChecksum
+# define contentChecksumEnabled LZ4F_contentChecksumEnabled
+# define contentChecksum_t LZ4F_contentChecksum_t
+# define skippableFrame LZ4F_skippableFrame
+# define frameType_t LZ4F_frameType_t
#endif
typedef struct {