David,

> This is the problem I originally reported with glibc 2.1.9x (or
> whatever is on RHAT7). Was it fixed in CVS only, or? 

Well, Boyd's message seems to mean that it was *not* successfully fixed
in the CVS. This problem is becoming a nightmare; let me describe it in
some detail. Sorry if the description is confused.

The trouble is caused by the second parameter of the iconv() function,
which seems to be declared char** on some platforms, and const char** on
others.

Now the obvious solution, i.e. casting the const off the passed
argument, doesn't work e.g. with RedHat7, apparently due to the
__restrict keyword in the declaration of iconv().

So there are 3 possibilities for the declaration of the above argument:
(1) just char**
(2) const char**
(3) const char** which doesn't accept a char**

In case (1), you have to pass a non-const char**, while in case (3), you
have to pass a const char**. Both work in case (2).

Our present approach is rather naive; see the occurences of
UTF8_ICONV_CAST_OK in utf8.cpp. 

The only way to tell (1)-(3) apart that I can imagine is by direct
platform checks, gradually converging to a reliable test which will tell
us whether to cast off the const or not.

Any hint will be most welcome. I may also be quite wrong.

Best,
Tom Kaiser

Reply via email to