Peter Kümmel wrote:
Lars Gullik Bjønnes wrote:
Peter Kümmel <[EMAIL PROTECTED]> writes:

| Peter Kümmel wrote:
| > Seems we have to use a ifdef.
| | Or we solve it with help of overloading the casting operator:

Hmm... I think I'll put that in the 'quite ugly' category.


Do you really prefer the configure/macro based version? This version
I would call'quite ugly'. I prefer a pure C++ version, but it's just
a matter of taste, so we should not discuss it.

I normally prefer pure C++ and dislike macro but I have to admit that your solution is complicated to read ;-)

We are talking here about a support code that uses a C library (iconv) so I'd say that macro are acceptable here. I would personally simply go for an #ifdef in uicode.C for now:

/* Define as const if the declaration of iconv() needs const. */
#ifdef WIN32
 #define ICONV_CONST const
#else
 #define ICONV_CONST
#endif

Then, that could be changed when/if someone has the autoconf and scons knowledge to do the test on the iconv prototype.

Abdel.



Maybe Bo could change the scons scripts for ICONV_CONST.

Peter



Reply via email to