]> git.pld-linux.org Git - packages/glibc.git/blob - glibc-git.patch
- add binutils patch (quick and dirty)
[packages/glibc.git] / glibc-git.patch
1 commit 5ccf88c235e060c2c61c69011161a31c3873e690
2 Author: Jim Meyering <meyering@redhat.com>
3 Date:   Fri May 15 16:47:36 2009 +0200
4
5     rename each .cvsignore file to .gitignore
6     (cherry picked from commit 2e180a26222caf478f29e272c9d1b5d9c6299752)
7
8 diff --git a/.cvsignore b/.cvsignore
9 deleted file mode 100644
10 index 213609f..0000000
11 --- a/.cvsignore
12 +++ /dev/null
13 @@ -1,29 +0,0 @@
14 -*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps
15 -*.gz *.Z *.tar *.tgz *.bz2
16 -=*
17 -TODO AUTHORS copyr-* copying.*
18 -glibc-*
19 -
20 -configparms
21 -
22 -sun[43]* i[345]86* hp300*
23 -
24 -ieeetest hppa-sysdeps regex
25 -
26 -gpl2lgpl.sed
27 -distinfo
28 -distinfo
29 -
30 -test-include
31 -analysis
32 -docs
33 -releases
34 -
35 -libc.prj .libc.prcs_aux
36 -libc.proj .snprj
37 -
38 -TODO.html
39 -
40 -autom4te*.cache
41 -
42 -rtkaio
43 diff --git a/.gitignore b/.gitignore
44 new file mode 100644
45 index 0000000..213609f
46 --- /dev/null
47 +++ b/.gitignore
48 @@ -0,0 +1,29 @@
49 +*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps
50 +*.gz *.Z *.tar *.tgz *.bz2
51 +=*
52 +TODO AUTHORS copyr-* copying.*
53 +glibc-*
54 +
55 +configparms
56 +
57 +sun[43]* i[345]86* hp300*
58 +
59 +ieeetest hppa-sysdeps regex
60 +
61 +gpl2lgpl.sed
62 +distinfo
63 +distinfo
64 +
65 +test-include
66 +analysis
67 +docs
68 +releases
69 +
70 +libc.prj .libc.prcs_aux
71 +libc.proj .snprj
72 +
73 +TODO.html
74 +
75 +autom4te*.cache
76 +
77 +rtkaio
78 diff --git a/assert/.cvsignore b/assert/.cvsignore
79 deleted file mode 100644
80 index 3fc9f4c..0000000
81 --- a/assert/.cvsignore
82 +++ /dev/null
83 @@ -1,6 +0,0 @@
84 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
85 -*.gz *.Z *.tar *.tgz
86 -=*
87 -TODO COPYING* AUTHORS copyr-* copying.*
88 -glibc-*
89 -distinfo
90 diff --git a/assert/.gitignore b/assert/.gitignore
91 new file mode 100644
92 index 0000000..3fc9f4c
93 --- /dev/null
94 +++ b/assert/.gitignore
95 @@ -0,0 +1,6 @@
96 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
97 +*.gz *.Z *.tar *.tgz
98 +=*
99 +TODO COPYING* AUTHORS copyr-* copying.*
100 +glibc-*
101 +distinfo
102 diff --git a/csu/.cvsignore b/csu/.cvsignore
103 deleted file mode 100644
104 index da6e41b..0000000
105 --- a/csu/.cvsignore
106 +++ /dev/null
107 @@ -1,7 +0,0 @@
108 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
109 -*.gz *.Z *.tar *.tgz
110 -=*
111 -TODO COPYING* AUTHORS copyr-* copying.*
112 -glibc-*
113 -distinfo
114 -specs
115 diff --git a/csu/.gitignore b/csu/.gitignore
116 new file mode 100644
117 index 0000000..da6e41b
118 --- /dev/null
119 +++ b/csu/.gitignore
120 @@ -0,0 +1,7 @@
121 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
122 +*.gz *.Z *.tar *.tgz
123 +=*
124 +TODO COPYING* AUTHORS copyr-* copying.*
125 +glibc-*
126 +distinfo
127 +specs
128 diff --git a/ctype/.cvsignore b/ctype/.cvsignore
129 deleted file mode 100644
130 index 3fc9f4c..0000000
131 --- a/ctype/.cvsignore
132 +++ /dev/null
133 @@ -1,6 +0,0 @@
134 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
135 -*.gz *.Z *.tar *.tgz
136 -=*
137 -TODO COPYING* AUTHORS copyr-* copying.*
138 -glibc-*
139 -distinfo
140 diff --git a/ctype/.gitignore b/ctype/.gitignore
141 new file mode 100644
142 index 0000000..3fc9f4c
143 --- /dev/null
144 +++ b/ctype/.gitignore
145 @@ -0,0 +1,6 @@
146 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
147 +*.gz *.Z *.tar *.tgz
148 +=*
149 +TODO COPYING* AUTHORS copyr-* copying.*
150 +glibc-*
151 +distinfo
152 diff --git a/dirent/.cvsignore b/dirent/.cvsignore
153 deleted file mode 100644
154 index 3fc9f4c..0000000
155 --- a/dirent/.cvsignore
156 +++ /dev/null
157 @@ -1,6 +0,0 @@
158 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
159 -*.gz *.Z *.tar *.tgz
160 -=*
161 -TODO COPYING* AUTHORS copyr-* copying.*
162 -glibc-*
163 -distinfo
164 diff --git a/dirent/.gitignore b/dirent/.gitignore
165 new file mode 100644
166 index 0000000..3fc9f4c
167 --- /dev/null
168 +++ b/dirent/.gitignore
169 @@ -0,0 +1,6 @@
170 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
171 +*.gz *.Z *.tar *.tgz
172 +=*
173 +TODO COPYING* AUTHORS copyr-* copying.*
174 +glibc-*
175 +distinfo
176 diff --git a/elf/.cvsignore b/elf/.cvsignore
177 deleted file mode 100644
178 index 3fc9f4c..0000000
179 --- a/elf/.cvsignore
180 +++ /dev/null
181 @@ -1,6 +0,0 @@
182 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
183 -*.gz *.Z *.tar *.tgz
184 -=*
185 -TODO COPYING* AUTHORS copyr-* copying.*
186 -glibc-*
187 -distinfo
188 diff --git a/elf/.gitignore b/elf/.gitignore
189 new file mode 100644
190 index 0000000..3fc9f4c
191 --- /dev/null
192 +++ b/elf/.gitignore
193 @@ -0,0 +1,6 @@
194 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
195 +*.gz *.Z *.tar *.tgz
196 +=*
197 +TODO COPYING* AUTHORS copyr-* copying.*
198 +glibc-*
199 +distinfo
200 diff --git a/gmon/.cvsignore b/gmon/.cvsignore
201 deleted file mode 100644
202 index 3fc9f4c..0000000
203 --- a/gmon/.cvsignore
204 +++ /dev/null
205 @@ -1,6 +0,0 @@
206 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
207 -*.gz *.Z *.tar *.tgz
208 -=*
209 -TODO COPYING* AUTHORS copyr-* copying.*
210 -glibc-*
211 -distinfo
212 diff --git a/gmon/.gitignore b/gmon/.gitignore
213 new file mode 100644
214 index 0000000..3fc9f4c
215 --- /dev/null
216 +++ b/gmon/.gitignore
217 @@ -0,0 +1,6 @@
218 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
219 +*.gz *.Z *.tar *.tgz
220 +=*
221 +TODO COPYING* AUTHORS copyr-* copying.*
222 +glibc-*
223 +distinfo
224 diff --git a/gnulib/.cvsignore b/gnulib/.cvsignore
225 deleted file mode 100644
226 index 3fc9f4c..0000000
227 --- a/gnulib/.cvsignore
228 +++ /dev/null
229 @@ -1,6 +0,0 @@
230 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
231 -*.gz *.Z *.tar *.tgz
232 -=*
233 -TODO COPYING* AUTHORS copyr-* copying.*
234 -glibc-*
235 -distinfo
236 diff --git a/gnulib/.gitignore b/gnulib/.gitignore
237 new file mode 100644
238 index 0000000..3fc9f4c
239 --- /dev/null
240 +++ b/gnulib/.gitignore
241 @@ -0,0 +1,6 @@
242 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
243 +*.gz *.Z *.tar *.tgz
244 +=*
245 +TODO COPYING* AUTHORS copyr-* copying.*
246 +glibc-*
247 +distinfo
248 diff --git a/grp/.cvsignore b/grp/.cvsignore
249 deleted file mode 100644
250 index 3fc9f4c..0000000
251 --- a/grp/.cvsignore
252 +++ /dev/null
253 @@ -1,6 +0,0 @@
254 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
255 -*.gz *.Z *.tar *.tgz
256 -=*
257 -TODO COPYING* AUTHORS copyr-* copying.*
258 -glibc-*
259 -distinfo
260 diff --git a/grp/.gitignore b/grp/.gitignore
261 new file mode 100644
262 index 0000000..3fc9f4c
263 --- /dev/null
264 +++ b/grp/.gitignore
265 @@ -0,0 +1,6 @@
266 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
267 +*.gz *.Z *.tar *.tgz
268 +=*
269 +TODO COPYING* AUTHORS copyr-* copying.*
270 +glibc-*
271 +distinfo
272 diff --git a/hurd/.cvsignore b/hurd/.cvsignore
273 deleted file mode 100644
274 index 3fc9f4c..0000000
275 --- a/hurd/.cvsignore
276 +++ /dev/null
277 @@ -1,6 +0,0 @@
278 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
279 -*.gz *.Z *.tar *.tgz
280 -=*
281 -TODO COPYING* AUTHORS copyr-* copying.*
282 -glibc-*
283 -distinfo
284 diff --git a/hurd/.gitignore b/hurd/.gitignore
285 new file mode 100644
286 index 0000000..3fc9f4c
287 --- /dev/null
288 +++ b/hurd/.gitignore
289 @@ -0,0 +1,6 @@
290 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
291 +*.gz *.Z *.tar *.tgz
292 +=*
293 +TODO COPYING* AUTHORS copyr-* copying.*
294 +glibc-*
295 +distinfo
296 diff --git a/inet/.cvsignore b/inet/.cvsignore
297 deleted file mode 100644
298 index 3fc9f4c..0000000
299 --- a/inet/.cvsignore
300 +++ /dev/null
301 @@ -1,6 +0,0 @@
302 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
303 -*.gz *.Z *.tar *.tgz
304 -=*
305 -TODO COPYING* AUTHORS copyr-* copying.*
306 -glibc-*
307 -distinfo
308 diff --git a/inet/.gitignore b/inet/.gitignore
309 new file mode 100644
310 index 0000000..3fc9f4c
311 --- /dev/null
312 +++ b/inet/.gitignore
313 @@ -0,0 +1,6 @@
314 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
315 +*.gz *.Z *.tar *.tgz
316 +=*
317 +TODO COPYING* AUTHORS copyr-* copying.*
318 +glibc-*
319 +distinfo
320 diff --git a/intl/.cvsignore b/intl/.cvsignore
321 deleted file mode 100644
322 index 3fc9f4c..0000000
323 --- a/intl/.cvsignore
324 +++ /dev/null
325 @@ -1,6 +0,0 @@
326 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
327 -*.gz *.Z *.tar *.tgz
328 -=*
329 -TODO COPYING* AUTHORS copyr-* copying.*
330 -glibc-*
331 -distinfo
332 diff --git a/intl/.gitignore b/intl/.gitignore
333 new file mode 100644
334 index 0000000..3fc9f4c
335 --- /dev/null
336 +++ b/intl/.gitignore
337 @@ -0,0 +1,6 @@
338 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
339 +*.gz *.Z *.tar *.tgz
340 +=*
341 +TODO COPYING* AUTHORS copyr-* copying.*
342 +glibc-*
343 +distinfo
344 diff --git a/io/.cvsignore b/io/.cvsignore
345 deleted file mode 100644
346 index 3fc9f4c..0000000
347 --- a/io/.cvsignore
348 +++ /dev/null
349 @@ -1,6 +0,0 @@
350 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
351 -*.gz *.Z *.tar *.tgz
352 -=*
353 -TODO COPYING* AUTHORS copyr-* copying.*
354 -glibc-*
355 -distinfo
356 diff --git a/io/.gitignore b/io/.gitignore
357 new file mode 100644
358 index 0000000..3fc9f4c
359 --- /dev/null
360 +++ b/io/.gitignore
361 @@ -0,0 +1,6 @@
362 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
363 +*.gz *.Z *.tar *.tgz
364 +=*
365 +TODO COPYING* AUTHORS copyr-* copying.*
366 +glibc-*
367 +distinfo
368 diff --git a/libio/.cvsignore b/libio/.cvsignore
369 deleted file mode 100644
370 index 602b74c..0000000
371 --- a/libio/.cvsignore
372 +++ /dev/null
373 @@ -1,8 +0,0 @@
374 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
375 -*.gz *.Z *.tar *.tgz
376 -=*
377 -TODO COPYING* AUTHORS copyr-* copying.*
378 -glibc-*
379 -
380 -mpn-copy.mk
381 -distinfo
382 diff --git a/libio/.gitignore b/libio/.gitignore
383 new file mode 100644
384 index 0000000..602b74c
385 --- /dev/null
386 +++ b/libio/.gitignore
387 @@ -0,0 +1,8 @@
388 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
389 +*.gz *.Z *.tar *.tgz
390 +=*
391 +TODO COPYING* AUTHORS copyr-* copying.*
392 +glibc-*
393 +
394 +mpn-copy.mk
395 +distinfo
396 diff --git a/locale/.cvsignore b/locale/.cvsignore
397 deleted file mode 100644
398 index 3fc9f4c..0000000
399 --- a/locale/.cvsignore
400 +++ /dev/null
401 @@ -1,6 +0,0 @@
402 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
403 -*.gz *.Z *.tar *.tgz
404 -=*
405 -TODO COPYING* AUTHORS copyr-* copying.*
406 -glibc-*
407 -distinfo
408 diff --git a/locale/.gitignore b/locale/.gitignore
409 new file mode 100644
410 index 0000000..3fc9f4c
411 --- /dev/null
412 +++ b/locale/.gitignore
413 @@ -0,0 +1,6 @@
414 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
415 +*.gz *.Z *.tar *.tgz
416 +=*
417 +TODO COPYING* AUTHORS copyr-* copying.*
418 +glibc-*
419 +distinfo
420 diff --git a/mach/.cvsignore b/mach/.cvsignore
421 deleted file mode 100644
422 index 3fc9f4c..0000000
423 --- a/mach/.cvsignore
424 +++ /dev/null
425 @@ -1,6 +0,0 @@
426 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
427 -*.gz *.Z *.tar *.tgz
428 -=*
429 -TODO COPYING* AUTHORS copyr-* copying.*
430 -glibc-*
431 -distinfo
432 diff --git a/mach/.gitignore b/mach/.gitignore
433 new file mode 100644
434 index 0000000..3fc9f4c
435 --- /dev/null
436 +++ b/mach/.gitignore
437 @@ -0,0 +1,6 @@
438 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
439 +*.gz *.Z *.tar *.tgz
440 +=*
441 +TODO COPYING* AUTHORS copyr-* copying.*
442 +glibc-*
443 +distinfo
444 diff --git a/manual/.cvsignore b/manual/.cvsignore
445 deleted file mode 100644
446 index 54abbbb..0000000
447 --- a/manual/.cvsignore
448 +++ /dev/null
449 @@ -1,14 +0,0 @@
450 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
451 -*.gz *.Z *.tar *.tgz *.bz2
452 -=*
453 -TODO COPYING* AUTHORS copyr-* copying.*
454 -glibc-*
455 -
456 -*.dvi* *.info* *.c.texi *.ps *.pdf
457 -*.toc *.aux *.log *.tmp
458 -*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
459 -
460 -texis top-menu.texi chapters.texi summary.texi stamp-*
461 -distinfo dir-add.texinfo dir-add.texi
462 -
463 -libm-err.texi
464 diff --git a/manual/.gitignore b/manual/.gitignore
465 new file mode 100644
466 index 0000000..54abbbb
467 --- /dev/null
468 +++ b/manual/.gitignore
469 @@ -0,0 +1,14 @@
470 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
471 +*.gz *.Z *.tar *.tgz *.bz2
472 +=*
473 +TODO COPYING* AUTHORS copyr-* copying.*
474 +glibc-*
475 +
476 +*.dvi* *.info* *.c.texi *.ps *.pdf
477 +*.toc *.aux *.log *.tmp
478 +*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
479 +
480 +texis top-menu.texi chapters.texi summary.texi stamp-*
481 +distinfo dir-add.texinfo dir-add.texi
482 +
483 +libm-err.texi
484 diff --git a/math/.cvsignore b/math/.cvsignore
485 deleted file mode 100644
486 index 3fc9f4c..0000000
487 --- a/math/.cvsignore
488 +++ /dev/null
489 @@ -1,6 +0,0 @@
490 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
491 -*.gz *.Z *.tar *.tgz
492 -=*
493 -TODO COPYING* AUTHORS copyr-* copying.*
494 -glibc-*
495 -distinfo
496 diff --git a/math/.gitignore b/math/.gitignore
497 new file mode 100644
498 index 0000000..3fc9f4c
499 --- /dev/null
500 +++ b/math/.gitignore
501 @@ -0,0 +1,6 @@
502 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
503 +*.gz *.Z *.tar *.tgz
504 +=*
505 +TODO COPYING* AUTHORS copyr-* copying.*
506 +glibc-*
507 +distinfo
508 diff --git a/misc/.cvsignore b/misc/.cvsignore
509 deleted file mode 100644
510 index 3fc9f4c..0000000
511 --- a/misc/.cvsignore
512 +++ /dev/null
513 @@ -1,6 +0,0 @@
514 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
515 -*.gz *.Z *.tar *.tgz
516 -=*
517 -TODO COPYING* AUTHORS copyr-* copying.*
518 -glibc-*
519 -distinfo
520 diff --git a/misc/.gitignore b/misc/.gitignore
521 new file mode 100644
522 index 0000000..3fc9f4c
523 --- /dev/null
524 +++ b/misc/.gitignore
525 @@ -0,0 +1,6 @@
526 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
527 +*.gz *.Z *.tar *.tgz
528 +=*
529 +TODO COPYING* AUTHORS copyr-* copying.*
530 +glibc-*
531 +distinfo
532 diff --git a/po/.cvsignore b/po/.cvsignore
533 deleted file mode 100644
534 index 37752e3..0000000
535 --- a/po/.cvsignore
536 +++ /dev/null
537 @@ -1,2 +0,0 @@
538 -*.mo
539 -libc.pot.files
540 diff --git a/po/.gitignore b/po/.gitignore
541 new file mode 100644
542 index 0000000..37752e3
543 --- /dev/null
544 +++ b/po/.gitignore
545 @@ -0,0 +1,2 @@
546 +*.mo
547 +libc.pot.files
548 diff --git a/posix/.cvsignore b/posix/.cvsignore
549 deleted file mode 100644
550 index 3fc9f4c..0000000
551 --- a/posix/.cvsignore
552 +++ /dev/null
553 @@ -1,6 +0,0 @@
554 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
555 -*.gz *.Z *.tar *.tgz
556 -=*
557 -TODO COPYING* AUTHORS copyr-* copying.*
558 -glibc-*
559 -distinfo
560 diff --git a/posix/.gitignore b/posix/.gitignore
561 new file mode 100644
562 index 0000000..3fc9f4c
563 --- /dev/null
564 +++ b/posix/.gitignore
565 @@ -0,0 +1,6 @@
566 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
567 +*.gz *.Z *.tar *.tgz
568 +=*
569 +TODO COPYING* AUTHORS copyr-* copying.*
570 +glibc-*
571 +distinfo
572 diff --git a/pwd/.cvsignore b/pwd/.cvsignore
573 deleted file mode 100644
574 index 3fc9f4c..0000000
575 --- a/pwd/.cvsignore
576 +++ /dev/null
577 @@ -1,6 +0,0 @@
578 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
579 -*.gz *.Z *.tar *.tgz
580 -=*
581 -TODO COPYING* AUTHORS copyr-* copying.*
582 -glibc-*
583 -distinfo
584 diff --git a/pwd/.gitignore b/pwd/.gitignore
585 new file mode 100644
586 index 0000000..3fc9f4c
587 --- /dev/null
588 +++ b/pwd/.gitignore
589 @@ -0,0 +1,6 @@
590 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
591 +*.gz *.Z *.tar *.tgz
592 +=*
593 +TODO COPYING* AUTHORS copyr-* copying.*
594 +glibc-*
595 +distinfo
596 diff --git a/resolv/.cvsignore b/resolv/.cvsignore
597 deleted file mode 100644
598 index 3fc9f4c..0000000
599 --- a/resolv/.cvsignore
600 +++ /dev/null
601 @@ -1,6 +0,0 @@
602 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
603 -*.gz *.Z *.tar *.tgz
604 -=*
605 -TODO COPYING* AUTHORS copyr-* copying.*
606 -glibc-*
607 -distinfo
608 diff --git a/resolv/.gitignore b/resolv/.gitignore
609 new file mode 100644
610 index 0000000..3fc9f4c
611 --- /dev/null
612 +++ b/resolv/.gitignore
613 @@ -0,0 +1,6 @@
614 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
615 +*.gz *.Z *.tar *.tgz
616 +=*
617 +TODO COPYING* AUTHORS copyr-* copying.*
618 +glibc-*
619 +distinfo
620 diff --git a/resource/.cvsignore b/resource/.cvsignore
621 deleted file mode 100644
622 index 3fc9f4c..0000000
623 --- a/resource/.cvsignore
624 +++ /dev/null
625 @@ -1,6 +0,0 @@
626 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
627 -*.gz *.Z *.tar *.tgz
628 -=*
629 -TODO COPYING* AUTHORS copyr-* copying.*
630 -glibc-*
631 -distinfo
632 diff --git a/resource/.gitignore b/resource/.gitignore
633 new file mode 100644
634 index 0000000..3fc9f4c
635 --- /dev/null
636 +++ b/resource/.gitignore
637 @@ -0,0 +1,6 @@
638 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
639 +*.gz *.Z *.tar *.tgz
640 +=*
641 +TODO COPYING* AUTHORS copyr-* copying.*
642 +glibc-*
643 +distinfo
644 diff --git a/setjmp/.cvsignore b/setjmp/.cvsignore
645 deleted file mode 100644
646 index 3fc9f4c..0000000
647 --- a/setjmp/.cvsignore
648 +++ /dev/null
649 @@ -1,6 +0,0 @@
650 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
651 -*.gz *.Z *.tar *.tgz
652 -=*
653 -TODO COPYING* AUTHORS copyr-* copying.*
654 -glibc-*
655 -distinfo
656 diff --git a/setjmp/.gitignore b/setjmp/.gitignore
657 new file mode 100644
658 index 0000000..3fc9f4c
659 --- /dev/null
660 +++ b/setjmp/.gitignore
661 @@ -0,0 +1,6 @@
662 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
663 +*.gz *.Z *.tar *.tgz
664 +=*
665 +TODO COPYING* AUTHORS copyr-* copying.*
666 +glibc-*
667 +distinfo
668 diff --git a/signal/.cvsignore b/signal/.cvsignore
669 deleted file mode 100644
670 index 3fc9f4c..0000000
671 --- a/signal/.cvsignore
672 +++ /dev/null
673 @@ -1,6 +0,0 @@
674 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
675 -*.gz *.Z *.tar *.tgz
676 -=*
677 -TODO COPYING* AUTHORS copyr-* copying.*
678 -glibc-*
679 -distinfo
680 diff --git a/signal/.gitignore b/signal/.gitignore
681 new file mode 100644
682 index 0000000..3fc9f4c
683 --- /dev/null
684 +++ b/signal/.gitignore
685 @@ -0,0 +1,6 @@
686 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
687 +*.gz *.Z *.tar *.tgz
688 +=*
689 +TODO COPYING* AUTHORS copyr-* copying.*
690 +glibc-*
691 +distinfo
692 diff --git a/socket/.cvsignore b/socket/.cvsignore
693 deleted file mode 100644
694 index 3fc9f4c..0000000
695 --- a/socket/.cvsignore
696 +++ /dev/null
697 @@ -1,6 +0,0 @@
698 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
699 -*.gz *.Z *.tar *.tgz
700 -=*
701 -TODO COPYING* AUTHORS copyr-* copying.*
702 -glibc-*
703 -distinfo
704 diff --git a/socket/.gitignore b/socket/.gitignore
705 new file mode 100644
706 index 0000000..3fc9f4c
707 --- /dev/null
708 +++ b/socket/.gitignore
709 @@ -0,0 +1,6 @@
710 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
711 +*.gz *.Z *.tar *.tgz
712 +=*
713 +TODO COPYING* AUTHORS copyr-* copying.*
714 +glibc-*
715 +distinfo
716 diff --git a/stdio-common/.cvsignore b/stdio-common/.cvsignore
717 deleted file mode 100644
718 index 602b74c..0000000
719 --- a/stdio-common/.cvsignore
720 +++ /dev/null
721 @@ -1,8 +0,0 @@
722 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
723 -*.gz *.Z *.tar *.tgz
724 -=*
725 -TODO COPYING* AUTHORS copyr-* copying.*
726 -glibc-*
727 -
728 -mpn-copy.mk
729 -distinfo
730 diff --git a/stdio-common/.gitignore b/stdio-common/.gitignore
731 new file mode 100644
732 index 0000000..602b74c
733 --- /dev/null
734 +++ b/stdio-common/.gitignore
735 @@ -0,0 +1,8 @@
736 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
737 +*.gz *.Z *.tar *.tgz
738 +=*
739 +TODO COPYING* AUTHORS copyr-* copying.*
740 +glibc-*
741 +
742 +mpn-copy.mk
743 +distinfo
744 diff --git a/stdlib/.cvsignore b/stdlib/.cvsignore
745 deleted file mode 100644
746 index 602b74c..0000000
747 --- a/stdlib/.cvsignore
748 +++ /dev/null
749 @@ -1,8 +0,0 @@
750 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
751 -*.gz *.Z *.tar *.tgz
752 -=*
753 -TODO COPYING* AUTHORS copyr-* copying.*
754 -glibc-*
755 -
756 -mpn-copy.mk
757 -distinfo
758 diff --git a/stdlib/.gitignore b/stdlib/.gitignore
759 new file mode 100644
760 index 0000000..602b74c
761 --- /dev/null
762 +++ b/stdlib/.gitignore
763 @@ -0,0 +1,8 @@
764 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
765 +*.gz *.Z *.tar *.tgz
766 +=*
767 +TODO COPYING* AUTHORS copyr-* copying.*
768 +glibc-*
769 +
770 +mpn-copy.mk
771 +distinfo
772 diff --git a/string/.cvsignore b/string/.cvsignore
773 deleted file mode 100644
774 index 3fc9f4c..0000000
775 --- a/string/.cvsignore
776 +++ /dev/null
777 @@ -1,6 +0,0 @@
778 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
779 -*.gz *.Z *.tar *.tgz
780 -=*
781 -TODO COPYING* AUTHORS copyr-* copying.*
782 -glibc-*
783 -distinfo
784 diff --git a/string/.gitignore b/string/.gitignore
785 new file mode 100644
786 index 0000000..3fc9f4c
787 --- /dev/null
788 +++ b/string/.gitignore
789 @@ -0,0 +1,6 @@
790 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
791 +*.gz *.Z *.tar *.tgz
792 +=*
793 +TODO COPYING* AUTHORS copyr-* copying.*
794 +glibc-*
795 +distinfo
796 diff --git a/sunrpc/.cvsignore b/sunrpc/.cvsignore
797 deleted file mode 100644
798 index b2e79b5..0000000
799 --- a/sunrpc/.cvsignore
800 +++ /dev/null
801 @@ -1,8 +0,0 @@
802 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
803 -*.gz *.Z *.tar *.tgz
804 -=*
805 -TODO COPYING* AUTHORS copyr-* copying.*
806 -glibc-*
807 -
808 -rpcsrc-4.0
809 -distinfo
810 diff --git a/sunrpc/.gitignore b/sunrpc/.gitignore
811 new file mode 100644
812 index 0000000..b2e79b5
813 --- /dev/null
814 +++ b/sunrpc/.gitignore
815 @@ -0,0 +1,8 @@
816 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
817 +*.gz *.Z *.tar *.tgz
818 +=*
819 +TODO COPYING* AUTHORS copyr-* copying.*
820 +glibc-*
821 +
822 +rpcsrc-4.0
823 +distinfo
824 diff --git a/sysdeps/mach/hurd/.cvsignore b/sysdeps/mach/hurd/.cvsignore
825 deleted file mode 100644
826 index 1f69fd9..0000000
827 --- a/sysdeps/mach/hurd/.cvsignore
828 +++ /dev/null
829 @@ -1,4 +0,0 @@
830 -*.gz *.Z *.tar *.tgz
831 -=*
832 -TODO COPYING* AUTHORS copyr-* copying.*
833 -glibc-*
834 diff --git a/sysdeps/mach/hurd/.gitignore b/sysdeps/mach/hurd/.gitignore
835 new file mode 100644
836 index 0000000..1f69fd9
837 --- /dev/null
838 +++ b/sysdeps/mach/hurd/.gitignore
839 @@ -0,0 +1,4 @@
840 +*.gz *.Z *.tar *.tgz
841 +=*
842 +TODO COPYING* AUTHORS copyr-* copying.*
843 +glibc-*
844 diff --git a/sysdeps/unix/common/.cvsignore b/sysdeps/unix/common/.cvsignore
845 deleted file mode 100644
846 index 1f69fd9..0000000
847 --- a/sysdeps/unix/common/.cvsignore
848 +++ /dev/null
849 @@ -1,4 +0,0 @@
850 -*.gz *.Z *.tar *.tgz
851 -=*
852 -TODO COPYING* AUTHORS copyr-* copying.*
853 -glibc-*
854 diff --git a/sysdeps/unix/common/.gitignore b/sysdeps/unix/common/.gitignore
855 new file mode 100644
856 index 0000000..1f69fd9
857 --- /dev/null
858 +++ b/sysdeps/unix/common/.gitignore
859 @@ -0,0 +1,4 @@
860 +*.gz *.Z *.tar *.tgz
861 +=*
862 +TODO COPYING* AUTHORS copyr-* copying.*
863 +glibc-*
864 diff --git a/sysvipc/.cvsignore b/sysvipc/.cvsignore
865 deleted file mode 100644
866 index 3fc9f4c..0000000
867 --- a/sysvipc/.cvsignore
868 +++ /dev/null
869 @@ -1,6 +0,0 @@
870 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
871 -*.gz *.Z *.tar *.tgz
872 -=*
873 -TODO COPYING* AUTHORS copyr-* copying.*
874 -glibc-*
875 -distinfo
876 diff --git a/sysvipc/.gitignore b/sysvipc/.gitignore
877 new file mode 100644
878 index 0000000..3fc9f4c
879 --- /dev/null
880 +++ b/sysvipc/.gitignore
881 @@ -0,0 +1,6 @@
882 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
883 +*.gz *.Z *.tar *.tgz
884 +=*
885 +TODO COPYING* AUTHORS copyr-* copying.*
886 +glibc-*
887 +distinfo
888 diff --git a/termios/.cvsignore b/termios/.cvsignore
889 deleted file mode 100644
890 index 3fc9f4c..0000000
891 --- a/termios/.cvsignore
892 +++ /dev/null
893 @@ -1,6 +0,0 @@
894 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
895 -*.gz *.Z *.tar *.tgz
896 -=*
897 -TODO COPYING* AUTHORS copyr-* copying.*
898 -glibc-*
899 -distinfo
900 diff --git a/termios/.gitignore b/termios/.gitignore
901 new file mode 100644
902 index 0000000..3fc9f4c
903 --- /dev/null
904 +++ b/termios/.gitignore
905 @@ -0,0 +1,6 @@
906 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
907 +*.gz *.Z *.tar *.tgz
908 +=*
909 +TODO COPYING* AUTHORS copyr-* copying.*
910 +glibc-*
911 +distinfo
912 diff --git a/time/.cvsignore b/time/.cvsignore
913 deleted file mode 100644
914 index 3fc9f4c..0000000
915 --- a/time/.cvsignore
916 +++ /dev/null
917 @@ -1,6 +0,0 @@
918 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
919 -*.gz *.Z *.tar *.tgz
920 -=*
921 -TODO COPYING* AUTHORS copyr-* copying.*
922 -glibc-*
923 -distinfo
924 diff --git a/time/.gitignore b/time/.gitignore
925 new file mode 100644
926 index 0000000..3fc9f4c
927 --- /dev/null
928 +++ b/time/.gitignore
929 @@ -0,0 +1,6 @@
930 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
931 +*.gz *.Z *.tar *.tgz
932 +=*
933 +TODO COPYING* AUTHORS copyr-* copying.*
934 +glibc-*
935 +distinfo
936 diff --git a/wcsmbs/.cvsignore b/wcsmbs/.cvsignore
937 deleted file mode 100644
938 index 3fc9f4c..0000000
939 --- a/wcsmbs/.cvsignore
940 +++ /dev/null
941 @@ -1,6 +0,0 @@
942 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
943 -*.gz *.Z *.tar *.tgz
944 -=*
945 -TODO COPYING* AUTHORS copyr-* copying.*
946 -glibc-*
947 -distinfo
948 diff --git a/wcsmbs/.gitignore b/wcsmbs/.gitignore
949 new file mode 100644
950 index 0000000..3fc9f4c
951 --- /dev/null
952 +++ b/wcsmbs/.gitignore
953 @@ -0,0 +1,6 @@
954 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
955 +*.gz *.Z *.tar *.tgz
956 +=*
957 +TODO COPYING* AUTHORS copyr-* copying.*
958 +glibc-*
959 +distinfo
960 diff --git a/wctype/.cvsignore b/wctype/.cvsignore
961 deleted file mode 100644
962 index 3fc9f4c..0000000
963 --- a/wctype/.cvsignore
964 +++ /dev/null
965 @@ -1,6 +0,0 @@
966 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
967 -*.gz *.Z *.tar *.tgz
968 -=*
969 -TODO COPYING* AUTHORS copyr-* copying.*
970 -glibc-*
971 -distinfo
972 diff --git a/wctype/.gitignore b/wctype/.gitignore
973 new file mode 100644
974 index 0000000..3fc9f4c
975 --- /dev/null
976 +++ b/wctype/.gitignore
977 @@ -0,0 +1,6 @@
978 +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
979 +*.gz *.Z *.tar *.tgz
980 +=*
981 +TODO COPYING* AUTHORS copyr-* copying.*
982 +glibc-*
983 +distinfo
984 commit b0a411e5ddb4d0e7e9eca017fd6e8c3c060071cb
985 Author: Ulrich Drepper <drepper@redhat.com>
986 Date:   Fri May 15 13:02:02 2009 -0700
987
988     Ignore Emacs backup files.
989     (cherry picked from commit f1342e0be8e222dbca077beca94b5937564e8c4b)
990
991 diff --git a/.gitignore b/.gitignore
992 index 213609f..1518b6a 100644
993 --- a/.gitignore
994 +++ b/.gitignore
995 @@ -1,3 +1,4 @@
996 +*~
997  *.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps
998  *.gz *.Z *.tar *.tgz *.bz2
999  =*
1000 commit 85734801890201249fcf5270ca50ae0dbac77c94
1001 Author: Ulrich Drepper <drepper@redhat.com>
1002 Date:   Fri May 15 19:47:10 2009 -0700
1003
1004     Cleanup some .gitignore files.
1005     (cherry picked from commit 9a1fbe861d8ae41976f926a211d59098a030878f)
1006
1007 diff --git a/.gitignore b/.gitignore
1008 index 1518b6a..d903bc6 100644
1009 --- a/.gitignore
1010 +++ b/.gitignore
1011 @@ -1,15 +1,35 @@
1012  *~
1013 -*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps
1014 -*.gz *.Z *.tar *.tgz *.bz2
1015 +*.d
1016 +*.o
1017 +*.so
1018 +*.po
1019 +*.go
1020 +*.bo
1021 +stamp.*
1022 +*.stamp
1023 +*.ustamp
1024 +*.udeps
1025 +*.gz
1026 +*.Z
1027 +*.tar
1028 +*.tgz
1029 +*.bz2
1030  =*
1031 -TODO AUTHORS copyr-* copying.*
1032 +TODO
1033 +AUTHORS
1034 +copyr-*
1035 +copying.*
1036  glibc-*
1037  
1038  configparms
1039  
1040 -sun[43]* i[345]86* hp300*
1041 +sun[43]*
1042 +i[345]86*
1043 +hp300*
1044  
1045 -ieeetest hppa-sysdeps regex
1046 +ieeetest
1047 +hppa-sysdeps
1048 +regex
1049  
1050  gpl2lgpl.sed
1051  distinfo
1052 @@ -20,8 +40,10 @@ analysis
1053  docs
1054  releases
1055  
1056 -libc.prj .libc.prcs_aux
1057 -libc.proj .snprj
1058 +libc.prj
1059 +.libc.prcs_aux
1060 +libc.proj
1061 +.snprj
1062  
1063  TODO.html
1064  
1065 diff --git a/manual/.gitignore b/manual/.gitignore
1066 index 54abbbb..27f045c 100644
1067 --- a/manual/.gitignore
1068 +++ b/manual/.gitignore
1069 @@ -1,14 +1,32 @@
1070 -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
1071 -*.gz *.Z *.tar *.tgz *.bz2
1072 -=*
1073 -TODO COPYING* AUTHORS copyr-* copying.*
1074 -glibc-*
1075 +*.dvi*
1076 +*.info*
1077 +*.c.texi
1078 +*.ps
1079 +*.pdf
1080 +*.toc
1081 +*.aux
1082 +*.log
1083 +*.tmp
1084 +*.cp
1085 +*.cps
1086 +*.fn
1087 +*.fns
1088 +*.vr
1089 +*.vrs
1090 +*.tp
1091 +*.tps
1092 +*.ky
1093 +*.kys
1094 +*.pg
1095 +*.pgs
1096  
1097 -*.dvi* *.info* *.c.texi *.ps *.pdf
1098 -*.toc *.aux *.log *.tmp
1099 -*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
1100 -
1101 -texis top-menu.texi chapters.texi summary.texi stamp-*
1102 -distinfo dir-add.texinfo dir-add.texi
1103 +texis
1104 +top-menu.texi
1105 +chapters.texi
1106 +summary.texi
1107 +stamp-*
1108 +distinfo
1109 +dir-add.texinfo
1110 +dir-add.texi
1111  
1112  libm-err.texi
1113 commit f84a1e419017b86b4745ae983854b3d57e8c55f1
1114 Author: Ulrich Drepper <drepper@redhat.com>
1115 Date:   Fri May 15 10:12:35 2009 -0700
1116
1117     No cancel signal in unsafe places.
1118     
1119     When disabling async cancellation we cannot return from the function
1120     call if the thread is canceled.  This happens when the cancel bits
1121     have been set before async cancel is disabled but the signal hasn't
1122     been sent/received yet.  Delay for as long as necessary since
1123     otherwise the signal might be received in an unsafe context.
1124     (cherry picked from commit 1a7f254b4b0590bfab1baa1400705265b1b23b97)
1125
1126 diff --git a/nptl/ChangeLog b/nptl/ChangeLog
1127 index b83dfd0..74a2a73 100644
1128 diff --git a/nptl/cancellation.c b/nptl/cancellation.c
1129 index 81134a6..4d528cf 100644
1130 --- a/nptl/cancellation.c
1131 +++ b/nptl/cancellation.c
1132 @@ -70,15 +70,17 @@ __pthread_disable_asynccancel (int oldtype)
1133      return;
1134  
1135    struct pthread *self = THREAD_SELF;
1136 +  int newval;
1137  
1138  #ifdef THREAD_ATOMIC_AND
1139    THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK);
1140 +  newval = THREAD_GETMEM (self, cancelhandling);
1141  #else
1142    int oldval = THREAD_GETMEM (self, cancelhandling);
1143  
1144    while (1)
1145      {
1146 -      int newval = oldval & ~CANCELTYPE_BITMASK;
1147 +      newval = oldval & ~CANCELTYPE_BITMASK;
1148  
1149        if (newval == oldval)
1150         break;
1151 @@ -92,4 +94,14 @@ __pthread_disable_asynccancel (int oldtype)
1152        oldval = curval;
1153      }
1154  #endif
1155 +
1156 +  /* We cannot return when we are being canceled.  Upon return the
1157 +     thread might be things which would have to be undone.  The
1158 +     following loop should loop until the cancellation signal is
1159 +     delivered.  */
1160 +  while (__builtin_expect (newval & CANCELED_BITMASK, 0))
1161 +    {
1162 +      lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE);
1163 +      newval = THREAD_GETMEM (self, cancelhandling);
1164 +    }
1165  }
1166 diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c
1167 index cf24f1c..35ac82b 100644
1168 --- a/nptl/libc-cancellation.c
1169 +++ b/nptl/libc-cancellation.c
1170 @@ -86,15 +86,17 @@ __libc_disable_asynccancel (int oldtype)
1171      return;
1172  
1173    struct pthread *self = THREAD_SELF;
1174 +  int newval;
1175  
1176  #ifdef THREAD_ATOMIC_AND
1177    THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK);
1178 +  newval = THREAD_GETMEM (self, cancelhandling);
1179  #else
1180    int oldval = THREAD_GETMEM (self, cancelhandling);
1181  
1182    while (1)
1183      {
1184 -      int newval = oldval & ~CANCELTYPE_BITMASK;
1185 +      newval = oldval & ~CANCELTYPE_BITMASK;
1186  
1187        if (newval == oldval)
1188         break;
1189 @@ -108,6 +110,16 @@ __libc_disable_asynccancel (int oldtype)
1190        oldval = curval;
1191      }
1192  #endif
1193 +
1194 +  /* We cannot return when we are being canceled.  Upon return the
1195 +     thread might be things which would have to be undone.  The
1196 +     following loop should loop until the cancellation signal is
1197 +     delivered.  */
1198 +  while (__builtin_expect (newval & CANCELED_BITMASK, 0))
1199 +    {
1200 +      lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE);
1201 +      newval = THREAD_GETMEM (self, cancelhandling);
1202 +    }
1203  }
1204  
1205  
1206 commit 6b23316e66ec3d2f1417896e1fa25c24a8ae32d3
1207 Author: Ulrich Drepper <drepper@redhat.com>
1208 Date:   Fri May 15 20:42:36 2009 -0700
1209
1210     Fix change to prevent cancel signal in unsafe places.
1211     
1212     The bits tested to decide when to delay the return when switching
1213     off async cancel mode were wrong.  Fix that.  Also close a race
1214     condition in pthread_cancel where the bit indicating the cancellation
1215     is unconditionally set even if the cancel type might have changed.
1216     (cherry picked from commit 9437b427cec6266abd303983848549a5c4ba0d0a)
1217
1218 diff --git a/nptl/ChangeLog b/nptl/ChangeLog
1219 index 74a2a73..f3bd32f 100644
1220 diff --git a/nptl/cancellation.c b/nptl/cancellation.c
1221 index 4d528cf..2a6f83d 100644
1222 --- a/nptl/cancellation.c
1223 +++ b/nptl/cancellation.c
1224 @@ -72,10 +72,6 @@ __pthread_disable_asynccancel (int oldtype)
1225    struct pthread *self = THREAD_SELF;
1226    int newval;
1227  
1228 -#ifdef THREAD_ATOMIC_AND
1229 -  THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK);
1230 -  newval = THREAD_GETMEM (self, cancelhandling);
1231 -#else
1232    int oldval = THREAD_GETMEM (self, cancelhandling);
1233  
1234    while (1)
1235 @@ -93,13 +89,13 @@ __pthread_disable_asynccancel (int oldtype)
1236        /* Prepare the next round.  */
1237        oldval = curval;
1238      }
1239 -#endif
1240  
1241    /* We cannot return when we are being canceled.  Upon return the
1242       thread might be things which would have to be undone.  The
1243       following loop should loop until the cancellation signal is
1244       delivered.  */
1245 -  while (__builtin_expect (newval & CANCELED_BITMASK, 0))
1246 +  while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK))
1247 +                          == CANCELING_BITMASK, 0))
1248      {
1249        lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE);
1250        newval = THREAD_GETMEM (self, cancelhandling);
1251 diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c
1252 index 35ac82b..cada464 100644
1253 --- a/nptl/libc-cancellation.c
1254 +++ b/nptl/libc-cancellation.c
1255 @@ -88,10 +88,6 @@ __libc_disable_asynccancel (int oldtype)
1256    struct pthread *self = THREAD_SELF;
1257    int newval;
1258  
1259 -#ifdef THREAD_ATOMIC_AND
1260 -  THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK);
1261 -  newval = THREAD_GETMEM (self, cancelhandling);
1262 -#else
1263    int oldval = THREAD_GETMEM (self, cancelhandling);
1264  
1265    while (1)
1266 @@ -109,13 +105,13 @@ __libc_disable_asynccancel (int oldtype)
1267        /* Prepare the next round.  */
1268        oldval = curval;
1269      }
1270 -#endif
1271  
1272    /* We cannot return when we are being canceled.  Upon return the
1273       thread might be things which would have to be undone.  The
1274       following loop should loop until the cancellation signal is
1275       delivered.  */
1276 -  while (__builtin_expect (newval & CANCELED_BITMASK, 0))
1277 +  while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK))
1278 +                          == CANCELING_BITMASK, 0))
1279      {
1280        lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE);
1281        newval = THREAD_GETMEM (self, cancelhandling);
1282 diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c
1283 index a13af56..55bb0da 100644
1284 --- a/nptl/pthread_cancel.c
1285 +++ b/nptl/pthread_cancel.c
1286 @@ -1,4 +1,4 @@
1287 -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
1288 +/* Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
1289     This file is part of the GNU C Library.
1290     Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
1291  
1292 @@ -44,6 +44,7 @@ pthread_cancel (th)
1293    int newval;
1294    do
1295      {
1296 +    again:
1297        oldval = pd->cancelhandling;
1298        newval = oldval | CANCELING_BITMASK | CANCELED_BITMASK;
1299  
1300 @@ -59,7 +60,10 @@ pthread_cancel (th)
1301        if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval))
1302         {
1303           /* Mark the cancellation as "in progress".  */
1304 -         atomic_bit_set (&pd->cancelhandling, CANCELING_BIT);
1305 +         if (atomic_compare_and_exchange_bool_acq (&pd->cancelhandling,
1306 +                                                   oldval | CANCELING_BITMASK,
1307 +                                                   oldval))
1308 +           goto again;
1309  
1310           /* The cancellation handler will take care of marking the
1311              thread as canceled.  */
1312 commit 6dca80c9c771c5c4728a8c335861300bce93f8a0
1313 Author: Jakub Jelinek <jakub@redhat.com>
1314 Date:   Fri May 15 20:48:08 2009 -0700
1315
1316     Don't try to cleanup libselinux and libaudit.
1317     
1318     Because we are not shutting down the other threads first another
1319     thread might work on a query before the process shuts down.  In this
1320     case the now uninitialized libselinux and libaudit might be used.
1321     Just don't free the resources.  It's not necessary anyway because
1322     the process is about to terminate.
1323     (cherry picked from commit 9e471dad8e173806cbbfb704875d5ae40e36fa34)
1324     (fixed ChangeLog entry by pasky)
1325
1326 diff --git a/ChangeLog b/ChangeLog
1327 index e3afa85..3f41c66 100644
1328 diff --git a/nscd/nscd.c b/nscd/nscd.c
1329 index 3265ea8..b9035f2 100644
1330 --- a/nscd/nscd.c
1331 +++ b/nscd/nscd.c
1332 @@ -488,10 +488,6 @@ termination_handler (int signum)
1333         msync (dbs[cnt].head, dbs[cnt].memsize, MS_ASYNC);
1334      }
1335  
1336 -  /* Shutdown the SELinux AVC.  */
1337 -  if (selinux_enabled)
1338 -    nscd_avc_destroy ();
1339 -
1340    _exit (EXIT_SUCCESS);
1341  }
1342  
1343 diff --git a/nscd/selinux.c b/nscd/selinux.c
1344 index 9a167ec..e07a454 100644
1345 --- a/nscd/selinux.c
1346 +++ b/nscd/selinux.c
1347 @@ -1,5 +1,5 @@
1348  /* SELinux access controls for nscd.
1349 -   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
1350 +   Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
1351     This file is part of the GNU C Library.
1352     Contributed by Matthew Rickard <mjricka@epoch.ncsc.mil>, 2004.
1353  
1354 @@ -418,15 +418,4 @@ nscd_avc_print_stats (struct avc_cache_stats *cstats)
1355           cstats->cav_probes, cstats->cav_misses);
1356  }
1357  
1358 -
1359 -/* Clean up the AVC before exiting.  */
1360 -void
1361 -nscd_avc_destroy (void)
1362 -{
1363 -  avc_destroy ();
1364 -#ifdef HAVE_LIBAUDIT
1365 -  audit_close (audit_fd);
1366 -#endif
1367 -}
1368 -
1369  #endif /* HAVE_SELINUX */
1370 diff --git a/nscd/selinux.h b/nscd/selinux.h
1371 index 27afcd6..67d981b 100644
1372 --- a/nscd/selinux.h
1373 +++ b/nscd/selinux.h
1374 @@ -1,5 +1,5 @@
1375  /* Header for nscd SELinux access controls.
1376 -   Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
1377 +   Copyright (C) 2004, 2006, 2007, 2009 Free Software Foundation, Inc.
1378     This file is part of the GNU C Library.
1379     Contributed by Matthew Rickard <mjricka@epoch.ncsc.mil>, 2004.
1380  
1381 @@ -35,8 +35,6 @@ struct avc_cache_stats;
1382  
1383  /* Initialize the userspace AVC.  */
1384  extern void nscd_avc_init (void);
1385 -/* Destroy the userspace AVC.  */
1386 -extern void nscd_avc_destroy (void);
1387  /* Determine if we are running on an SELinux kernel.  */
1388  extern void nscd_selinux_enabled (int *selinux_enabled);
1389  /* Check if the client has permission for the request type.  */
1390 @@ -55,7 +53,6 @@ extern void install_real_capabilities (cap_t new_caps);
1391  #else
1392  # define selinux_enabled 0
1393  # define nscd_avc_init() (void) 0
1394 -# define nscd_avc_destroy() (void) 0
1395  # define nscd_selinux_enabled(selinux_enabled) (void) 0
1396  # define nscd_request_avc_has_perm(fd, req) 0
1397  # define nscd_avc_cache_stats(cstats) (void) 0
1398 commit f27dc66bb946b74df6817768758b1de49d4be887
1399 Author: Jakub Jelinek <jakub@redhat.com>
1400 Date:   Fri May 15 21:08:55 2009 -0700
1401
1402     Avoid double definition of catomic_compare_and_exchange_val_acq.
1403     (cherry picked from commit 3b1b533bc3239ef6df1e40e0088e7270ac060be6)
1404
1405 diff --git a/ChangeLog b/ChangeLog
1406 index 3f41c66..b584ec6 100644
1407 diff --git a/include/atomic.h b/include/atomic.h
1408 index 7c0548b..9366f78 100644
1409 --- a/include/atomic.h
1410 +++ b/include/atomic.h
1411 @@ -95,14 +95,15 @@
1412  #endif
1413  
1414  
1415 -#if !defined catomic_compare_and_exchange_val_acq \
1416 -    && defined __arch_c_compare_and_exchange_val_32_acq
1417 -# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
1418 +#ifndef catomic_compare_and_exchange_val_acq
1419 +# ifdef __arch_c_compare_and_exchange_val_32_acq
1420 +#  define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
1421    __atomic_val_bysize (__arch_c_compare_and_exchange_val,acq,                \
1422                        mem, newval, oldval)
1423 -#else
1424 -# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
1425 +# else
1426 +#  define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
1427    atomic_compare_and_exchange_val_acq (mem, newval, oldval)
1428 +# endif
1429  #endif
1430  
1431  
1432 @@ -125,8 +126,8 @@
1433  #  define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
1434    __atomic_bool_bysize (__arch_compare_and_exchange_bool,acq,                \
1435                         mem, newval, oldval)
1436 -#  else
1437 -#   define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
1438 +# else
1439 +#  define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
1440    ({ /* Cannot use __oldval here, because macros later in this file might     \
1441         call this macro with __oldval argument.  */                           \
1442       __typeof (oldval) __atg3_old = (oldval);                                \
1443 @@ -142,8 +143,8 @@
1444  #  define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
1445    __atomic_bool_bysize (__arch_c_compare_and_exchange_bool,acq,                      \
1446                         mem, newval, oldval)
1447 -#  else
1448 -#   define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
1449 +# else
1450 +#  define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
1451    ({ /* Cannot use __oldval here, because macros later in this file might     \
1452         call this macro with __oldval argument.  */                           \
1453       __typeof (oldval) __atg4_old = (oldval);                                \
1454 commit b9e0df9847f3460c67e27e631af8662e7906ed6b
1455 Author: Jakub Jelinek <jakub@redhat.com>
1456 Date:   Fri May 15 21:17:08 2009 -0700
1457
1458     Robustify libc-side nscd database reader.
1459     
1460     The nscd database mapped in processes can change at any time.  We
1461     have to be more vigilant when it comes to using that memory.  Test
1462     the data entries are valid in their entire size, don't read data
1463     again from memory once we verified it, and make sure the trailing
1464     pointer is not going off the deep end.
1465     (cherry picked from commit cfe1fc1013d0e7e4863c974fa0e78891cc0a2ed2)
1466
1467 diff --git a/ChangeLog b/ChangeLog
1468 index b584ec6..a672e15 100644
1469 diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
1470 index 3c9688f..f66a658 100644
1471 --- a/nscd/nscd-client.h
1472 +++ b/nscd/nscd-client.h
1473 @@ -1,4 +1,4 @@
1474 -/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007
1475 +/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009
1476     Free Software Foundation, Inc.
1477     This file is part of the GNU C Library.
1478     Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
1479 @@ -329,7 +329,8 @@ static inline int __nscd_drop_map_ref (struct mapped_database *map,
1480  extern struct datahead *__nscd_cache_search (request_type type,
1481                                              const char *key,
1482                                              size_t keylen,
1483 -                                            const struct mapped_database *mapped);
1484 +                                            const struct mapped_database *mapped,
1485 +                                            size_t datalen);
1486  
1487  /* Wrappers around read, readv and write that only read/write less than LEN
1488     bytes on error or EOF.  */
1489 diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c
1490 index 674a5e7..d1c5cd1 100644
1491 --- a/nscd/nscd_getai.c
1492 +++ b/nscd/nscd_getai.c
1493 @@ -1,4 +1,5 @@
1494 -/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1495 +/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
1496 +   Free Software Foundation, Inc.
1497     This file is part of the GNU C Library.
1498     Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
1499  
1500 @@ -75,7 +76,7 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
1501    if (mapped != NO_MAPPING)
1502      {
1503        struct datahead *found = __nscd_cache_search (GETAI, key, keylen,
1504 -                                                   mapped);
1505 +                                                   mapped, sizeof ai_resp);
1506        if (found != NULL)
1507         {
1508           respdata = (char *) (&found->data[0].aidata + 1);
1509 diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
1510 index b84b06b..c2d204c 100644
1511 --- a/nscd/nscd_getgr_r.c
1512 +++ b/nscd/nscd_getgr_r.c
1513 @@ -1,4 +1,4 @@
1514 -/* Copyright (C) 1998-2000, 2002-2005, 2006, 2007
1515 +/* Copyright (C) 1998-2000, 2002-2005, 2006, 2007, 2009
1516     Free Software Foundation, Inc.
1517     This file is part of the GNU C Library.
1518     Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1998.
1519 @@ -107,7 +107,8 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
1520  
1521    if (mapped != NO_MAPPING)
1522      {
1523 -      struct datahead *found = __nscd_cache_search (type, key, keylen, mapped);
1524 +      struct datahead *found = __nscd_cache_search (type, key, keylen, mapped,
1525 +                                                   sizeof gr_resp);
1526        if (found != NULL)
1527         {
1528           len = (const uint32_t *) (&found->data[0].grdata + 1);
1529 diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
1530 index aea8288..70631fa 100644
1531 --- a/nscd/nscd_gethst_r.c
1532 +++ b/nscd/nscd_gethst_r.c
1533 @@ -1,4 +1,5 @@
1534 -/* Copyright (C) 1998-2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1535 +/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009
1536 +   Free Software Foundation, Inc.
1537     This file is part of the GNU C Library.
1538     Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
1539  
1540 @@ -137,7 +138,8 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type,
1541    if (mapped != NO_MAPPING)
1542      {
1543        /* No const qualifier, as it can change during garbage collection.  */
1544 -      struct datahead *found = __nscd_cache_search (type, key, keylen, mapped);
1545 +      struct datahead *found = __nscd_cache_search (type, key, keylen, mapped,
1546 +                                                   sizeof hst_resp);
1547        if (found != NULL)
1548         {
1549           h_name = (char *) (&found->data[0].hstdata + 1);
1550 diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c
1551 index 21f792b..8a4449d 100644
1552 --- a/nscd/nscd_getpw_r.c
1553 +++ b/nscd/nscd_getpw_r.c
1554 @@ -1,4 +1,4 @@
1555 -/* Copyright (C) 1998, 1999, 2003, 2004, 2005, 2007
1556 +/* Copyright (C) 1998, 1999, 2003, 2004, 2005, 2007, 2009
1557     Free Software Foundation, Inc.
1558     This file is part of the GNU C Library.
1559     Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1998.
1560 @@ -104,7 +104,8 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type,
1561  
1562    if (mapped != NO_MAPPING)
1563      {
1564 -      struct datahead *found = __nscd_cache_search (type, key, keylen, mapped);
1565 +      struct datahead *found = __nscd_cache_search (type, key, keylen, mapped,
1566 +                                                   sizeof pw_resp);
1567        if (found != NULL)
1568         {
1569           pw_name = (const char *) (&found->data[0].pwdata + 1);
1570 diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c
1571 index b1ad7e2..dce4165 100644
1572 --- a/nscd/nscd_getserv_r.c
1573 +++ b/nscd/nscd_getserv_r.c
1574 @@ -1,4 +1,4 @@
1575 -/* Copyright (C) 2007 Free Software Foundation, Inc.
1576 +/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
1577     This file is part of the GNU C Library.
1578     Contributed by Ulrich Drepper <drepper@redhat.com>, 2007.
1579  
1580 @@ -104,7 +104,8 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
1581  
1582    if (mapped != NO_MAPPING)
1583      {
1584 -      struct datahead *found = __nscd_cache_search (type, key, keylen, mapped);
1585 +      struct datahead *found = __nscd_cache_search (type, key, keylen, mapped,
1586 +                                                   sizeof serv_resp);
1587  
1588        if (found != NULL)
1589         {
1590 diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
1591 index cd3fa24..db24796 100644
1592 --- a/nscd/nscd_helper.c
1593 +++ b/nscd/nscd_helper.c
1594 @@ -21,6 +21,7 @@
1595  #include <errno.h>
1596  #include <fcntl.h>
1597  #include <stdbool.h>
1598 +#include <stddef.h>
1599  #include <string.h>
1600  #include <time.h>
1601  #include <unistd.h>
1602 @@ -472,18 +473,20 @@ __nscd_get_map_ref (request_type type, const char *name,
1603     garbage collection.  */
1604  struct datahead *
1605  __nscd_cache_search (request_type type, const char *key, size_t keylen,
1606 -                    const struct mapped_database *mapped)
1607 +                    const struct mapped_database *mapped, size_t datalen)
1608  {
1609    unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module;
1610    size_t datasize = mapped->datasize;
1611  
1612    ref_t trail = mapped->head->array[hash];
1613 +  trail = atomic_forced_read (trail);
1614    ref_t work = trail;
1615    int tick = 0;
1616  
1617    while (work != ENDREF && work + sizeof (struct hashentry) <= datasize)
1618      {
1619        struct hashentry *here = (struct hashentry *) (mapped->data + work);
1620 +      ref_t here_key, here_packet;
1621  
1622  #ifndef _STRING_ARCH_unaligned
1623        /* Although during garbage collection when moving struct hashentry
1624 @@ -498,13 +501,14 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
1625  
1626        if (type == here->type
1627           && keylen == here->len
1628 -         && here->key + keylen <= datasize
1629 -         && memcmp (key, mapped->data + here->key, keylen) == 0
1630 -         && here->packet + sizeof (struct datahead) <= datasize)
1631 +         && (here_key = atomic_forced_read (here->key)) + keylen <= datasize
1632 +         && memcmp (key, mapped->data + here_key, keylen) == 0
1633 +         && ((here_packet = atomic_forced_read (here->packet))
1634 +             + sizeof (struct datahead) <= datasize))
1635         {
1636           /* We found the entry.  Increment the appropriate counter.  */
1637           struct datahead *dh
1638 -           = (struct datahead *) (mapped->data + here->packet);
1639 +           = (struct datahead *) (mapped->data + here_packet);
1640  
1641  #ifndef _STRING_ARCH_unaligned
1642           if ((uintptr_t) dh & (__alignof__ (*dh) - 1))
1643 @@ -513,11 +517,14 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
1644  
1645           /* See whether we must ignore the entry or whether something
1646              is wrong because garbage collection is in progress.  */
1647 -         if (dh->usable && here->packet + dh->allocsize <= datasize)
1648 +         if (dh->usable
1649 +             && here_packet + dh->allocsize <= datasize
1650 +             && (here_packet + offsetof (struct datahead, data) + datalen
1651 +                 <= datasize))
1652             return dh;
1653         }
1654  
1655 -      work = here->next;
1656 +      work = atomic_forced_read (here->next);
1657        /* Prevent endless loops.  This should never happen but perhaps
1658          the database got corrupted, accidentally or deliberately.  */
1659        if (work == trail)
1660 @@ -532,7 +539,11 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
1661           if ((uintptr_t) trailelem & (__alignof__ (*trailelem) - 1))
1662             return NULL;
1663  #endif
1664 -         trail = trailelem->next;
1665 +
1666 +         if (trail + sizeof (struct hashentry) > datasize)
1667 +           return NULL;
1668 +
1669 +         trail = atomic_forced_read (trailelem->next);
1670         }
1671        tick = 1 - tick;
1672      }
1673 diff --git a/nscd/nscd_initgroups.c b/nscd/nscd_initgroups.c
1674 index 866455a..5ff60c0 100644
1675 --- a/nscd/nscd_initgroups.c
1676 +++ b/nscd/nscd_initgroups.c
1677 @@ -1,4 +1,4 @@
1678 -/* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
1679 +/* Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
1680     This file is part of the GNU C Library.
1681     Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
1682  
1683 @@ -55,7 +55,8 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size,
1684    if (mapped != NO_MAPPING)
1685      {
1686        struct datahead *found = __nscd_cache_search (INITGROUPS, user,
1687 -                                                   userlen, mapped);
1688 +                                                   userlen, mapped,
1689 +                                                   sizeof initgr_resp);
1690        if (found != NULL)
1691         {
1692           respdata = (char *) (&found->data[0].initgrdata + 1);
1693 commit 4c7cb20430af51ddebf270b423d5c4aec3b9f770
1694 Author: Ulrich Drepper <drepper@redhat.com>
1695 Date:   Fri May 15 21:33:43 2009 -0700
1696
1697     Further robustify nscd database lookup.
1698     
1699     We can compute an absolute maximum for the number of elements which
1700     can fit into the currently mapped database.  Stop after that many
1701     iterations.
1702     (cherry picked from commit 831a40494d44045c0caaf8085ab1d35c0da23140)
1703
1704 diff --git a/ChangeLog b/ChangeLog
1705 index a672e15..9001fb7 100644
1706 diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
1707 index f66a658..81ca3d5 100644
1708 --- a/nscd/nscd-client.h
1709 +++ b/nscd/nscd-client.h
1710 @@ -44,9 +44,14 @@
1711  /* Path for the configuration file.  */
1712  #define _PATH_NSCDCONF  "/etc/nscd.conf"
1713  
1714 -/* Maximu allowed length for the key.  */
1715 +/* Maximum allowed length for the key.  */
1716  #define MAXKEYLEN 1024
1717  
1718 +/* Maximum alignment requirement we will encounter.  */
1719 +#define BLOCK_ALIGN_LOG 3
1720 +#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG)
1721 +#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1)
1722 +
1723  
1724  /* Available services.  */
1725  typedef enum
1726 diff --git a/nscd/nscd.h b/nscd/nscd.h
1727 index 3279b85..632bf58 100644
1728 --- a/nscd/nscd.h
1729 +++ b/nscd/nscd.h
1730 @@ -111,11 +111,6 @@ struct database_dyn
1731  /* Path used when not using persistent storage.  */
1732  #define _PATH_NSCD_XYZ_DB_TMP  "/var/run/nscd/dbXXXXXX"
1733  
1734 -/* Maximum alignment requirement we will encounter.  */
1735 -#define BLOCK_ALIGN_LOG 3
1736 -#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG)
1737 -#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1)
1738 -
1739  /* Default value for the maximum size of the database files.  */
1740  #define DEFAULT_MAX_DB_SIZE    (32 * 1024 * 1024)
1741  
1742 diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
1743 index db24796..80ee3e1 100644
1744 --- a/nscd/nscd_helper.c
1745 +++ b/nscd/nscd_helper.c
1746 @@ -481,6 +481,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
1747    ref_t trail = mapped->head->array[hash];
1748    trail = atomic_forced_read (trail);
1749    ref_t work = trail;
1750 +  size_t loop_cnt = datasize / (offsetof (struct datahead, data) + datalen);
1751    int tick = 0;
1752  
1753    while (work != ENDREF && work + sizeof (struct hashentry) <= datasize)
1754 @@ -527,7 +528,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
1755        work = atomic_forced_read (here->next);
1756        /* Prevent endless loops.  This should never happen but perhaps
1757          the database got corrupted, accidentally or deliberately.  */
1758 -      if (work == trail)
1759 +      if (work == trail || loop_cnt-- > 0)
1760         break;
1761        if (tick)
1762         {
1763 commit 223e614dafc55a14889355e95367e216d2fd320e
1764 Author: Ulrich Drepper <drepper@redhat.com>
1765 Date:   Sat May 16 10:10:32 2009 -0700
1766
1767     Fix exit condition.
1768     
1769     The patch to bound the search in the nscd caches used a wrong exit
1770     condition.  Fixed now.
1771     (cherry picked from commit 95410b7ba23c44f6a038285d9c38ee84129e4cd6)
1772
1773 diff --git a/ChangeLog b/ChangeLog
1774 index 9001fb7..7d55188 100644
1775 diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
1776 index 80ee3e1..c09f008 100644
1777 --- a/nscd/nscd_helper.c
1778 +++ b/nscd/nscd_helper.c
1779 @@ -528,7 +528,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
1780        work = atomic_forced_read (here->next);
1781        /* Prevent endless loops.  This should never happen but perhaps
1782          the database got corrupted, accidentally or deliberately.  */
1783 -      if (work == trail || loop_cnt-- > 0)
1784 +      if (work == trail || loop_cnt-- == 0)
1785         break;
1786        if (tick)
1787         {
1788 commit e856702a047ee2cf4e7d3153d6adc8b740803770
1789 Author: Ulrich Drepper <drepper@redhat.com>
1790 Date:   Sat May 16 10:29:43 2009 -0700
1791
1792     Move BLOCK_ALIGN* macros back.
1793     
1794     The move to nscd-client.h was only needed for some interim version
1795     of the patch.  The final version doesn't need it.  Undo the change.
1796     (cherry picked from commit fa546abe9d0346d5d87b8fe19884993408476d77)
1797
1798 diff --git a/ChangeLog b/ChangeLog
1799 index 7d55188..eceae0b 100644
1800 diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
1801 index 81ca3d5..c6c09cb 100644
1802 --- a/nscd/nscd-client.h
1803 +++ b/nscd/nscd-client.h
1804 @@ -47,11 +47,6 @@
1805  /* Maximum allowed length for the key.  */
1806  #define MAXKEYLEN 1024
1807  
1808 -/* Maximum alignment requirement we will encounter.  */
1809 -#define BLOCK_ALIGN_LOG 3
1810 -#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG)
1811 -#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1)
1812 -
1813  
1814  /* Available services.  */
1815  typedef enum
1816 diff --git a/nscd/nscd.h b/nscd/nscd.h
1817 index 632bf58..3279b85 100644
1818 --- a/nscd/nscd.h
1819 +++ b/nscd/nscd.h
1820 @@ -111,6 +111,11 @@ struct database_dyn
1821  /* Path used when not using persistent storage.  */
1822  #define _PATH_NSCD_XYZ_DB_TMP  "/var/run/nscd/dbXXXXXX"
1823  
1824 +/* Maximum alignment requirement we will encounter.  */
1825 +#define BLOCK_ALIGN_LOG 3
1826 +#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG)
1827 +#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1)
1828 +
1829  /* Default value for the maximum size of the database files.  */
1830  #define DEFAULT_MAX_DB_SIZE    (32 * 1024 * 1024)
1831  
1832 commit 94c11628f5d077da7ce5372019ab3af73efb67f3
1833 Author: Ulrich Drepper <drepper@redhat.com>
1834 Date:   Sat May 16 11:39:39 2009 -0700
1835
1836     Unify __WAIT_INT definition in stdlib.h and sys/wait.h.
1837     
1838     This fixes BZ #10159.  The stdlib.h definition was out of date.
1839     (cherry picked from commit a64039b084ae3faca3336b7d95f2e40c497d20e1)
1840
1841 diff --git a/ChangeLog b/ChangeLog
1842 index eceae0b..772438d 100644
1843 diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
1844 index 77bb860..5b084ef 100644
1845 --- a/stdlib/stdlib.h
1846 +++ b/stdlib/stdlib.h
1847 @@ -48,9 +48,9 @@ __BEGIN_DECLS
1848     as well as POSIX.1 use of `int' for the status word.  */
1849  
1850  #  if defined __GNUC__ && !defined __cplusplus
1851 -#   define __WAIT_INT(status)                                                \
1852 -  (__extension__ ({ union { __typeof(status) __in; int __i; } __u;           \
1853 -                   __u.__in = (status); __u.__i; }))
1854 +#   define __WAIT_INT(status) \
1855 +  (__extension__ (((union { __typeof(status) __in; int __i; }) \
1856 +                   { .__in = (status) }).__i))
1857  #  else
1858  #   define __WAIT_INT(status)  (*(int *) &(status))
1859  #  endif
1860 commit cd816bef9505a03a9c0cfebbedb75bbfd779c147
1861 Author: Jakub Jelinek <jakub@redhat.com>
1862 Date:   Mon May 18 10:19:50 2009 -0700
1863
1864     Fix forced loop termination in nscd database lookup.
1865     
1866     There are two issues with the forced loop exit in the nscd lookup:
1867     1. the estimate of the entry size isn't pessimistic enough for all
1868        databases, resulting potentially is too early exits
1869     2. the combination of 64-bit process and 32-bit nscd would lead to
1870        rejecting valid records in the database.
1871     (cherry picked from commit 5078fff6c4bc1c71c5d558ff7ec4775aa48b0c11)
1872
1873 diff --git a/ChangeLog b/ChangeLog
1874 index 772438d..356b9fb 100644
1875 diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
1876 index c09f008..fe63f9a 100644
1877 --- a/nscd/nscd_helper.c
1878 +++ b/nscd/nscd_helper.c
1879 @@ -468,6 +468,15 @@ __nscd_get_map_ref (request_type type, const char *name,
1880  }
1881  
1882  
1883 +/* Using sizeof (hashentry) is not always correct to determine the size of
1884 +   the data structure as found in the nscd cache.  The program could be
1885 +   a 64-bit process and nscd could be a 32-bit process.  In this case
1886 +   sizeof (hashentry) would overestimate the size.  The following is
1887 +   the minimum size of such an entry, good enough for our tests here.  */
1888 +#define MINIMUM_HASHENTRY_SIZE \
1889 +  (offsetof (struct hashentry, dellist) + sizeof (int32_t))
1890 +
1891 +
1892  /* Don't return const struct datahead *, as eventhough the record
1893     is normally constant, it can change arbitrarily during nscd
1894     garbage collection.  */
1895 @@ -481,10 +490,11 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
1896    ref_t trail = mapped->head->array[hash];
1897    trail = atomic_forced_read (trail);
1898    ref_t work = trail;
1899 -  size_t loop_cnt = datasize / (offsetof (struct datahead, data) + datalen);
1900 +  size_t loop_cnt = datasize / (MINIMUM_HASHENTRY_SIZE
1901 +                               + offsetof (struct datahead, data) / 2);
1902    int tick = 0;
1903  
1904 -  while (work != ENDREF && work + sizeof (struct hashentry) <= datasize)
1905 +  while (work != ENDREF && work + MINIMUM_HASHENTRY_SIZE <= datasize)
1906      {
1907        struct hashentry *here = (struct hashentry *) (mapped->data + work);
1908        ref_t here_key, here_packet;
1909 @@ -541,7 +551,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
1910             return NULL;
1911  #endif
1912  
1913 -         if (trail + sizeof (struct hashentry) > datasize)
1914 +         if (trail + MINIMUM_HASHENTRY_SIZE > datasize)
1915             return NULL;
1916  
1917           trail = atomic_forced_read (trailelem->next);
1918 commit 917dc587df5b051e5a13647f11e8ca824cb30cd7
1919 Author: Jakub Jelinek <jakub@redhat.com>
1920 Date:   Thu May 21 18:15:26 2009 -0700
1921
1922     Correct socketcall argument for accept4.
1923     
1924     The header had the old name (paccept).
1925     (cherry picked from commit a2292378d0d629c26edfae6b197efbdb362a7094)
1926
1927 diff --git a/ChangeLog b/ChangeLog
1928 index 356b9fb..16f3e53 100644
1929 diff --git a/sysdeps/unix/sysv/linux/socketcall.h b/sysdeps/unix/sysv/linux/socketcall.h
1930 index 24ec9ee..adf01b6 100644
1931 --- a/sysdeps/unix/sysv/linux/socketcall.h
1932 +++ b/sysdeps/unix/sysv/linux/socketcall.h
1933 @@ -1,5 +1,5 @@
1934  /* ID for functions called via socketcall system call.
1935 -   Copyright (C) 1995, 1996, 2008 Free Software Foundation, Inc.
1936 +   Copyright (C) 1995, 1996, 2008, 2009 Free Software Foundation, Inc.
1937     This file is part of the GNU C Library.
1938  
1939     The GNU C Library is free software; you can redistribute it and/or
1940 @@ -43,6 +43,6 @@
1941  #define SOCKOP_getsockopt      15
1942  #define SOCKOP_sendmsg         16
1943  #define SOCKOP_recvmsg         17
1944 -#define SOCKOP_paccept         18
1945 +#define SOCKOP_accept4         18
1946  
1947  #endif /* sys/socketcall.h */
1948 commit a1223d660444de94f267d77512ea1a93a2dd9a14
1949 Author: Jakub Jelinek <jakub@redhat.com>
1950 Date:   Thu May 21 18:16:59 2009 -0700
1951
1952     Remove __NR_accept4 definition.
1953     
1954     This definition was meant to be removed before the checkin.  It was
1955     used in the development.
1956     (cherry picked from commit d14eda9310125ddf8fe66df01bbe46ab7d226a5e)
1957
1958 diff --git a/ChangeLog b/ChangeLog
1959 index 16f3e53..dd4e672 100644
1960 diff --git a/sysdeps/unix/sysv/linux/accept4.c b/sysdeps/unix/sysv/linux/accept4.c
1961 index 97f7b8c..4be710f 100644
1962 --- a/sysdeps/unix/sysv/linux/accept4.c
1963 +++ b/sysdeps/unix/sysv/linux/accept4.c
1964 @@ -1,4 +1,4 @@
1965 -/* Copyright (C) 2008 Free Software Foundation, Inc.
1966 +/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
1967     This file is part of the GNU C Library.
1968     Contributed by Ulrich Drepper <drepper@redhat.com>, 2008.
1969  
1970 @@ -24,8 +24,6 @@
1971  #include <sysdep-cancel.h>
1972  #include <sys/syscall.h>
1973  
1974 -#define __NR_accept4                            288
1975 -
1976  
1977  #ifdef __NR_accept4
1978  int
1979 commit 127bcb269a4f04f571c038c1cda8551c87a73500
1980 Author: Ulrich Drepper <drepper@redhat.com>
1981 Date:   Thu May 21 18:23:57 2009 -0700
1982
1983     Don't define __ASSUME_ACCEPT4 for IA-64.
1984     (cherry picked from commit 3533b1a6a6a6b7e350b7a9459f8152b1f9f0364a)
1985
1986 diff --git a/ChangeLog b/ChangeLog
1987 index dd4e672..c527543 100644
1988 diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
1989 index 473360a..4562515 100644
1990 --- a/sysdeps/unix/sysv/linux/kernel-features.h
1991 +++ b/sysdeps/unix/sysv/linux/kernel-features.h
1992 @@ -521,7 +521,7 @@
1993  /* Support for the accept4 syscall was added in 2.6.28.  */
1994  #if __LINUX_KERNEL_VERSION >= 0x02061c \
1995      && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
1996 -       || defined __ia64__ || defined __sparc__ || defined __s390__)
1997 +       || defined __sparc__ || defined __s390__)
1998  # define __ASSUME_ACCEPT4      1
1999  #endif
2000  
2001 commit 5d45e59ea6c702ffbd15476e121a4feca7bc93d0
2002 Author: Ulrich Drepper <drepper@redhat.com>
2003 Date:   Thu May 21 18:47:59 2009 -0700
2004
2005     Fix IA-64 memchr read-ahead.
2006     
2007     The latest stratcliff extension exposed a bug in the IA-64 memchr which
2008     uses non-speculative loads to prefetch data.  Change the code to use
2009     speculative loads with appropriate fixup.  Fixes BZ 10162.
2010     (cherry picked from commit fa64b7f76b97930cd2aaf7bfd305cac3d925cd8f)
2011
2012 diff --git a/ChangeLog b/ChangeLog
2013 index c527543..6ad9ad8 100644
2014 diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S
2015 index e9a7ba8..cd062b2 100644
2016 --- a/sysdeps/ia64/memchr.S
2017 +++ b/sysdeps/ia64/memchr.S
2018 @@ -96,7 +96,8 @@ ENTRY(__memchr)
2019         mov     pr.rot = 1 << 16 ;;
2020  .l2:
2021  (p[0])         mov     addr[0] = ret0
2022 -(p[0])         ld8     value[0] = [ret0], 8
2023 +(p[0])         ld8.s   value[0] = [ret0], 8     // speculative load
2024 +(p[MEMLAT])    chk.s   value[MEMLAT], .recovery // check and recovery
2025  (p[MEMLAT])    xor     aux[0] = value[MEMLAT], chrx8
2026  (p[MEMLAT+1])  czx1.r  poschr[0] = aux[1]
2027  (p[MEMLAT+2])  cmp.ne  p7, p0 = 8, poschr[1]
2028 @@ -124,6 +125,20 @@ ENTRY(__memchr)
2029         mov     ar.lc = saved_lc
2030         br.ret.sptk.many b0
2031  
2032 +.recovery:
2033 +       adds    ret0 = -((MEMLAT + 1) * 8), ret0;;
2034 +(p[MEMLAT+1])  add     ret0 = -8, ret0;;
2035 +(p[MEMLAT+2])  add     ret0 = -8, ret0;;
2036 +.l4:
2037 +       mov     addr[MEMLAT+2] = ret0
2038 +       ld8     tmp = [ret0];;          // load the first unchecked 8byte
2039 +       xor     aux[1] = tmp, chrx8;;
2040 +       czx1.r  poschr[1] = aux[1];;
2041 +       cmp.ne  p7, p0 = 8, poschr[1]
2042 +(p7)   br.cond.spnt    .foundit;;
2043 +       adds    ret0 = 8, ret0          // load the next unchecked 8byte
2044 +       br.sptk .l4;;
2045 +
2046  END(__memchr)
2047  
2048  weak_alias (__memchr, memchr)
2049 commit 297676350b6683bb5daa41cfc77c2a745383a882
2050 Author: Andreas Schwab <schwab@linux-m68k.org>
2051 Date:   Fri May 22 08:35:15 2009 -0700
2052
2053     Fix errno for IBM long double.
2054     
2055     After the last addition to the math test suite PPC routines haven't
2056     been adjusted so far.
2057     (cherry picked from commit 38ae768d88c47dd06030104eb3376212b0d8d164)
2058
2059 diff --git a/ChangeLog b/ChangeLog
2060 index 6ad9ad8..10ac72d 100644
2061 diff --git a/sysdeps/ieee754/ldbl-128ibm/s_cosl.c b/sysdeps/ieee754/ldbl-128ibm/s_cosl.c
2062 index 59a8196..8470850 100644
2063 --- a/sysdeps/ieee754/ldbl-128ibm/s_cosl.c
2064 +++ b/sysdeps/ieee754/ldbl-128ibm/s_cosl.c
2065 @@ -44,6 +44,7 @@
2066   *     TRIG(x) returns trig(x) nearly rounded
2067   */
2068  
2069 +#include <errno.h>
2070  #include "math.h"
2071  #include "math_private.h"
2072  #include <math_ldbl_opt.h>
2073 @@ -67,9 +68,11 @@
2074           return __kernel_cosl(x,z);
2075  
2076      /* cos(Inf or NaN) is NaN */
2077 -       else if (ix>=0x7ff0000000000000LL)
2078 +       else if (ix>=0x7ff0000000000000LL) {
2079 +           if (ix == 0x7ff0000000000000LL)
2080 +               __set_errno (EDOM);
2081             return x-x;
2082 -
2083 +       }
2084      /* argument reduction needed */
2085         else {
2086             n = __ieee754_rem_pio2l(x,y);
2087 diff --git a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
2088 index 7350065..f631edd 100644
2089 --- a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
2090 +++ b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
2091 @@ -51,6 +51,7 @@
2092      License along with this library; if not, write to the Free Software
2093      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA */
2094  
2095 +#include <errno.h>
2096  #include "math.h"
2097  #include "math_private.h"
2098  #include <math_ldbl_opt.h>
2099 @@ -120,7 +121,10 @@ __expm1l (long double x)
2100  
2101    /* Overflow.  */
2102    if (x > maxlog)
2103 -    return (big * big);
2104 +    {
2105 +      __set_errno (ERANGE);
2106 +      return (big * big);
2107 +    }
2108  
2109    /* Minimum value.  */
2110    if (x < minarg)
2111 diff --git a/sysdeps/ieee754/ldbl-128ibm/s_sinl.c b/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
2112 index 8cc592c..bd72225 100644
2113 --- a/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
2114 +++ b/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
2115 @@ -44,6 +44,7 @@
2116   *     TRIG(x) returns trig(x) nearly rounded
2117   */
2118  
2119 +#include <errno.h>
2120  #include "math.h"
2121  #include "math_private.h"
2122  #include <math_ldbl_opt.h>
2123 @@ -67,8 +68,11 @@
2124           return __kernel_sinl(x,z,0);
2125  
2126      /* sin(Inf or NaN) is NaN */
2127 -       else if (ix>=0x7ff0000000000000LL) return x-x;
2128 -
2129 +       else if (ix>=0x7ff0000000000000LL) {
2130 +           if (ix == 0x7ff0000000000000LL)
2131 +               __set_errno (EDOM);
2132 +           return x-x;
2133 +       }
2134      /* argument reduction needed */
2135         else {
2136             n = __ieee754_rem_pio2l(x,y);
2137 diff --git a/sysdeps/ieee754/ldbl-128ibm/s_tanl.c b/sysdeps/ieee754/ldbl-128ibm/s_tanl.c
2138 index ea5a7f0..913f38f 100644
2139 --- a/sysdeps/ieee754/ldbl-128ibm/s_tanl.c
2140 +++ b/sysdeps/ieee754/ldbl-128ibm/s_tanl.c
2141 @@ -44,6 +44,7 @@
2142   *     TRIG(x) returns trig(x) nearly rounded
2143   */
2144  
2145 +#include <errno.h>
2146  #include "math.h"
2147  #include "math_private.h"
2148  #include <math_ldbl_opt.h>
2149 @@ -66,8 +67,11 @@
2150         if(ix <= 0x3fe921fb54442d10LL) return __kernel_tanl(x,z,1);
2151  
2152      /* tanl(Inf or NaN) is NaN */
2153 -       else if (ix>=0x7ff0000000000000LL) return x-x;          /* NaN */
2154 -
2155 +       else if (ix>=0x7ff0000000000000LL) {
2156 +           if (ix == 0x7ff0000000000000LL)
2157 +               __set_errno (EDOM);
2158 +           return x-x;         /* NaN */
2159 +       }
2160      /* argument reduction needed */
2161         else {
2162             n = __ieee754_rem_pio2l(x,y);
2163 commit e38af591a8dd3377926543044c5ddb39b156f903
2164 Author: Ulrich Drepper <drepper@redhat.com>
2165 Date:   Fri May 22 09:07:00 2009 -0700
2166
2167     Describe nss_dns parallel lookup workaround in 2.10 NEWS.
2168     (cherry picked from commit 57be3fd79a418b14e417e9a6b96f05dcb99932ee)
2169
2170 diff --git a/NEWS b/NEWS
2171 index 411c2c3..89f06dd 100644
2172 --- a/NEWS
2173 +++ b/NEWS
2174 @@ -47,6 +47,13 @@ Version 2.10
2175  * Handling for group shadow files has been added.
2176    Implemented by Ulrich Drepper.
2177  
2178 +* DNS IPv4-IPv6 parallel lookup now deals better with broken DNS
2179 +  servers (the case, e.g., for some people using the built-in DNS
2180 +  server in ADSL modems/routers).  There is a once-per-process timeout
2181 +  in case of a broken server.  To avoid it, users can run nscd or put
2182 +  'options single-request' in /etc/resolv.conf.
2183 +  Implemented by Ulrich Drepper.
2184 +
2185  \f
2186  Version 2.9
2187  
2188 commit ffbb82ecfee3854d5571683fbe4d2d5cd26c8748
2189 Author: Aurelien Jarno <aurelien@aurel32.net>
2190 Date:   Wed May 27 16:41:00 2009 -0700
2191
2192     [BZ #10200]
2193     * db-symbols.awk: Use the last field for the symbol name instead
2194     of the 8th one.
2195     (cherry picked from commit 8ee84bd01f85b5ab1430750270b7e51a967d03eb)
2196
2197 diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog
2198 index 8c07d9f..1ade196 100644
2199 diff --git a/nptl_db/db-symbols.awk b/nptl_db/db-symbols.awk
2200 index 3327213..f9a91b9 100644
2201 --- a/nptl_db/db-symbols.awk
2202 +++ b/nptl_db/db-symbols.awk
2203 @@ -14,7 +14,7 @@ NF == 0 { in_symtab=0; next }
2204  
2205  !in_symtab { next }
2206  
2207 -NF >= 8 && $7 != "UND" { seen[$8] = 1 }
2208 +NF >= 8 && $7 != "UND" { seen[$NF] = 1 }
2209  
2210  END {
2211    status = 0;
2212 commit 6e1f9be792b03fe122dbb0984d97eb1c6b731e69
2213 Author: Ulrich Drepper <drepper@redhat.com>
2214 Date:   Fri May 29 12:00:22 2009 -0700
2215
2216     Fix errno for boundary conditions in 128-bit long double.
2217     
2218     Similar to the changes which went already in for the other formats,
2219     follow POSIX rules for errno.
2220     (cherry picked from commit 7f3394bdf34e28b374e5569a7a74ddac734fb172)
2221
2222 diff --git a/ChangeLog b/ChangeLog
2223 index 10ac72d..7f28993 100644
2224 diff --git a/sysdeps/ieee754/ldbl-128/s_cosl.c b/sysdeps/ieee754/ldbl-128/s_cosl.c
2225 index d1258b2..ef61c3a 100644
2226 --- a/sysdeps/ieee754/ldbl-128/s_cosl.c
2227 +++ b/sysdeps/ieee754/ldbl-128/s_cosl.c
2228 @@ -44,6 +44,7 @@
2229   *     TRIG(x) returns trig(x) nearly rounded
2230   */
2231  
2232 +#include <errno.h>
2233  #include "math.h"
2234  #include "math_private.h"
2235  
2236 @@ -66,7 +67,14 @@
2237           return __kernel_cosl(x,z);
2238  
2239      /* cos(Inf or NaN) is NaN */
2240 -       else if (ix>=0x7fff000000000000LL) return x-x;
2241 +       else if (ix>=0x7fff000000000000LL) {
2242 +           if (ix == 0x7fff000000000000LL) {
2243 +               GET_LDOUBLE_LSW64(n,x);
2244 +               if (n == 0)
2245 +                   __set_errno (EDOM);
2246 +           }
2247 +           return x-x;
2248 +       }
2249  
2250      /* argument reduction needed */
2251         else {
2252 diff --git a/sysdeps/ieee754/ldbl-128/s_expm1l.c b/sysdeps/ieee754/ldbl-128/s_expm1l.c
2253 index 78bbe65..a82489b 100644
2254 --- a/sysdeps/ieee754/ldbl-128/s_expm1l.c
2255 +++ b/sysdeps/ieee754/ldbl-128/s_expm1l.c
2256 @@ -53,6 +53,7 @@
2257  
2258  
2259  
2260 +#include <errno.h>
2261  #include "math.h"
2262  #include "math_private.h"
2263  
2264 @@ -121,7 +122,10 @@ __expm1l (long double x)
2265  
2266    /* Overflow.  */
2267    if (x > maxlog)
2268 -    return (big * big);
2269 +    {
2270 +      __set_errno (ERANGE);
2271 +      return (big * big);
2272 +    }
2273  
2274    /* Minimum value.  */
2275    if (x < minarg)
2276 diff --git a/sysdeps/ieee754/ldbl-128/s_sinl.c b/sysdeps/ieee754/ldbl-128/s_sinl.c
2277 index 446a75f..dc509e7 100644
2278 --- a/sysdeps/ieee754/ldbl-128/s_sinl.c
2279 +++ b/sysdeps/ieee754/ldbl-128/s_sinl.c
2280 @@ -44,6 +44,7 @@
2281   *     TRIG(x) returns trig(x) nearly rounded
2282   */
2283  
2284 +#include <errno.h>
2285  #include "math.h"
2286  #include "math_private.h"
2287  
2288 @@ -66,7 +67,14 @@
2289           return __kernel_sinl(x,z,0);
2290  
2291      /* sin(Inf or NaN) is NaN */
2292 -       else if (ix>=0x7fff000000000000LL) return x-x;
2293 +       else if (ix>=0x7fff000000000000LL) {
2294 +           if (ix == 0x7fff000000000000LL) {
2295 +               GET_LDOUBLE_LSW64(n,x);
2296 +               if (n == 0)
2297 +                   __set_errno (EDOM);
2298 +           }
2299 +           return x-x;
2300 +       }
2301  
2302      /* argument reduction needed */
2303         else {
2304 diff --git a/sysdeps/ieee754/ldbl-128/s_tanl.c b/sysdeps/ieee754/ldbl-128/s_tanl.c
2305 index ea9d053..2349da6 100644
2306 --- a/sysdeps/ieee754/ldbl-128/s_tanl.c
2307 +++ b/sysdeps/ieee754/ldbl-128/s_tanl.c
2308 @@ -44,6 +44,7 @@
2309   *     TRIG(x) returns trig(x) nearly rounded
2310   */
2311  
2312 +#include <errno.h>
2313  #include "math.h"
2314  #include "math_private.h"
2315  
2316 @@ -65,7 +66,14 @@
2317         if(ix <= 0x3ffe921fb54442d1LL) return __kernel_tanl(x,z,1);
2318  
2319      /* tanl(Inf or NaN) is NaN */
2320 -       else if (ix>=0x7fff000000000000LL) return x-x;          /* NaN */
2321 +       else if (ix>=0x7fff000000000000LL) {
2322 +           if (ix == 0x7fff000000000000LL) {
2323 +               GET_LDOUBLE_LSW64(n,x);
2324 +               if (n == 0)
2325 +                   __set_errno (EDOM);
2326 +           }
2327 +           return x-x;         /* NaN */
2328 +       }
2329  
2330      /* argument reduction needed */
2331         else {
2332 commit 8eccea8011d27503c02b1dcd00aef80185e1b89a
2333 Author: Roland McGrath <roland@redhat.com>
2334 Date:   Sat May 30 15:06:51 2009 -0700
2335
2336     Remove arch directory names from .gitignore.
2337     (cherry picked from commit cc3ae2461cf5ced13ab7c7787543f4dd3eabe88c)
2338
2339 diff --git a/.gitignore b/.gitignore
2340 index d903bc6..befca38 100644
2341 --- a/.gitignore
2342 +++ b/.gitignore
2343 @@ -23,12 +23,7 @@ glibc-*
2344  
2345  configparms
2346  
2347 -sun[43]*
2348 -i[345]86*
2349 -hp300*
2350 -
2351  ieeetest
2352 -hppa-sysdeps
2353  regex
2354  
2355  gpl2lgpl.sed
2356 commit 10bf3b765521cf6f8bc30efcfbf6f16debcbce8e
2357 Author: Andreas Schwab <schwab@linux-m68k.org>
2358 Date:   Sun May 31 16:54:28 2009 -0700
2359
2360     Move AC_CANONICAL_HOST before first use of $host and $build.
2361     (cherry picked from commit c16a054d5e20e4da6ccc528b690910a777d69a8b)
2362
2363 diff --git a/ChangeLog b/ChangeLog
2364 index 7f28993..6d9cc29 100644
2365 diff --git a/configure b/configure
2366 index 7555891..88cf4fd 100755
2367 --- a/configure
2368 +++ b/configure
2369 @@ -726,14 +726,6 @@ base_machine
2370  add_on_subdirs
2371  add_ons
2372  subdirs
2373 -host_os
2374 -host_vendor
2375 -host_cpu
2376 -host
2377 -build_os
2378 -build_vendor
2379 -build_cpu
2380 -build
2381  libc_cv_nss_crypt
2382  experimental_malloc
2383  multi_arch
2384 @@ -756,6 +748,14 @@ CPPFLAGS
2385  LDFLAGS
2386  CFLAGS
2387  CC
2388 +host_os
2389 +host_vendor
2390 +host_cpu
2391 +host
2392 +build_os
2393 +build_vendor
2394 +build_cpu
2395 +build
2396  target_alias
2397  host_alias
2398  build_alias
2399 @@ -2011,6 +2011,90 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2400  
2401  
2402  
2403 +# Make sure we can run config.sub.
2404 +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2405 +  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2406 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2407 +   { (exit 1); exit 1; }; }
2408 +
2409 +{ $as_echo "$as_me:$LINENO: checking build system type" >&5
2410 +$as_echo_n "checking build system type... " >&6; }
2411 +if test "${ac_cv_build+set}" = set; then
2412 +  $as_echo_n "(cached) " >&6
2413 +else
2414 +  ac_build_alias=$build_alias
2415 +test "x$ac_build_alias" = x &&
2416 +  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2417 +test "x$ac_build_alias" = x &&
2418 +  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2419 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2420 +   { (exit 1); exit 1; }; }
2421 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2422 +  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2423 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2424 +   { (exit 1); exit 1; }; }
2425 +
2426 +fi
2427 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2428 +$as_echo "$ac_cv_build" >&6; }
2429 +case $ac_cv_build in
2430 +*-*-*) ;;
2431 +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2432 +$as_echo "$as_me: error: invalid value of canonical build" >&2;}
2433 +   { (exit 1); exit 1; }; };;
2434 +esac
2435 +build=$ac_cv_build
2436 +ac_save_IFS=$IFS; IFS='-'
2437 +set x $ac_cv_build
2438 +shift
2439 +build_cpu=$1
2440 +build_vendor=$2
2441 +shift; shift
2442 +# Remember, the first character of IFS is used to create $*,
2443 +# except with old shells:
2444 +build_os=$*
2445 +IFS=$ac_save_IFS
2446 +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2447 +
2448 +
2449 +{ $as_echo "$as_me:$LINENO: checking host system type" >&5
2450 +$as_echo_n "checking host system type... " >&6; }
2451 +if test "${ac_cv_host+set}" = set; then
2452 +  $as_echo_n "(cached) " >&6
2453 +else
2454 +  if test "x$host_alias" = x; then
2455 +  ac_cv_host=$ac_cv_build
2456 +else
2457 +  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2458 +    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2459 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2460 +   { (exit 1); exit 1; }; }
2461 +fi
2462 +
2463 +fi
2464 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2465 +$as_echo "$ac_cv_host" >&6; }
2466 +case $ac_cv_host in
2467 +*-*-*) ;;
2468 +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2469 +$as_echo "$as_me: error: invalid value of canonical host" >&2;}
2470 +   { (exit 1); exit 1; }; };;
2471 +esac
2472 +host=$ac_cv_host
2473 +ac_save_IFS=$IFS; IFS='-'
2474 +set x $ac_cv_host
2475 +shift
2476 +host_cpu=$1
2477 +host_vendor=$2
2478 +shift; shift
2479 +# Remember, the first character of IFS is used to create $*,
2480 +# except with old shells:
2481 +host_os=$*
2482 +IFS=$ac_save_IFS
2483 +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2484 +
2485 +
2486 +
2487  ac_ext=c
2488  ac_cpp='$CPP $CPPFLAGS'
2489  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2490 @@ -3844,90 +3928,6 @@ else
2491  fi
2492  
2493  
2494 -# Make sure we can run config.sub.
2495 -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2496 -  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2497 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2498 -   { (exit 1); exit 1; }; }
2499 -
2500 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5
2501 -$as_echo_n "checking build system type... " >&6; }
2502 -if test "${ac_cv_build+set}" = set; then
2503 -  $as_echo_n "(cached) " >&6
2504 -else
2505 -  ac_build_alias=$build_alias
2506 -test "x$ac_build_alias" = x &&
2507 -  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2508 -test "x$ac_build_alias" = x &&
2509 -  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2510 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2511 -   { (exit 1); exit 1; }; }
2512 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2513 -  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2514 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2515 -   { (exit 1); exit 1; }; }
2516 -
2517 -fi
2518 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2519 -$as_echo "$ac_cv_build" >&6; }
2520 -case $ac_cv_build in
2521 -*-*-*) ;;
2522 -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2523 -$as_echo "$as_me: error: invalid value of canonical build" >&2;}
2524 -   { (exit 1); exit 1; }; };;
2525 -esac
2526 -build=$ac_cv_build
2527 -ac_save_IFS=$IFS; IFS='-'
2528 -set x $ac_cv_build
2529 -shift
2530 -build_cpu=$1
2531 -build_vendor=$2
2532 -shift; shift
2533 -# Remember, the first character of IFS is used to create $*,
2534 -# except with old shells:
2535 -build_os=$*
2536 -IFS=$ac_save_IFS
2537 -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2538 -
2539 -
2540 -{ $as_echo "$as_me:$LINENO: checking host system type" >&5
2541 -$as_echo_n "checking host system type... " >&6; }
2542 -if test "${ac_cv_host+set}" = set; then
2543 -  $as_echo_n "(cached) " >&6
2544 -else
2545 -  if test "x$host_alias" = x; then
2546 -  ac_cv_host=$ac_cv_build
2547 -else
2548 -  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2549 -    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2550 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2551 -   { (exit 1); exit 1; }; }
2552 -fi
2553 -
2554 -fi
2555 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2556 -$as_echo "$ac_cv_host" >&6; }
2557 -case $ac_cv_host in
2558 -*-*-*) ;;
2559 -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2560 -$as_echo "$as_me: error: invalid value of canonical host" >&2;}
2561 -   { (exit 1); exit 1; }; };;
2562 -esac
2563 -host=$ac_cv_host
2564 -ac_save_IFS=$IFS; IFS='-'
2565 -set x $ac_cv_host
2566 -shift
2567 -host_cpu=$1
2568 -host_vendor=$2
2569 -shift; shift
2570 -# Remember, the first character of IFS is used to create $*,
2571 -# except with old shells:
2572 -host_os=$*
2573 -IFS=$ac_save_IFS
2574 -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2575 -
2576 -
2577 -
2578  # The way shlib-versions is used to generate soversions.mk uses a
2579  # fairly simplistic model for name recognition that can't distinguish
2580  # i486-pc-linux-gnu fully from i486-pc-gnu.  So we mutate a $host_os
2581 diff --git a/configure.in b/configure.in
2582 index d54e952..6a92bd8 100644
2583 --- a/configure.in
2584 +++ b/configure.in
2585 @@ -6,6 +6,8 @@ AC_CONFIG_SRCDIR([include/features.h])
2586  AC_CONFIG_HEADERS([config.h])
2587  AC_CONFIG_AUX_DIR([scripts])
2588  
2589 +AC_CANONICAL_HOST
2590 +
2591  AC_PROG_CC
2592  if test $host != $build; then
2593    AC_CHECK_PROGS(BUILD_CC, gcc cc)
2594 @@ -316,8 +318,6 @@ else
2595  fi
2596  AC_SUBST(libc_cv_nss_crypt)
2597  
2598 -AC_CANONICAL_HOST
2599 -
2600  # The way shlib-versions is used to generate soversions.mk uses a
2601  # fairly simplistic model for name recognition that can't distinguish
2602  # i486-pc-linux-gnu fully from i486-pc-gnu.  So we mutate a $host_os
2603 commit a447f6830f9f2a9543247790b1f9b90a465e6079
2604 Author: Ulrich Drepper <drepper@redhat.com>
2605 Date:   Sun May 31 17:46:55 2009 -0700
2606
2607     Add missing file from accept4 commit.
2608     
2609     Hidden by previous .gitignore content.
2610     (cherry picked from commit fd469aac31dc09f1328c8c4b976f887ebd592c56)
2611
2612 diff --git a/sysdeps/unix/sysv/linux/i386/internal_accept4.S b/sysdeps/unix/sysv/linux/i386/internal_accept4.S
2613 new file mode 100644
2614 index 0000000..c3f1630
2615 --- /dev/null
2616 +++ b/sysdeps/unix/sysv/linux/i386/internal_accept4.S
2617 @@ -0,0 +1 @@
2618 +/* Not needed, accept4.S has everything.  */
2619 commit 1e639628d118eb75a2e0de99debbba6e949cdbae
2620 Author: André Goddard Rosa <andre.goddard@gmail.com>
2621 Date:   Mon Jun 1 11:43:26 2009 -0700
2622
2623     Fix mbrtowc example.
2624     
2625     The remaining bytes were not copied correctly.
2626     (cherry picked from commit 21e66bc528edcbe18d434eb33a601e0f796904c9)
2627
2628 diff --git a/manual/charset.texi b/manual/charset.texi
2629 index 8b2c09c..79854e5 100644
2630 --- a/manual/charset.texi
2631 +++ b/manual/charset.texi
2632 @@ -1234,7 +1234,7 @@ file_mbsrtowcs (int input, int output)
2633        /* @r{If any characters must be carried forward,}
2634           @r{put them at the beginning of @code{buffer}.} */
2635        if (filled > 0)
2636 -        memmove (inp, buffer, filled);
2637 +        memmove (buffer, inp, filled);
2638      @}
2639  
2640    return 1;
2641 commit e926cb177490407dfea3fc6c181a272b7b8a2a20
2642 Author: Ulrich Drepper <drepper@redhat.com>
2643 Date:   Wed Jun 3 08:30:35 2009 -0700
2644
2645     Terminate correct buffer.
2646     
2647     Little typo could cause additional characters to be printed.
2648     (cherry picked from commit fbb04b35e7997070feec74e0fd46953faef71f9e)
2649
2650 diff --git a/ChangeLog b/ChangeLog
2651 index 6d9cc29..1211e1d 100644
2652 diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
2653 index db10012..5700272 100644
2654 --- a/elf/dl-sysdep.c
2655 +++ b/elf/dl-sysdep.c
2656 @@ -335,7 +335,7 @@ _dl_show_auxv (void)
2657  
2658        /* Unknown value: print a generic line.  */
2659        char buf2[17];
2660 -      buf[sizeof (buf2) - 1] = '\0';
2661 +      buf2[sizeof (buf2) - 1] = '\0';
2662        const char *val2 = _itoa ((unsigned long int) av->a_un.a_val,
2663                                 buf2 + sizeof buf2 - 1, 16, 0);
2664        const char *val =  _itoa ((unsigned long int) av->a_type,
2665 commit e40d82c4ee736936290827c8297c2c58e2181932
2666 Author: Ulrich Drepper <drepper@redhat.com>
2667 Date:   Tue Jun 9 06:59:02 2009 -0700
2668
2669     (_IO_new_file_fopen): Don't prematurely stop parsing mode string.
2670     (cherry picked from commits 0d74e0436195a051d69e78bef10d23879788cb7e,
2671     d360a0da2b42b2b79e9ce9c2d7984c234e840b7a)
2672
2673 diff --git a/ChangeLog b/ChangeLog
2674 index 1211e1d..3063dc8 100644
2675 diff --git a/libio/fileops.c b/libio/fileops.c
2676 index cf47c91..4698953 100644
2677 --- a/libio/fileops.c
2678 +++ b/libio/fileops.c
2679 @@ -1,4 +1,4 @@
2680 -/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008
2681 +/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008, 2009
2682     Free Software Foundation, Inc.
2683     This file is part of the GNU C Library.
2684     Written by Per Bothner <bothner@cygnus.com>.
2685 @@ -319,11 +319,11 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
2686           continue;
2687         case 'c':
2688           fp->_flags2 |= _IO_FLAGS2_NOTCANCEL;
2689 -         break;
2690 +         continue;
2691  #ifdef O_CLOEXEC
2692         case 'e':
2693           oflags |= O_CLOEXEC;
2694 -         break;
2695 +         continue;
2696  #endif
2697         default:
2698           /* Ignore.  */
2699 commit ac37d9836e2967b9d5cd5b260910db53fbab1858
2700 Author: J.H.M. Dassen <rdassen@redhat.com>
2701 Date:   Tue Jun 9 07:58:02 2009 -0700
2702
2703     Remove comma at end of enum.
2704     (cherry picked from commit 88ea382fda5af7717f85bb19837c9c99094f3df4)
2705
2706 diff --git a/ChangeLog b/ChangeLog
2707 index 3063dc8..c6c3553 100644
2708 diff --git a/dlfcn/dlfcn.h b/dlfcn/dlfcn.h
2709 index 7e373ed..3e461df 100644
2710 --- a/dlfcn/dlfcn.h
2711 +++ b/dlfcn/dlfcn.h
2712 @@ -1,6 +1,5 @@
2713  /* User functions for run-time dynamic loading.
2714 -   Copyright (C) 1995-1999,2000,2001,2003,2004,2006
2715 -       Free Software Foundation, Inc.
2716 +   Copyright (C) 1995-2001,2003,2004,2006,2009 Free Software Foundation, Inc.
2717     This file is part of the GNU C Library.
2718  
2719     The GNU C Library is free software; you can redistribute it and/or
2720 @@ -164,7 +163,7 @@ enum
2721         segment, or if the calling thread has not allocated a block for it.  */
2722      RTLD_DI_TLS_DATA = 10,
2723  
2724 -    RTLD_DI_MAX = 10,
2725 +    RTLD_DI_MAX = 10
2726    };
2727  
2728  
2729 commit 53f32b044fff54341c426a9ba16753b881d32f91
2730 Author: Ulrich Drepper <drepper@redhat.com>
2731 Date:   Thu Jun 11 10:07:33 2009 -0700
2732
2733     Remember we switched to single-request mode.
2734     
2735     This change prevents repetition in most later calls of the resolver
2736     in case the DNS server or the network connection is broken.
2737     (cherry picked from commit 310647e9809986986650994d036af18ca9b17fb2)
2738
2739 diff --git a/ChangeLog b/ChangeLog
2740 index c6c3553..ecf7c10 100644
2741 diff --git a/resolv/res_send.c b/resolv/res_send.c
2742 index 25a854f..39c69da 100644
2743 --- a/resolv/res_send.c
2744 +++ b/resolv/res_send.c
2745 @@ -1008,7 +1008,7 @@ send_dg(res_state statp,
2746                 seconds /= statp->nscount;
2747         if (seconds <= 0)
2748                 seconds = 1;
2749 -       bool single_request = ((statp->options) & RES_SNGLKUP) != 0;// XXX
2750 +       bool single_request = (statp->options & RES_SNGLKUP) != 0;// XXX
2751         int save_gotsomewhere = *gotsomewhere;
2752   retry:
2753         evNowTime(&now);
2754 @@ -1059,6 +1059,7 @@ send_dg(res_state statp,
2755                        have received the first answer.  */
2756                     if (!single_request)
2757                       {
2758 +                       statp->options |= RES_SNGLKUP;
2759                         single_request = true;
2760                         *gotsomewhere = save_gotsomewhere;
2761                         goto retry;
2762 commit 9cf557216cbd0fe6e5ca235114c27260622d049b
2763 Author: Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>
2764 Date:   Thu Jun 11 11:32:51 2009 -0700
2765
2766     Fix futex syscall parameter for x86 absolute timeout waits.
2767     
2768     This affects only installations compiled for kernels older than 2.6.18.
2769     (cherry picked from commit 1828530f09bcc321cfb84c27110bbce804605ec4)
2770
2771 diff --git a/nptl/ChangeLog b/nptl/ChangeLog
2772 index f3bd32f..d97efa0 100644
2773 diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2774 index 056b729..7578c7e 100644
2775 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2776 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2777 @@ -60,7 +60,7 @@
2778  # define LOAD_FUTEX_WAIT_ABS(reg) \
2779         xorl    $FUTEX_PRIVATE_FLAG, reg ; \
2780         andl    %gs:PRIVATE_FUTEX, reg ; \
2781 -       orl     $FUTEX_WAIT | FUTEX_CLOCK_REALTIME, reg
2782 +       orl     $FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME, reg
2783  # define LOAD_FUTEX_WAKE(reg) \
2784         xorl    $FUTEX_PRIVATE_FLAG, reg ; \
2785         andl    %gs:PRIVATE_FUTEX, reg ; \
2786 commit 0f1ea04f8ab3ad481089fd705f4bda2df0fd8078
2787 Author: Akinori Hattori <hattya@gentoo.org>
2788 Date:   Mon Jun 15 10:54:26 2009 -0700
2789
2790     Handle leap seconds even if no DST rule exists.
2791     
2792     This fixes BZ #10211.
2793     (cherry picked from commit 29143408ae6d474a115768e809691635f507b1fd)
2794
2795 diff --git a/ChangeLog b/ChangeLog
2796 index ecf7c10..b79f020 100644
2797 diff --git a/time/tzfile.c b/time/tzfile.c
2798 index 9700223..4e20b25 100644
2799 --- a/time/tzfile.c
2800 +++ b/time/tzfile.c
2801 @@ -1,4 +1,4 @@
2802 -/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006, 2007
2803 +/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006,2007,2009
2804     Free Software Foundation, Inc.
2805     This file is part of the GNU C Library.
2806  
2807 @@ -659,9 +659,7 @@ __tzfile_compute (time_t timer, int use_localtime,
2808               __tzname[1] = __tzstring (&zone_names[strlen (zone_names) + 1]);
2809             }
2810  
2811 -         *leap_correct = 0L;
2812 -         *leap_hit = 0;
2813 -         return;
2814 +         goto leap;
2815         }
2816        else
2817         {
2818 @@ -762,6 +760,7 @@ __tzfile_compute (time_t timer, int use_localtime,
2819        tp->tm_gmtoff = info->offset;
2820      }
2821  
2822 + leap:
2823    *leap_correct = 0L;
2824    *leap_hit = 0;
2825  
2826 commit e80cfa694185fc970ca3804660a903b28173cd52
2827 Author: Ulrich Drepper <drepper@redhat.com>
2828 Date:   Mon Jun 15 11:00:08 2009 -0700
2829
2830     Fix computation of tzspec_len.
2831     
2832     Without this it should never have worked that we can use the
2833     embedded envvar in the timezone data files for dates after the last
2834     matching rule.
2835     (cherry picked from commit 6355c99740c91ed5a7fa14e378f74950e09f5f48)
2836
2837 diff --git a/ChangeLog b/ChangeLog
2838 index b79f020..c77ed82 100644
2839 diff --git a/time/tzfile.c b/time/tzfile.c
2840 index 4e20b25..d8bd55a 100644
2841 --- a/time/tzfile.c
2842 +++ b/time/tzfile.c
2843 @@ -248,7 +248,7 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
2844                                 + num_transitions * (8 + 1)
2845                                 + num_types * 6
2846                                 + chars
2847 -                               + num_leaps * 8
2848 +                               + num_leaps * 12
2849                                 + num_isstd
2850                                 + num_isgmt) - 1 : 0);
2851  
2852 commit 4da50f4b075b4ed9c75f072e1e26deee720fb8bf
2853 Author: Bruce Dubbs <bdubbs@linuxfromscratch.org>
2854 Date:   Mon Jun 15 17:27:48 2009 -0700
2855
2856     (do_test): Use de_DE.UTF-8 as locale name.
2857     
2858     (cherry picked from commit 4155d926336ba38428a98359bf0908453ff83625)
2859
2860 diff --git a/ChangeLog b/ChangeLog
2861 index c77ed82..f7ac9ec 100644
2862 diff --git a/libio/tst-fgetwc.c b/libio/tst-fgetwc.c
2863 index 9ccfeb1..06e4a42 100644
2864 --- a/libio/tst-fgetwc.c
2865 +++ b/libio/tst-fgetwc.c
2866 @@ -6,7 +6,7 @@
2867  static int
2868  do_test (void)
2869  {
2870 -  if (setlocale (LC_ALL, "de_DE.utf8") == NULL)
2871 +  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
2872      {
2873        puts ("setlocale failed");
2874        return 1;
2875 commit 26330c1c489a2cb2ea775390c9a7a6302954f64c
2876 Author: Joe Landers <jlanders@vmware.com>
2877 Date:   Mon Jun 15 17:37:40 2009 -0700
2878
2879     Fix memory leak when batch-reading large NIS password maps.
2880     
2881     Not the whole was traversed in the function to free all buffers.
2882     BZ #10203
2883     (cherry picked from commit 233a182b9ee2a48eddbb15f70af8bc24add24af3)
2884
2885 diff --git a/ChangeLog b/ChangeLog
2886 index f7ac9ec..c999607 100644
2887 diff --git a/nis/nss_nis/nis-pwd.c b/nis/nss_nis/nis-pwd.c
2888 index 1b5206a..fdc7dc9 100644
2889 --- a/nis/nss_nis/nis-pwd.c
2890 +++ b/nis/nss_nis/nis-pwd.c
2891 @@ -1,4 +1,4 @@
2892 -/* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc.
2893 +/* Copyright (C) 1996-1998,2001-2003,2006,2009 Free Software Foundation, Inc.
2894     This file is part of the GNU C Library.
2895     Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
2896  
2897 @@ -116,7 +116,7 @@ internal_nis_endpwent (void)
2898        oldkeylen = 0;
2899      }
2900  
2901 -  struct response_t *curr = intern.next;
2902 +  struct response_t *curr = intern.start;
2903  
2904    while (curr != NULL)
2905      {
2906 commit 3ff6565150bef32e4cfc565b1463df84dd8c6d7a
2907 Author: Arnaud Ebalard <arno@natisbad.org>
2908 Date:   Mon Jun 15 20:33:39 2009 -0700
2909
2910     Fix type of nd_opt_home_agent_info_preference.
2911     
2912     (cherry picked from commit 7ed520bd8504700cf4aaf3b06deb10575bfc546a)
2913
2914 diff --git a/ChangeLog b/ChangeLog
2915 index c999607..d0912cc 100644
2916 diff --git a/inet/netinet/icmp6.h b/inet/netinet/icmp6.h
2917 index 0cb1aa6..82893da 100644
2918 --- a/inet/netinet/icmp6.h
2919 +++ b/inet/netinet/icmp6.h
2920 @@ -1,4 +1,4 @@
2921 -/* Copyright (C) 1991-1997,2000,2006 Free Software Foundation, Inc.
2922 +/* Copyright (C) 1991-1997,2000,2006,2009 Free Software Foundation, Inc.
2923     This file is part of the GNU C Library.
2924  
2925     The GNU C Library is free software; you can redistribute it and/or
2926 @@ -339,7 +339,7 @@ struct nd_opt_home_agent_info
2927      uint8_t   nd_opt_home_agent_info_type;
2928      uint8_t   nd_opt_home_agent_info_len;
2929      uint16_t  nd_opt_home_agent_info_reserved;
2930 -    int16_t   nd_opt_home_agent_info_preference;
2931 +    uint16_t  nd_opt_home_agent_info_preference;
2932      uint16_t  nd_opt_home_agent_info_lifetime;
2933    };
2934  
2935 commit 2a31410e40b61c47ab4c5283c25cea2c5405d757
2936 Author: Ulrich Drepper <drepper@redhat.com>
2937 Date:   Mon Jun 15 21:12:57 2009 -0700
2938
2939     When iterating over CPU bitmask, don't try more than CPU_SETSIZE.
2940     (cherry picked from commit 395a37e379bf900b2b6a25e17c44cde2d1c46c44)
2941
2942 diff --git a/ChangeLog b/ChangeLog
2943 index d0912cc..b1ba145 100644
2944 diff --git a/posix/tst-cpucount.c b/posix/tst-cpucount.c
2945 index fe3cded..b3691a1 100644
2946 --- a/posix/tst-cpucount.c
2947 +++ b/posix/tst-cpucount.c
2948 @@ -1,5 +1,6 @@
2949  #include <sched.h>
2950  #include <stdio.h>
2951 +#include <sys/param.h>
2952  
2953  static int
2954  do_test (void)
2955 @@ -8,7 +9,7 @@ do_test (void)
2956  
2957    CPU_ZERO (&c);
2958  
2959 -  for (int cnt = 0; cnt < 130; ++cnt)
2960 +  for (int cnt = 0; cnt < MIN (CPU_SETSIZE, 130); ++cnt)
2961      {
2962        int n = CPU_COUNT (&c);
2963        if (n != cnt)
2964 commit c8bfc696298620bc1199996f5d836ce837248b0b
2965 Author: Ulrich Drepper <drepper@redhat.com>
2966 Date:   Mon Jun 15 22:56:51 2009 -0700
2967
2968     Fix permission of slave device on devpts if necessary.
2969     
2970     If devptr is misconfigured the slave device permission after grantpt
2971     might not be 0620.  BZ #10166
2972     (cherry picked from commit 292e3abebff9f94ca47c1a725a691cb6ed6cff5f)
2973
2974 diff --git a/ChangeLog b/ChangeLog
2975 index b1ba145..7bec39a 100644
2976 diff --git a/sysdeps/unix/sysv/linux/grantpt.c b/sysdeps/unix/sysv/linux/grantpt.c
2977 index b894b8b..c858f89 100644
2978 --- a/sysdeps/unix/sysv/linux/grantpt.c
2979 +++ b/sysdeps/unix/sysv/linux/grantpt.c
2980 @@ -1,4 +1,4 @@
2981 -/* Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
2982 +/* Copyright (C) 1998, 1999, 2001, 2002, 2009 Free Software Foundation, Inc.
2983     This file is part of the GNU C Library.
2984  
2985     The GNU C Library is free software; you can redistribute it and/or
2986 @@ -70,9 +70,16 @@ grantpt (int fd)
2987      return -1;
2988  
2989    /* If the slave pseudo terminal lives on a `devpts' filesystem, the
2990 -     ownership and access permission are already set.  */
2991 +     ownership is already set and the access permission might already
2992 +     be set.  */
2993    if (fsbuf.f_type == DEVPTS_SUPER_MAGIC || fsbuf.f_type == DEVFS_SUPER_MAGIC)
2994 -    return 0;
2995 +    {
2996 +      struct stat64 st;
2997 +
2998 +      if (fstat (fd, &st) == 0
2999 +         && (st.st_mode & ACCESSPERMS) == (S_IRUSR|S_IWUSR|S_IWGRP))
3000 +       return 0;
3001 +    }
3002  
3003    return __unix_grantpt (fd);
3004  }
3005 commit c9dab1b7acf11a334c9494eca160ad841b5f05e2
3006 Author: Ulrich Drepper <drepper@redhat.com>
3007 Date:   Tue Jun 16 07:48:27 2009 -0700
3008
3009     Run tst-fgetwc with necessary envvar.
3010     (cherry picked from commit eae3208e249edda25548fa7680d01193d7515e0c)
3011
3012 diff --git a/ChangeLog b/ChangeLog
3013 index 7bec39a..e6f4565 100644
3014 diff --git a/libio/Makefile b/libio/Makefile
3015 index b94d047..501e80c 100644
3016 --- a/libio/Makefile
3017 +++ b/libio/Makefile
3018 @@ -153,6 +153,7 @@ tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
3019  bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
3020  tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata
3021  bug-ftell-ENV = LOCPATH=$(common-objpfx)localedata
3022 +tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata
3023  
3024  generated = tst-fopenloc.mtrace tst-fopenloc.check
3025  
3026 commit 1f3ae5ae370802ab2bd4f4fc15acd09f381bfa52
3027 Author: Ulrich Drepper <drepper@redhat.com>
3028 Date:   Tue Jun 16 08:25:01 2009 -0700
3029
3030     Define week, first_weekday, first_workday in de_AT locale.
3031     
3032     BZ #10011
3033     (cherry picked from commit b23964c6207124341b89cefc316dc512a669c17b)
3034
3035 diff --git a/localedata/ChangeLog b/localedata/ChangeLog
3036 index b3db076..fbe5bc6 100644
3037 diff --git a/localedata/locales/de_AT b/localedata/locales/de_AT
3038 index 4ec42f4..4e0b7fb 100644
3039 --- a/localedata/locales/de_AT
3040 +++ b/localedata/locales/de_AT
3041 @@ -121,6 +121,9 @@ t_fmt_ampm ""
3042  date_fmt       "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
3043  <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
3044  <U0025><U005A><U0020><U0025><U0059>"
3045 +week    7;19971130;4
3046 +first_weekday 2
3047 +first_workday 2
3048  END LC_TIME
3049  
3050  LC_PAPER
3051 commit 626b1576643ecb869c1a685a7dc59e5df09bbf1d
3052 Author: Ryan S. Arnold <rsa@us.ibm.com>
3053 Date:   Tue Jun 16 08:29:04 2009 -0700
3054
3055     Fix incorrect use of cmpldi in 32-bit PPC code.
3056     
3057     The 32-bit PowerPC POWER6 memcpy uses the cmpldi insn when it should use a cmplwi.
3058     BZ #10107
3059     (cherry picked from commit 25bfbb9e0e610afaf6b67e5ee1a1a5338018c42e)
3060
3061 diff --git a/ChangeLog b/ChangeLog
3062 index e6f4565..7b39200 100644
3063 diff --git a/sysdeps/powerpc/powerpc32/power6/memcpy.S b/sysdeps/powerpc/powerpc32/power6/memcpy.S
3064 index ba45fd2..156b0bd 100644
3065 --- a/sysdeps/powerpc/powerpc32/power6/memcpy.S
3066 +++ b/sysdeps/powerpc/powerpc32/power6/memcpy.S
3067 @@ -1,5 +1,5 @@
3068  /* Optimized memcpy implementation for PowerPC32 on POWER6.
3069 -   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
3070 +   Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
3071     This file is part of the GNU C Library.
3072  
3073     The GNU C Library is free software; you can redistribute it and/or
3074 @@ -25,9 +25,9 @@
3075     Returns 'dst'.
3076  
3077     Memcpy handles short copies (< 32-bytes) using a binary move blocks 
3078 -   (no loops) of lwz/stw.  The tail (remaining 1-3) bytes is handled 
3079 -   with the appropriate combination of byte and halfword load/stores. 
3080 -   There is minimal effort to optimize the alignment of short moves.  
3081 +   (no loops) of lwz/stw.  The tail (remaining 1-3) bytes is handled
3082 +   with the appropriate combination of byte and halfword load/stores.
3083 +   There is minimal effort to optimize the alignment of short moves.
3084  
3085     Longer moves (>= 32-bytes) justify the effort to get at least the
3086     destination word (4-byte) aligned.  Further optimization is
3087 @@ -80,11 +80,11 @@ EALIGN (BP_SYM (memcpy), 5, 0)
3088      bne-   cr6,L(wdu)   /* If source is not word aligned. .L6 */
3089      clrlwi 11,31,30  /* calculate the number of tail bytes */
3090      b      L(word_aligned)
3091 -  /* Copy words from source to destination, assuming the destination is 
3092 +  /* Copy words from source to destination, assuming the destination is
3093       aligned on a word boundary.
3094  
3095       At this point we know there are at least 29 bytes left (32-3) to copy.
3096 -     The next step is to determine if the source is also word aligned. 
3097 +     The next step is to determine if the source is also word aligned.
3098       If not branch to the unaligned move code at .L6. which uses
3099       a load, shift, store strategy.
3100  
3101 @@ -100,9 +100,9 @@ EALIGN (BP_SYM (memcpy), 5, 0)
3102  
3103    /* Move words where destination and source are word aligned.
3104       Use an unrolled loop to copy 4 words (16-bytes) per iteration.
3105 -     If the the copy is not an exact multiple of 16 bytes, 1-3 
3106 +     If the the copy is not an exact multiple of 16 bytes, 1-3
3107       words are copied as needed to set up the main loop.  After
3108 -     the main loop exits there may be a tail of 1-3 bytes. These bytes are 
3109 +     the main loop exits there may be a tail of 1-3 bytes. These bytes are
3110       copied a halfword/byte at a time as needed to preserve alignment.  */
3111  L(word_aligned):
3112      mtcrf 0x01,9
3113 @@ -121,7 +121,7 @@ L(word_aligned):
3114      addi  10,3,8
3115      bf    31,4f
3116      lwz   0,8(12)
3117 -    stw   0,8(3)    
3118 +    stw   0,8(3)
3119      blt   cr1,3f
3120      addi  11,12,12
3121      addi  10,3,12
3122 @@ -135,7 +135,7 @@ L(word_aligned):
3123      addi  11,12,4
3124      stw   6,0(3)
3125      addi  10,3,4
3126 -    
3127 +
3128      .align  4
3129  4:
3130      lwz   6,0(11)
3131 @@ -149,14 +149,14 @@ L(word_aligned):
3132      addi  11,11,16
3133      addi  10,10,16
3134      bdnz  4b
3135 -3:  
3136 +3:
3137      clrrwi 0,31,2
3138      mtcrf 0x01,31
3139      beq   cr6,0f
3140  .L9:
3141      add   3,3,0
3142      add   12,12,0
3143 -    
3144 +
3145  /*  At this point we have a tail of 0-3 bytes and we know that the
3146      destination is word aligned.  */
3147  2:  bf    30,1f
3148 @@ -175,7 +175,7 @@ L(word_aligned):
3149      addi 1,1,32
3150      blr
3151  
3152 -/* Copy up to 31 bytes.  This divided into two cases 0-8 bytes and 9-31 
3153 +/* Copy up to 31 bytes.  This divided into two cases 0-8 bytes and 9-31
3154     bytes.  Each case is handled without loops, using binary (1,2,4,8)
3155     tests.
3156  
3157 @@ -208,7 +208,7 @@ L(word_unaligned_short):
3158      andi. 0,8,3
3159      beq   cr6,L(wus_8) /* Handle moves of 8 bytes.  */
3160  /* At least 9 bytes left.  Get the source word aligned.  */
3161 -    cmpldi     cr1,5,16
3162 +    cmplwi     cr1,5,16
3163      mr    12,4
3164      ble   cr6,L(wus_4)  /* Handle moves of 0-8 bytes.  */
3165      mr    11,3
3166 @@ -241,7 +241,7 @@ L(wus_tail):
3167  /* At least 6 bytes left and the source is word aligned.  This allows
3168     some speculative loads up front.  */
3169  /* We need to special case the fall-through because the biggest delays
3170 -   are due to address computation not being ready in time for the 
3171 +   are due to address computation not being ready in time for the
3172     AGEN.  */
3173      lwz   6,0(12)
3174      lwz   7,4(12)
3175 @@ -336,7 +336,7 @@ L(wus_tail4):  /* Move 4 bytes.  */
3176  L(wus_tail2):  /* Move 2-3 bytes.  */
3177      bf    30,L(wus_tail1)
3178      lhz   6,0(12)
3179 -    sth   6,0(11) 
3180 +    sth   6,0(11)
3181      bf    31,L(wus_tailX)
3182      lbz   7,2(12)
3183      stb   7,2(11)
3184 @@ -368,7 +368,7 @@ L(wus_4):
3185      stw   6,0(3)
3186      bf    30,L(wus_5)
3187      lhz   7,4(4)
3188 -    sth   7,4(3) 
3189 +    sth   7,4(3)
3190      bf    31,L(wus_0)
3191      lbz   8,6(4)
3192      stb   8,6(3)
3193 @@ -386,7 +386,7 @@ L(wus_5):
3194  L(wus_2):  /* Move 2-3 bytes.  */
3195      bf    30,L(wus_1)
3196      lhz   6,0(4)
3197 -    sth   6,0(3) 
3198 +    sth   6,0(3)
3199      bf    31,L(wus_0)
3200      lbz   7,2(4)
3201      stb   7,2(3)
3202 @@ -410,13 +410,13 @@ L(wdu):
3203  
3204    /* Copy words where the destination is aligned but the source is
3205       not.  For power4, power5 and power6 machines there is penalty for
3206 -     unaligned loads (src) that cross 32-byte, cacheline, or page 
3207 +     unaligned loads (src) that cross 32-byte, cacheline, or page
3208       boundaries. So we want to use simple (unaligned) loads where
3209       posible but avoid them where we know the load would span a 32-byte
3210 -     boundary. 
3211 +     boundary.
3212  
3213       At this point we know we have at least 29 (32-3) bytes to copy
3214 -     the src is unaligned. and we may cross at least one 32-byte 
3215 +     the src is unaligned. and we may cross at least one 32-byte
3216       boundary. Also we have the following regester values:
3217       r3 == adjusted dst, word aligned
3218       r4 == unadjusted src
3219 @@ -427,7 +427,7 @@ L(wdu):
3220       r31 == adjusted len
3221  
3222       First we need to copy word upto but not crossing the next 32-byte
3223 -     boundary. Then perform aligned loads just before and just after 
3224 +     boundary. Then perform aligned loads just before and just after
3225       the boundary and use shifts and or to gernerate the next aligned
3226       word for dst. If more then 32 bytes remain we copy (unaligned src)
3227       the next 7 words and repeat the loop until less then 32-bytes
3228 @@ -442,7 +442,7 @@ L(wdu):
3229      mr      4,12      /* restore unaligned adjusted src ptr */
3230      clrlwi  0,12,27   /* Find dist from previous 32-byte boundary.  */
3231      slwi    10,10,3   /* calculate number of bits to shift 1st word left */
3232 -    cmplwi  cr5,0,16   
3233 +    cmplwi  cr5,0,16
3234      subfic  8,0,32   /* Number of bytes to next 32-byte boundary.  */
3235  
3236      mtcrf   0x01,8
3237 @@ -532,7 +532,7 @@ L(wdu_32):
3238      lwz     6,0(12)
3239      cmplwi  cr6,31,4
3240      srwi    8,31,5    /* calculate the 32 byte loop count */
3241 -    slw     0,6,10 
3242 +    slw     0,6,10
3243      clrlwi  31,31,27   /* The remaining bytes, < 32.  */
3244      blt     cr5,L(wdu_32tail)
3245      mtctr   8
3246 @@ -543,7 +543,7 @@ L(wdu_loop32):
3247      lwz   8,4(12)
3248      addi  12,12,32
3249      lwz   7,4(4)
3250 -    srw   8,8,9 
3251 +    srw   8,8,9
3252      or    0,0,8
3253      stw   0,0(3)
3254      stw   7,4(3)
3255 @@ -562,7 +562,7 @@ L(wdu_loop32):
3256      stw   6,24(3)
3257      stw   7,28(3)
3258      addi  3,3,32
3259 -    slw   0,8,10 
3260 +    slw   0,8,10
3261      bdnz+ L(wdu_loop32)
3262  
3263  L(wdu_32tail):
3264 @@ -571,7 +571,7 @@ L(wdu_32tail):
3265      blt     cr6,L(wdu_4tail)
3266      /* calculate and store the final word */
3267      lwz   8,4(12)
3268 -    srw   8,8,9 
3269 +    srw   8,8,9
3270      or    6,0,8
3271      b     L(wdu_32tailx)
3272  #endif
3273 @@ -816,7 +816,7 @@ L(wdu_4tail):
3274      beq   cr6,L(wdus_0)        /* If the tail is 0 bytes we are done!  */
3275      bf    30,L(wdus_3)
3276      lhz   7,0(4)
3277 -    sth   7,0(3) 
3278 +    sth   7,0(3)
3279      bf    31,L(wdus_0)
3280      lbz   8,2(4)
3281      stb   8,2(3)
3282 diff --git a/sysdeps/powerpc/powerpc32/power6/memset.S b/sysdeps/powerpc/powerpc32/power6/memset.S
3283 index 10fb7b9..cc65b7b 100644
3284 --- a/sysdeps/powerpc/powerpc32/power6/memset.S
3285 +++ b/sysdeps/powerpc/powerpc32/power6/memset.S
3286 @@ -1,5 +1,5 @@
3287  /* Optimized 32-bit memset implementation for POWER6.
3288 -   Copyright (C) 1997,99, 2000,02,03,06,2007 Free Software Foundation, Inc.
3289 +   Copyright (C) 1997,99,2000,02,03,06,2007,2009 Free Software Foundation, Inc.
3290     This file is part of the GNU C Library.
3291  
3292     The GNU C Library is free software; you can redistribute it and/or
3293 @@ -240,7 +240,7 @@ L(nzCacheAligned256):
3294         cmplwi  cr1,rLEN,256
3295         addi    rMEMP3,rMEMP,64
3296  #ifdef NOT_IN_libc
3297 -/* When we are not in libc we should use only GPRs to avoid the FPU lock 
3298 +/* When we are not in libc we should use only GPRs to avoid the FPU lock
3299     interrupt.  */
3300         stw     rCHR,0(rMEMP)
3301          stw     rCHR,4(rMEMP)
3302 @@ -381,7 +381,7 @@ L(cacheAligned):
3303         blt     cr1,L(cacheAligned1)
3304         li      rMEMP2,128
3305  L(cacheAlignedx):
3306 -       cmpldi  cr5,rLEN,640
3307 +       cmplwi  cr5,rLEN,640
3308         blt     cr6,L(cacheAligned128)
3309         bgt     cr5,L(cacheAligned512)
3310         cmplwi  cr6,rLEN,512
3311 commit d0f6ed789f460357fca11f8ffcffcb968d8d7434
3312 Author: Jakub Jelinek <jakub@redhat.com>
3313 Date:   Tue Jun 16 10:23:31 2009 -0700
3314
3315     Fix x86-64 memchr for large lengths.
3316     
3317     (cherry picked from commit fab8238de69de67637d21923b3ec1c26e4ce8450)
3318
3319 diff --git a/ChangeLog b/ChangeLog
3320 index 7b39200..b3808c5 100644
3321 diff --git a/string/test-memchr.c b/string/test-memchr.c
3322 index c233ead..cd9a01e 100644
3323 --- a/string/test-memchr.c
3324 +++ b/string/test-memchr.c
3325 @@ -1,5 +1,5 @@
3326  /* Test and measure memchr functions.
3327 -   Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
3328 +   Copyright (C) 1999, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
3329     This file is part of the GNU C Library.
3330     Written by Jakub Jelinek <jakub@redhat.com>, 1999.
3331  
3332 @@ -144,7 +144,12 @@ do_random_tests (void)
3333         }
3334  
3335        if (pos < len)
3336 -       result = (char *) (p + pos + align);
3337 +       {
3338 +         size_t r = random ();
3339 +         if ((r & 31) == 0)
3340 +           len = ~(uintptr_t) (p + align) - ((r >> 5) & 31);
3341 +         result = (char *) (p + pos + align);
3342 +       }
3343        else
3344         result = NULL;
3345  
3346 diff --git a/sysdeps/x86_64/memchr.S b/sysdeps/x86_64/memchr.S
3347 index 54b7af5..6082aa7 100644
3348 --- a/sysdeps/x86_64/memchr.S
3349 +++ b/sysdeps/x86_64/memchr.S
3350 @@ -41,7 +41,7 @@ ENTRY (memchr)
3351         movl    $16, %esi
3352         jnz     1f
3353         cmpq    %rsi, %rdx
3354 -       jle     3f
3355 +       jbe     3f
3356  
3357  2:     movdqa  (%rdi,%rsi), %xmm0
3358         leaq    16(%rsi), %rsi
3359 @@ -50,7 +50,7 @@ ENTRY (memchr)
3360         testl   %ecx, %ecx
3361         jnz     1f
3362         cmpq    %rsi, %rdx
3363 -       jg      2b
3364 +       ja      2b
3365  
3366  3:     xorl    %eax, %eax
3367         ret
3368 @@ -60,7 +60,7 @@ ENTRY (memchr)
3369         addq    %rcx, %rax
3370         leaq    -16(%rsi,%rcx), %rsi
3371         cmpq    %rsi, %rdx
3372 -       jle     3b
3373 +       jbe     3b
3374         ret
3375  END (memchr)
3376  
3377 commit 137028b4d7e50f71906c1656c27079eac5a1d085
3378 Author: Petr Baudis <pasky@suse.cz>
3379 Date:   Thu Jul 16 10:10:10 2009 -0700
3380
3381     Fix lock handling in memory hander of nscd.
3382     
3383     The commit 20e498bd removes the pthread_mutex_rdlock() calls, but not the
3384     corresponding pthread_mutex_unlock() calls. Also, the database lock is never
3385     unlocked in one branch of the mempool_alloc() if.
3386     
3387     I think unreproducible random assert(dh->usable) crashes in prune_cache() were
3388     caused by this. But an easy way to make nscd threads hang with the broken
3389     locking was.
3390
3391 diff --git a/ChangeLog b/ChangeLog
3392 index a81c5b4..37f20a4 100644
3393 diff --git a/nscd/aicache.c b/nscd/aicache.c
3394 index 524c0a6..8dac48e 100644
3395 --- a/nscd/aicache.c
3396 +++ b/nscd/aicache.c
3397 @@ -543,8 +543,6 @@ next_nip:
3398        (void) cache_add (req->type, key_copy, req->key_len, &dataset->head,
3399                         true, db, uid, he == NULL);
3400  
3401 -      pthread_rwlock_unlock (&db->lock);
3402 -
3403        /* Mark the old entry as obsolete.  */
3404        if (dh != NULL)
3405         dh->usable = false;
3406 diff --git a/nscd/grpcache.c b/nscd/grpcache.c
3407 index 184d538..fc20084 100644
3408 --- a/nscd/grpcache.c
3409 +++ b/nscd/grpcache.c
3410 @@ -146,8 +146,6 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
3411               (void) cache_add (req->type, &dataset->strdata, req->key_len,
3412                                 &dataset->head, true, db, owner, he == NULL);
3413  
3414 -             pthread_rwlock_unlock (&db->lock);
3415 -
3416               /* Mark the old entry as obsolete.  */
3417               if (dh != NULL)
3418                 dh->usable = false;
3419 @@ -367,12 +365,10 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
3420                 (void) cache_add (GETGRBYGID, cp, key_offset, &dataset->head,
3421                                   false, db, owner, false);
3422             }
3423 -
3424 -       out:
3425 -         pthread_rwlock_unlock (&db->lock);
3426         }
3427      }
3428  
3429 +out:
3430    if (__builtin_expect (written != total, 0) && debug_level > 0)
3431      {
3432        char buf[256];
3433 diff --git a/nscd/hstcache.c b/nscd/hstcache.c
3434 index 51e2273..77ffcdf 100644
3435 --- a/nscd/hstcache.c
3436 +++ b/nscd/hstcache.c
3437 @@ -153,8 +153,6 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
3438               (void) cache_add (req->type, &dataset->strdata, req->key_len,
3439                                 &dataset->head, true, db, owner, he == NULL);
3440  
3441 -             pthread_rwlock_unlock (&db->lock);
3442 -
3443               /* Mark the old entry as obsolete.  */
3444               if (dh != NULL)
3445                 dh->usable = false;
3446 @@ -404,8 +402,6 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
3447  
3448           (void) cache_add (req->type, key_copy, req->key_len,
3449                             &dataset->head, true, db, owner, he == NULL);
3450 -
3451 -         pthread_rwlock_unlock (&db->lock);
3452         }
3453      }
3454  
3455 diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
3456 index c33aaf3..f8d4742 100644
3457 --- a/nscd/initgrcache.c
3458 +++ b/nscd/initgrcache.c
3459 @@ -230,8 +230,6 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
3460               (void) cache_add (req->type, key_copy, req->key_len,
3461                                 &dataset->head, true, db, uid, he == NULL);
3462  
3463 -             pthread_rwlock_unlock (&db->lock);
3464 -
3465               /* Mark the old entry as obsolete.  */
3466               if (dh != NULL)
3467                 dh->usable = false;
3468 @@ -388,8 +386,6 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
3469  
3470           (void) cache_add (INITGROUPS, cp, req->key_len, &dataset->head, true,
3471                             db, uid, he == NULL);
3472 -
3473 -         pthread_rwlock_unlock (&db->lock);
3474         }
3475      }
3476  
3477 diff --git a/nscd/mem.c b/nscd/mem.c
3478 index fcea6db..80ea951 100644
3479 --- a/nscd/mem.c
3480 +++ b/nscd/mem.c
3481 @@ -566,9 +566,6 @@ mempool_alloc (struct database_dyn *db, size_t len, int data_alloc)
3482             }
3483         }
3484  
3485 -      if (data_alloc)
3486 -       pthread_rwlock_unlock (&db->lock);
3487 -
3488        if (! db->last_alloc_failed)
3489         {
3490           dbg_log (_("no more memory for database '%s'"), dbnames[db - dbs]);
3491 @@ -591,5 +588,8 @@ mempool_alloc (struct database_dyn *db, size_t len, int data_alloc)
3492  
3493    pthread_mutex_unlock (&db->memlock);
3494  
3495 +  if (data_alloc)
3496 +    pthread_rwlock_unlock (&db->lock);
3497 +
3498    return res;
3499  }
3500 diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
3501 index 2338e7e..fc5b44e 100644
3502 --- a/nscd/pwdcache.c
3503 +++ b/nscd/pwdcache.c
3504 @@ -153,8 +153,6 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
3505               (void) cache_add (req->type, key_copy, req->key_len,
3506                                 &dataset->head, true, db, owner, he == NULL);
3507  
3508 -             pthread_rwlock_unlock (&db->lock);
3509 -
3510               /* Mark the old entry as obsolete.  */
3511               if (dh != NULL)
3512                 dh->usable = false;
3513 @@ -362,12 +360,10 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
3514                 (void) cache_add (GETPWBYUID, cp, key_offset, &dataset->head,
3515                                   false, db, owner, false);
3516             }
3517 -
3518 -       out:
3519 -         pthread_rwlock_unlock (&db->lock);
3520         }
3521      }
3522  
3523 +out:
3524    if (__builtin_expect (written != total, 0) && debug_level > 0)
3525      {
3526        char buf[256];
3527 diff --git a/nscd/servicescache.c b/nscd/servicescache.c
3528 index dc98d30..c965c97 100644
3529 --- a/nscd/servicescache.c
3530 +++ b/nscd/servicescache.c
3531 @@ -136,8 +136,6 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
3532               (void) cache_add (req->type, &dataset->strdata, req->key_len,
3533                                 &dataset->head, true, db, owner, he == NULL);
3534  
3535 -             pthread_rwlock_unlock (&db->lock);
3536 -
3537               /* Mark the old entry as obsolete.  */
3538               if (dh != NULL)
3539                 dh->usable = false;
3540 @@ -317,8 +315,6 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
3541  
3542           (void) cache_add (req->type, key_copy, req->key_len,
3543                             &dataset->head, true, db, owner, he == NULL);
3544 -
3545 -         pthread_rwlock_unlock (&db->lock);
3546         }
3547      }
3548  
3549 commit 6cbbaa50aac809ad6e0692247876c82d58e466bf
3550 Author: Ulrich Drepper <drepper@redhat.com>
3551 Date:   Thu Jul 2 03:30:55 2009 -0700
3552
3553     Fix possible race when freeing object in fast bin list.
3554
3555 diff --git a/ChangeLog b/ChangeLog
3556 index 0c6c36f..4700e7d 100644
3557 diff --git a/malloc/malloc.c b/malloc/malloc.c
3558 index 516d401..70e4e58 100644
3559 --- a/malloc/malloc.c
3560 +++ b/malloc/malloc.c
3561 @@ -4822,6 +4822,7 @@ _int_free(mstate av, mchunkptr p)
3562             goto errout;
3563           }
3564         p->fd = fd = old;
3565 +       atomic_full_barrier ();
3566        }
3567      while ((old = catomic_compare_and_exchange_val_acq (fb, p, fd)) != fd);
3568  #else
3569 commit bec466d922ee22b94ac0d00415fb605e136efe6e
3570 Author: Ulrich Drepper <drepper@redhat.com>
3571 Date:   Thu Jul 16 09:54:34 2009 -0700
3572
3573     Fix race in corruption check.
3574     
3575     With atomic fastbins the checks performed can race with concurrent
3576     modifications of the arena.  If we detect a problem re-do the test
3577     after getting the lock.
3578
3579 diff --git a/ChangeLog b/ChangeLog
3580 index 1e9df42..6ddf9a1 100644
3581 diff --git a/malloc/malloc.c b/malloc/malloc.c
3582 index 0c0182e..a459a2b 100644
3583 --- a/malloc/malloc.c
3584 +++ b/malloc/malloc.c
3585 @@ -4799,8 +4799,29 @@ _int_free(mstate av, mchunkptr p)
3586         || __builtin_expect (chunksize (chunk_at_offset (p, size))
3587                              >= av->system_mem, 0))
3588        {
3589 -       errstr = "free(): invalid next size (fast)";
3590 -       goto errout;
3591 +#ifdef ATOMIC_FASTBINS
3592 +       /* We might not have a lock at this point and concurrent modifications
3593 +          of system_mem might have let to a false positive.  Redo the test
3594 +          after getting the lock.  */
3595 +       if (have_lock
3596 +           || ({ assert (locked == 0);
3597 +                 mutex_lock(&av->mutex);
3598 +                 locked = 1;
3599 +                 chunk_at_offset (p, size)->size <= 2 * SIZE_SZ
3600 +                   || chunksize (chunk_at_offset (p, size)) >= av->system_mem;
3601 +             }))
3602 +#endif
3603 +         {
3604 +           errstr = "free(): invalid next size (fast)";
3605 +           goto errout;
3606 +         }
3607 +#ifdef ATOMIC_FASTBINS
3608 +       if (! have_lock)
3609 +         {
3610 +           (void)mutex_unlock(&av->mutex);
3611 +           locked = 0;
3612 +         }
3613 +#endif
3614        }
3615  
3616      if (__builtin_expect (perturb_byte, 0))
This page took 0.284472 seconds and 3 git commands to generate.