perl: Disable setlocale usage under musl
authorMarcel Denia <[email protected]>
Wed, 19 Aug 2015 22:12:16 +0000 (00:12 +0200)
committerMarcel Denia <[email protected]>
Tue, 1 Sep 2015 07:23:24 +0000 (09:23 +0200)
While setlocale() is present, musl currently doesn't provide a suitable implementation.
It'll silently accept every locale, even if not present at all, defaulting them
to C.UTF-8. This will confuse applications as well as our testsuite(see lib/locale.t).

Even if a locale does exist, it's effects will not apply to an extent that will
satisfy many applications.

Avoid further mischief here and just disable setlocale() for now.

Signed-off-by: Marcel Denia <[email protected]>
lang/perl/files/libc.config

index 1bfd93f7650186eecdc7c461333d20d229b352f7..2c355a3ce4157b892dbece761733270d9d1e404b 100644 (file)
 }
 
 ($owrt:libc eq 'musl') {
+       # musl does not provide a working setlocale(). It accepts arbitrary locales
+       # and makes them act as if they were C.UTF-8.
+       d_setlocale='undef'
+       
        d_stdio_ptr_lval='undef'
        d_stdio_ptr_lval_sets_cnt='undef'
        d_stdiobase='undef'