From f43dc7d3f8ea53e1010abca32fff02feed062c8c Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Thu, 18 Aug 2005 19:58:56 +0000 Subject: [PATCH] Fix mbstate_t from conflicting with that from on HP-UX git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure.in | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index ac77e940e9..f4c6e9720e 100644 --- a/configure.in +++ b/configure.in @@ -3905,14 +3905,21 @@ if test "$wxUSE_WCHAR_T" = "yes"; then AC_DEFINE(HAVE_WCSLEN) fi - dnl on HP-UX aCC and g++ need this define to find mbstrtowcs() &c - if test "$USE_HPUX" = 1; then + dnl On HP-UX aCC need this define to find mbstrtowcs() &c + dnl Can't be used for g++ since the mbstate_t in wchar.h can conflict + dnl with g++'s in (unless -D_INCLUDE__STDC_A1_SOURCE is in the + dnl flags when g++ is configured, it will declare it's own). + if test "$USE_HPUX" = 1 -a "$GCC" != "yes"; then CPPFLAGS="$CPPFLAGS -D_INCLUDE__STDC_A1_SOURCE " fi - dnl try to use wcsrtombs instead of wcstombs which is buggy in old GNU - dnl libc versions if possible - AC_CHECK_FUNCS(wcsrtombs) + dnl Try to use wcsrtombs instead of wcstombs which is buggy in old GNU + dnl libc versions if possible. AC_CHECK_FUNCS only checks it's in the + dnl library, not the header, so do a header check for mbstate_t first. + AC_CHECK_TYPES([mbstate_t], + [AC_CHECK_FUNCS(wcsrtombs)], + [], + [#include ]) else AC_MSG_WARN([Wide character support is unavailable]) fi -- 2.45.2