From 0a7631ae641f7970df6d9c899af911216808f8e2 Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Fri, 4 Aug 2017 17:49:37 +0100 Subject: [PATCH] Add macros for XML_Char-based strncmp and strlen equivalents --- expat/tests/runtests.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 698a024f..b724db17 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -73,14 +73,18 @@ #define XML_FMT_CHAR "lc" #define XML_FMT_STR "ls" #include +#define xcstrlen(s) wcslen(s) #define xcstrcmp(s, t) wcscmp((s), (t)) +#define xcstrncmp(s, t, n) wcsncmp((s), (t), (n)) #else #ifdef XML_UNICODE #error "No support for UTF-16 character without wchar_t in tests" #else #define XML_FMT_CHAR "c" #define XML_FMT_STR "s" +#define xcstrlen(s) strlen(s) #define xcstrcmp(s, t) strcmp((s), (t)) +#define xcstrncmp(s, t, n) strncmp((s), (t), (n)) #endif /* XML_UNICODE */ #endif /* XML_UNICODE_WCHAR_T */ -- 2.40.0