summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDmitrii Rodionov <d.rodionov@samsung.com>2018-04-18 09:20:56 (GMT)
committerDmitrii Rodionov <d.rodionov@samsung.com>2018-04-18 09:20:56 (GMT)
commitea6ed46fc273a7b10870caeb515622737eb1c572 (patch)
treeda5dd9e85f056a06beb94e2bb99a511bd5720494 /lib
parenta35aba6d747854f8b0d7137c7d3dbc67f6a9fb33 (diff)
downloadlz4-ea6ed46fc273a7b10870caeb515622737eb1c572.zip
lz4-ea6ed46fc273a7b10870caeb515622737eb1c572.tar.gz
lz4-ea6ed46fc273a7b10870caeb515622737eb1c572.tar.bz2
Wrap likely/unlikely macroses with #ifndef
It prevent redefine error when project using lz4 has its own likely/unlikely macroses.
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 0ce05da..1e96931 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -147,8 +147,12 @@
# define expect(expr,value) (expr)
#endif
+#ifndef likely
#define likely(expr) expect((expr) != 0, 1)
+#endif
+#ifndef unlikely
#define unlikely(expr) expect((expr) != 0, 0)
+#endif
/*-************************************