diff options
Diffstat (limited to 'devel/bmake/files/cond.c')
-rw-r--r-- | devel/bmake/files/cond.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/devel/bmake/files/cond.c b/devel/bmake/files/cond.c index 78d2abefba2..68d4ba5b39e 100644 --- a/devel/bmake/files/cond.c +++ b/devel/bmake/files/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.1.1.2 2008/03/09 19:39:32 joerg Exp $ */ +/* $NetBSD: cond.c,v 1.1.1.3 2008/11/11 14:28:22 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.1.1.2 2008/03/09 19:39:32 joerg Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.1.1.3 2008/11/11 14:28:22 joerg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.1.1.2 2008/03/09 19:39:32 joerg Exp $"); +__RCSID("$NetBSD: cond.c,v 1.1.1.3 2008/11/11 14:28:22 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -710,6 +710,8 @@ CondToken(Boolean doEval) Boolean lhsQuoted; Boolean rhsQuoted; +do_compare_setup: + rhs = NULL; lhsFree = rhsFree = FALSE; lhsQuoted = rhsQuoted = FALSE; @@ -985,6 +987,13 @@ error: * binary operator) and set to invert the evaluation * function if condInvert is TRUE. */ + if (isdigit((unsigned char)condExpr[0])) { + /* + * Variables may already be substituted + * by the time we get here. + */ + goto do_compare_setup; + } use_default: invert = condInvert; evalProc = condDefProc; |