diff options
| author | rillig <rillig@NetBSD.org> | 2020-08-29 07:52:55 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2020-08-29 07:52:55 +0000 |
| commit | 7aeb91f4d5bbdab0a353cfce09be487fa5c14d42 (patch) | |
| tree | ab885da6179660feecb79aaeaa404853fab1bd2c /usr.bin/make/parse.c | |
| parent | fa15de304968eec784657a94ea4cfe24b17c8395 (diff) | |
make(1): allow for strict type checking for Boolean
Having Boolean aliased to int creates ambiguities since int is widely
used. Allow to occasionally compile make with -DUSE_DOUBLE_BOOLEAN to
check that the type definitions still agree.
Diffstat (limited to 'usr.bin/make/parse.c')
| -rw-r--r-- | usr.bin/make/parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index c61e19765c0..8db626917c9 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.268 2020/08/28 04:48:57 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.269 2020/08/29 07:52:55 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.268 2020/08/28 04:48:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.269 2020/08/29 07:52:55 rillig Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.268 2020/08/28 04:48:57 rillig Exp $"); +__RCSID("$NetBSD: parse.c,v 1.269 2020/08/29 07:52:55 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -2541,7 +2541,7 @@ IsInclude(const char *line, Boolean sysv) static const size_t inclen = sizeof(inc) - 1; /* 'd' is not valid for sysv */ - int o = strchr(&("ds-"[sysv]), *line) != NULL; + int o = strchr(sysv ? "s-" : "ds-", *line) != NULL; if (strncmp(line + o, inc, inclen) != 0) return FALSE; |
