aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2017-08-05 16:08:11 +0200
committerJay Berkenbilt <ejb@ql.org>2017-08-05 16:22:33 +0200
commit8fe261d8b4c26c0cb9f863ec3850c4b82755a42f (patch)
tree994b340a6cb7698e8518217109922448af723e18
parenta60eb552d37896bceabc1e5def40337df8ba21e7 (diff)
downloadqpdf-8fe261d8b4c26c0cb9f863ec3850c4b82755a42f.tar.zst
QUtil::strcasecmp
-rw-r--r--include/qpdf/QUtil.hh3
-rw-r--r--libqpdf/QUtil.cc10
2 files changed, 13 insertions, 0 deletions
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index 87904ea1..ed396c07 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -166,6 +166,9 @@ namespace QUtil
QPDF_DLL
std::list<std::string> read_lines_from_file(std::istream&);
+ QPDF_DLL
+ int strcasecmp(char const *, char const *);
+
// These routines help the tokenizer recognize certain character
// classes without using ctype, which we avoid because of locale
// considerations.
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc
index ffe69148..29217cc6 100644
--- a/libqpdf/QUtil.cc
+++ b/libqpdf/QUtil.cc
@@ -619,3 +619,13 @@ QUtil::read_lines_from_file(std::istream& in)
return result;
}
+
+int
+QUtil::strcasecmp(char const *s1, char const *s2)
+{
+#ifdef _WIN32
+ return _stricmp(s1, s2);
+#else
+ return ::strcasecmp(s1, s2);
+#endif
+}