about summary refs log tree commit diff
path: root/locale/setlocale.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-29 05:57:16 +0000
committerRoland McGrath <roland@gnu.org>2002-08-29 05:57:16 +0000
commit9a411bf59fc681103e6a509ec3e13c68e8c61224 (patch)
treef62b3b3542ee9687ab654590687c22f348f47e67 /locale/setlocale.c
parent963e3b588003bafb2529e4a989211b0ecc39c684 (diff)
downloadglibc-9a411bf59fc681103e6a509ec3e13c68e8c61224.tar.gz
glibc-9a411bf59fc681103e6a509ec3e13c68e8c61224.tar.xz
glibc-9a411bf59fc681103e6a509ec3e13c68e8c61224.zip
* locale/findlocale.c [NL_CURRENT_INDIRECT] (_nl_C): New variable.
	* locale/setlocale.c (setlocale) [NL_CURRENT_INDIRECT]: Null return
	from _nl_find_locale ok if for _nl_C_name.
Diffstat (limited to 'locale/setlocale.c')
-rw-r--r--locale/setlocale.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 1944336004..c64db08f05 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -307,7 +307,14 @@ setlocale (int category, const char *locale)
 						 &newnames[category]);
 
 	    if (newdata[category] == NULL)
-	      break;
+	      {
+#ifdef NL_CURRENT_INDIRECT
+		if (newnames[category] == _nl_C_name)
+		  /* Null because it's the weak value of _nl_C_LC_FOO.  */
+		  continue;
+#endif
+		break;
+	      }
 
 	    /* We must not simply free a global locale since we have no
 	       control over the usage.  So we mark it as un-deletable.  */