Skip to content
Snippets Groups Projects
Commit 472f6129 authored by Scott Cantor's avatar Scott Cantor
Browse files

XERCESC-2196 - cross-compiling issue

https://issues.apache.org/jira/browse/XERCESC-2196
parent 92019816
No related branches found
No related tags found
No related merge requests found
...@@ -221,6 +221,28 @@ else ...@@ -221,6 +221,28 @@ else
[ [
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([HAVE_WCSRTOMBS], 0, [Define to 1 if you have the `wcsrtombs' function.]) 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]) AC_MSG_CHECKING([for mbsrtowcs])
...@@ -243,7 +265,29 @@ else ...@@ -243,7 +265,29 @@ else
[ [
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AC_DEFINE_UNQUOTED([HAVE_MBSRTOWCS], 0, [Define to 1 if you have the `mbsrtowcs' function.]) 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]) AC_MSG_CHECKING([if iconv uses const pointers])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment