Subject: pkg/22476: fluxbox improperly uses return value of setlocale(3)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <anonymous@on.the.net>
List: netbsd-bugs
Date: 08/14/2003 08:54:59
>Number: 22476
>Category: pkg
>Synopsis: fluxbox improperly uses return value of setlocale(3)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 14 08:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Dandy Sakano
>Release: NetBSD 1.6W
>Organization:
2ch.net
>Environment:
NetBSD 1.6W
>Description:
The patch from PR20009 is still necessary!
>How-To-Repeat:
>Fix:
--- src/I18n.cc.orig 2003-07-01 05:37:57.000000000 +0900
+++ src/I18n.cc 2003-08-14 17:49:05.000000000 +0900
@@ -58,7 +58,9 @@
I18n::I18n():m_multibyte(false), m_catalog_fd((nl_catd)(-1)) {
#ifdef HAVE_SETLOCALE
//make sure we don't get 0 to m_locale string
- char *temp = setlocale(LC_ALL, "");
+ char *temp
+ (void)setlocale(LC_ALL, "");
+ temp = setlocale(LC_MESSAGES, NULL);
m_locale = ( temp ? temp : "");
if (m_locale.size() == 0) {
cerr<<"Warning: Failed to set locale, reverting to \"C\""<<endl;
>Release-Note:
>Audit-Trail:
>Unformatted: