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
706a0a9e
Commit
706a0a9e
authored
Jun 29, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace configure macros by explicit platform checks (probably not
correct on all platforms yet).
parent
545aefa1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
14 deletions
+62
-14
build.h
tools/winebuild/build.h
+2
-0
spec32.c
tools/winebuild/spec32.c
+5
-5
utils.c
tools/winebuild/utils.c
+55
-9
No files found.
tools/winebuild/build.h
View file @
706a0a9e
...
...
@@ -184,6 +184,8 @@ extern unsigned int get_page_size(void);
extern
const
char
*
asm_name
(
const
char
*
func
);
extern
const
char
*
func_declaration
(
const
char
*
func
);
extern
const
char
*
func_size
(
const
char
*
func
);
extern
const
char
*
get_asm_string_keyword
(
void
);
extern
const
char
*
get_asm_short_keyword
(
void
);
extern
void
add_import_dll
(
const
char
*
name
,
const
char
*
filename
);
extern
void
add_delayed_import
(
const
char
*
name
);
...
...
tools/winebuild/spec32.c
View file @
706a0a9e
...
...
@@ -266,12 +266,12 @@ static void output_exports( FILE *outfile, DLLSPEC *spec )
fprintf
(
outfile
,
"
\"
__wine_spec_exp_ordinals:
\\
n
\"\n
"
);
for
(
i
=
0
;
i
<
spec
->
nb_names
;
i
++
)
{
fprintf
(
outfile
,
"
\"\\
t
"
__ASM_SHORT
"
%d
\\
n
\"\n
"
,
spec
->
names
[
i
]
->
ordinal
-
spec
->
base
);
fprintf
(
outfile
,
"
\"\\
t
%s
%d
\\
n
\"\n
"
,
get_asm_short_keyword
(),
spec
->
names
[
i
]
->
ordinal
-
spec
->
base
);
}
if
(
spec
->
nb_names
%
2
)
{
fprintf
(
outfile
,
"
\"\\
t
"
__ASM_SHORT
" 0
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t
%s 0
\\
n
\"\n
"
,
get_asm_short_keyword
()
);
}
}
...
...
@@ -284,7 +284,7 @@ static void output_exports( FILE *outfile, DLLSPEC *spec )
{
ORDDEF
*
odp
=
spec
->
ordinals
[
i
];
if
(
odp
&&
(
odp
->
flags
&
FLAG_FORWARD
))
fprintf
(
outfile
,
"
\"\\
t
"
__ASM_STRING
"
\\\"
%s
\\\"\\
n
\"\n
"
,
odp
->
link_name
);
fprintf
(
outfile
,
"
\"\\
t
%s
\\\"
%s
\\\"\\
n
\"\n
"
,
get_asm_string_keyword
()
,
odp
->
link_name
);
}
fprintf
(
outfile
,
"
\"\\
t.align %d
\\
n
\"\n
"
,
get_alignment
(
4
)
);
}
...
...
@@ -324,7 +324,7 @@ static void output_exports( FILE *outfile, DLLSPEC *spec )
case
TYPE_CDECL
:
fprintf
(
outfile
,
"
\"\\
tjmp %s
\\
n
\"\n
"
,
asm_name
(
odp
->
link_name
)
);
fprintf
(
outfile
,
"
\"\\
tret
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t
"
__ASM_SHORT
" %d
\\
n
\"\n
"
,
args
);
fprintf
(
outfile
,
"
\"\\
t
%s %d
\\
n
\"\n
"
,
get_asm_short_keyword
()
,
args
);
fprintf
(
outfile
,
"
\"\\
t.long %s,0x%08x
\\
n
\"\n
"
,
asm_name
(
odp
->
link_name
),
mask
);
break
;
default:
...
...
tools/winebuild/utils.c
View file @
706a0a9e
...
...
@@ -384,26 +384,72 @@ unsigned int get_page_size(void)
const
char
*
asm_name
(
const
char
*
sym
)
{
static
char
buffer
[
256
];
sprintf
(
buffer
,
__ASM_NAME
(
"%s"
),
sym
);
return
buffer
;
switch
(
target_platform
)
{
case
PLATFORM_APPLE
:
case
PLATFORM_WINDOWS
:
buffer
[
0
]
=
'_'
;
strcpy
(
buffer
+
1
,
sym
);
return
buffer
;
default:
return
sym
;
}
}
/* return an assembly function declaration for a C function name */
const
char
*
func_declaration
(
const
char
*
func
)
{
static
char
buffer
[
256
];
sprintf
(
buffer
,
__ASM_FUNC
(
"%s"
),
func
);
switch
(
target_platform
)
{
case
PLATFORM_WINDOWS
:
sprintf
(
buffer
,
".def _%s; .scl 2; .type 32; .endef"
,
func
);
break
;
case
PLATFORM_APPLE
:
sprintf
(
buffer
,
".type _%s,@function"
,
func
);
break
;
case
PLATFORM_SVR4
:
sprintf
(
buffer
,
".type %s,2"
,
func
);
break
;
default:
sprintf
(
buffer
,
".type %s,@function"
,
func
);
break
;
}
return
buffer
;
}
/* return a size declaration for an assembly function */
const
char
*
func_size
(
const
char
*
func
)
{
#ifdef HAVE_ASM_DOT_SIZE
static
char
buffer
[
256
];
sprintf
(
buffer
,
".size "
__ASM_NAME
(
"%s"
)
", .-"
__ASM_NAME
(
"%s"
),
func
,
func
);
return
buffer
;
#else
return
""
;
#endif
switch
(
target_platform
)
{
case
PLATFORM_APPLE
:
case
PLATFORM_WINDOWS
:
return
""
;
default:
sprintf
(
buffer
,
".size %s, .-%s"
,
func
,
func
);
return
buffer
;
}
}
const
char
*
get_asm_string_keyword
(
void
)
{
switch
(
target_platform
)
{
case
PLATFORM_SVR4
:
return
".asciz"
;
default:
return
".string"
;
}
}
const
char
*
get_asm_short_keyword
(
void
)
{
switch
(
target_platform
)
{
case
PLATFORM_SVR4
:
return
".half"
;
default:
return
".short"
;
}
}
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