mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
0811db080e
svn path=/nixpkgs/branches/stdenv-updates/; revision=32373
73 lines
2.3 KiB
Diff
73 lines
2.3 KiB
Diff
diff -rc glibc-2.9-20081208-orig/locale/loadarchive.c glibc-2.9-20081208/locale/loadarchive.c
|
|
*** glibc-2.9-20081208-orig/locale/loadarchive.c 2005-09-09 18:56:52.000000000 +0200
|
|
--- glibc-2.9-20081208/locale/loadarchive.c 2009-04-19 13:54:26.000000000 +0200
|
|
***************
|
|
*** 124,129 ****
|
|
--- 124,142 ----
|
|
}
|
|
|
|
|
|
+ static int
|
|
+ open_locale_archive ()
|
|
+ {
|
|
+ int fd = -1;
|
|
+ char *path = getenv ("LOCALE_ARCHIVE");
|
|
+ if (path)
|
|
+ fd = open_not_cancel_2 (path, O_RDONLY|O_LARGEFILE);
|
|
+ if (fd < 0)
|
|
+ fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
|
|
+ return fd;
|
|
+ }
|
|
+
|
|
+
|
|
/* Find the locale *NAMEP in the locale archive, and return the
|
|
internalized data structure for its CATEGORY data. If this locale has
|
|
already been loaded from the archive, just returns the existing data
|
|
***************
|
|
*** 203,209 ****
|
|
archmapped = &headmap;
|
|
|
|
/* The archive has never been opened. */
|
|
! fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
|
|
if (fd < 0)
|
|
/* Cannot open the archive, for whatever reason. */
|
|
return NULL;
|
|
--- 216,222 ----
|
|
archmapped = &headmap;
|
|
|
|
/* The archive has never been opened. */
|
|
! fd = open_locale_archive ();
|
|
if (fd < 0)
|
|
/* Cannot open the archive, for whatever reason. */
|
|
return NULL;
|
|
***************
|
|
*** 394,400 ****
|
|
if (fd == -1)
|
|
{
|
|
struct stat64 st;
|
|
! fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
|
|
if (fd == -1)
|
|
/* Cannot open the archive, for whatever reason. */
|
|
return NULL;
|
|
--- 407,413 ----
|
|
if (fd == -1)
|
|
{
|
|
struct stat64 st;
|
|
! fd = open_locale_archive ();
|
|
if (fd == -1)
|
|
/* Cannot open the archive, for whatever reason. */
|
|
return NULL;
|
|
diff -rc glibc-2.9-20081208-orig/sysdeps/generic/unsecvars.h glibc-2.9-20081208/sysdeps/generic/unsecvars.h
|
|
*** glibc-2.9-20081208-orig/sysdeps/generic/unsecvars.h 2006-10-11 18:24:05.000000000 +0200
|
|
--- glibc-2.9-20081208/sysdeps/generic/unsecvars.h 2009-04-19 13:55:34.000000000 +0200
|
|
***************
|
|
*** 16,21 ****
|
|
--- 16,22 ----
|
|
"LD_SHOW_AUXV\0" \
|
|
"LD_USE_LOAD_BIAS\0" \
|
|
"LOCALDOMAIN\0" \
|
|
+ "LOCALE_ARCHIVE\0" \
|
|
"LOCPATH\0" \
|
|
"MALLOC_TRACE\0" \
|
|
"NIS_PATH\0" \
|