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 in many places.  strtold_l()?  
This stuff required for the implementation of the C++11 standard library?  
Or just general random programs?  Should be in the implementation 
namespace either way, with weak aliases in the latter case.


> - use ld(1) from binutils-2.17 to avoid linker errors (for some reason it
>   links symbols between first two object files and discards them for the
>   rest of the command line)

Can you describe the specific case where this happens?  Part of linking 
something against libcxxrt/libcxx?


> Obviously, our locale support still sucks, this patch is mostly 
> providing the API for filling the blanks later.

How much did the ramdisks grow by when you built release with this?  
Having just freed up a bunch of space on the ramdisks, I'll be pissed if 
we squander it all immediately.



> @@ -106,14 +108,14 @@ strtod
>  #endif
>  #ifdef USE_LOCALE /*{{*/
>  #ifdef NO_LOCALE_CACHE
> -     char *decimalpoint = localeconv()->decimal_point;
> +     char *decimalpoint = localeconv_l(loc)->decimal_point;
>       int dplen = strlen(decimalpoint);
>  #else
>       char *decimalpoint;
>       static char *decimalpoint_cache;
>       static int dplen;

With threads supported, NO_LOCALE_CACHE has to be defined, no?


> Index: locale/___runetype_mb.c
> ===================================================================
> RCS file: /cvs/src/lib/libc/locale/___runetype_mb.c,v
> retrieving revision 1.2
> diff -u -p -r1.2 ___runetype_mb.c
> --- locale/___runetype_mb.c   5 Dec 2012 23:20:00 -0000       1.2
> +++ locale/___runetype_mb.c   15 Oct 2013 12:42:22 -0000
> @@ -66,3 +66,4 @@ ___runetype_mb(wint_t c)
>  
>       return (0U);
>  }
> +

Heh.


Philip Guenther

Reply via email to