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
6932138f
Commit
6932138f
authored
Oct 02, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Split get_link_name into a separate get_abi_name helper.
parent
c3769732
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
utils.c
tools/winebuild/utils.c
+17
-12
No files found.
tools/winebuild/utils.c
View file @
6932138f
...
...
@@ -728,28 +728,28 @@ const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec )
}
/* return the stdcall-decorated name for an entry point */
const
char
*
get_link_name
(
const
ORDDEF
*
odp
)
static
const
char
*
get_abi_name
(
const
ORDDEF
*
odp
,
const
char
*
name
)
{
static
char
*
buffer
;
char
*
ret
;
if
(
target
.
cpu
!=
CPU_i386
)
return
odp
->
link_
name
;
if
(
target
.
cpu
!=
CPU_i386
)
return
name
;
switch
(
odp
->
type
)
{
case
TYPE_STDCALL
:
if
(
is_pe
())
{
if
(
odp
->
flags
&
FLAG_THISCALL
)
return
odp
->
link_
name
;
if
(
odp
->
flags
&
FLAG_FASTCALL
)
ret
=
strmake
(
"@%s@%u"
,
odp
->
link_
name
,
get_args_size
(
odp
));
else
if
(
!
kill_at
)
ret
=
strmake
(
"%s@%u"
,
odp
->
link_
name
,
get_args_size
(
odp
));
else
return
odp
->
link_
name
;
if
(
odp
->
flags
&
FLAG_THISCALL
)
return
name
;
if
(
odp
->
flags
&
FLAG_FASTCALL
)
ret
=
strmake
(
"@%s@%u"
,
name
,
get_args_size
(
odp
));
else
if
(
!
kill_at
)
ret
=
strmake
(
"%s@%u"
,
name
,
get_args_size
(
odp
));
else
return
name
;
}
else
{
if
(
odp
->
flags
&
FLAG_THISCALL
)
ret
=
strmake
(
"__thiscall_%s"
,
odp
->
link_
name
);
else
if
(
odp
->
flags
&
FLAG_FASTCALL
)
ret
=
strmake
(
"__fastcall_%s"
,
odp
->
link_
name
);
else
return
odp
->
link_
name
;
if
(
odp
->
flags
&
FLAG_THISCALL
)
ret
=
strmake
(
"__thiscall_%s"
,
name
);
else
if
(
odp
->
flags
&
FLAG_FASTCALL
)
ret
=
strmake
(
"__fastcall_%s"
,
name
);
else
return
name
;
}
break
;
...
...
@@ -758,13 +758,13 @@ const char *get_link_name( const ORDDEF *odp )
{
int
args
=
get_args_size
(
odp
);
if
(
odp
->
flags
&
FLAG_REGISTER
)
args
+=
get_ptr_size
();
/* context argument */
ret
=
strmake
(
"%s@%u"
,
odp
->
link_
name
,
args
);
ret
=
strmake
(
"%s@%u"
,
name
,
args
);
}
else
return
odp
->
link_
name
;
else
return
name
;
break
;
default:
return
odp
->
link_
name
;
return
name
;
}
free
(
buffer
);
...
...
@@ -772,6 +772,11 @@ const char *get_link_name( const ORDDEF *odp )
return
ret
;
}
const
char
*
get_link_name
(
const
ORDDEF
*
odp
)
{
return
get_abi_name
(
odp
,
odp
->
link_name
);
}
/*******************************************************************
* sort_func_list
*
...
...
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