projects
/
m6w6
/
ext-psi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
4bbbf73
)
cpp: search local dir only for quoted headers
author
Michael Wallner
<mike@php.net>
Wed, 18 Apr 2018 11:47:32 +0000
(13:47 +0200)
committer
Michael Wallner
<mike@php.net>
Wed, 18 Apr 2018 11:47:32 +0000
(13:47 +0200)
src/cpp.c
patch
|
blob
|
history
diff --git
a/src/cpp.c
b/src/cpp.c
index 5ab649247d17a4a2f468d7411a825e2c9333541c..908c21f25d1384818fa0290cff88d989c869acb6 100644
(file)
--- a/
src/cpp.c
+++ b/
src/cpp.c
@@
-469,7
+469,7
@@
bool psi_cpp_include(struct psi_cpp *cpp, const struct psi_token *file, unsigned
bool parsed = false;
int f_len = strlen(file->text);
bool parsed = false;
int f_len = strlen(file->text);
- if (
!(flags & PSI_CPP_INCLUDE_NEXT) || *file->text == '/'
) {
+ if (
file->type == PSI_T_QUOTED_STRING && (!(flags & PSI_CPP_INCLUDE_NEXT) || *file->text == '/')
) {
/* first try as is, full or relative path */
char temp[PATH_MAX], *path = temp;
/* first try as is, full or relative path */
char temp[PATH_MAX], *path = temp;
@@
-499,7
+499,7
@@
bool psi_cpp_include(struct psi_cpp *cpp, const struct psi_token *file, unsigned
}
}
}
}
- if (!(flags & PSI_CPP_INCLUDE_NEXT)
|| !cpp->search
) {
+ if (!(flags & PSI_CPP_INCLUDE_NEXT)) {
cpp->search = PSI_G(search_path);
}
cpp->search = PSI_G(search_path);
}