Skip to content

Commit

Permalink
XERCESC-2196 - cross-compiling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
scantor committed Oct 6, 2022
1 parent e4d2a4c commit de63649
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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])
Expand Down

0 comments on commit de63649

Please sign in to comment.