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/750cf15844f1
branches: trunk
changeset: 941527:750cf15844f1
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 7f89ccdb558f -r 750cf15844f1 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