Hi again,
At Tue, 13 Feb 2001 07:21:15 +0900,
I wrote:
> I found that setlocale() always fails on -current.
>
> #include <stdio.h>
> #include <locale.h>
>
> int main()
> {
> if (setlocale(LC_ALL, ""))
> puts("ok");
> else
> puts("failed");
> return 0;
> }
>
> This program shows "failed" on -current regardless of the value of
> LANG unless it's other than "C", when it shows "ok" on -stable...
>
> Any ideas?
I found the culprit. Here is a patch which fixes the problem.
Index: lmessages.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/locale/lmessages.c,v
retrieving revision 1.4
diff -u -r1.4 lmessages.c
--- lmessages.c 2001/02/12 08:56:39 1.4
+++ lmessages.c 2001/02/13 08:19:04
@@ -55,7 +55,7 @@
ret = __part_load_locale(name, &_messages_using_locale,
messages_locale_buf, "LC_MESSAGES", LCMESSAGES_SIZE_FULL,
(const char **)&_messages_locale);
- if (ret == 0) {
+ if (ret != 0) {
/* Assume that we have incomplete locale file (without
* "yesstr" and "nostr" declared. Try it also.
*/
--
/
/__ __ Akinori.org / MUSHA.org
/ ) ) ) ) / FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp
"We're only at home when we're on the run, on the wing, on the fly"
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message