Issue #2415 has been updated by tuxillo. Description updated Category set to Userland Assignee set to tuxillo Target version set to 3.9.x
Hi, Not sure if I've understood. In the case you pass the "locale" string to setlocale(3): $ uname -a DragonFly hammer.df.com 3.6-RELEASE DragonFly v3.6.0-RELEASE #8: Fri Nov 22 13:22:00 PST 2013 r...@pkgbox64.dragonflybsd.org:/usr/obj/build/home/justin/src/sys/X86_64_GENERIC x86_64 $ ./t_locale setlocale(LC_ALL, "es_ES.UTF-8")=es_ES.UTF-8 setlocale(LC_ALL, "en_EN.UTF-8")=(null) setlocale(LC_ALL, "fake")=(null) setlocale(LC_ALL, NULL)=es_ES.UTF-8 $ uname -a DragonFly hammer.df.com 3.7-DEVELOPMENT DragonFly v3.7.1.1227.g566f1-DEVELOPMENT #1: Thu May 22 19:25:43 CEST 2014 root@:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64 $ ./t_locale1 setlocale(LC_ALL, "es_ES.UTF-8")=es_ES.UTF-8 setlocale(LC_ALL, "en_EN.UTF-8")=(null) setlocale(LC_ALL, "fake")=(null) setlocale(LC_ALL, NULL)=es_ES.UTF-8 root@testfbsd:/root # uname -a FreeBSD testfbsd 9.1-RELEASE-p10 FreeBSD 9.1-RELEASE-p10 #0: Sun Jan 12 20:11:23 UTC 2014 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 root@testfbsd:/root # cc t_locale.c -o t_locale root@testfbsd:/root # ./t_locale setlocale(LC_ALL, "es_ES.UTF-8")=es_ES.UTF-8 setlocale(LC_ALL, "en_EN.UTF-8")=(null) setlocale(LC_ALL, "fake")=(null) setlocale(LC_ALL, NULL)=es_ES.UTF-8 In the case of using "" as locale: DFly: $ ./t_locale1 setlocale(LC_ALL, "")=(null) $ echo $LC_ALL fake FreBSD 9.1: root@testfbsd:/root # ./t_locale setlocale(LC_ALL, "")=(null) root@testfbsd:/root # echo $LC_ALL fake I hope I'm not misunderstanding what you just said. Best regards, Antonio Huete ---------------------------------------- Bug #2415: setlocale() for unknown locales http://bugs.dragonflybsd.org/issues/2415#change-12016 * Author: meand * Status: New * Priority: Normal * Assignee: tuxillo * Category: Userland * Target version: 3.9.x ---------------------------------------- The return value of setlocale() for LC_ALL deviates from implementations found in FreeBSD, NetBSD, GNU libc and OpenSolaris. Other implementations return NULL for unknown locales and the category LC_ALL, where instead DragonflyBSD isresponding with the internal value list. Thus an environment variable LC_ALL=fake produces ### setlocale(LC_ALL, ""); C/C/fake/fake/fake/C ### setlocale(LC_CTYPE, ""); (null) The LC_ALL category is hiding the erroneous effect from the invoking program, whereas the other categories are correctly reporting their failures. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account