Sun Dec 23 23:29:28 2018 UTC ()
On Minix3 the call to read returns EAGAIN (-1) and causes the build to break.
Skip punting on Minix3 as workaround for now, change via sjg@


(sevan)
diff -r1.17 -r1.18 pkgsrc/devel/bmake/files/job.c

cvs diff -r1.17 -r1.18 pkgsrc/devel/bmake/files/job.c (expand / switch to unified diff)

--- pkgsrc/devel/bmake/files/job.c 2018/09/10 10:16:58 1.17
+++ pkgsrc/devel/bmake/files/job.c 2018/12/23 23:29:28 1.18
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: job.c,v 1.17 2018/09/10 10:16:58 schmonz Exp $ */ 1/* $NetBSD: job.c,v 1.18 2018/12/23 23:29:28 sevan Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -60,34 +60,34 @@ @@ -60,34 +60,34 @@
60 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 60 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
61 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 61 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
62 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 62 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
63 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 63 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
64 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 64 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
69 * SUCH DAMAGE. 69 * SUCH DAMAGE.
70 */ 70 */
71 71
72#ifndef MAKE_NATIVE 72#ifndef MAKE_NATIVE
73static char rcsid[] = "$NetBSD: job.c,v 1.17 2018/09/10 10:16:58 schmonz Exp $"; 73static char rcsid[] = "$NetBSD: job.c,v 1.18 2018/12/23 23:29:28 sevan Exp $";
74#else 74#else
75#include <sys/cdefs.h> 75#include <sys/cdefs.h>
76#ifndef lint 76#ifndef lint
77#if 0 77#if 0
78static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; 78static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
79#else 79#else
80__RCSID("$NetBSD: job.c,v 1.17 2018/09/10 10:16:58 schmonz Exp $"); 80__RCSID("$NetBSD: job.c,v 1.18 2018/12/23 23:29:28 sevan Exp $");
81#endif 81#endif
82#endif /* not lint */ 82#endif /* not lint */
83#endif 83#endif
84 84
85/*- 85/*-
86 * job.c -- 86 * job.c --
87 * handle the creation etc. of our child processes. 87 * handle the creation etc. of our child processes.
88 * 88 *
89 * Interface: 89 * Interface:
90 * Job_Make Start the creation of the given target. 90 * Job_Make Start the creation of the given target.
91 * 91 *
92 * Job_CatchChildren Check for and handle the termination of any 92 * Job_CatchChildren Check for and handle the termination of any
93 * children. This must be called reasonably 93 * children. This must be called reasonably
@@ -2074,27 +2074,30 @@ Job_CatchOutput(void) @@ -2074,27 +2074,30 @@ Job_CatchOutput(void)
2074 } while (nready < 0 && errno == EINTR); 2074 } while (nready < 0 && errno == EINTR);
2075 2075
2076 if (nready < 0) 2076 if (nready < 0)
2077 Punt("poll: %s", strerror(errno)); 2077 Punt("poll: %s", strerror(errno));
2078 2078
2079 if (nready > 0 && readyfd(&childExitJob)) { 2079 if (nready > 0 && readyfd(&childExitJob)) {
2080 char token = 0; 2080 char token = 0;
2081 ssize_t count; 2081 ssize_t count;
2082 count = read(childExitJob.inPipe, &token, 1); 2082 count = read(childExitJob.inPipe, &token, 1);
2083 switch (count) { 2083 switch (count) {
2084 case 0: 2084 case 0:
2085 Punt("unexpected eof on token pipe"); 2085 Punt("unexpected eof on token pipe");
2086 case -1: 2086 case -1:
 2087#ifndef __minix
2087 Punt("token pipe read: %s", strerror(errno)); 2088 Punt("token pipe read: %s", strerror(errno));
 2089#endif
 2090 break;
2088 case 1: 2091 case 1:
2089 if (token == DO_JOB_RESUME[0]) 2092 if (token == DO_JOB_RESUME[0])
2090 /* Complete relay requested from our SIGCONT handler */ 2093 /* Complete relay requested from our SIGCONT handler */
2091 JobRestartJobs(); 2094 JobRestartJobs();
2092 break; 2095 break;
2093 default: 2096 default:
2094 abort(); 2097 abort();
2095 } 2098 }
2096 --nready; 2099 --nready;
2097 } 2100 }
2098 2101
2099 Job_CatchChildren(); 2102 Job_CatchChildren();
2100 if (nready == 0) 2103 if (nready == 0)