summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-09-22 07:56:58 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-09-22 07:56:58 +0000
commitcf4a2364534279fde574928ba2bf1a4a0e08252e (patch)
treef2ae0421a3bdb9c43816bb2b1e0aa3a944a1abe2 /soltools
parent9d8fbd80012fb7eaf447d24024d0dabf513e570d (diff)
INTEGRATION: CWS vgbugs04 (1.3.62); FILE MERGED
2006/08/31 10:34:13 vg 1.3.62.2: #i69015# generic paths for windows 2006/07/04 10:37:14 vg 1.3.62.1: #137785# optimize makedepend
Diffstat (limited to 'soltools')
-rw-r--r--soltools/mkdepend/include.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c
index a6b4289f10d4..45d0730393a3 100644
--- a/soltools/mkdepend/include.c
+++ b/soltools/mkdepend/include.c
@@ -34,6 +34,7 @@ void remove_dotdot( char * );
int isdot( char * );
int isdotdot( char * );
int issymbolic(char * dir, char * component);
+int exists_path(struct IncludesCollection*, char*);
extern struct inclist inclist[ MAXFILES ],
@@ -43,10 +44,11 @@ extern char *notdotdot[ ];
extern boolean show_where_not;
extern boolean warn_multiple;
-struct inclist *inc_path(file, include, dot)
+struct inclist *inc_path(file, include, dot, incCollection)
register char *file,
*include;
boolean dot;
+ struct IncludesCollection* incCollection;
{
static char path[ BUFSIZ ];
register char **pp, *p;
@@ -70,7 +72,8 @@ struct inclist *inc_path(file, include, dot)
* then check the exact path provided.
*/
if (!found && (dot || *include == '/')) {
- if (stat(include, &st) == 0 && !( st.st_mode & S_IFDIR)) {
+
+ if ((exists_path(incCollection, include)) && stat(include, &st) == 0 && !( st.st_mode & S_IFDIR)) {
ip = newinclude(include, include);
found = TRUE;
}
@@ -94,7 +97,7 @@ struct inclist *inc_path(file, include, dot)
strcpy(path + (p-file) + 1, include);
}
remove_dotdot(path);
- if (stat(path, &st) == 0 && !( st.st_mode & S_IFDIR)) {
+ if ((exists_path(incCollection, path)) && stat(path, &st) == 0 && !( st.st_mode & S_IFDIR)) {
ip = newinclude(path, include);
found = TRUE;
}
@@ -110,7 +113,7 @@ struct inclist *inc_path(file, include, dot)
for (pp = includedirs; *pp; pp++) {
sprintf(path, "%s/%s", *pp, include);
remove_dotdot(path);
- if (stat(path, &st) == 0 && !(st.st_mode & S_IFDIR)) {
+ if ((exists_path(incCollection, path)) && stat(path, &st) == 0 && !(st.st_mode & S_IFDIR)) {
ip = newinclude(path, include);
found = TRUE;
break;
@@ -124,6 +127,14 @@ struct inclist *inc_path(file, include, dot)
return(ip);
}
+int exists_path(incCollection, path)
+ struct IncludesCollection* incCollection;
+ char* path;
+{
+ convert_slashes(path);
+ return call_IncludesCollection_exists(incCollection, path);
+}
+
/*
* Occasionally, pathnames are created that look like .../x/../y
* Any of the 'x/..' sequences within the name can be eliminated.