Re: partial xlocale(3) port from FreeBSD

2013-10-23 Thread Vladimir Támara Patiño
Commenting differences I find between your patch and the one I sent On Tue, Oct 15, 2013 at 03:32:29PM +0200, Martin Pelikan wrote: Index: Makefile +CFLAGS+=-D__NO_TLS I had removed parts that used TLS, but this is better. Index: arch/amd64/gdtoa/strtold.c I didn't have this (neither for

Re: partial xlocale(3) port from FreeBSD

2013-10-21 Thread Stefan Sperling
On Mon, Oct 21, 2013 at 12:45:58AM +0200, Martin Pelikan wrote: Obviously, our locale support still sucks, this patch is mostly providing the API for filling the blanks later. Which blanks exactly? Locale features we don't have, such as collation? Yes. The features why for

Re: partial xlocale(3) port from FreeBSD

2013-10-21 Thread Martin Pelikan
Indeed, doing collation properly (i.e. with Unicode, not just 8 bit characters like FreeBSD does) really is a non-trivial effort. It requires some expertise in linguistics and a solid understanding of the unicode standard. You'd need to make use of something like ICU (icu-project.org) to

Re: partial xlocale(3) port from FreeBSD

2013-10-21 Thread Stefan Sperling
On Mon, Oct 21, 2013 at 02:14:32PM +0200, Martin Pelikan wrote: Applications don't care where a symbol comes from. Build scripts and Makefiles might expect them to be in libc and would need to link an additional library, but that's trivial to do. For all such ports? Ok then :-) How many

Re: partial xlocale(3) port from FreeBSD

2013-10-21 Thread Vladimir Támara Patiño
On Mon, Oct 21, 2013 at 02:14:32PM +0200, Martin Pelikan wrote: Indeed, doing collation properly (i.e. with Unicode, not just 8 bit characters like FreeBSD does) really is a non-trivial effort. It requires some expertise in linguistics and a solid understanding of the unicode standard.

Re: partial xlocale(3) port from FreeBSD

2013-10-21 Thread Stefan Sperling
On Mon, Oct 21, 2013 at 09:05:04AM -0500, Vladimir Támara Patiño wrote: I agree full Unicode support is desirable, but IMHO having 8 bits collation is better than nothing (for example withouth it spanish speakers have to see ñ, á and other special symbols at the end of sorted results in

Re: partial xlocale(3) port from FreeBSD

2013-10-20 Thread Stefan Sperling
On Sat, Oct 19, 2013 at 09:26:47PM -0700, Philip Guenther wrote: On Tue, 15 Oct 2013, Martin Pelikan wrote: Obviously, our locale support still sucks, this patch is mostly providing the API for filling the blanks later. Which blanks exactly? Locale features we don't have, such as collation?

Re: partial xlocale(3) port from FreeBSD

2013-10-20 Thread Martin Pelikan
Obviously, our locale support still sucks, this patch is mostly providing the API for filling the blanks later. Which blanks exactly? Locale features we don't have, such as collation? Yes. The features why for example PostgreSQL won't sort tables correctly, which if you live in a

Re: partial xlocale(3) port from FreeBSD

2013-10-19 Thread Philip Guenther
On Tue, 15 Oct 2013, Martin Pelikan wrote: Apologies, I left one bit out. Here it is. ... --- locale.h 3 Jul 2011 18:51:01 - 1.8 +++ locale.h 15 Oct 2013 19:21:31 - @@ -54,6 +54,12 @@ struct lconv { charn_sep_by_space; charp_sign_posn; char

Re: partial xlocale(3) port from FreeBSD

2013-10-19 Thread Philip Guenther
On Tue, 15 Oct 2013, Martin Pelikan wrote: my laptop now has libcxx working (most of the tests pass, but I haven't checked what is missing from the C++ runtime). The steps required are: - port xlocale(3) from FreeBSD -- this is what this patch does Interesting: this goes beyond POSIX.2008

Re: partial xlocale(3) port from FreeBSD

2013-10-19 Thread Philip Guenther
On Tue, Oct 15, 2013 at 6:40 AM, Martin Pelikan martin.peli...@gmail.com wrote: Second part (include/ headers) follows. Is this xlocale.h specified anywhere so that we can evaluate our compliance? Philip Guenther

Re: partial xlocale(3) port from FreeBSD

2013-10-15 Thread Martin Pelikan
- port xlocale(3) from FreeBSD -- this is what this patch does I did the patch in two parts, separating include/ and lib/libc/, because my Second part (include/ headers) follows. -- Martin Pelikan Index: _ctype.h === RCS file:

Re: partial xlocale(3) port from FreeBSD

2013-10-15 Thread Martin Pelikan
- port xlocale(3) from FreeBSD -- this is what this patch does Second part (include/ headers) follows. Apologies, I left one bit out. Here it is. -- Martin Pelikan Index: locale.h === RCS file: /cvs/src/include/locale.h,v