From 2100b4ce152e9c70b3ce8760112d5a24ead4e52d Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 3 Apr 2020 21:34:45 -0400 Subject: Allow qpdf to be built on systems without wchar_t (fixes #406) --- include/qpdf/QUtil.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh index fa6a76aa..2066cfef 100644 --- a/include/qpdf/QUtil.hh +++ b/include/qpdf/QUtil.hh @@ -357,12 +357,20 @@ namespace QUtil QPDF_DLL std::vector parse_numrange(char const* range, int max); +#ifndef QPDF_NO_WCHAR_T + // If you are building qpdf on a stripped down system that doesn't + // have wchar_t, such as may be the case in some embedded + // environments, you may define QPDF_NO_WCHAR_T in your build. + // This symbol is never defined automatically. Search for wchar_t + // in qpdf's top-level README.md file for details. + // Take an argv array consisting of wchar_t, as when wmain is // invoked, convert all UTF-16 encoded strings to UTF-8, and call // another main. QPDF_DLL int call_main_from_wmain(int argc, wchar_t* argv[], std::function realmain); +#endif // QPDF_NO_WCHAR_T }; #endif // QUTIL_HH -- cgit v1.2.3-54-g00ecf