Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
9cebf090
Commit
9cebf090
authored
15 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
configure: Add a macro to define an stdcall suffix in assembly code.
parent
8812d241
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
configure
+78
-0
78 additions, 0 deletions
configure
configure.ac
+21
-0
21 additions, 0 deletions
configure.ac
include/config.h.in
+3
-0
3 additions, 0 deletions
include/config.h.in
with
102 additions
and
0 deletions
configure
+
78
−
0
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
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
21
−
0
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,
...
...
This diff is collapsed.
Click to expand it.
include/config.h.in
+
3
−
0
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment