4 # if defined PROTOTYPES || (defined __STDC__ && __STDC__)
5 # define PARAMS(Args) Args
7 # define PARAMS(Args) ()
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;
16 extern char *const xalloc_msg_memory_exhausted;
19 extern void (*xalloc_fail_func) ();
21 void *xmalloc PARAMS ((size_t n)) __attribute__ ((__malloc__));
22 void *xmalloc_and_zero PARAMS ((size_t n)) __attribute__ ((__malloc__));
23 void *xcalloc PARAMS ((size_t n, size_t s));
24 void *xrealloc PARAMS ((void *p, size_t n)) __attribute__ ((__malloc__));
26 char *xstrdup PARAMS ((const char *s)) __attribute__ ((__malloc__));
28 extern int xasprintf(char **strp, const char *fmt, ...);
29 extern int xvasprintf(char **strp, const char *fmt, va_list ap);