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.2: 1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch README.history
Date: Wed, 29 Sep 2010 22:41:36
Message-Id: 20100929224133.2090D20051@flycatcher.gentoo.org
1 vapier 10/09/29 22:41:33
2
3 Modified: README.history
4 Added: 1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch
5 Log:
6 fix by Guy Martin for CLOEXEC and NONBLOCK values on hppa
7
8 Revision Changes Path
9 1.6 src/patchsets/glibc/2.11.2/README.history
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.2/README.history?rev=1.6&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.2/README.history?rev=1.6&content-type=text/plain
13 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.2/README.history?r1=1.5&r2=1.6
14
15 Index: README.history
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.11.2/README.history,v
18 retrieving revision 1.5
19 retrieving revision 1.6
20 diff -u -r1.5 -r1.6
21 --- README.history 14 Aug 2010 04:23:32 -0000 1.5
22 +++ README.history 29 Sep 2010 22:41:33 -0000 1.6
23 @@ -1,5 +1,6 @@
24 4 [pending]
25 + 0010_all_glibc-locale-output-quote.patch
26 + + 1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch
27
28 3 26.07.2010
29 U 0020_all_glibc-tweak-rfc1918-lookup.patch
30
31
32
33 1.1 src/patchsets/glibc/2.11.2/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch
34
35 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.2/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch?rev=1.1&view=markup
36 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.2/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch?rev=1.1&content-type=text/plain
37
38 Index: 1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch
39 ===================================================================
40 CLOEXEC and NONBLOCK values are different on hppa, so it needs its own headers
41
42 https://bugs.gentoo.org/331119
43
44 --- ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h
45 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h
46 @@ -0,0 +1,144 @@
47 +/* Copyright (C) 2002-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
48 + This file is part of the GNU C Library.
49 +
50 + The GNU C Library is free software; you can redistribute it and/or
51 + modify it under the terms of the GNU Lesser General Public
52 + License as published by the Free Software Foundation; either
53 + version 2.1 of the License, or (at your option) any later version.
54 +
55 + The GNU C Library is distributed in the hope that it will be useful,
56 + but WITHOUT ANY WARRANTY; without even the implied warranty of
57 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
58 + Lesser General Public License for more details.
59 +
60 + You should have received a copy of the GNU Lesser General Public
61 + License along with the GNU C Library; if not, write to the Free
62 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
63 + 02111-1307 USA. */
64 +
65 +#ifndef _SYS_EPOLL_H
66 +#define _SYS_EPOLL_H 1
67 +
68 +#include <stdint.h>
69 +#include <sys/types.h>
70 +
71 +/* Get __sigset_t. */
72 +#include <bits/sigset.h>
73 +
74 +#ifndef __sigset_t_defined
75 +# define __sigset_t_defined
76 +typedef __sigset_t sigset_t;
77 +#endif
78 +
79 +
80 +/* Flags to be passed to epoll_create1. */
81 +enum
82 + {
83 + EPOLL_CLOEXEC = 010000000,
84 +#define EPOLL_CLOEXEC EPOLL_CLOEXEC
85 + EPOLL_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
86 +#define EPOLL_NONBLOCK EPOLL_NONBLOCK
87 + };
88 +
89 +
90 +enum EPOLL_EVENTS
91 + {
92 + EPOLLIN = 0x001,
93 +#define EPOLLIN EPOLLIN
94 + EPOLLPRI = 0x002,
95 +#define EPOLLPRI EPOLLPRI
96 + EPOLLOUT = 0x004,
97 +#define EPOLLOUT EPOLLOUT
98 + EPOLLRDNORM = 0x040,
99 +#define EPOLLRDNORM EPOLLRDNORM
100 + EPOLLRDBAND = 0x080,
101 +#define EPOLLRDBAND EPOLLRDBAND
102 + EPOLLWRNORM = 0x100,
103 +#define EPOLLWRNORM EPOLLWRNORM
104 + EPOLLWRBAND = 0x200,
105 +#define EPOLLWRBAND EPOLLWRBAND
106 + EPOLLMSG = 0x400,
107 +#define EPOLLMSG EPOLLMSG
108 + EPOLLERR = 0x008,
109 +#define EPOLLERR EPOLLERR
110 + EPOLLHUP = 0x010,
111 +#define EPOLLHUP EPOLLHUP
112 + EPOLLRDHUP = 0x2000,
113 +#define EPOLLRDHUP EPOLLRDHUP
114 + EPOLLONESHOT = (1 << 30),
115 +#define EPOLLONESHOT EPOLLONESHOT
116 + EPOLLET = (1 << 31)
117 +#define EPOLLET EPOLLET
118 + };
119 +
120 +
121 +/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */
122 +#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */
123 +#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */
124 +#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */
125 +
126 +
127 +typedef union epoll_data
128 +{
129 + void *ptr;
130 + int fd;
131 + uint32_t u32;
132 + uint64_t u64;
133 +} epoll_data_t;
134 +
135 +struct epoll_event
136 +{
137 + uint32_t events; /* Epoll events */
138 + epoll_data_t data; /* User data variable */
139 +};
140 +
141 +
142 +__BEGIN_DECLS
143 +
144 +/* Creates an epoll instance. Returns an fd for the new instance.
145 + The "size" parameter is a hint specifying the number of file
146 + descriptors to be associated with the new instance. The fd
147 + returned by epoll_create() should be closed with close(). */
148 +extern int epoll_create (int __size) __THROW;
149 +
150 +/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
151 + parameter has been dropped. */
152 +extern int epoll_create1 (int __flags) __THROW;
153 +
154 +
155 +/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
156 + -1 in case of error ( the "errno" variable will contain the
157 + specific error code ) The "op" parameter is one of the EPOLL_CTL_*
158 + constants defined above. The "fd" parameter is the target of the
159 + operation. The "event" parameter describes which events the caller
160 + is interested in and any associated user data. */
161 +extern int epoll_ctl (int __epfd, int __op, int __fd,
162 + struct epoll_event *__event) __THROW;
163 +
164 +
165 +/* Wait for events on an epoll instance "epfd". Returns the number of
166 + triggered events returned in "events" buffer. Or -1 in case of
167 + error with the "errno" variable set to the specific error code. The
168 + "events" parameter is a buffer that will contain triggered
169 + events. The "maxevents" is the maximum number of events to be
170 + returned ( usually size of "events" ). The "timeout" parameter
171 + specifies the maximum wait time in milliseconds (-1 == infinite).
172 +
173 + This function is a cancellation point and therefore not marked with
174 + __THROW. */
175 +extern int epoll_wait (int __epfd, struct epoll_event *__events,
176 + int __maxevents, int __timeout);
177 +
178 +
179 +/* Same as epoll_wait, but the thread's signal mask is temporarily
180 + and atomically replaced with the one provided as parameter.
181 +
182 + This function is a cancellation point and therefore not marked with
183 + __THROW. */
184 +extern int epoll_pwait (int __epfd, struct epoll_event *__events,
185 + int __maxevents, int __timeout,
186 + __const __sigset_t *__ss);
187 +
188 +__END_DECLS
189 +
190 +#endif /* sys/epoll.h */
191 --- ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h
192 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h
193 @@ -0,0 +1,54 @@
194 +/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
195 + This file is part of the GNU C Library.
196 +
197 + The GNU C Library is free software; you can redistribute it and/or
198 + modify it under the terms of the GNU Lesser General Public
199 + License as published by the Free Software Foundation; either
200 + version 2.1 of the License, or (at your option) any later version.
201 +
202 + The GNU C Library is distributed in the hope that it will be useful,
203 + but WITHOUT ANY WARRANTY; without even the implied warranty of
204 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
205 + Lesser General Public License for more details.
206 +
207 + You should have received a copy of the GNU Lesser General Public
208 + License along with the GNU C Library; if not, write to the Free
209 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
210 + 02111-1307 USA. */
211 +
212 +#ifndef _SYS_EVENTFD_H
213 +#define _SYS_EVENTFD_H 1
214 +
215 +#include <stdint.h>
216 +
217 +
218 +/* Type for event counter. */
219 +typedef uint64_t eventfd_t;
220 +
221 +/* Flags for signalfd. */
222 +enum
223 + {
224 + EFD_SEMAPHORE = 1,
225 +#define EFD_SEMAPHORE EFD_SEMAPHORE
226 + EFD_CLOEXEC = 010000000,
227 +#define EFD_CLOEXEC EFD_CLOEXEC
228 + EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
229 +#define EFD_NONBLOCK EFD_NONBLOCK
230 + };
231 +
232 +
233 +__BEGIN_DECLS
234 +
235 +/* Return file descriptor for generic event channel. Set initial
236 + value to COUNT. */
237 +extern int eventfd (int __count, int __flags) __THROW;
238 +
239 +/* Read event counter and possibly wait for events. */
240 +extern int eventfd_read (int __fd, eventfd_t *__value);
241 +
242 +/* Increment event counter. */
243 +extern int eventfd_write (int __fd, eventfd_t __value);
244 +
245 +__END_DECLS
246 +
247 +#endif /* sys/eventfd.h */
248 --- ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h
249 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h
250 @@ -0,0 +1,105 @@
251 +/* Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
252 + This file is part of the GNU C Library.
253 +
254 + The GNU C Library is free software; you can redistribute it and/or
255 + modify it under the terms of the GNU Lesser General Public
256 + License as published by the Free Software Foundation; either
257 + version 2.1 of the License, or (at your option) any later version.
258 +
259 + The GNU C Library is distributed in the hope that it will be useful,
260 + but WITHOUT ANY WARRANTY; without even the implied warranty of
261 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
262 + Lesser General Public License for more details.
263 +
264 + You should have received a copy of the GNU Lesser General Public
265 + License along with the GNU C Library; if not, write to the Free
266 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
267 + 02111-1307 USA. */
268 +
269 +#ifndef _SYS_INOTIFY_H
270 +#define _SYS_INOTIFY_H 1
271 +
272 +#include <stdint.h>
273 +
274 +
275 +/* Flags for the parameter of inotify_init1. */
276 +enum
277 + {
278 + IN_CLOEXEC = 010000000,
279 +#define IN_CLOEXEC IN_CLOEXEC
280 + IN_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */
281 +#define IN_NONBLOCK IN_NONBLOCK
282 + };
283 +
284 +
285 +/* Structure describing an inotify event. */
286 +struct inotify_event
287 +{
288 + int wd; /* Watch descriptor. */
289 + uint32_t mask; /* Watch mask. */
290 + uint32_t cookie; /* Cookie to synchronize two events. */
291 + uint32_t len; /* Length (including NULs) of name. */
292 + char name __flexarr; /* Name. */
293 +};
294 +
295 +
296 +/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */
297 +#define IN_ACCESS 0x00000001 /* File was accessed. */
298 +#define IN_MODIFY 0x00000002 /* File was modified. */
299 +#define IN_ATTRIB 0x00000004 /* Metadata changed. */
300 +#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */
301 +#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */
302 +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
303 +#define IN_OPEN 0x00000020 /* File was opened. */
304 +#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */
305 +#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */
306 +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
307 +#define IN_CREATE 0x00000100 /* Subfile was created. */
308 +#define IN_DELETE 0x00000200 /* Subfile was deleted. */
309 +#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */
310 +#define IN_MOVE_SELF 0x00000800 /* Self was moved. */
311 +
312 +/* Events sent by the kernel. */
313 +#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */
314 +#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */
315 +#define IN_IGNORED 0x00008000 /* File was ignored. */
316 +
317 +/* Helper events. */
318 +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
319 +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
320 +
321 +/* Special flags. */
322 +#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a
323 + directory. */
324 +#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */
325 +#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already
326 + existing watch. */
327 +#define IN_ISDIR 0x40000000 /* Event occurred against dir. */
328 +#define IN_ONESHOT 0x80000000 /* Only send event once. */
329 +
330 +/* All events which a program can wait on. */
331 +#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \
332 + | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \
333 + | IN_MOVED_TO | IN_CREATE | IN_DELETE \
334 + | IN_DELETE_SELF | IN_MOVE_SELF)
335 +
336 +
337 +__BEGIN_DECLS
338 +
339 +/* Create and initialize inotify instance. */
340 +extern int inotify_init (void) __THROW;
341 +
342 +/* Create and initialize inotify instance. */
343 +extern int inotify_init1 (int __flags) __THROW;
344 +
345 +/* Add watch of object NAME to inotify instance FD. Notify about
346 + events specified by MASK. */
347 +extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
348 + __THROW;
349 +
350 +/* Remove the watch specified by WD from the inotify instance FD. */
351 +extern int inotify_rm_watch (int __fd, int __wd) __THROW;
352 +
353 +__END_DECLS
354 +
355 +#endif /* sys/inotify.h */
356 --- ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h
357 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h
358 @@ -0,0 +1,66 @@
359 +/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
360 + This file is part of the GNU C Library.
361 +
362 + The GNU C Library is free software; you can redistribute it and/or
363 + modify it under the terms of the GNU Lesser General Public
364 + License as published by the Free Software Foundation; either
365 + version 2.1 of the License, or (at your option) any later version.
366 +
367 + The GNU C Library is distributed in the hope that it will be useful,
368 + but WITHOUT ANY WARRANTY; without even the implied warranty of
369 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
370 + Lesser General Public License for more details.
371 +
372 + You should have received a copy of the GNU Lesser General Public
373 + License along with the GNU C Library; if not, write to the Free
374 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
375 + 02111-1307 USA. */
376 +
377 +#ifndef _SYS_SIGNALFD_H
378 +#define _SYS_SIGNALFD_H 1
379 +
380 +#define __need_sigset_t
381 +#include <signal.h>
382 +#include <stdint.h>
383 +
384 +
385 +struct signalfd_siginfo
386 +{
387 + uint32_t ssi_signo;
388 + int32_t ssi_errno;
389 + int32_t ssi_code;
390 + uint32_t ssi_pid;
391 + uint32_t ssi_uid;
392 + int32_t ssi_fd;
393 + uint32_t ssi_tid;
394 + uint32_t ssi_band;
395 + uint32_t ssi_overrun;
396 + uint32_t ssi_trapno;
397 + int32_t ssi_status;
398 + int32_t ssi_int;
399 + uint64_t ssi_ptr;
400 + uint64_t ssi_utime;
401 + uint64_t ssi_stime;
402 + uint64_t ssi_addr;
403 + uint8_t __pad[48];
404 +};
405 +
406 +/* Flags for signalfd. */
407 +enum
408 + {
409 + SFD_CLOEXEC = 010000000,
410 +#define SFD_CLOEXEC SFD_CLOEXEC
411 + SFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
412 +#define SFD_NONBLOCK SFD_NONBLOCK
413 + };
414 +
415 +__BEGIN_DECLS
416 +
417 +/* Request notification for delivery of signals in MASK to be
418 + performed using descriptor FD.*/
419 +extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
420 + __THROW __nonnull ((2));
421 +
422 +__END_DECLS
423 +
424 +#endif /* sys/signalfd.h */
425 --- ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h
426 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h
427 @@ -0,0 +1,60 @@
428 +/* Copyright (C) 2008 Free Software Foundation, Inc.
429 + This file is part of the GNU C Library.
430 +
431 + The GNU C Library is free software; you can redistribute it and/or
432 + modify it under the terms of the GNU Lesser General Public
433 + License as published by the Free Software Foundation; either
434 + version 2.1 of the License, or (at your option) any later version.
435 +
436 + The GNU C Library is distributed in the hope that it will be useful,
437 + but WITHOUT ANY WARRANTY; without even the implied warranty of
438 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
439 + Lesser General Public License for more details.
440 +
441 + You should have received a copy of the GNU Lesser General Public
442 + License along with the GNU C Library; if not, write to the Free
443 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
444 + 02111-1307 USA. */
445 +
446 +#ifndef _SYS_TIMERFD_H
447 +#define _SYS_TIMERFD_H 1
448 +
449 +#include <time.h>
450 +
451 +
452 +/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
453 +enum
454 + {
455 + TFD_CLOEXEC = 010000000,
456 +#define TFD_CLOEXEC TFD_CLOEXEC
457 + TFD_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */
458 +#define TFD_NONBLOCK TFD_NONBLOCK
459 + };
460 +
461 +
462 +/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
463 +enum
464 + {
465 + TFD_TIMER_ABSTIME = 1 << 0
466 +#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
467 + };
468 +
469 +
470 +__BEGIN_DECLS
471 +
472 +/* Return file descriptor for new interval timer source. */
473 +extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
474 +
475 +/* Set next expiration time of interval timer source UFD to UTMR. If
476 + FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
477 + absolute. Optionally return the old expiration time in OTMR. */
478 +extern int timerfd_settime (int __ufd, int __flags,
479 + __const struct itimerspec *__utmr,
480 + struct itimerspec *__otmr) __THROW;
481 +
482 +/* Return the next expiration time of UFD. */
483 +extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
484 +
485 +__END_DECLS
486 +
487 +#endif /* sys/timerfd.h */