diff options
author | Dmitrii Rodionov <d.rodionov@samsung.com> | 2018-04-18 09:20:56 (GMT) |
---|---|---|
committer | Dmitrii Rodionov <d.rodionov@samsung.com> | 2018-04-18 09:20:56 (GMT) |
commit | ea6ed46fc273a7b10870caeb515622737eb1c572 (patch) | |
tree | da5dd9e85f056a06beb94e2bb99a511bd5720494 | |
parent | a35aba6d747854f8b0d7137c7d3dbc67f6a9fb33 (diff) | |
download | lz4-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.
-rw-r--r-- | lib/lz4.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 /*-************************************ |