summaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2010-12-02 15:15:35 +0100
committerMichal Čihař <michal@cihar.com>2010-12-02 15:15:35 +0100
commit5f35e65ee7f7db4d8f9ef21ce126f4ff314ef5ae (patch)
tree66b158d0d7e5b1382852ed8278f7ccc5aa356527 /helper
parentd91a0635ba6086e8d6a09ac0290b39e6d62fda37 (diff)
Imported Upstream version 1.28.93
Diffstat (limited to 'helper')
-rw-r--r--helper/string.c4
-rw-r--r--helper/string.h13
2 files changed, 14 insertions, 3 deletions
diff --git a/helper/string.c b/helper/string.c
index d243369..8d502b9 100644
--- a/helper/string.c
+++ b/helper/string.c
@@ -40,7 +40,7 @@ char *strchrnul(char *s, int find)
#endif
-#ifndef HAVE_STRNCASECMP
+#ifdef INTERNAL_STRNCASECMP
#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
/**
* Case insensitive string comparator
@@ -71,7 +71,7 @@ int strncasecmp (const char *s1, const char *s2, size_t n)
#undef TOLOWER
#endif
-#ifndef HAVE_STRCASECMP
+#ifdef INTERNAL_STRCASECMP
#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
/**
* Case insensitive string comparator
diff --git a/helper/string.h b/helper/string.h
index e7511e7..1f111ad 100644
--- a/helper/string.h
+++ b/helper/string.h
@@ -37,13 +37,24 @@ extern int strcasecmp(const char *s1, const char *s2);
#ifndef HAVE_STRCHRNUL
extern char *strchrnul(char *s, int find);
#endif
+
#ifndef HAVE_STRNCASECMP
-/** #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) */
+#ifdef HAVE_STRNICMP
+#define strncasecmp _strnicmp
+#else
+# define INTERNAL_STRNCASECMP
extern int strncasecmp (const char *s1, const char *s2, size_t n);
#endif
+#endif
+
#ifndef HAVE_STRCASECMP
+#ifdef HAVE_STRNICMP
+#define strncasecmp _strnicmp
+#else
+# define INTERNAL_STRCASECMP
extern int strcasecmp (const char *s1, const char *s2);
#endif
+#endif
#ifndef HAVE_TOWLOWER
wchar_t towlower (wchar_t c);