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
59b5c52f
Commit
59b5c52f
authored
Mar 23, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add a common helper to find an imported dll.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a717598b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
19 deletions
+8
-19
import.c
tools/winebuild/import.c
+8
-19
No files found.
tools/winebuild/import.c
View file @
59b5c52f
...
...
@@ -154,15 +154,15 @@ static int is_delayed_import( const char *name )
return
0
;
}
/*
check whether a given dll has already been imported
*/
static
struct
import
*
is_already_imported
(
const
char
*
name
)
/*
find an imported dll from its name
*/
static
struct
import
*
find_import_dll
(
const
char
*
name
)
{
struct
import
*
import
;
LIST_FOR_EACH_ENTRY
(
import
,
&
dll_imports
,
struct
import
,
entry
)
if
(
!
strcmp
(
import
->
dll_name
,
name
))
return
import
;
if
(
!
strc
asec
mp
(
import
->
dll_name
,
name
))
return
import
;
LIST_FOR_EACH_ENTRY
(
import
,
&
dll_delayed
,
struct
import
,
entry
)
if
(
!
strcmp
(
import
->
dll_name
,
name
))
return
import
;
if
(
!
strc
asec
mp
(
import
->
dll_name
,
name
))
return
import
;
return
NULL
;
}
...
...
@@ -215,7 +215,7 @@ static DLLSPEC *read_import_lib( struct import *imp )
close_input_file
(
f
);
/* check if we already imported that library from a different file */
if
((
prev_imp
=
is_already_imported
(
spec
->
file_name
)))
if
((
prev_imp
=
find_import_dll
(
spec
->
file_name
)))
{
if
(
prev_imp
->
dev
!=
imp
->
dev
||
prev_imp
->
ino
!=
imp
->
ino
)
fatal_error
(
"%s and %s have the same export name '%s'
\n
"
,
...
...
@@ -292,7 +292,7 @@ void add_delayed_import( const char *name )
char
*
fullname
=
get_dll_name
(
name
,
NULL
);
strarray_add
(
&
delayed_imports
,
fullname
,
NULL
);
if
((
imp
=
is_already_imported
(
fullname
)))
if
((
imp
=
find_import_dll
(
fullname
)))
{
list_remove
(
&
imp
->
entry
);
list_add_tail
(
&
dll_delayed
,
&
imp
->
entry
);
...
...
@@ -389,25 +389,14 @@ static void check_undefined_forwards( DLLSPEC *spec )
api_name
=
p
+
1
;
dll_name
=
get_dll_name
(
link_name
,
NULL
);
LIST_FOR_EACH_ENTRY
(
imp
,
&
dll_imports
,
struct
import
,
entry
)
if
((
imp
=
find_import_dll
(
dll_name
))
)
{
if
(
strcasecmp
(
imp
->
dll_name
,
dll_name
))
continue
;
if
(
!
find_export
(
api_name
,
imp
->
exports
,
imp
->
nb_exports
))
warning
(
"%s:%d: forward '%s' not found in %s
\n
"
,
spec
->
src_name
,
odp
->
lineno
,
odp
->
link_name
,
imp
->
dll_name
);
goto
done
;
}
LIST_FOR_EACH_ENTRY
(
imp
,
&
dll_delayed
,
struct
import
,
entry
)
{
if
(
strcasecmp
(
imp
->
dll_name
,
dll_name
))
continue
;
if
(
!
find_export
(
api_name
,
imp
->
exports
,
imp
->
nb_exports
))
warning
(
"%s:%d: forward '%s' not found in %s
\n
"
,
spec
->
src_name
,
odp
->
lineno
,
odp
->
link_name
,
imp
->
dll_name
);
goto
done
;
}
warning
(
"%s:%d: forward '%s' not found in the imported dll list
\n
"
,
else
warning
(
"%s:%d: forward '%s' not found in the imported dll list
\n
"
,
spec
->
src_name
,
odp
->
lineno
,
odp
->
link_name
);
done:
free
(
link_name
);
free
(
dll_name
);
}
...
...
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