RE: Your INTERMEDIATE_ENCODING patch for Solaris

Pierre Muller
2010-08-19T15:03:48Z

Hi Tom,

I think your patch still has a problem:
if I have a system (like my i386 open solaris)
that only has the libc iconv functions, but no libiconv)
The libc headers do not set __STDC_ISO_10646__
nor defined _LIBICONV_VERSION macro.

Thus we do not know how to handle those iconv functions.
I think that we should simply ignore them by defining PHONY_ICONV in such cases.
The problem is then that we already loaded libc iconv.h header
which then leads to an error of conflicting types for iconv definition.

This probably means that the check that in done inside gdb_wchar.h should be
changed into a configuration macro, something like
HAVE_USABLE_ICONV.

Pierre

PS: libc iconv on Solaris seems to work more or less,
but it doesn't like 'ASCII' charset (don't know why..)
but code in _initialize_charset does transform '646' into 'ASCII'
which is bad.
If LANG is set to en_US.UTF-8 for instance,
the 'print version' works.
So changing the '646' -> 'ASCII' into a '646' -> 'UTF-8'
would also improve things for solaris, but I have no idea
if this would also affect Non Solaris hosts.

PS2: what about being able to disable iconv at configure level with
--disable-iconv
that would skip iconv checks and thus lead to
PHONY_ICONV?