Fixes on the glibc-2.12 expression.

I removed a patch (mod_nano) already in the release.
I fixed the nix-locale-archive so the programs don't try to modify the /usr
locale-archive (for non-nixos), although the libc may use that archive to show
strings.
I remove the glibc-2.11 void directory.


svn path=/nixpkgs/branches/stdenv-updates/; revision=23302

+3 -43
+1 -4
pkgs/development/libraries/glibc-2.12/common.nix
··· 66 67 /* Allow nixos and nix handle the locale-archive. */ 68 ./nix-locale-archive.patch 69 - ] 70 - ++ stdenv.lib.optional (fetchgit == null) 71 - /* MOD_NANO definition, for ntp (taken from glibc upstream) */ 72 - ./mod_nano.patch; 73 74 configureFlags = [ 75 "-C"
··· 66 67 /* Allow nixos and nix handle the locale-archive. */ 68 ./nix-locale-archive.patch 69 + ]; 70 71 configureFlags = [ 72 "-C"
-31
pkgs/development/libraries/glibc-2.12/mod_nano.patch
··· 1 - commit 89b432d7a5befb85048c97e881b2106e8df58e43 2 - Author: Ulrich Drepper <drepper@redhat.com> 3 - Date: Sun Nov 22 10:23:12 2009 -0800 4 - 5 - Fix up <sys/timex.h> a bit more for recent API changes. 6 - 7 - diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h 8 - index 5f10c7f..88b87f1 100644 9 - --- a/sysdeps/unix/sysv/linux/sys/timex.h 10 - +++ b/sysdeps/unix/sysv/linux/sys/timex.h 11 - @@ -85,6 +85,9 @@ struct timex 12 - #define MOD_TIMECONST ADJ_TIMECONST 13 - #define MOD_CLKB ADJ_TICK 14 - #define MOD_CLKA ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */ 15 - +#define MOD_TAI ADJ_TAI 16 - +#define MOD_MICRO ADJ_MICRO 17 - +#define MOD_NANO ADJ_NANO 18 - 19 - 20 - /* Status codes (timex.status) */ 21 - @@ -108,8 +111,9 @@ struct timex 22 - #define STA_MODE 0x4000 /* mode (0 = PLL, 1 = FLL) (ro) */ 23 - #define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */ 24 - 25 - +/* Read-only bits */ 26 - #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ 27 - - STA_PPSERROR | STA_CLOCKERR) /* read-only bits */ 28 - + STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) 29 - 30 - /* Clock states (time_state) */ 31 - #define TIME_OK 0 /* clock synchronized, no leap second */
···
+2 -8
pkgs/development/libraries/glibc-2.12/nix-locale-archive.patch
··· 50 index 77262b7..fddc00d 100644 51 --- a/locale/programs/locale.c 52 +++ b/locale/programs/locale.c 53 - @@ -628,6 +628,23 @@ nameentcmp (const void *a, const void *b) 54 ((const struct nameent *) b)->name); 55 } 56 ··· 60 + int fd = -1; 61 + char *path = getenv ("LOCALE_ARCHIVE_2_11"); 62 + char *path2 = getenv ("LOCALE_ARCHIVE"); 63 - + const char *usualpath = "/usr/lib/locale/locale-archive"; 64 + if (path) 65 + fd = open64 (path, access); 66 + if (path2 && fd < 0) 67 + fd = open64 (path2, access); 68 + if (fd < 0) 69 + fd = open64 (fname, access); 70 - + if (fd < 0) 71 - + fd = open64 (usualpath, access); 72 + return fd; 73 +} 74 ··· 87 index 85ba77d..3ad2af8 100644 88 --- a/locale/programs/locarchive.c 89 +++ b/locale/programs/locarchive.c 90 - @@ -512,6 +512,23 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head) 91 *ah = new_ah; 92 } 93 ··· 97 + int fd = -1; 98 + char *path = getenv ("LOCALE_ARCHIVE_2_11"); 99 + char *path2 = getenv ("LOCALE_ARCHIVE"); 100 - + const char *usualpath = "/usr/lib/locale/locale-archive"; 101 + if (path) 102 + fd = open64 (path, access); 103 + if (path2 && fd < 0) 104 + fd = open64 (path2, access); 105 + if (fd < 0) 106 + fd = open64 (fname, access); 107 - + if (fd < 0) 108 - + fd = open64 (usualpath, access); 109 + return fd; 110 +} 111
··· 50 index 77262b7..fddc00d 100644 51 --- a/locale/programs/locale.c 52 +++ b/locale/programs/locale.c 53 + @@ -628,6 +628,20 @@ nameentcmp (const void *a, const void *b) 54 ((const struct nameent *) b)->name); 55 } 56 ··· 60 + int fd = -1; 61 + char *path = getenv ("LOCALE_ARCHIVE_2_11"); 62 + char *path2 = getenv ("LOCALE_ARCHIVE"); 63 + if (path) 64 + fd = open64 (path, access); 65 + if (path2 && fd < 0) 66 + fd = open64 (path2, access); 67 + if (fd < 0) 68 + fd = open64 (fname, access); 69 + return fd; 70 +} 71 ··· 84 index 85ba77d..3ad2af8 100644 85 --- a/locale/programs/locarchive.c 86 +++ b/locale/programs/locarchive.c 87 + @@ -512,6 +512,20 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head) 88 *ah = new_ah; 89 } 90 ··· 94 + int fd = -1; 95 + char *path = getenv ("LOCALE_ARCHIVE_2_11"); 96 + char *path2 = getenv ("LOCALE_ARCHIVE"); 97 + if (path) 98 + fd = open64 (path, access); 99 + if (path2 && fd < 0) 100 + fd = open64 (path2, access); 101 + if (fd < 0) 102 + fd = open64 (fname, access); 103 + return fd; 104 +} 105