diff options
| author | rillig <rillig@NetBSD.org> | 2020-10-23 17:59:25 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2020-10-23 17:59:25 +0000 |
| commit | 2ceb00fb760e8af33a26ef3d7c6f85fcd17f12c6 (patch) | |
| tree | e7392cf471076295348d7e12b1a3cf046b7edc04 /usr.bin/make/make.h | |
| parent | d3f41369e15bde0734cff87188e4d9a659dd8b0a (diff) | |
make(1): allow compilation with Boolean implemented as char
Diffstat (limited to 'usr.bin/make/make.h')
| -rw-r--r-- | usr.bin/make/make.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/make/make.h b/usr.bin/make/make.h index ca470d1c9c4..fff88a47a13 100644 --- a/usr.bin/make/make.h +++ b/usr.bin/make/make.h @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.160 2020/10/19 23:43:55 rillig Exp $ */ +/* $NetBSD: make.h,v 1.161 2020/10/23 17:59:25 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -144,6 +144,12 @@ typedef double Boolean; typedef unsigned char Boolean; #define TRUE ((unsigned char)0xFF) #define FALSE ((unsigned char)0x00) +#elif defined(USE_CHAR_BOOLEAN) +/* During development, to find code that uses a boolean as array index, via + * -Wchar-subscripts. */ +typedef char Boolean; +#define TRUE ((char)-1) +#define FALSE ((char)0x00) #elif defined(USE_ENUM_BOOLEAN) typedef enum Boolean { FALSE, TRUE } Boolean; #else |
