Collation implementation

Paolo Bonzini bonzi@pc-amo3.elet.polimi.it
Mon Jun 19 04:36:00 GMT 2000


> I believe it is not possible to implement this in a reliable and
> portable way; you need certain help from the C library (or else it
> will be inefficient and thread-unsafe, or using a different database
> than the C library).

In fact my problem was that if I force people to use glibc I lose
everybody who's not using Linux, while if I use a different database I
make maintainance more complicated for me.

I wanted to make my choice coherent with those of the libstdc++ team. An
idea could be to extract glibc's locale implementation (including
xlocale.h) into a separate `liblocale' to be used by GNU Smalltalk,
libstdc++ and whatever else.

This liblocale could be distributed together with glibc's localedata; we
would need to get the latest CVS of libc and convert
locale/localedef/locale.h to eliminate dependencies on gcc and glibc
(especially the latter would make the work void).

Making a separate library is a good way to take maintainance problems out
of a library -- for example before writing GNU Smalltalk's JIT compiler I
decided to put the back-ends into a separate library to keep portability
issues out of GNU Smalltalk. What do you think?

Paolo Bonzini



More information about the Libstdc++ mailing list