Abdelrazak Younes <[EMAIL PROTECTED]> writes:

| > | Index: support/unicode.C
| > | ===================================================================
| > | --- support/unicode.C     (revision 14662)
| > | +++ support/unicode.C     (working copy)
| > | @@ -16,6 +16,10 @@
| > |  |  #include "debug.h"
| > |  | +#include <boost/cstdint.hpp>
| > | +
| > | +#include <iconv.h>
| > | +
| > |  #include <cerrno>
| > |  #include <iomanip>
| > |  #include <string>
| > | @@ -45,7 +49,7 @@
| > |           }
| > |   }
| > |  | -      char * inbuf = const_cast<char *>(&buf[0]);
| > | + char const * inbuf = const_cast<char *>(&buf[0]);
| > And what is the point of the const_cast then?
| > IMO this should not be const.
| 
| line59:
|   size_t res = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
| 
| MSVC tells me that it cannot convert inbuf from "char *" to "const char *"

But that is just bullocks.

Converting non-const to const is always possible, it is the opposite
that is not ok. You are sure there are not a '**' somewhere in the
error message?

What prototype does iconf have on win?

| > |   size_t inbytesleft = buf.size();
| > |   char out[1000] = { 0 };
| > |   char * outbuf = out;
| > | @@ -108,7 +112,7 @@
| > |  {
| > |   //lyxerr << "Outbuf =" << std::hex;
| > |  | -      std::vector<uint32_t> ucs4;
| > | + std::vector<boost::uint32_t> ucs4;
| > So, the win compiler has a problem with lookup,
| 
| No, I think uint32_t is also defined in the global namespace and
| that's what gcc uses here. So I guess you'd better explicitly specify
| boost::.

Hmm... that should only be used if stdint/inttypes has been included
(and c++ used in C99 compaiblity mode)

| > but please add a
| > 'using' statement instead.
| > using boost::uint32_t;
| 
| If you want but you are using boost::uint32_t just two lines before.

Hmm... ok... boost::uint32_t it is then.

-- 
        Lgb

Reply via email to