summaryrefslogtreecommitdiff
path: root/usr/src/lib/libpp/common/ppsearch.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libpp/common/ppsearch.c')
-rw-r--r--usr/src/lib/libpp/common/ppsearch.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/usr/src/lib/libpp/common/ppsearch.c b/usr/src/lib/libpp/common/ppsearch.c
index 83b956bca9..9730ad177f 100644
--- a/usr/src/lib/libpp/common/ppsearch.c
+++ b/usr/src/lib/libpp/common/ppsearch.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2008 AT&T Intellectual Property *
+* Copyright (c) 1986-2009 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -82,7 +82,7 @@ ppmultiple(register struct ppfile* fp, register struct ppsymbol* test)
{
if (status != INC_CLEAR)
{
- if (status != INC_TEST && status->macro || !(pp.mode & ALLMULTIPLE) && !(pp.state & STRICT))
+ if (status == INC_TEST || status->macro)
{
if ((pp.mode & (ALLMULTIPLE|LOADING)) == LOADING)
fp->guard = INC_IGNORE;
@@ -96,6 +96,8 @@ ppmultiple(register struct ppfile* fp, register struct ppsymbol* test)
}
if ((pp.mode & (ALLMULTIPLE|LOADING)) == LOADING)
test = INC_IGNORE;
+ else
+ return 1;
}
fp->guard = test;
return 1;
@@ -605,8 +607,14 @@ ppsearch(char* file, int type, int flags)
pp.include = 0;
fd = -1;
- dospath = 0;
chop = 0;
+ if (s = strchr(file, '\\'))
+ {
+ do *s++ = '/'; while (s = strchr(s, '\\'));
+ dospath = 1;
+ }
+ else
+ dospath = 0;
again:
pathcanon(file, 0);
if (chop)
@@ -757,15 +765,6 @@ ppsearch(char* file, int type, int flags)
switch (dospath)
{
- case 0:
- if (s = strchr(file, '\\'))
- {
- do *s++ = '/'; while (s = strchr(s, '\\'));
- pathcanon(file, 0);
- dospath = 1;
- goto again;
- }
- /*FALLTHROUGH*/
case 1:
if (ppisid(file[0]) && file[1] == ':' && file[2] == '/')
{