11#ifndef TOR_COMPAT_STRING_H
12#define TOR_COMPAT_STRING_H
23#ifndef HAVE_STRNCASECMP
24static inline int strncasecmp(
const char *a,
const char *b,
size_t n);
25static inline int strncasecmp(
const char *a,
const char *b,
size_t n) {
26 return _strnicmp(a,b,n);
29#ifndef HAVE_STRCASECMP
30static inline int strcasecmp(
const char *a,
const char *b);
31static inline int strcasecmp(
const char *a,
const char *b) {
52size_t strlcat(
char *dst,
const char *src,
size_t siz);
55size_t strlcpy(
char *dst,
const char *src,
size_t siz);
60#define tor_strtok_r(str, sep, lasts) strtok_r(str, sep, lasts)
62#define tor_strtok_r(str, sep, lasts) tor_strtok_r_impl(str, sep, lasts)
Utility macros to handle different features and behavior in different compilers.
char * tor_strtok_r_impl(char *str, const char *sep, char **lasts)