edge_weight_compare() shouldn't rely on edge_compare().
[tinc] / lib / xalloc.h
1 #include <sys/types.h>
2
3 #ifndef PARAMS
4 # if defined PROTOTYPES || (defined __STDC__ && __STDC__)
5 #  define PARAMS(Args) Args
6 # else
7 #  define PARAMS(Args) ()
8 # endif
9 #endif
10
11 /* Exit value when the requested amount of memory is not available.
12    The caller may set it to some other value.  */
13 extern int xalloc_exit_failure;
14
15 /* FIXME: describe */
16 extern char *const xalloc_msg_memory_exhausted;
17
18 /* FIXME: describe */
19 extern void (*xalloc_fail_func) ();
20
21 void *xmalloc PARAMS ((size_t n));
22 void *xmalloc_and_zero PARAMS ((size_t n));
23 void *xcalloc PARAMS ((size_t n, size_t s));
24 void *xrealloc PARAMS ((void *p, size_t n));
25
26 char *xstrdup PARAMS ((const char *s));