This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] nscd stat and YESSTR/NOSTR


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  <>

	* 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 <>, 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
SUSE LINUX Products GmbH       Maxfeldstr. 5       D-90409 Nuernberg
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]