From: Dmitrii Rodionov Date: Wed, 18 Apr 2018 09:20:56 +0000 (+0300) Subject: Wrap likely/unlikely macroses with #ifndef X-Git-Tag: upstream/1.9.3~8^2~32^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea6ed46fc273a7b10870caeb515622737eb1c572;p=platform%2Fupstream%2Flz4.git Wrap likely/unlikely macroses with #ifndef It prevent redefine error when project using lz4 has its own likely/unlikely macroses. --- 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 /*-************************************