about summary refs log tree commit diff
path: root/locale/programs/locale.c
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@systemhalted.org>2015-11-27 10:09:45 -0500
committerCarlos O'Donell <carlos@systemhalted.org>2015-11-27 10:22:38 -0500
commit90fe682d3067163aa773feecf497ef599429457a (patch)
tree112e4c0c097305fc1d82681b15592f0f8456f6ba /locale/programs/locale.c
parent977a30801f61b7bbc27e8f185c1e7eb49675c60c (diff)
downloadglibc-90fe682d3067163aa773feecf497ef599429457a.tar.gz
glibc-90fe682d3067163aa773feecf497ef599429457a.tar.xz
glibc-90fe682d3067163aa773feecf497ef599429457a.zip
Rename localedir to complocaledir (bug 14259).
In preparation to fix the --localedir configure argument we must
move the existing conflicting definition of localedir to a more
appropriate name. Given that all current internal uses of localedir
relate to the compiled locales we rename to complocaledir.
Diffstat (limited to 'locale/programs/locale.c')
-rw-r--r--locale/programs/locale.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index b1de17f0d2..c8995adec2 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -45,7 +45,7 @@
 #include "../locarchive.h"
 #include <programs/xmalloc.h>
 
-#define ARCHIVE_NAME LOCALEDIR "/locale-archive"
+#define ARCHIVE_NAME COMPLOCALEDIR "/locale-archive"
 
 /* If set print the name of the category.  */
 static int show_category_name;
@@ -325,9 +325,11 @@ select_dirs (const struct dirent *dirent)
 #endif
 	{
 	  struct stat64 st;
-	  char buf[sizeof (LOCALEDIR) + strlen (dirent->d_name) + 1];
+	  char buf[sizeof (COMPLOCALEDIR)
+		   + strlen (dirent->d_name) + 1];
 
-	  stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"), dirent->d_name);
+	  stpcpy (stpcpy (stpcpy (buf, COMPLOCALEDIR), "/"),
+		  dirent->d_name);
 
 	  if (stat64 (buf, &st) == 0)
 	    mode = st.st_mode;
@@ -444,17 +446,21 @@ write_locales (void)
     first_locale = 0;
 
   /* Now we can look for all files in the directory.  */
-  ndirents = scandir (LOCALEDIR, &dirents, select_dirs, alphasort);
+  ndirents = scandir (COMPLOCALEDIR, &dirents, select_dirs,
+		      alphasort);
   for (cnt = 0; cnt < ndirents; ++cnt)
     {
       /* Test whether at least the LC_CTYPE data is there.  Some
 	 directories only contain translations.  */
-      char buf[sizeof (LOCALEDIR) + strlen (dirents[cnt]->d_name)
-	      + sizeof "/LC_IDENTIFICATION"];
+      char buf[sizeof (COMPLOCALEDIR)
+	       + strlen (dirents[cnt]->d_name)
+	       + sizeof "/LC_IDENTIFICATION"];
       char *enddir;
       struct stat64 st;
 
-      stpcpy (enddir = stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"),
+      stpcpy (enddir = stpcpy (stpcpy (stpcpy (buf,
+					       COMPLOCALEDIR),
+					       "/"),
 			       dirents[cnt]->d_name),
 	      "/LC_IDENTIFICATION");