make(1): fix return type of macro DEBUG
This macro was supposed to return a boolean expression all the time, it just hadn't been implemented this way. This resulted in wrong output for the test sh-flags, in compilation modes -DUSE_UCHAR_BOOLEAN and -DUSE_CHAR_BOOLEAN, since in ParseCommandFlags, the expression DEBUG(LOUD) didn't fit into a boolean.
This commit is contained in:
parent
a542a5a6b7
commit
82632c2fd8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: make.h,v 1.235 2020/12/18 18:17:45 rillig Exp $ */
|
||||
/* $NetBSD: make.h,v 1.236 2020/12/22 22:31:50 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -581,7 +581,7 @@ typedef enum DebugFlags {
|
||||
|
||||
#define CONCAT(a, b) a##b
|
||||
|
||||
#define DEBUG(module) (opts.debug & CONCAT(DEBUG_,module))
|
||||
#define DEBUG(module) ((opts.debug & CONCAT(DEBUG_, module)) != 0)
|
||||
|
||||
void debug_printf(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: meta.c,v 1.164 2020/12/20 22:36:40 rillig Exp $ */
|
||||
/* $NetBSD: meta.c,v 1.165 2020/12/22 22:31:50 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Implement 'meta' mode.
|
||||
@ -416,7 +416,7 @@ meta_needed(GNode *gn, const char *dname,
|
||||
struct cached_stat cst;
|
||||
|
||||
if (verbose)
|
||||
verbose = DEBUG(META) != 0;
|
||||
verbose = DEBUG(META);
|
||||
|
||||
/* This may be a phony node which we don't want meta data for... */
|
||||
/* Skip .meta for .BEGIN, .END, .ERROR etc as well. */
|
||||
|
Loading…
Reference in New Issue
Block a user