Module Name: src
Committed By: rillig
Date: Fri Dec 18 18:17:45 UTC 2020
Modified Files:
src/usr.bin/make: make.h
Log Message:
make(1): support using C99 bool for Boolean
To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/usr.bin/make/make.h
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/make.h
diff -u src/usr.bin/make/make.h:1.234 src/usr.bin/make/make.h:1.235
--- src/usr.bin/make/make.h:1.234 Sun Dec 13 20:09:02 2020
+++ src/usr.bin/make/make.h Fri Dec 18 18:17:45 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.234 2020/12/13 20:09:02 rillig Exp $ */
+/* $NetBSD: make.h,v 1.235 2020/12/18 18:17:45 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -136,8 +136,12 @@
* A boolean type is defined as an integer, not an enum, for historic reasons.
* The only allowed values are the constants TRUE and FALSE (1 and 0).
*/
-
-#ifdef USE_DOUBLE_BOOLEAN
+#if defined(USE_C99_BOOLEAN)
+#include <stdbool.h>
+typedef bool Boolean;
+#define FALSE false
+#define TRUE true
+#elif defined(USE_DOUBLE_BOOLEAN)
/* During development, to find type mismatches in function declarations. */
typedef double Boolean;
#define TRUE 1.0