Module Name: src
Committed By: rillig
Date: Fri Oct 23 18:05:35 UTC 2020
Modified Files:
src/usr.bin/make: make.h
Log Message:
make(1): only define TRUE and FALSE if necessary
For -DUSE_ENUM_BOOLEAN, the macros are not necessary.
To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 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.161 src/usr.bin/make/make.h:1.162
--- src/usr.bin/make/make.h:1.161 Fri Oct 23 17:59:25 2020
+++ src/usr.bin/make/make.h Fri Oct 23 18:05:35 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.161 2020/10/23 17:59:25 rillig Exp $ */
+/* $NetBSD: make.h,v 1.162 2020/10/23 18:05:35 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -138,6 +138,8 @@
#ifdef USE_DOUBLE_BOOLEAN
/* During development, to find type mismatches in function declarations. */
typedef double Boolean;
+#define TRUE 1.0
+#define FALSE 0.0
#elif defined(USE_UCHAR_BOOLEAN)
/* During development, to find code that depends on the exact value of TRUE or
* that stores other values in Boolean variables. */
@@ -154,13 +156,13 @@ typedef char Boolean;
typedef enum Boolean { FALSE, TRUE } Boolean;
#else
typedef int Boolean;
-#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
+#endif
#include "lst.h"
#include "enum.h"