This is the mail archive of the libc-alpha@sources.redhat.com 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]

useless file accesses (1)



At startup of internationalized programs, locale.alias is searched in two
places: /usr/share/locale/locale.alias and /usr/share/i18n/locale.alias.

Strace output:
  open("/glibc22/share/locale/locale.alias", O_RDONLY) = 3
  fstat(3, {st_mode=S_IFREG|0644, st_size=2316, ...}) = 0
  read(3, "# Locale name alias data base.\n#"..., 4096) = 2316
  read(3, "", 4096)                       = 0
  close(3)                                = 0
  open("/glibc22/share/i18n/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)

I'm in favour of removing the second location because:

- There has never been a file in the second location, as far as I can remember.
- The /usr/share/i18n directory contains only data for localedef, not for
  libc itself.
- Both locations are in /usr/share, not on /var; therefore it doesn't give
  any additional customization facilities for the user.
- The manual recommends to modify the first file and doesn't mention the
  second one.


2000-08-06  Bruno Haible  <haible@clisp.cons.org>

	* intl/Makefile (CPPFLAGS): Remove $(i18ndir) from LOCALE_ALIAS_PATH.
	* locale/Makefile (locale-CPPFLAGS): Likewise.

*** glibc-20000729/intl/Makefile.bak	Thu Jul 20 19:44:00 2000
--- glibc-20000729/intl/Makefile	Sun Aug  6 19:18:08 2000
***************
*** 70,76 ****
  $(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
  
  CPPFLAGS += -D'GNULOCALEDIR="$(msgcatdir)"' \
! 	    -D'LOCALE_ALIAS_PATH="$(msgcatdir):$(i18ndir)"'
  YFLAGS = --name-prefix=__gettext --output
  
  $(inst_msgcatdir)/locale.alias: locale.alias $(+force)
--- 70,76 ----
  $(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
  
  CPPFLAGS += -D'GNULOCALEDIR="$(msgcatdir)"' \
! 	    -D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
  YFLAGS = --name-prefix=__gettext --output
  
  $(inst_msgcatdir)/locale.alias: locale.alias $(+force)
*** glibc-20000729/locale/Makefile.bak	Mon Jul 24 15:34:51 2000
--- glibc-20000729/locale/Makefile	Sun Aug  6 19:18:10 2000
***************
*** 85,91 ****
  
  locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
  		   -DLOCALEDIR='"$(localedir)"' \
! 		   -DLOCALE_ALIAS_PATH='"$(msgcatdir):$(i18ndir)"' \
  		   -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
  		   -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
  		   -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
--- 85,91 ----
  
  locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
  		   -DLOCALEDIR='"$(localedir)"' \
! 		   -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
  		   -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
  		   -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
  		   -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \

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