Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
54c37238
Commit
54c37238
authored
Nov 11, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Add a helper function to open a file from the include path.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ec7664d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
makedep.c
tools/makedep.c
+9
-5
No files found.
tools/makedep.c
View file @
54c37238
...
@@ -1208,13 +1208,17 @@ static struct file *load_file( const char *name )
...
@@ -1208,13 +1208,17 @@ static struct file *load_file( const char *name )
/*******************************************************************
/*******************************************************************
* open_file
* open_include_path_file
*
* Open a file from a directory on the include path.
*/
*/
static
struct
file
*
open_file
(
const
struct
makefile
*
make
,
const
char
*
path
,
char
**
filename
)
static
struct
file
*
open_include_path_file
(
const
struct
makefile
*
make
,
const
char
*
dir
,
const
char
*
name
,
char
**
filename
)
{
{
struct
file
*
ret
=
load_file
(
base_dir_path
(
make
,
path
));
char
*
src_path
=
base_dir_path
(
make
,
concat_paths
(
dir
,
name
));
struct
file
*
ret
=
load_file
(
src_path
);
if
(
ret
)
*
filename
=
xstrdup
(
path
);
if
(
ret
)
*
filename
=
src_dir_path
(
make
,
concat_paths
(
dir
,
name
)
);
return
ret
;
return
ret
;
}
}
...
@@ -1411,7 +1415,7 @@ static struct file *open_include_file( const struct makefile *make, struct incl_
...
@@ -1411,7 +1415,7 @@ static struct file *open_include_file( const struct makefile *make, struct incl_
}
}
if
(
*
dir
!=
'/'
)
if
(
*
dir
!=
'/'
)
{
{
if
((
file
=
open_
file
(
make
,
concat_paths
(
dir
,
pFile
->
name
)
,
&
pFile
->
filename
)))
if
((
file
=
open_
include_path_file
(
make
,
dir
,
pFile
->
name
,
&
pFile
->
filename
)))
return
file
;
return
file
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment