瀏覽代碼

perl: Disable setlocale usage under musl

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 <naoir@gmx.net>
Marcel Denia 9 年之前
父節點
當前提交
cecee995b0
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      lang/perl/files/libc.config

+ 4
- 0
lang/perl/files/libc.config 查看文件

@@ -12,6 +12,10 @@
12 12
 }
13 13
 
14 14
 ($owrt:libc eq 'musl') {
15
+	# musl does not provide a working setlocale(). It accepts arbitrary locales
16
+	# and makes them act as if they were C.UTF-8.
17
+	d_setlocale='undef'
18
+	
15 19
 	d_stdio_ptr_lval='undef'
16 20
 	d_stdio_ptr_lval_sets_cnt='undef'
17 21
 	d_stdiobase='undef'