]> mj.ucw.cz Git - checkmail.git/blob - util.h
Updated maintainer scripts
[checkmail.git] / util.h
1 /*
2  *      Various Utility Functions (extracted from the UCW Library)
3  *
4  *      (c) 2005 Martin Mares <mj@ucw.cz>
5  */
6
7 #ifdef __GNUC__
8 #define NONRET __attribute__((noreturn))
9 #define UNUSED __attribute__((unused))
10 #define likely(x) __builtin_expect((x),1)
11 #define unlikely(x) __builtin_expect((x),0)
12 #else
13 #define NONRET
14 #define UNUSED
15 #define likely(x) (x)
16 #define ulikely(x) (x)
17 #endif
18
19 typedef unsigned int uns;
20
21 extern int debug_mode;
22
23 void NONRET die(char *x, ...);
24 void debug(char *x, ...);
25 void *xmalloc(uns size);
26 void *xrealloc(void *old, uns size);
27 char *xstrdup(char *s);