Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/glibc/2.11: 0056_all_glibc-2.11-preadv-pwritev-fallocate-64bit.patch 0057_all_glibc-2.11-readahead-ppc32.patch 0058_all_glibc-2.11-memset-fortify-const-warning.patch
Date: Wed, 02 Dec 2009 02:38:01
Message-Id: E1NFf6M-0008EF-AB@stork.gentoo.org
1 vapier 09/12/02 02:37:58
2
3 Added:
4 0056_all_glibc-2.11-preadv-pwritev-fallocate-64bit.patch
5 0057_all_glibc-2.11-readahead-ppc32.patch
6 0058_all_glibc-2.11-memset-fortify-const-warning.patch
7 Log:
8 grab some fixes from mainline
9
10 Revision Changes Path
11 1.1 src/patchsets/glibc/2.11/0056_all_glibc-2.11-preadv-pwritev-fallocate-64bit.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.11/0056_all_glibc-2.11-preadv-pwritev-fallocate-64bit.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.11/0056_all_glibc-2.11-preadv-pwritev-fallocate-64bit.patch?rev=1.1&content-type=text/plain
15
16 Index: 0056_all_glibc-2.11-preadv-pwritev-fallocate-64bit.patch
17 ===================================================================
18 From 34df851b3364e14133b865574dbc5f2a8b88874e Mon Sep 17 00:00:00 2001
19 From: Jakub Jelinek <jakub@××××××.com>
20 Date: Fri, 6 Nov 2009 09:26:31 -0800
21 Subject: [PATCH 03/25] Fix preadv, pwritev and fallocate for -D_FILE_OFFSET_BITS=64.
22
23 As reported in http://bugzilla.redhat.com/533063 , preadv/pwritev prototypes
24 are wrong on 32-bit arches with -D_FILE_OFFSET_BITS=64 and as I've just
25 found, fallocate is wrong too.
26 The problem is that only off_t is remapped to the 64-bit type transparently,
27 __off_t is not.
28 ---
29 ChangeLog | 14 ++++++++++++++
30 misc/sys/uio.h | 4 ++--
31 sysdeps/unix/sysv/linux/i386/bits/fcntl.h | 4 ++--
32 sysdeps/unix/sysv/linux/ia64/bits/fcntl.h | 4 ++--
33 sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h | 4 ++--
34 sysdeps/unix/sysv/linux/s390/bits/fcntl.h | 4 ++--
35 sysdeps/unix/sysv/linux/sh/bits/fcntl.h | 4 ++--
36 sysdeps/unix/sysv/linux/sparc/bits/fcntl.h | 4 ++--
37 sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h | 4 ++--
38 9 files changed, 30 insertions(+), 16 deletions(-)
39
40 diff --git a/misc/sys/uio.h b/misc/sys/uio.h
41 index 05d956b..a32b7ed 100644
42 --- a/misc/sys/uio.h
43 +++ b/misc/sys/uio.h
44 @@ -80,10 +80,10 @@ extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count,
45 # else
46 # ifdef __REDIRECT
47 extern ssize_t __REDIRECT (preadv, (int __fd, __const struct iovec *__iovec,
48 - int __count, __off_t __offset),
49 + int __count, __off64_t __offset),
50 preadv64) __wur;
51 extern ssize_t __REDIRECT (pwritev, (int __fd, __const struct iovec *__iovec,
52 - int __count, __off_t __offset),
53 + int __count, __off64_t __offset),
54 pwritev64) __wur;
55 # else
56 # define preadv preadv64
57 diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
58 index 06b9e48..6a38dc0 100644
59 --- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
60 +++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
61 @@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
62 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
63 # else
64 # ifdef __REDIRECT
65 -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
66 - __off_t __len),
67 +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
68 + __off64_t __len),
69 fallocate64);
70 # else
71 # define fallocate fallocate64
72 diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
73 index 9677394..9a0245a 100644
74 --- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
75 +++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
76 @@ -253,8 +253,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
77 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
78 # else
79 # ifdef __REDIRECT
80 -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
81 - __off_t __len),
82 +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
83 + __off64_t __len),
84 fallocate64);
85 # else
86 # define fallocate fallocate64
87 diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
88 index ea0ee6e..6c4b66b 100644
89 --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
90 +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
91 @@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
92 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
93 # else
94 # ifdef __REDIRECT
95 -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
96 - __off_t __len),
97 +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
98 + __off64_t __len),
99 fallocate64);
100 # else
101 # define fallocate fallocate64
102 diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
103 index 3a11c48..d3dddbc 100644
104 --- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
105 +++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
106 @@ -279,8 +279,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
107 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
108 # else
109 # ifdef __REDIRECT
110 -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
111 - __off_t __len),
112 +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
113 + __off64_t __len),
114 fallocate64);
115 # else
116 # define fallocate fallocate64
117 diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
118 index 03ecd72..d7a21ea 100644
119 --- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
120 +++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
121 @@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
122 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
123 # else
124 # ifdef __REDIRECT
125 -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
126 - __off_t __len),
127 +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
128 + __off64_t __len),
129 fallocate64);
130 # else
131 # define fallocate fallocate64
132 diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
133 index 2b8c9bd..dfa848a 100644
134 --- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
135 +++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
136 @@ -278,8 +278,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
137 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
138 # else
139 # ifdef __REDIRECT
140 -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
141 - __off_t __len),
142 +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
143 + __off64_t __len),
144 fallocate64);
145 # else
146 # define fallocate fallocate64
147 diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
148 index 29c956c..c3eb859 100644
149 --- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
150 +++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
151 @@ -273,8 +273,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
152 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
153 # else
154 # ifdef __REDIRECT
155 -extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
156 - __off_t __len),
157 +extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
158 + __off64_t __len),
159 fallocate64);
160 # else
161 # define fallocate fallocate64
162 --
163 1.6.5.3
164
165
166
167
168 1.1 src/patchsets/glibc/2.11/0057_all_glibc-2.11-readahead-ppc32.patch
169
170 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.11/0057_all_glibc-2.11-readahead-ppc32.patch?rev=1.1&view=markup
171 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.11/0057_all_glibc-2.11-readahead-ppc32.patch?rev=1.1&content-type=text/plain
172
173 Index: 0057_all_glibc-2.11-readahead-ppc32.patch
174 ===================================================================
175 From 5b55d23611e939340d658f42212c474c8188053e Mon Sep 17 00:00:00 2001
176 From: Andreas Schwab <schwab@××××××.com>
177 Date: Fri, 6 Nov 2009 09:29:24 -0800
178 Subject: [PATCH 05/25] Correct readahead syscall wrapper on powerpc32.
179
180 Due to alignment of 64bit parameters there is a dummy second argument.
181 But other than that the syscall arguments are directly mapped to the
182 function arguments.
183 ---
184 ChangeLog | 5 +++++
185 .../sysv/linux/powerpc/powerpc32/syscalls.list | 3 +++
186 2 files changed, 8 insertions(+), 0 deletions(-)
187
188 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
189 index 82025b4..1233be6 100644
190 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
191 +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
192 @@ -3,3 +3,6 @@
193 # System calls with wrappers.
194 oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
195 oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
196 +
197 +# Due to 64bit alignment there is a dummy second parameter
198 +readahead - readahead i:iiiii __readahead readahead
199 --
200 1.6.5.3
201
202
203
204
205 1.1 src/patchsets/glibc/2.11/0058_all_glibc-2.11-memset-fortify-const-warning.patch
206
207 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.11/0058_all_glibc-2.11-memset-fortify-const-warning.patch?rev=1.1&view=markup
208 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.11/0058_all_glibc-2.11-memset-fortify-const-warning.patch?rev=1.1&content-type=text/plain
209
210 Index: 0058_all_glibc-2.11-memset-fortify-const-warning.patch
211 ===================================================================
212 From 6515a01fc1d35d329886d5a45435537ee9115bc4 Mon Sep 17 00:00:00 2001
213 From: Caolan McNamara <caolanm@××××××.com>
214 Date: Tue, 10 Nov 2009 06:29:13 -0800
215 Subject: [PATCH 10/25] Avoid memset warning in one case.
216
217 ---
218 ChangeLog | 5 +++++
219 string/bits/string3.h | 5 +++--
220 2 files changed, 8 insertions(+), 2 deletions(-)
221
222 diff --git a/string/bits/string3.h b/string/bits/string3.h
223 index a5593e3..1d759f1 100644
224 --- a/string/bits/string3.h
225 +++ b/string/bits/string3.h
226 @@ -1,4 +1,4 @@
227 -/* Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
228 +/* Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
229 This file is part of the GNU C Library.
230
231 The GNU C Library is free software; you can redistribute it and/or
232 @@ -77,7 +77,8 @@ __NTH (mempcpy (void *__restrict __dest, __const void *__restrict __src,
233 __extern_always_inline void *
234 __NTH (memset (void *__dest, int __ch, size_t __len))
235 {
236 - if (__builtin_constant_p (__len) && __len == 0)
237 + if (__builtin_constant_p (__len) && __len == 0
238 + && (!__builtin_constant_p (__ch) || __ch != 0))
239 {
240 __warn_memset_zero_len ();
241 return __dest;
242 --
243 1.6.5.3