21 #ifndef __EKG_XMALLOC_H 22 #define __EKG_XMALLOC_H 24 #include <sys/types.h> 30 #define __(x) (x ? x : "(null)") 34 #elif defined(__GNUC__) 35 # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) 36 #elif defined(__LCLINT__) 43 #ifndef HAVE_SOCKLEN_T 50 # define PATH_MAX MAX_PATH 52 # ifdef _POSIX_PATH_MAX 53 # define PATH_MAX _POSIX_PATH_MAX 55 # define PATH_MAX 4096 60 #ifndef EKG2_WIN32_NOFUNCTION 62 #ifndef EKG_NO_DEPRECATED 63 void *
xcalloc(
size_t nmemb,
size_t size);
65 void xfree(
void *ptr);
66 void *
xrealloc(
void *ptr,
size_t size);
73 char *
xstrcat(
char *dest,
const char *src);
75 int xstrcmp(
const char *s1,
const char *s2);
76 int xstrcoll(
const char *s1,
const char *s2);
77 char *
xstrcpy(
char *dest,
const char *src);
78 size_t xstrcspn(
const char *
s,
const char *reject);
81 char *
xstrncat(
char *dest,
const char *src,
size_t n);
82 int xstrncmp(
const char *s1,
const char *s2,
size_t n);
83 char *
xstrncpy(
char *dest,
const char *src,
size_t n);
84 int xstrncasecmp(
const char *s1,
const char *s2,
size_t n);
85 char *
xstrpbrk(
const char *
s,
const char *accept);
90 size_t xstrspn(
const char *
s,
const char *accept);
91 char *
xstrstr(
const char *haystack,
const char *needle);
92 char *
xstrcasestr(
const char *haystack,
const char *needle);
93 char *
xstrtok(
char *
s,
const char *delim);
94 char *
xindex(
const char *
s,
int c);
97 #ifndef EKG_NO_DEPRECATED 105 char *
saprintf(
const char *format, ...);
int xstrncmp(const char *s1, const char *s2, size_t n)
Definition: xmalloc.c:238
size_t xstrspn(const char *s, const char *accept)
Definition: xmalloc.c:272
unsigned int socklen_t
Definition: xmalloc.h:44
char * xstrpbrk(const char *s, const char *accept)
Definition: xmalloc.c:253
void xfree(void *ptr)
Definition: ekg_hash_benchmark.c:29
void * xmalloc(size_t size)
Definition: ekg_hash_benchmark.c:25
size_t xstrcspn(const char *s, const char *reject)
Definition: xmalloc.c:218
int xstrcoll(const char *s1, const char *s2)
Definition: xmalloc.c:208
char * xstrrchr(const char *s, int c)
Definition: xmalloc.c:258
char * xstrncat(char *dest, const char *src, size_t n)
Definition: xmalloc.c:233
char * xstrcpy(char *dest, const char *src)
Definition: xmalloc.c:213
void * xrealloc(void *ptr, size_t size)
Definition: xmalloc.c:116
char * xstrtok(char *s, const char *delim)
Definition: xmalloc.c:277
char * xindex(const char *s, int c)
Definition: xmalloc.c:283
char * vsaprintf(const char *format, va_list ap)
Definition: xmalloc.c:168
char * xstrstr(const char *haystack, const char *needle)
Definition: xmalloc.c:177
size_t xstrlen(const char *s)
Definition: xmalloc.c:223
int xstrncasecmp_pl(const char *s1, const char *s2, size_t n)
Definition: xmalloc.c:228
char * utf8ndup(const char *s, size_t n)
Definition: xmalloc.c:145
int xstrcasecmp(const char *s1, const char *s2)
Definition: xmalloc.c:187
char * xstrdup(const char *s)
Definition: ekg_hash_benchmark.c:28
void * xcalloc(size_t nmemb, size_t size)
Definition: xmalloc.c:63
char * saprintf(const char *format,...)
Definition: stuff.c:2369
char * xrindex(const char *s, int c)
Definition: xmalloc.c:292
char * xstrndup(const char *s, size_t n)
Definition: xmalloc.c:136
char * xstrncpy(char *dest, const char *src, size_t n)
Definition: xmalloc.c:243
char * xstrchr(const char *s, int c)
Definition: xmalloc.c:197
int xstrncasecmp(const char *s1, const char *s2, size_t n)
Definition: xmalloc.c:248
int xstrcmp(const char *s1, const char *s2)
Definition: ekg_hash_benchmark.c:27
char * xstrcat(char *dest, const char *src)
Definition: xmalloc.c:192
char * xstrcasestr(const char *haystack, const char *needle)
Definition: xmalloc.c:182