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
3570bfd4
Commit
3570bfd4
authored
Nov 13, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not warn for unused imported dlls when forwards to the same dlls
are present.
parent
f3a15607
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
8 deletions
+29
-8
build.h
tools/winebuild/build.h
+1
-1
import.c
tools/winebuild/import.c
+20
-1
main.c
tools/winebuild/main.c
+1
-1
spec32.c
tools/winebuild/spec32.c
+7
-5
No files found.
tools/winebuild/build.h
View file @
3570bfd4
...
...
@@ -153,7 +153,7 @@ extern int output_res16_directory( unsigned char *buffer );
extern
void
BuildGlue
(
FILE
*
outfile
,
FILE
*
infile
);
extern
void
BuildRelays
(
FILE
*
outfile
);
extern
void
BuildSpec16File
(
FILE
*
outfile
);
extern
void
BuildSpec32File
(
FILE
*
outfile
,
int
output_main
);
extern
void
BuildSpec32File
(
FILE
*
outfile
);
extern
SPEC_TYPE
ParseTopLevel
(
FILE
*
file
);
/* global variables */
...
...
tools/winebuild/import.c
View file @
3570bfd4
...
...
@@ -195,6 +195,25 @@ static void add_extra_undef_symbols(void)
}
}
/* warn if a given dll is not used, but check forwards first */
static
void
warn_unused
(
const
char
*
dllname
)
{
int
i
;
size_t
len
=
strlen
(
dllname
);
const
char
*
p
=
strchr
(
dllname
,
'.'
);
if
(
p
&&
!
strcasecmp
(
p
,
".dll"
))
len
=
p
-
dllname
;
for
(
i
=
Base
;
i
<=
Limit
;
i
++
)
{
ORDDEF
*
odp
=
Ordinals
[
i
];
if
(
!
odp
||
odp
->
type
!=
TYPE_FORWARD
)
continue
;
if
(
!
strncasecmp
(
odp
->
u
.
fwd
.
link_name
,
dllname
,
len
)
&&
odp
->
u
.
fwd
.
link_name
[
len
]
==
'.'
)
return
;
/* found an import, do not warn */
}
warning
(
"%s imported but no symbols used
\n
"
,
dllname
);
}
/* read in the list of undefined symbols */
void
read_undef_symbols
(
const
char
*
name
)
{
...
...
@@ -249,7 +268,7 @@ int resolve_imports( FILE *outfile )
else
undef_symbols
[
j
-
off
]
=
undef_symbols
[
j
];
}
nb_undef_symbols
-=
off
;
if
(
!
off
)
warn
ing
(
"%s imported but no symbols used
\n
"
,
imp
->
dll
);
if
(
!
off
)
warn
_unused
(
imp
->
dll
);
}
return
1
;
}
...
...
tools/winebuild/main.c
View file @
3570bfd4
...
...
@@ -203,7 +203,7 @@ int main(int argc, char **argv)
BuildSpec16File
(
output_file
);
break
;
case
SPEC_WIN32
:
BuildSpec32File
(
output_file
,
!
resolve_imports
(
output_file
)
);
BuildSpec32File
(
output_file
);
break
;
default:
assert
(
0
);
}
...
...
tools/winebuild/spec32.c
View file @
3570bfd4
...
...
@@ -358,12 +358,12 @@ static void output_stub_funcs( FILE *outfile )
*
* Build a Win32 C file from a spec file.
*/
void
BuildSpec32File
(
FILE
*
outfile
,
int
output_main
)
void
BuildSpec32File
(
FILE
*
outfile
)
{
ORDDEF
*
odp
;
int
i
,
fwd_size
=
0
,
have_regs
=
FALSE
;
int
nr_exports
,
nr_imports
,
nr_resources
,
nr_debug
;
int
characteristics
,
subsystem
;
int
characteristics
,
subsystem
,
has_imports
;
const
char
*
init_func
;
DWORD
page_size
;
...
...
@@ -380,6 +380,8 @@ void BuildSpec32File( FILE *outfile, int output_main )
AssignOrdinals
();
nr_exports
=
Base
<=
Limit
?
Limit
-
Base
+
1
:
0
;
has_imports
=
resolve_imports
(
outfile
);
fprintf
(
outfile
,
"/* File generated automatically from %s; do not edit! */
\n\n
"
,
input_file_name
);
...
...
@@ -498,7 +500,7 @@ void BuildSpec32File( FILE *outfile, int output_main )
" _ARGC = __wine_get_main_args( &_ARGV );
\n
"
" ExitProcess( %s( GetModuleHandleA(0), 0, cmdline, info.wShowWindow ) );
\n
"
"}
\n\n
"
,
init_func
,
init_func
);
if
(
output_main
)
if
(
!
has_imports
)
fprintf
(
outfile
,
"int main( int argc, char *argv[] )
\n
"
"{
\n
"
...
...
@@ -510,7 +512,7 @@ void BuildSpec32File( FILE *outfile, int output_main )
subsystem
=
IMAGE_SUBSYSTEM_WINDOWS_GUI
;
break
;
case
SPEC_MODE_CUIEXE
:
if
(
!
init_func
)
init_func
=
output_main
?
"wine_main"
:
"
main"
;
if
(
!
init_func
)
init_func
=
has_imports
?
"main"
:
"wine_
main"
;
fprintf
(
outfile
,
"
\n
#include <winbase.h>
\n
"
"int _ARGC;
\n
"
...
...
@@ -522,7 +524,7 @@ void BuildSpec32File( FILE *outfile, int output_main )
" _ARGC = __wine_get_main_args( &_ARGV );
\n
"
" ExitProcess( %s( _ARGC, _ARGV ) );
\n
"
"}
\n\n
"
,
init_func
,
init_func
);
if
(
output_main
)
if
(
!
has_imports
)
fprintf
(
outfile
,
"int main( int argc, char *argv[] )
\n
"
"{
\n
"
...
...
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