WCHAR_MIN; WCHAR_MAX
Benjamin Kosnik
bkoz@cygnus.com
Thu Oct 7 11:56:00 GMT 1999
> Don't leave it out in general. Not all platforms loose as bad as
> Solaris. Test for the existence of th symbol and to fix it for real
> let fixinclude generate a wrapper header for the platforms having
> problems.
Hmm. Yeah. The problem being that this is bailing in mknumeric_limits,
which is run at the beginning of the build process. Are you saying that
autoconf/fixincludes should test for what? wchar_t in std_cwchar? Even if
it does test for this, we'll run into problems on platforms where wchar_t
is not a simple integer type, because mknumeric_limits is trying to probe
the basic types to determine largest size, etc for the <limits> header.
All kinds of funky stuff goes on in there.
Or, are you saying that autoconf should test for something more complex?
And if so, what? This is our current test for mbstate_t (in configure.in)
# Test wchar.h for mbstate_t, which is needed for char_traits and others.
AC_CHECK_HEADER(wchar.h, [
AC_TRY_COMPILE([#include <wchar.h>],
[mbstate_t teststate;], use_native_mbstatet=yes, use_native_mbstatet=no)])
if test $use_native_mbstatet = "no"; then
AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
AC_MSG_WARN("standard header wchar.h does not declare the type
mbstate_t")
fi
I am really in favor of cleaning up the cwchar and cmath headers once and
for all, based on either an autoconf or fixincludes hack, so that they
are cleanly generated with the correct info for the specified target.
Nobody seems able to figure out how this should be done though.
Suggestions and or a sample solution would be most welcome.
-Benjamin
More information about the Libstdc++
mailing list