=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/dir.c,v retrieving revision 1.44 retrieving revision 1.45 diff -c -r1.44 -r1.45 *** src/usr.bin/make/dir.c 2006/01/20 23:10:19 1.44 --- src/usr.bin/make/dir.c 2007/01/18 17:49:51 1.45 *************** *** 1,5 **** /* $OpenPackages$ */ ! /* $OpenBSD: dir.c,v 1.44 2006/01/20 23:10:19 espie Exp $ */ /* $NetBSD: dir.c,v 1.14 1997/03/29 16:51:26 christos Exp $ */ /* --- 1,5 ---- /* $OpenPackages$ */ ! /* $OpenBSD: dir.c,v 1.45 2007/01/18 17:49:51 espie Exp $ */ /* $NetBSD: dir.c,v 1.14 1997/03/29 16:51:26 christos Exp $ */ /* *************** *** 634,640 **** * that directory later on. */ char * ! Dir_FindFilei(const char *name, const char *ename, Lst path) { Path *p; /* current path member */ char *p1; /* pointer into p->name */ --- 634,641 ---- * that directory later on. */ char * ! Dir_FindFileComplexi(const char *name, const char *ename, Lst path, ! bool checkCurdirFirst) { Path *p; /* current path member */ char *p1; /* pointer into p->name */ *************** *** 664,673 **** if (DEBUG(DIR)) printf("Searching for %s...", name); ! /* No matter what, we always look for the file in the current directory ! * before anywhere else and we always return exactly what the caller ! * specified. */ ! if ((!hasSlash || (cp - name == 2 && *name == '.')) && find_file_hashi(dot, cp, ename, hv) != NULL) { if (DEBUG(DIR)) printf("in '.'\n"); --- 665,674 ---- if (DEBUG(DIR)) printf("Searching for %s...", name); ! /* Unless checkCurDirFirst is false, we always look for ! * the file in the current directory before anywhere else ! * and we always return exactly what the caller specified. */ ! if (checkCurdirFirst && (!hasSlash || (cp - name == 2 && *name == '.')) && find_file_hashi(dot, cp, ename, hv) != NULL) { if (DEBUG(DIR)) printf("in '.'\n");