Commit 701dd712 authored by Abhishek Parmar's avatar Abhishek Parmar

Guard GOOGLE_PREDICT_TRUE|FALS with #ifndef to avoid collision with other google…

Guard GOOGLE_PREDICT_TRUE|FALS with #ifndef to avoid collision with other google opensource projects like protobuf.
parent 1b0b08c8
...@@ -129,15 +129,28 @@ typedef unsigned __int64 uint64; ...@@ -129,15 +129,28 @@ typedef unsigned __int64 uint64;
#ifndef GOOGLE_PREDICT_BRANCH_NOT_TAKEN #ifndef GOOGLE_PREDICT_BRANCH_NOT_TAKEN
#if @ac_cv_have___builtin_expect@ #if @ac_cv_have___builtin_expect@
#define GOOGLE_PREDICT_BRANCH_NOT_TAKEN(x) (__builtin_expect(x, 0)) #define GOOGLE_PREDICT_BRANCH_NOT_TAKEN(x) (__builtin_expect(x, 0))
#define GOOGLE_PREDICT_FALSE(x) (__builtin_expect(x, 0))
#define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
#else #else
#define GOOGLE_PREDICT_BRANCH_NOT_TAKEN(x) x #define GOOGLE_PREDICT_BRANCH_NOT_TAKEN(x) x
#endif
#endif
#ifndef GOOGLE_PREDICT_FALSE
#if @ac_cv_have___builtin_expect@
#define GOOGLE_PREDICT_FALSE(x) (__builtin_expect(x, 0))
#else
#define GOOGLE_PREDICT_FALSE(x) x #define GOOGLE_PREDICT_FALSE(x) x
#endif
#endif
#ifndef GOOGLE_PREDICT_TRUE
#if @ac_cv_have___builtin_expect@
#define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
#else
#define GOOGLE_PREDICT_TRUE(x) x #define GOOGLE_PREDICT_TRUE(x) x
#endif #endif
#endif #endif
// Make a bunch of macros for logging. The way to log things is to stream // Make a bunch of macros for logging. The way to log things is to stream
// things to LOG(<a particular severity level>). E.g., // things to LOG(<a particular severity level>). E.g.,
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment