Alexandre Julliard : makedep: Allow the source directory itself in include paths.
Alexandre Julliard
julliard at winehq.org
Tue Dec 3 13:46:35 CST 2013
Module: wine
Branch: master
Commit: 4674566ba4d9f523dd48bbe4af131c2a0b136394
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4674566ba4d9f523dd48bbe4af131c2a0b136394
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Dec 2 23:28:58 2013 +0100
makedep: Allow the source directory itself in include paths.
---
tools/makedep.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/makedep.c b/tools/makedep.c
index 164b7e4..1d99762 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -536,7 +536,7 @@ static FILE *open_include_file( struct incl_file *pFile )
{
FILE *file = NULL;
char *filename, *p;
- unsigned int i;
+ unsigned int i, len;
errno = ENOENT;
@@ -664,8 +664,9 @@ static FILE *open_include_file( struct incl_file *pFile )
{
/* ignore absolute paths that don't point into the source dir */
if (!top_src_dir) continue;
- if (strncmp( dir, top_src_dir, strlen(top_src_dir) )) continue;
- if (dir[strlen(top_src_dir)] != '/') continue;
+ len = strlen( top_src_dir );
+ if (strncmp( dir, top_src_dir, len )) continue;
+ if (dir[len] && dir[len] != '/') continue;
}
filename = strmake( "%s/%s", dir, pFile->name );
if ((file = fopen( filename, "r" ))) goto found;
More information about the wine-cvs
mailing list