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): only define TRUE and FALSE if necessary



details:   https://anonhg.NetBSD.org/src/rev/c882813013e7
branches:  trunk
changeset: 945190:c882813013e7
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Oct 23 18:05:35 2020 +0000

description:
make(1): only define TRUE and FALSE if necessary

For -DUSE_ENUM_BOOLEAN, the macros are not necessary.

diffstat:

 usr.bin/make/make.h |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 356658f89592 -r c882813013e7 usr.bin/make/make.h
--- a/usr.bin/make/make.h       Fri Oct 23 17:59:25 2020 +0000
+++ b/usr.bin/make/make.h       Fri Oct 23 18:05:35 2020 +0000
@@ -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 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"



Home | Main Index | Thread Index | Old Index