libutil: Rename functions in reserved namespace to prevent potential conflict
libc may define functions with the same names, but differing in prototype.
This commit is contained in:
parent
036449cdf1
commit
eeedfd87e5
6
util.h
6
util.h
|
@ -47,16 +47,20 @@ void weprintf(const char *, ...);
|
||||||
double estrtod(const char *);
|
double estrtod(const char *);
|
||||||
|
|
||||||
#undef strcasestr
|
#undef strcasestr
|
||||||
|
#define strcasestr xstrcasestr
|
||||||
char *strcasestr(const char *, const char *);
|
char *strcasestr(const char *, const char *);
|
||||||
|
|
||||||
#undef strlcat
|
#undef strlcat
|
||||||
|
#define strlcat xstrlcat
|
||||||
size_t strlcat(char *, const char *, size_t);
|
size_t strlcat(char *, const char *, size_t);
|
||||||
size_t estrlcat(char *, const char *, size_t);
|
size_t estrlcat(char *, const char *, size_t);
|
||||||
#undef strlcpy
|
#undef strlcpy
|
||||||
|
#define strlcpy xstrlcpy
|
||||||
size_t strlcpy(char *, const char *, size_t);
|
size_t strlcpy(char *, const char *, size_t);
|
||||||
size_t estrlcpy(char *, const char *, size_t);
|
size_t estrlcpy(char *, const char *, size_t);
|
||||||
|
|
||||||
#undef strsep
|
#undef strsep
|
||||||
|
#define strsep xstrsep
|
||||||
char *strsep(char **, const char *);
|
char *strsep(char **, const char *);
|
||||||
|
|
||||||
/* regex */
|
/* regex */
|
||||||
|
@ -76,10 +80,12 @@ mode_t parsemode(const char *, mode_t, mode_t);
|
||||||
off_t parseoffset(const char *);
|
off_t parseoffset(const char *);
|
||||||
void putword(FILE *, const char *);
|
void putword(FILE *, const char *);
|
||||||
#undef strtonum
|
#undef strtonum
|
||||||
|
#define strtonum xstrtonum
|
||||||
long long strtonum(const char *, long long, long long, const char **);
|
long long strtonum(const char *, long long, long long, const char **);
|
||||||
long long enstrtonum(int, const char *, long long, long long);
|
long long enstrtonum(int, const char *, long long, long long);
|
||||||
long long estrtonum(const char *, long long, long long);
|
long long estrtonum(const char *, long long, long long);
|
||||||
size_t unescape(char *);
|
size_t unescape(char *);
|
||||||
int mkdirp(const char *, mode_t, mode_t);
|
int mkdirp(const char *, mode_t, mode_t);
|
||||||
#undef memmem
|
#undef memmem
|
||||||
|
#define memmem xmemmem
|
||||||
void *memmem(const void *, size_t, const void *, size_t);
|
void *memmem(const void *, size_t, const void *, size_t);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user