source: patches/glibc-2.5-branch_update-1.patch@ cee27cd

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since cee27cd was 3218ec2, checked in by Jim Gifford <clfs@…>, 18 years ago

Added: glibc-2.5-branch_update-1.patch

  • Property mode set to 100644
File size: 18.0 KB
RevLine 
[3218ec2]1Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
2Date: 2006-12-03
3Initial Package Version: 2.5
4Upstream Status: From Upstream
5Origin: Robert Connolly (Concept)
6 cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc \
7 co -rglibc-2_5-branch libc
8Description: This is a branch update for Glibc-2.5, and should be
9rechecked periodically. See the "Changelog" and "localedata/ChangeLog"
10for specific details.
11
12diff -Naur glibc-2.5/ChangeLog libc/ChangeLog
13--- glibc-2.5/ChangeLog 2006-09-29 11:45:39.000000000 -0700
14+++ libc/ChangeLog 2006-10-06 08:39:29.000000000 -0700
15@@ -1,5 +1,62 @@
16+2006-10-06 Andreas Jaeger <aj@suse.de>
17+
18+ * include/features.h (__GLIBC_MINOR__): It's glibc 2.5 now.
19+
20+2006-10-06 Ulrich Drepper <drepper@redhat.com>
21+
22+ * po/pl.po: Update from translation team.
23+
24+ * nscd/nscd.c (main): Fix typo in message.
25+ Patch by Jakub Bogsz <qboosh@pld-linux.org>.
26+
27+2006-10-02 Jakub Jelinek <jakub@redhat.com>
28+
29+ [BZ #3291]
30+ * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Include
31+ errno.h, signal.h, unistd.h and sysdep-cancel.h.
32+ (__sigprocmask): Define.
33+
34+2006-10-02 Ulrich Drepper <drepper@redhat.com>
35+
36+ * elf/rtld.c (dl_main): Don't use prelinking if LD_DYNAMIC_WEAK is
37+ used.
38+
39+2006-10-02 Jakub Jelinek <jakub@redhat.com>
40+
41+ * nscd/mem.c (mempool_alloc): Round array size to 16 bytes
42+ in oldtotal and newtotal calculation.
43+ * nscd/nscd-client.h (struct mapped_database): Add datasize
44+ field.
45+ * nscd/nscd_helper.c (get_mapping): Initialize datasize field.
46+ (__nscd_get_map_ref): Get a new mapping even if mapping's data_size
47+ increased.
48+ (__nscd_cache_search): Add checks to make sure we never reference
49+ data beyond the current mapping.
50+
51+2006-10-02 Dmitry V. Levin <ldv@altlinux.org>
52+
53+ * sysdeps/posix/getaddrinfo.c (match_prefix): Make mask and val
54+ variables const to avoid compiler warnings.
55+
56+ * io/fts.c (fts_close): Remove redundant checks.
57+ (fts_build): Likewise.
58+ (fts_palloc): Likewise.
59+
60+ * manual/message.texi (Advanced gettext functions,
61+ Using gettextized software): Fix typos.
62+
63+2006-09-30 Ulrich Drepper <drepper@redhat.com>
64+
65+ * posix/glob.c (glob_in_dir): Add some comments and asserts to
66+ explain why there are no leaks.
67+
68 2006-09-29 Ulrich Drepper <drepper@redhat.com>
69
70+ * libio/wmemstream.c: Include <wchar.h>.
71+ * libio/bug-wmemstream1.c: Likewise.
72+ * libio/tst-wmemstream1.c: Likewise.
73+ * libio/tst-wmemstream2.c: Likewise.
74+
75 * version.h (RELEASE): Bump to 2.5.
76 * README: Regenerated.
77
78diff -Naur glibc-2.5/elf/rtld.c libc/elf/rtld.c
79--- glibc-2.5/elf/rtld.c 2006-09-29 09:56:15.000000000 -0700
80+++ libc/elf/rtld.c 2006-10-02 11:24:37.000000000 -0700
81@@ -2087,7 +2087,8 @@
82 }
83
84 if (main_map->l_info[ADDRIDX (DT_GNU_LIBLIST)]
85- && ! __builtin_expect (GLRO(dl_profile) != NULL, 0))
86+ && ! __builtin_expect (GLRO(dl_profile) != NULL, 0)
87+ && ! __builtin_expect (GLRO(dl_dynamic_weak), 0))
88 {
89 ElfW(Lib) *liblist, *liblistend;
90 struct link_map **r_list, **r_listend, *l;
91diff -Naur glibc-2.5/include/features.h libc/include/features.h
92--- glibc-2.5/include/features.h 2006-04-25 13:34:32.000000000 -0700
93+++ libc/include/features.h 2006-10-06 08:38:14.000000000 -0700
94@@ -304,7 +304,7 @@
95 /* Major and minor version number of the GNU C library package. Use
96 these macros to test for features in specific releases. */
97 #define __GLIBC__ 2
98-#define __GLIBC_MINOR__ 4
99+#define __GLIBC_MINOR__ 5
100
101 #define __GLIBC_PREREQ(maj, min) \
102 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
103diff -Naur glibc-2.5/io/fts.c libc/io/fts.c
104--- glibc-2.5/io/fts.c 2006-04-08 12:33:17.000000000 -0700
105+++ libc/io/fts.c 2006-10-02 09:06:49.000000000 -0700
106@@ -251,8 +251,7 @@
107 /* Free up child linked list, sort array, path buffer. */
108 if (sp->fts_child)
109 fts_lfree(sp->fts_child);
110- if (sp->fts_array)
111- free(sp->fts_array);
112+ free(sp->fts_array);
113 free(sp->fts_path);
114
115 /* Return to original directory, save errno if necessary. */
116@@ -705,8 +704,7 @@
117 * structures already allocated.
118 */
119 mem1: saved_errno = errno;
120- if (p)
121- free(p);
122+ free(p);
123 fts_lfree(head);
124 (void)__closedir(dirp);
125 cur->fts_info = FTS_ERR;
126@@ -1043,10 +1041,7 @@
127 * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
128 */
129 if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) {
130- if (sp->fts_path) {
131- free(sp->fts_path);
132- sp->fts_path = NULL;
133- }
134+ free(sp->fts_path);
135 sp->fts_path = NULL;
136 __set_errno (ENAMETOOLONG);
137 return (1);
138diff -Naur glibc-2.5/libio/bug-wmemstream1.c libc/libio/bug-wmemstream1.c
139--- glibc-2.5/libio/bug-wmemstream1.c 2006-08-14 15:11:34.000000000 -0700
140+++ libc/libio/bug-wmemstream1.c 2006-09-29 17:06:33.000000000 -0700
141@@ -1,5 +1,6 @@
142 #include <stdio.h>
143 #include <string.h>
144+#include <wchar.h>
145
146
147 static int
148diff -Naur glibc-2.5/libio/tst-wmemstream1.c libc/libio/tst-wmemstream1.c
149--- glibc-2.5/libio/tst-wmemstream1.c 2006-01-11 18:02:27.000000000 -0800
150+++ libc/libio/tst-wmemstream1.c 2006-09-29 17:06:33.000000000 -0700
151@@ -1,3 +1,5 @@
152+#include <wchar.h>
153+
154 #define CHAR_T wchar_t
155 #define W(o) L##o
156 #define OPEN_MEMSTREAM open_wmemstream
157diff -Naur glibc-2.5/libio/tst-wmemstream2.c libc/libio/tst-wmemstream2.c
158--- glibc-2.5/libio/tst-wmemstream2.c 2006-01-11 18:02:27.000000000 -0800
159+++ libc/libio/tst-wmemstream2.c 2006-09-29 17:06:33.000000000 -0700
160@@ -1,3 +1,5 @@
161+#include <wchar.h>
162+
163 #define CHAR_T wchar_t
164 #define W(o) L##o
165 #define OPEN_MEMSTREAM open_wmemstream
166diff -Naur glibc-2.5/libio/wmemstream.c libc/libio/wmemstream.c
167--- glibc-2.5/libio/wmemstream.c 2006-08-14 15:13:48.000000000 -0700
168+++ libc/libio/wmemstream.c 2006-09-29 17:06:33.000000000 -0700
169@@ -20,6 +20,7 @@
170 #include "strfile.h"
171 #include <stdio.h>
172 #include <stdlib.h>
173+#include <wchar.h>
174
175
176 struct _IO_FILE_wmemstream
177diff -Naur glibc-2.5/localedata/ChangeLog libc/localedata/ChangeLog
178--- glibc-2.5/localedata/ChangeLog 2006-09-29 11:30:52.000000000 -0700
179+++ libc/localedata/ChangeLog 2006-10-06 08:36:50.000000000 -0700
180@@ -1,3 +1,16 @@
181+2006-10-05 Dmitry V. Levin <ldv@altlinux.org>
182+
183+ * locales/tt_RU: Fix territory, title and descriptive comment.
184+
185+2006-10-05 Ulrich Drepper <drepper@redhat.com>
186+
187+ * locales/pa_IN (abday): Fix spelling of Sunday.
188+ Patch by Mayank Jain <majain@redhat.com>.
189+
190+2006-10-01 Ulrich Drepper <drepper@redhat.com>
191+
192+ * locales/en_GB: Use more complete en_US data in LC_NAME.
193+
194 2006-09-29 Ulrich Drepper <drepper@redhat.com>
195
196 [BZ #39]
197diff -Naur glibc-2.5/localedata/locales/en_GB libc/localedata/locales/en_GB
198--- glibc-2.5/localedata/locales/en_GB 2006-07-30 15:19:44.000000000 -0700
199+++ libc/localedata/locales/en_GB 2006-10-01 09:18:33.000000000 -0700
200@@ -146,8 +146,7 @@
201 END LC_MEASUREMENT
202
203 LC_NAME
204-name_fmt "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
205-<U0025><U006D><U0025><U0074><U0025><U0066>"
206+copy "en_US"
207 END LC_NAME
208
209 LC_ADDRESS
210diff -Naur glibc-2.5/localedata/locales/pa_IN libc/localedata/locales/pa_IN
211--- glibc-2.5/localedata/locales/pa_IN 2006-08-12 22:47:24.000000000 -0700
212+++ libc/localedata/locales/pa_IN 2006-10-05 09:54:26.000000000 -0700
213@@ -80,7 +80,7 @@
214 "<U0A2C><U0A41><U0A71><U0A27><U0020>";/
215 "<U0A35><U0A40><U0A30><U0020>";/
216 "<U0A36><U0A41><U0A71><U0A15><U0A30><U0020>";/
217- "<U0A36><U0A28><U0A40><U0A1A><U0A30><U0020>"
218+ "<U0A36><U0A28><U0A3F><U0A71><U0A1A><U0A30><U0020>"
219 %
220 % Full weekday names (%A)
221 day "<U0A10><U0A24><U0A35><U0A3E><U0A30><U0020>";/
222diff -Naur glibc-2.5/localedata/locales/tt_RU libc/localedata/locales/tt_RU
223--- glibc-2.5/localedata/locales/tt_RU 2006-07-30 15:19:43.000000000 -0700
224+++ libc/localedata/locales/tt_RU 2006-10-06 08:34:42.000000000 -0700
225@@ -1,7 +1,7 @@
226 comment_char %
227 escape_char /
228 %
229-% Tatar Language Locale for Tatarstan
230+% Tatar Language Locale for Russia
231 % Source:
232 % Contact: Pablo Saratxaga, Rinat Norkin
233 % Email: <pablo@mandrakesoft.com>, <rinat@taif.ru>
234@@ -24,7 +24,7 @@
235 % replace cyrillic alphabet
236
237 LC_IDENTIFICATION
238-title "Tatar language locale for Tatarstan"
239+title "Tatar language locale for Russia"
240 source "Rinat Norkin"
241 address ""
242 contact "Pablo Saratxaga, Rinat Norkin"
243@@ -32,7 +32,7 @@
244 tel ""
245 fax ""
246 language "Tatar"
247-territory "Tatarstan"
248+territory "Russia"
249 revision "0.4"
250 date "2001-01-28"
251
252diff -Naur glibc-2.5/manual/message.texi libc/manual/message.texi
253--- glibc-2.5/manual/message.texi 2003-08-29 00:15:18.000000000 -0700
254+++ libc/manual/message.texi 2006-10-02 09:02:53.000000000 -0700
255@@ -1189,7 +1189,7 @@
256 with every language this is the only viable solution except for
257 hardcoding the information in the code (which still would require the
258 possibility of extensions to not prevent the use of new languages). The
259-details are explained in the GNU @code{gettext} manual. Here only a a
260+details are explained in the GNU @code{gettext} manual. Here only a
261 bit of information is provided.
262
263 The information about the plural form selection has to be stored in the
264@@ -1590,7 +1590,7 @@
265 them.
266
267 The POSIX locale model uses the environment variables @code{LC_COLLATE},
268-@code{LC_CTYPE}, @code{LC_MESSAGES}, @code{LC_MONETARY}, @code{NUMERIC},
269+@code{LC_CTYPE}, @code{LC_MESSAGES}, @code{LC_MONETARY}, @code{LC_NUMERIC},
270 and @code{LC_TIME} to select the locale which is to be used. This way
271 the user can influence lots of functions. As we mentioned above the
272 @code{gettext} functions also take advantage of this.
273diff -Naur glibc-2.5/manual/stdio.texi libc/manual/stdio.texi
274--- glibc-2.5/manual/stdio.texi 2006-02-03 23:12:54.000000000 -0800
275+++ libc/manual/stdio.texi 2006-10-06 08:33:02.000000000 -0700
276@@ -2393,8 +2393,9 @@
277 allocates a string (as with @code{malloc}; @pxref{Unconstrained
278 Allocation}) to hold the output, instead of putting the output in a
279 buffer you allocate in advance. The @var{ptr} argument should be the
280-address of a @code{char *} object, and @code{asprintf} stores a pointer
281-to the newly allocated string at that location.
282+address of a @code{char *} object, and a successful call to
283+@code{asprintf} stores a pointer to the newly allocated string at that
284+location.
285
286 The return value is the number of characters allocated for the buffer, or
287 less than zero if an error occurred. Usually this means that the buffer
288diff -Naur glibc-2.5/nscd/mem.c libc/nscd/mem.c
289--- glibc-2.5/nscd/mem.c 2005-12-06 21:47:27.000000000 -0800
290+++ libc/nscd/mem.c 2006-10-02 09:31:11.000000000 -0700
291@@ -1,5 +1,5 @@
292 /* Cache memory handling.
293- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
294+ Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
295 This file is part of the GNU C Library.
296 Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
297
298@@ -480,12 +480,12 @@
299 {
300 /* Try to resize the database. Grow size of 1/8th. */
301 size_t oldtotal = (sizeof (struct database_pers_head)
302- + db->head->module * sizeof (ref_t)
303+ + roundup (db->head->module * sizeof (ref_t), ALIGN)
304 + db->head->data_size);
305 size_t new_data_size = (db->head->data_size
306 + MAX (2 * len, db->head->data_size / 8));
307 size_t newtotal = (sizeof (struct database_pers_head)
308- + db->head->module * sizeof (ref_t)
309+ + roundup (db->head->module * sizeof (ref_t), ALIGN)
310 + new_data_size);
311 if (newtotal > db->max_db_size)
312 {
313diff -Naur glibc-2.5/nscd/nscd.c libc/nscd/nscd.c
314--- glibc-2.5/nscd/nscd.c 2006-05-30 10:29:36.000000000 -0700
315+++ libc/nscd/nscd.c 2006-10-06 08:24:36.000000000 -0700
316@@ -237,7 +237,7 @@
317
318 if (chdir ("/") != 0)
319 error (EXIT_FAILURE, errno,
320- _("cannot change current working cirectory to \"/\""));
321+ _("cannot change current working directory to \"/\""));
322
323 openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON);
324
325diff -Naur glibc-2.5/nscd/nscd-client.h libc/nscd/nscd-client.h
326--- glibc-2.5/nscd/nscd-client.h 2006-04-25 16:48:55.000000000 -0700
327+++ libc/nscd/nscd-client.h 2006-10-02 09:32:27.000000000 -0700
328@@ -258,6 +258,7 @@
329 const char *data;
330 size_t mapsize;
331 int counter; /* > 0 indicates it is usable. */
332+ size_t datasize;
333 };
334 #define NO_MAPPING ((struct mapped_database *) -1l)
335
336diff -Naur glibc-2.5/nscd/nscd_helper.c libc/nscd/nscd_helper.c
337--- glibc-2.5/nscd/nscd_helper.c 2006-04-25 16:47:53.000000000 -0700
338+++ libc/nscd/nscd_helper.c 2006-10-02 09:33:51.000000000 -0700
339@@ -290,6 +290,7 @@
340 newp->data = ((char *) mapping + head.header_size
341 + roundup (head.module * sizeof (ref_t), ALIGN));
342 newp->mapsize = size;
343+ newp->datasize = head.data_size;
344 /* Set counter to 1 to show it is usable. */
345 newp->counter = 1;
346
347@@ -340,7 +341,8 @@
348 /* If not mapped or timestamp not updated, request new map. */
349 if (cur == NULL
350 || (cur->head->nscd_certainly_running == 0
351- && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL)))
352+ && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL))
353+ || cur->head->data_size > cur->datasize)
354 cur = get_mapping (type, name,
355 (struct mapped_database **) &mapptr->mapped);
356
357@@ -365,14 +367,18 @@
358 const struct mapped_database *mapped)
359 {
360 unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module;
361+ size_t datasize = mapped->datasize;
362
363 ref_t work = mapped->head->array[hash];
364- while (work != ENDREF)
365+ while (work != ENDREF && work + sizeof (struct hashentry) <= datasize)
366 {
367 struct hashentry *here = (struct hashentry *) (mapped->data + work);
368
369- if (type == here->type && keylen == here->len
370- && memcmp (key, mapped->data + here->key, keylen) == 0)
371+ if (type == here->type
372+ && keylen == here->len
373+ && here->key + here->len <= datasize
374+ && memcmp (key, mapped->data + here->key, keylen) == 0
375+ && here->packet + sizeof (struct datahead) <= datasize)
376 {
377 /* We found the entry. Increment the appropriate counter. */
378 const struct datahead *dh
379@@ -380,8 +386,7 @@
380
381 /* See whether we must ignore the entry or whether something
382 is wrong because garbage collection is in progress. */
383- if (dh->usable && ((char *) dh + dh->allocsize
384- <= (char *) mapped->head + mapped->mapsize))
385+ if (dh->usable && here->packet + dh->allocsize <= datasize)
386 return dh;
387 }
388
389diff -Naur glibc-2.5/posix/glob.c libc/posix/glob.c
390--- glibc-2.5/posix/glob.c 2006-09-25 08:31:56.000000000 -0700
391+++ libc/posix/glob.c 2006-09-30 08:08:44.000000000 -0700
392@@ -1287,8 +1287,15 @@
393 for (size_t i = 0; i < cur; ++i)
394 free (names->name[i]);
395 names = names->next;
396+ /* NB: we will not leak memory here if we exit without
397+ freeing the current block assigned to OLD. At least
398+ the very first block is always allocated on the stack
399+ and this is the block assigned to OLD here. */
400 if (names == NULL)
401- break;
402+ {
403+ assert (old == &init_names);
404+ break;
405+ }
406 cur = names->count;
407 if (old == names_alloca)
408 names_alloca = names;
409@@ -1306,8 +1313,15 @@
410 new_gl_pathv[pglob->gl_offs + pglob->gl_pathc++]
411 = names->name[i];
412 names = names->next;
413+ /* NB: we will not leak memory here if we exit without
414+ freeing the current block assigned to OLD. At least
415+ the very first block is always allocated on the stack
416+ and this is the block assigned to OLD here. */
417 if (names == NULL)
418- break;
419+ {
420+ assert (old == &init_names);
421+ break;
422+ }
423 cur = names->count;
424 if (old == names_alloca)
425 names_alloca = names;
426diff -Naur glibc-2.5/README libc/README
427--- glibc-2.5/README 2006-09-29 11:42:12.000000000 -0700
428+++ libc/README 2006-10-02 10:11:52.000000000 -0700
429@@ -10,13 +10,6 @@
430 implement the operating system behavior seen by user applications.
431 In GNU/Hurd systems, it works with a microkernel and Hurd servers.
432
433-Version 2.4 is the first release after a long period of development, and
434-introduces changes to the API and a new ABI for all configurations. It
435-has been tested and deployed in new production systems, but should still
436-be considered somewhat experimental. The stable 2.3 release series
437-continues to be maintained, and implements a widely-deployed ABI.
438-Version 2.3.6 is available, and we will release 2.3.7 with more bug fixes.
439-
440 The GNU C Library implements much of the POSIX.1 functionality in the
441 GNU/Hurd system, using configurations i[34567]86-*-gnu.
442
443diff -Naur glibc-2.5/README.template libc/README.template
444--- glibc-2.5/README.template 2006-03-06 02:59:31.000000000 -0800
445+++ libc/README.template 2006-10-02 10:10:43.000000000 -0700
446@@ -10,13 +10,6 @@
447 implement the operating system behavior seen by user applications.
448 In GNU/Hurd systems, it works with a microkernel and Hurd servers.
449
450-Version 2.4 is the first release after a long period of development, and
451-introduces changes to the API and a new ABI for all configurations. It
452-has been tested and deployed in new production systems, but should still
453-be considered somewhat experimental. The stable 2.3 release series
454-continues to be maintained, and implements a widely-deployed ABI.
455-Version 2.3.6 is available, and we will release 2.3.7 with more bug fixes.
456-
457 The GNU C Library implements much of the POSIX.1 functionality in the
458 GNU/Hurd system, using configurations i[34567]86-*-gnu.
459
460diff -Naur glibc-2.5/sysdeps/posix/getaddrinfo.c libc/sysdeps/posix/getaddrinfo.c
461--- glibc-2.5/sysdeps/posix/getaddrinfo.c 2006-09-24 09:51:50.000000000 -0700
462+++ libc/sysdeps/posix/getaddrinfo.c 2006-10-02 09:49:47.000000000 -0700
463@@ -1291,8 +1291,8 @@
464 for (idx = 0; ; ++idx)
465 {
466 unsigned int bits = list[idx].bits;
467- uint8_t *mask = list[idx].prefix.s6_addr;
468- uint8_t *val = in6->sin6_addr.s6_addr;
469+ const uint8_t *mask = list[idx].prefix.s6_addr;
470+ const uint8_t *val = in6->sin6_addr.s6_addr;
471
472 while (bits >= 8)
473 {
474diff -Naur glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c libc/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
475--- glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c 2006-08-14 22:27:23.000000000 -0700
476+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c 2006-10-02 11:40:39.000000000 -0700
477@@ -1 +1,9 @@
478+#include <errno.h>
479+#include <signal.h>
480+#include <unistd.h>
481+#include <sysdep-cancel.h>
482+
483+#define __sigprocmask(how, set, oset) \
484+ INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8)
485+
486 #include <sysdeps/posix/pause.c>
Note: See TracBrowser for help on using the repository browser.