Module Name:    src
Committed By:   rillig
Date:           Sun Oct 25 20:24:25 UTC 2020

Modified Files:
        src/usr.bin/make: job.c

Log Message:
make(1): convert abort reason macros to enum


To generate a diff of this commit:
cvs rdiff -u -r1.282 -r1.283 src/usr.bin/make/job.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.282 src/usr.bin/make/job.c:1.283
--- src/usr.bin/make/job.c:1.282	Sun Oct 25 20:19:06 2020
+++ src/usr.bin/make/job.c	Sun Oct 25 20:24:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.282 2020/10/25 20:19:06 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.283 2020/10/25 20:24:25 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.282 2020/10/25 20:19:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.283 2020/10/25 20:24:25 rillig Exp $");
 
 # define STATIC static
 
@@ -218,10 +218,13 @@ typedef struct Shell {
  * error handling variables
  */
 static int errors = 0;		/* number of errors reported */
-static int aborting = 0;	/* why is the make aborting? */
-#define ABORT_ERROR	1	/* Because of an error */
-#define ABORT_INTERRUPT	2	/* Because it was interrupted */
-#define ABORT_WAIT	3	/* Waiting for jobs to finish */
+typedef enum AbortReason {	/* why is the make aborting? */
+    ABORT_NONE,
+    ABORT_ERROR,		/* Because of an error */
+    ABORT_INTERRUPT,		/* Because it was interrupted */
+    ABORT_WAIT			/* Waiting for jobs to finish */
+} AbortReason;
+static AbortReason aborting = ABORT_NONE;
 #define JOB_TOKENS	"+EI+"	/* Token to requeue for each abort state */
 
 /*

Reply via email to