summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1996-10-11 03:55:29 +0000
committersteve <steve@FreeBSD.org>1996-10-11 03:55:29 +0000
commita63d5c3c9f0f5e4e71fc32566f16a4cb3aee6ee0 (patch)
tree54dfcfd522ea8f3d5e3b89dab26431192bf8b7aa /usr.bin/make
parenta181da319aa465a74e726b669ac4fe778d6e75d1 (diff)
downloadFreeBSD-src-a63d5c3c9f0f5e4e71fc32566f16a4cb3aee6ee0.zip
FreeBSD-src-a63d5c3c9f0f5e4e71fc32566f16a4cb3aee6ee0.tar.gz
Reinstate '!=' fix by Bruce Evans. The original commit message from
parse.c(1.9) was: revision 1.9 date: 1996/09/12 03:03:25; author: bde; state: Exp; lines: +7 -6 Fixed handling of `!=' assignment. Don't warn if the shell's output is null, but warn if there was an error reading it. Suggested by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/main.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index c9e5eb0..474bd1b 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: main.c,v 1.12 1996/10/08 04:06:00 steve Exp $
*/
#ifndef lint
@@ -485,7 +485,7 @@ main(argc, argv)
* Note that while MACHINE is decided at run-time,
* MACHINE_ARCH is always known at compile time.
*/
- if (!machine) {
+ if (!machine) {
#ifndef MACHINE
struct utsname utsname;
@@ -965,12 +965,18 @@ Cmd_Exec(cmd, err)
while(((pid = wait(&status)) != cpid) && (pid >= 0))
continue;
+ if (cc == -1) {
+ /*
+ * Couldn't read all of the child's output -- tell the user
+ * but still use whatever we read. Null output isn't an
+ * error unless there was an error reading it.
+ */
+ Parse_Error(PARSE_WARNING, "Couldn't read shell's output");
+ }
+
res = (char *)Buf_GetAll (buf, &cc);
Buf_Destroy (buf, FALSE);
- if (cc == 0)
- *err = "Couldn't read shell's output for \"%s\"";
-
if (status)
*err = "\"%s\" returned non-zero status";
OpenPOWER on IntegriCloud