[PATCH] nscd stat and YESSTR/NOSTR
Thorsten Kukuk
kukuk@suse.de
Thu Jun 23 21:02:00 GMT 2005
Hi,
currently nscd -g always prints an empty string instead of "yes" or
"no". The reason is, that we now use nl_langinfo(YESSTR) and
nl_langinfo(NOSTR). But glibc documentation declares YESSTR and NOSTR
as deprecated and none of our locales supports it, so that nl_langinfo
always returns an empty string. Here a trivial fix:
2005-06-23 Thorsten Kukuk <kukuk@suse.de>
* nscd/nscd_stat.c (receive_print_stats): Replace YESSTR/NOSTR
with own translation.
--- nscd/nscd_stat.c 3 Oct 2004 21:11:18 -0000 1.13
+++ nscd/nscd_stat.c 23 Jun 2005 20:58:25 -0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1998.
@@ -143,8 +143,8 @@
int fd;
int i;
uid_t uid = getuid ();
- const char *yesstr = nl_langinfo (YESSTR);
- const char *nostr = nl_langinfo (NOSTR);
+ const char *yesstr = _("yes");
+ const char *nostr = _("no");
/* Find out whether there is another user but root allowed to
request statistics. */
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SUSE LINUX Products GmbH Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
More information about the Libc-alpha
mailing list