9 #if defined (__GLIBC__) && defined(__LCLINT__) 12 extern __const __int32_t *__ctype_tolower;
14 extern __const __int32_t *__ctype_toupper;
21 #define _isspaceptr(_chp) isspace((int)(*(unsigned char *)(_chp))) 35 #if defined(HAVE_UNISTD_H) && !defined(__LCLINT__) 53 void *
xcalloc (
size_t nmemb,
size_t size)
58 void *
xrealloc (
void * ptr,
size_t size)
63 char *
xstrdup (
const char *str)
67 #if !defined(HAVE_STPCPY) 69 static inline char *
stpcpy (
char *dest,
const char * src) {
70 register char *d = dest;
71 register const char *s = src;
81 #if defined(HAVE_MCHECK_H) && defined(__GNUC__) 82 #define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL) 83 #define xmalloc(_size) (malloc(_size) ? : vmefail()) 84 #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail()) 85 #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail()) 86 #define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str))) 88 #define xmalloc(_size) malloc(_size) 89 #define xcalloc(_nmemb, _size) calloc((_nmemb), (_size)) 90 #define xrealloc(_ptr, _size) realloc((_ptr), (_size)) 91 #define xstrdup(_str) strdup(_str) 94 #if defined(HAVE___SECURE_GETENV) && !defined(__LCLINT__) 95 #define getenv(_s) __secure_getenv(_s) 98 #if !defined(__GNUC__) && !defined(__attribute__) 99 #define __attribute__(x) 101 #define UNUSED(x) x __attribute__((__unused__))
static char * stpcpy(char *dest, const char *src)
#define xcalloc(_nmemb, _size)
#define xrealloc(_ptr, _size)