Re: Commit: const_casts needed to get RH7 to compile


Subject: Re: Commit: const_casts needed to get RH7 to compile
From: Chih-Wei Huang (cwhuang@linux.org.tw)
Date: Fri Nov 10 2000 - 08:33:04 CST


Dom Lachowicz ¼g¹D¡G
>
> Added a few const_cast<const char**>'s to get RH7 to compile. Spell check
> and saving of documents now works. Gnome-Printing is a bit broken now
> though, I'll fix that soon.

Sorry, are you sure to use const_cast<const char**>
to get *RH7* to compile?
I just tried to compile AW from CVS in RH7,
but failed at mismatch of iconv arguments.
In /usr/include/iconv.h (glibc 2.1.94), it reads

extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
                     size_t *__restrict __inbytesleft,
                     char **__restrict __outbuf,
                     size_t *__restrict __outbytesleft);

The second argument is not const char **.
Thus I have to change it to const_cast<const char**>
to get it work.

I also have to add
#include <string.h>
to get some files to compile, e.g.,
/src/af/util/xp/ut_pair.cpp

-- 
   ~     Chih-Wei Huang (cwhuang)
  'v'    E-Mail       : cwhuang@linux.org.tw
 // \\   CLDP Project : http://www.linux.org.tw/CLDP/ (Coordinator)
/(   )\  CLE  Project : http://cle.linux.org.tw/CLE/  (Developer)
 ^`~'^   HomePage     : http://www.cwhuang.idv.tw/



This archive was generated by hypermail 2b25 : Fri Nov 10 2000 - 08:39:04 CST