This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using xlocale to implement std::locale class


I made a patch(attached) to work std::locale using xlocale on darwin (MacOSX).

To apply the patch, goto libstdc++ directory and
patch -p1 < (attached filename)

To make the patched code work, one has to configure with --enable-clocale=darwin-xlocale.


However in this point, I only checked a trivial test like
locale::global(locale("");
and checked IO thru wcin/wcout to wstring works correctly.
Sorry but I could not catch up with what was discussed in this ML about the testsuite of std::locale. What kind of test should I do?



Additionaly, since Jonathan mentioned below, I checked the standards for what is used in config/local/gnu.(CX means extension to the ISO C standard.)


nl_langinfo_l POSIX.2008
strcoll_l POSIX.2008(CX)
strftime_l POSIX.2008(CX)
strtod_l
strtof_l
strtold_l
strxfrm_l POSIX.2008(CX)
newlocale POSIX.2008
freelocale POSIX.2008
duplocale POSIX.2008
uselocale POSIX.2008

iswctype_l POSIX.2008(CX)
towlower_l POSIX.2008(CX)
towupper_l POSIX.2008(CX)
wcscoll_l POSIX.2008(CX)
wcsftime_l
wcsxfrm_l POSIX.2008(CX)
wctype_l POSIX.2008(CX)

Maybe, directory arrangement like config/locale/ieee_1003.1-2008{,cx} would be better abstraction than what I made in this patch.

(11/05/05 9:41), Jonathan Wakely wrote:
If that isn't possible without changing the ABI of the darwin locale
model then you could create a new model. Maybe based on POSIX.2008 if
it can be defined only in terms of the latest POSIX API, or but let's
call it darwin2.  That would allow you to leave the existing darwin
model and create a totally new (incompatible) one enabled by
--enable-clocale=darwin2


-- Takeshi Kobayakawa

Attachment: libstdc++.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]