[haiku-development] Compatibility breakage: wchar_t -> long int

  • From: Oliver Tappe <zooey@xxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 22 Jun 2009 23:11:59 +0200

Hi guys,

during recent research concerning wchar_t and the related functions in our 
libroot, I have learnt that haiku's current compilers define wchar_t in a way 
(short unsigned int) that's incompatible with the actual implementation 
(which expects it to be 32 bits wide). This causes most wc-related functions 
to simply fail.

Locally, I have changed our gcc-configurations to break with 
BeOS-"compatibility" and defined wchar_t as "long int". This made quite a 
number of functions work all of a sudden (most notably, the conversion 
functions between multi-bytes and wide-characters).

While this is good, applying this change will require every haiku 
installation to be rebuilt completely. Additionally, all optional packages 
which might make use of wchar_t in any way, would have to be updated, too.

So, is there a good/bad time for this or should I just proceed?

cheers,
        Oliver

P.S.: if there are any changes pending for gcc2 or gcc4, please tell, since
      now would be a very good time to apply those, too :-)

Other related posts: