2 * Various Utility Functions (extracted from the UCW Library)
4 * (c) 2005 Martin Mares <mj@ucw.cz>
10 #define NONRET __attribute__((noreturn))
11 #define UNUSED __attribute__((unused))
12 #define likely(x) __builtin_expect((x),1)
13 #define unlikely(x) __builtin_expect((x),0)
18 #define ulikely(x) (x)
22 #define STR(c) STR2(c)
24 typedef unsigned int uns;
34 void NONRET die(char *x, ...);
35 void verb(int level, char *x, ...);
36 void *xmalloc(uns size);
37 void *xrealloc(void *old, uns size);
47 void sha1_init(struct sha1_ctx *ctx);
48 void sha1_update(struct sha1_ctx *sctx, const u8 *data, unsigned int len);
49 void sha1_final(struct sha1_ctx *sctx, u8 *out);