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
9cebf090
Commit
9cebf090
authored
Jun 14, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Add a macro to define an stdcall suffix in assembly code.
parent
8812d241
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
0 deletions
+102
-0
configure
configure
+78
-0
configure.ac
configure.ac
+21
-0
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
9cebf090
...
...
@@ -17615,6 +17615,69 @@ fi
{
$as_echo
"
$as_me
:
$LINENO
: result:
$ac_cv_c_extern_prefix
"
>
&5
$as_echo
"
$ac_cv_c_extern_prefix
"
>
&6
;
}
case
$host_cpu
in
*
i[3456789]86
*
)
{
$as_echo
"
$as_me
:
$LINENO
: checking whether external symbols need stdcall decoration"
>
&5
$as_echo_n
"checking whether external symbols need stdcall decoration... "
>
&6
;
}
if
test
"
${
ac_cv_c_stdcall_suffix
+set
}
"
=
set
;
then
$as_echo_n
"(cached) "
>
&6
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
#ifndef _MSC_VER
#define __stdcall __attribute__((__stdcall__))
#endif
int __stdcall ac_test(int i) { return i; }
int
main ()
{
asm("jmp _ac_test@4"); if (ac_test(1)) return 1
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
if
{
(
ac_try
=
"
$ac_link
"
case
"((
$ac_try
"
in
*
\"
*
|
*
\`
*
|
*
\\
*
)
ac_try_echo
=
\$
ac_try
;;
*
)
ac_try_echo
=
$ac_try
;;
esac
eval
ac_try_echo
=
"
\"\$
as_me:
$LINENO
:
$ac_try_echo
\"
"
$as_echo
"
$ac_try_echo
"
)
>
&5
(
eval
"
$ac_link
"
)
2>conftest.er1
ac_status
=
$?
grep
-v
'^ *+'
conftest.er1
>
conftest.err
rm
-f
conftest.er1
cat
conftest.err
>
&5
$as_echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
test
-z
"
$ac_c_werror_flag
"
||
test
!
-s
conftest.err
}
&&
test
-s
conftest
$ac_exeext
&&
{
test
"
$cross_compiling
"
=
yes
||
$as_test_x
conftest
$ac_exeext
}
;
then
ac_cv_c_stdcall_suffix
=
"yes"
else
$as_echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
ac_cv_c_stdcall_suffix
=
"no"
fi
rm
-rf
conftest.dSYM
rm
-f
core conftest.err conftest.
$ac_objext
conftest_ipa8_conftest.oo
\
conftest
$ac_exeext
conftest.
$ac_ext
fi
{
$as_echo
"
$as_me
:
$LINENO
: result:
$ac_cv_c_stdcall_suffix
"
>
&5
$as_echo
"
$ac_cv_c_stdcall_suffix
"
>
&6
;
}
;;
*
)
ac_cv_c_stdcall_suffix
=
"no"
;;
esac
if
test
"
$ac_cv_c_extern_prefix
"
=
"yes"
...
...
@@ -17633,6 +17696,21 @@ _ACEOF
fi
if
test
"
$ac_cv_c_stdcall_suffix
"
=
"yes"
then
cat
>>
confdefs.h
<<
\
_ACEOF
#define __ASM_STDCALL(args) "@" #args
_ACEOF
else
cat
>>
confdefs.h
<<
\
_ACEOF
#define __ASM_STDCALL(args) ""
_ACEOF
fi
{
$as_echo
"
$as_me
:
$LINENO
: checking how to define a function in assembly code"
>
&5
$as_echo_n
"checking how to define a function in assembly code... "
>
&6
;
}
if
test
"
${
ac_cv_asm_func_def
+set
}
"
=
set
;
then
...
...
configure.ac
View file @
9cebf090
...
...
@@ -1400,6 +1400,19 @@ AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_ext
[if (ac_test) return 1],
ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
case $host_cpu in
*i[[3456789]]86*)
AC_CACHE_CHECK([whether external symbols need stdcall decoration], ac_cv_c_stdcall_suffix,
WINE_TRY_ASM_LINK(["jmp _ac_test@4"],
[#ifndef _MSC_VER
#define __stdcall __attribute__((__stdcall__))
#endif
int __stdcall ac_test(int i) { return i; }],
[if (ac_test(1)) return 1],
ac_cv_c_stdcall_suffix="yes",ac_cv_c_stdcall_suffix="no")) ;;
*) ac_cv_c_stdcall_suffix="no" ;;
esac
AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
if test "$ac_cv_c_extern_prefix" = "yes"
then
...
...
@@ -1410,6 +1423,14 @@ else
asm_name_prefix=""
fi
AH_TEMPLATE(__ASM_STDCALL,[Define to a macro to generate an stdcall suffix])
if test "$ac_cv_c_stdcall_suffix" = "yes"
then
AC_DEFINE([__ASM_STDCALL(args)],["@" #args])
else
AC_DEFINE([__ASM_STDCALL(args)],[""])
fi
dnl **** Check how to define a function in assembly code ****
AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
...
...
include/config.h.in
View file @
9cebf090
...
...
@@ -1197,6 +1197,9 @@
/* Define to a macro to generate an assembly name from a C symbol */
#undef __ASM_NAME
/* Define to a macro to generate an stdcall suffix */
#undef __ASM_STDCALL
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
...
...
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