This is an automated email from the ASF dual-hosted git repository.
scantor pushed a commit to branch xerces-3.2
in repository https://gitbox.apache.org/repos/asf/xerces-c.git
The following commit(s) were added to refs/heads/xerces-3.2 by this push:
new de63649c1 XERCESC-2196 - cross-compiling issue
de63649c1 is described below
commit de63649c1d36ff39386837bef6c0e8eb90655324
Author: Scott Cantor <[email protected]>
AuthorDate: Thu Oct 6 09:37:11 2022 -0400
XERCESC-2196 - cross-compiling issue
https://issues.apache.org/jira/browse/XERCESC-2196
---
configure.ac | 46 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 6e1319d1a..d0b316bdf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,6 +247,28 @@ else
[
AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([HAVE_WCSRTOMBS], 0, [Define to 1 if you have the `wcsrtombs' function.])
+ ],
+ [
+ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
+ #include <string.h>]],
+ [[
+ mbstate_t st;
+ memset(&st, 0, sizeof(st));
+ char buffer[32];
+ const wchar_t* src=L"help";
+ wcsrtombs(buffer, &src, 32, &st);
+ if(src==0)
+ return 0;
+ else
+ return 1;]])],
+ [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED([HAVE_WCSRTOMBS], 1, [Define to 1 if you have the `wcsrtombs' function.])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_DEFINE_UNQUOTED([HAVE_WCSRTOMBS], 0, [Define to 1 if you have the `wcsrtombs' function.])
+ ])
]
)
AC_MSG_CHECKING([for mbsrtowcs])
@@ -269,7 +291,29 @@ else
[
AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([HAVE_MBSRTOWCS], 0, [Define to 1 if you have the `mbsrtowcs' function.])
- ]
+ ],
+ [
+ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
+ #include <string.h>]],
+ [[
+ mbstate_t st;
+ memset(&st, 0, sizeof(st));
+ wchar_t buffer[32];
+ const char* src="help";
+ mbsrtowcs(buffer, &src, 32, &st);
+ if(src==0)
+ return 0;
+ else
+ return 1;]])],
+ [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED([HAVE_MBSRTOWCS], 1, [Define to 1 if you have the `mbsrtowcs' function.])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_DEFINE_UNQUOTED([HAVE_MBSRTOWCS], 0, [Define to 1 if you have the `mbsrtowcs' function.])
+ ])
+ ]
)
AC_MSG_CHECKING([if iconv uses const pointers])
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.