Commit d88ce331 authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Merge branch 'bug26594'

parents cb1a3674 c8ccd028
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -610,6 +610,8 @@ AC_CHECK_FUNCS(
        sigaction \
        socketpair \
	statvfs \
        strncasecmp \
        strcasecmp \
        strlcat \
        strlcpy \
	strnlen \
+14 −3
Original line number Diff line number Diff line
@@ -13,9 +13,20 @@

/* ===== String compatibility */
#ifdef _WIN32
/* Windows names string functions differently from most other platforms. */
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
/* Windows doesn't have str(n)casecmp, but mingw defines it: only define it
 * ourselves if it's missing. */
#ifndef HAVE_STRNCASECMP
static inline int strncasecmp(const char *a, const char *b, size_t n);
static inline int strncasecmp(const char *a, const char *b, size_t n) {
  return strncmpi(a,b);
}
#endif
#ifndef HAVE_STRCASECMP
static inline int strcasecmp(const char *a, const char *b, size_t n);
static inline int strcasecmp(const char *a, const char *b, size_t n) {
  return strcmpi(a,b);
}
#endif
#endif

#if defined __APPLE__