1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-05 19:35:52 +03:00

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.
This commit is contained in:
Carlos O'Donell
2015-11-27 10:09:45 -05:00
parent 977a30801f
commit 90fe682d30
21 changed files with 70 additions and 33 deletions

View File

@@ -1,3 +1,30 @@
2015-11-27 Carlos O'Donell <carlos@redhat.com>
[BZ #14259]
* Makeconfig: Rename localedir to complocaledir.
Rename inst_localedir to inst_complocaledir.
* aclocal.m4: Rename libc_cv_localedir to libc_cv_complocaledir.
* config.make.in: Use complocaledir and libc_cv_complocaledir.
* configure.ac: Use libc_cv_complocaledir.
* configure: Regenerate.
* locale/Makefile: Use complocaledir. Rename define -DLOCALEDIR to
-DCOMPLOCALEDIR.
* locale/findlocale.c: Use COMPLOCALEDIR.
* locale/loadarchive.c: Likewise.
* locale/programs/locale.c: Likewise.
* locale/programs/localedef.c: Likewise.
* locale/programs/locarchive.c: Likewise.
* localedata/Makefile: Use inst_complocaledir.
* sysdeps/gnu/configure: Regenerate.
* sysdeps/hppa/configure: Regenerate.
* sysdeps/unix/sysv/linux/aarch64/configure: Regenerate.
* sysdeps/unix/sysv/linux/mips/configure: Regenerate.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Regenerate.
* sysdeps/unix/sysv/linux/s390/s390-64/configure: Regenerate.
* sysdeps/unix/sysv/linux/sparc/sparc64/configure: Regenerate.
* sysdeps/unix/sysv/linux/x86_64/64/configure: Regenerate.
* sysdeps/unix/sysv/linux/x86_64/x32/configure: Regenerate.
2015-11-27 Andrew Senkevich <andrew.senkevich@intel.com> 2015-11-27 Andrew Senkevich <andrew.senkevich@intel.com>
[BZ #19058] [BZ #19058]

View File

@@ -190,11 +190,12 @@ zonedir = $(datadir)/zoneinfo
endif endif
inst_zonedir = $(install_root)$(zonedir) inst_zonedir = $(install_root)$(zonedir)
# Where to install the locale files. # Where to install the compiled binary locale archive and compiled
ifndef localedir # binary locale files.
localedir = $(libdir)/locale ifndef complocaledir
complocaledir = $(libdir)/locale
endif endif
inst_localedir = $(install_root)$(localedir) inst_complocaledir = $(install_root)$(complocaledir)
# Where to install the message catalog data files (which are # Where to install the message catalog data files (which are
# machine-independent). # machine-independent).

2
aclocal.m4 vendored
View File

@@ -296,7 +296,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/$1'; libdir='${exec_prefix}/$1';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac]) esac])

View File

@@ -12,7 +12,7 @@ datadir = @datadir@
libdir = @libdir@ libdir = @libdir@
slibdir = @libc_cv_slibdir@ slibdir = @libc_cv_slibdir@
rtlddir = @libc_cv_rtlddir@ rtlddir = @libc_cv_rtlddir@
localedir = @libc_cv_localedir@ complocaledir = @libc_cv_complocaledir@
sysconfdir = @libc_cv_sysconfdir@ sysconfdir = @libc_cv_sysconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
rootsbindir = @libc_cv_rootsbindir@ rootsbindir = @libc_cv_rootsbindir@

2
configure vendored
View File

@@ -603,7 +603,7 @@ use_ldconfig
libc_cv_rootsbindir libc_cv_rootsbindir
libc_cv_localstatedir libc_cv_localstatedir
libc_cv_sysconfdir libc_cv_sysconfdir
libc_cv_localedir libc_cv_complocaledir
libc_cv_rtlddir libc_cv_rtlddir
libc_cv_slibdir libc_cv_slibdir
use_nscd use_nscd

View File

@@ -1763,7 +1763,7 @@ fi
AC_SUBST(libc_cv_slibdir) AC_SUBST(libc_cv_slibdir)
AC_SUBST(libc_cv_rtlddir) AC_SUBST(libc_cv_rtlddir)
AC_SUBST(libc_cv_localedir) AC_SUBST(libc_cv_complocaledir)
AC_SUBST(libc_cv_sysconfdir) AC_SUBST(libc_cv_sysconfdir)
AC_SUBST(libc_cv_localstatedir) AC_SUBST(libc_cv_localstatedir)
AC_SUBST(libc_cv_rootsbindir) AC_SUBST(libc_cv_rootsbindir)

View File

@@ -76,12 +76,15 @@ C-translit.h: C-translit.h.in gen-translit.pl
$(PERL) gen-translit.pl < $< > $@.tmp $(PERL) gen-translit.pl < $< > $@.tmp
mv -f $@.tmp $@ mv -f $@.tmp $@
localepath = "$(localedir):$(i18ndir)" # The path to the compiled binary locale archive or compiled locales,
# along with the parent path to the source locales and source
# charmaps.
localepath = "$(complocaledir):$(i18ndir)"
# -Iprograms doesn't really belong here, but this gets it at the head # -Iprograms doesn't really belong here, but this gets it at the head
# of the list instead of the tail, where CPPFLAGS-$(lib) gets added. # of the list instead of the tail, where CPPFLAGS-$(lib) gets added.
# We need it before the standard -I's to see programs/config.h first. # We need it before the standard -I's to see programs/config.h first.
locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \ locale-CPPFLAGS = -DCOMPLOCALEDIR='"$(complocaledir)"' \
-DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \ -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
-Iprograms -Iprograms

View File

@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden =
which are somehow addressed. */ which are somehow addressed. */
struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST]; struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
const char _nl_default_locale_path[] attribute_hidden = LOCALEDIR; const char _nl_default_locale_path[] attribute_hidden = COMPLOCALEDIR;
/* Checks if the name is actually present, that is, not NULL and not /* Checks if the name is actually present, that is, not NULL and not
empty. */ empty. */

View File

@@ -42,7 +42,7 @@
/* Name of the locale archive file. */ /* Name of the locale archive file. */
static const char archfname[] = LOCALEDIR "/locale-archive"; static const char archfname[] = COMPLOCALEDIR "/locale-archive";
/* Size of initial mapping window, optimal if large enough to /* Size of initial mapping window, optimal if large enough to
cover the header plus the initial locale. */ cover the header plus the initial locale. */

View File

@@ -45,7 +45,7 @@
#include "../locarchive.h" #include "../locarchive.h"
#include <programs/xmalloc.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. */ /* If set print the name of the category. */
static int show_category_name; static int show_category_name;
@@ -325,9 +325,11 @@ select_dirs (const struct dirent *dirent)
#endif #endif
{ {
struct stat64 st; 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) if (stat64 (buf, &st) == 0)
mode = st.st_mode; mode = st.st_mode;
@@ -444,17 +446,21 @@ write_locales (void)
first_locale = 0; first_locale = 0;
/* Now we can look for all files in the directory. */ /* 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) for (cnt = 0; cnt < ndirents; ++cnt)
{ {
/* Test whether at least the LC_CTYPE data is there. Some /* Test whether at least the LC_CTYPE data is there. Some
directories only contain translations. */ directories only contain translations. */
char buf[sizeof (LOCALEDIR) + strlen (dirents[cnt]->d_name) char buf[sizeof (COMPLOCALEDIR)
+ strlen (dirents[cnt]->d_name)
+ sizeof "/LC_IDENTIFICATION"]; + sizeof "/LC_IDENTIFICATION"];
char *enddir; char *enddir;
struct stat64 st; struct stat64 st;
stpcpy (enddir = stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"), stpcpy (enddir = stpcpy (stpcpy (stpcpy (buf,
COMPLOCALEDIR),
"/"),
dirents[cnt]->d_name), dirents[cnt]->d_name),
"/LC_IDENTIFICATION"); "/LC_IDENTIFICATION");

View File

@@ -457,11 +457,11 @@ construct_output_path (char *path)
'/'. */ '/'. */
ssize_t n; ssize_t n;
if (normal == NULL) if (normal == NULL)
n = asprintf (&result, "%s%s/%s%c", n = asprintf (&result, "%s%s/%s%c", output_prefix ?: "",
output_prefix ?: "", LOCALEDIR, path, '\0'); COMPLOCALEDIR, path, '\0');
else else
n = asprintf (&result, "%s%s/%.*s%s%s%c", n = asprintf (&result, "%s%s/%.*s%s%s%c",
output_prefix ?: "", LOCALEDIR, output_prefix ?: "", COMPLOCALEDIR,
(int) (startp - path), path, normal, endp, '\0'); (int) (startp - path), path, normal, endp, '\0');
if (n < 0) if (n < 0)

View File

@@ -57,7 +57,7 @@
extern const char *output_prefix; extern const char *output_prefix;
#define ARCHIVE_NAME LOCALEDIR "/locale-archive" #define ARCHIVE_NAME COMPLOCALEDIR "/locale-archive"
static const char *locnames[] = static const char *locnames[] =
{ {

View File

@@ -199,7 +199,7 @@ $(rtld-prefix) $(common-objpfx)locale/localedef
install-locales: $(INSTALL-SUPPORTED-LOCALES) install-locales: $(INSTALL-SUPPORTED-LOCALES)
install-locales-dir: install-locales-dir:
$(..)./scripts/mkinstalldirs $(inst_localedir) $(..)./scripts/mkinstalldirs $(inst_complocaledir)
$(INSTALL-SUPPORTED-LOCALES): install-locales-dir $(INSTALL-SUPPORTED-LOCALES): install-locales-dir
@locale=`echo $@ | sed -e 's/^install-//'`; \ @locale=`echo $@ | sed -e 's/^install-//'`; \

View File

@@ -14,7 +14,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib'; libdir='${exec_prefix}/lib';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac

View File

@@ -11,7 +11,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64'; libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac

View File

@@ -420,7 +420,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64'; libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac
@@ -434,7 +434,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib32'; libdir='${exec_prefix}/lib32';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac

View File

@@ -9,7 +9,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64'; libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac

View File

@@ -9,7 +9,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64'; libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac

View File

@@ -9,7 +9,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64'; libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac

View File

@@ -9,7 +9,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64'; libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac

View File

@@ -11,7 +11,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/libx32'; libdir='${exec_prefix}/libx32';
# Locale data can be shared between 32-bit and 64-bit libraries. # Locale data can be shared between 32-bit and 64-bit libraries.
libc_cv_localedir='${exec_prefix}/lib/locale' libc_cv_complocaledir='${exec_prefix}/lib/locale'
fi fi
;; ;;
esac esac