12 #define _isspaceptr(_chp) isspace((int)(*(unsigned char *)(_chp)))
23 void *
xcalloc (
size_t nmemb,
size_t size);
29 #if !defined(HAVE_STPCPY)
31 static inline char *
stpcpy (
char *dest,
const char * src) {
32 register char *d = dest;
33 register const char *s = src;
43 #if defined(HAVE_MCHECK_H) && defined(__GNUC__)
44 #define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL)
45 #define xmalloc(_size) (malloc(_size) ? : vmefail())
46 #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail())
47 #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail())
48 #define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
50 #define xmalloc(_size) malloc(_size)
51 #define xcalloc(_nmemb, _size) calloc((_nmemb), (_size))
52 #define xrealloc(_ptr, _size) realloc((_ptr), (_size))
53 #define xstrdup(_str) strdup(_str)
56 #if defined(HAVE_SECURE_GETENV)
57 #define getenv(_s) secure_getenv(_s)
58 #elif defined(HAVE___SECURE_GETENV)
59 #define getenv(_s) __secure_getenv(_s)
62 #if !defined(__GNUC__) && !defined(__attribute__)
63 #define __attribute__(x)
65 #define UNUSED(x) x __attribute__((__unused__))
#define xcalloc(_nmemb, _size)
#define xrealloc(_ptr, _size)
static char * stpcpy(char *dest, const char *src)