Add PTOK() macro from varnish-cache

parent 5b92665c
// from linux
#define likely(x) __builtin_expect(!!(x), 1)
//#define unlikely(x) __builtin_expect(!!(x), 0)
// not really compiler stuff, but compatiblity with master for varnish-cache 7.3
// taken from varnish-cache
#define _PTOK(call, var) \
do { \
int var = call; \
if (!var) \
break; \
errno = var; \
WRONG(#call " failed"); \
} while (0)
#define PTOK(call) _PTOK(call, VUNIQ_NAME(_pterr))
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