Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): support using C99 bool for Boolean
details: https://anonhg.NetBSD.org/src/rev/028a694ed595
branches: trunk
changeset: 979170:028a694ed595
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Dec 18 18:17:45 2020 +0000
description:
make(1): support using C99 bool for Boolean
diffstat:
usr.bin/make/make.h | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r 6881319c7bf2 -r 028a694ed595 usr.bin/make/make.h
--- a/usr.bin/make/make.h Fri Dec 18 17:32:41 2020 +0000
+++ b/usr.bin/make/make.h Fri Dec 18 18:17:45 2020 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index