1 |
the_paya 10/04/04 20:01:31 |
2 |
|
3 |
Added: bison-2.4.2-gnulib_spawn.patch |
4 |
Log: |
5 |
Fix for bug #312697, bad gnulib's spawn. |
6 |
(Portage version: 2.2_rc67/cvs/FreeBSD i386) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sys-devel/bison/files/bison-2.4.2-gnulib_spawn.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/bison/files/bison-2.4.2-gnulib_spawn.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/bison/files/bison-2.4.2-gnulib_spawn.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: bison-2.4.2-gnulib_spawn.patch |
15 |
=================================================================== |
16 |
Don't override the system defined values on FreeBSD >=8. |
17 |
See Gentoo bugs #310335 and #312697. |
18 |
(Shortened) patch from upstream gnulib. |
19 |
|
20 |
--- bison-2.4.2/lib/spawn.in.h |
21 |
+++ bison/lib/spawn.in.h |
22 |
@@ -110,26 +112,38 @@ |
23 |
|
24 |
|
25 |
/* Flags to be set in the `posix_spawnattr_t'. */ |
26 |
-#if @REPLACE_POSIX_SPAWN@ |
27 |
+#if @HAVE_POSIX_SPAWN@ |
28 |
+/* Use the values from the system, but provide the missing ones. */ |
29 |
+# ifndef POSIX_SPAWN_SETSCHEDPARAM |
30 |
+# define POSIX_SPAWN_SETSCHEDPARAM 0 |
31 |
+# endif |
32 |
+# ifndef POSIX_SPAWN_SETSCHEDULER |
33 |
+# define POSIX_SPAWN_SETSCHEDULER 0 |
34 |
+# endif |
35 |
+#else |
36 |
+# if @REPLACE_POSIX_SPAWN@ |
37 |
/* Use the values from the system, for better compatibility. */ |
38 |
/* But this implementation does not support AIX extensions. */ |
39 |
-# undef POSIX_SPAWN_FORK_HANDLERS |
40 |
-#else |
41 |
-# define POSIX_SPAWN_RESETIDS 0x01 |
42 |
-# define POSIX_SPAWN_SETPGROUP 0x02 |
43 |
-# define POSIX_SPAWN_SETSIGDEF 0x04 |
44 |
-# define POSIX_SPAWN_SETSIGMASK 0x08 |
45 |
-# define POSIX_SPAWN_SETSCHEDPARAM 0x10 |
46 |
-# define POSIX_SPAWN_SETSCHEDULER 0x20 |
47 |
+# undef POSIX_SPAWN_FORK_HANDLERS |
48 |
+# else |
49 |
+# define POSIX_SPAWN_RESETIDS 0x01 |
50 |
+# define POSIX_SPAWN_SETPGROUP 0x02 |
51 |
+# define POSIX_SPAWN_SETSIGDEF 0x04 |
52 |
+# define POSIX_SPAWN_SETSIGMASK 0x08 |
53 |
+# define POSIX_SPAWN_SETSCHEDPARAM 0x10 |
54 |
+# define POSIX_SPAWN_SETSCHEDULER 0x20 |
55 |
+# endif |
56 |
#endif |
57 |
/* A GNU extension. Use the next free bit position. */ |
58 |
#define POSIX_SPAWN_USEVFORK \ |
59 |
- ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1) \ |
60 |
- | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1) \ |
61 |
- | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1) \ |
62 |
- | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1) \ |
63 |
- | POSIX_SPAWN_SETSCHEDPARAM | (POSIX_SPAWN_SETSCHEDPARAM - 1) \ |
64 |
- | POSIX_SPAWN_SETSCHEDULER | (POSIX_SPAWN_SETSCHEDULER - 1)) \ |
65 |
+ ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1) \ |
66 |
+ | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1) \ |
67 |
+ | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1) \ |
68 |
+ | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1) \ |
69 |
+ | POSIX_SPAWN_SETSCHEDPARAM \ |
70 |
+ | (POSIX_SPAWN_SETSCHEDPARAM > 0 ? POSIX_SPAWN_SETSCHEDPARAM - 1 : 0) \ |
71 |
+ | POSIX_SPAWN_SETSCHEDULER \ |
72 |
+ | (POSIX_SPAWN_SETSCHEDULER > 0 ? POSIX_SPAWN_SETSCHEDULER - 1 : 0)) \ |
73 |
+ 1) |
74 |
typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap |
75 |
[2 * (((POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP |