Made stdcall decoration in .def files the default, and added -k option
to switch it off.
This commit is contained in:
parent
3b5e2d1a08
commit
b42dc56fce
|
@ -9823,56 +9823,6 @@ _ACEOF
|
|||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether stdcall symbols need to be decorated" >&5
|
||||
echo $ECHO_N "checking whether stdcall symbols need to be decorated... $ECHO_C" >&6
|
||||
if test "${ac_cv_c_stdcall_decoration+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
void ac_asm(void) { asm("\t.globl _ac_test@0\n_ac_test@0:\n\t.globl ac_test@0\nac_test@0:"); }
|
||||
extern void __attribute__((__stdcall__)) ac_test(void);
|
||||
int
|
||||
main ()
|
||||
{
|
||||
ac_test()
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_c_stdcall_decoration="yes"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
ac_cv_c_stdcall_decoration="no"
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_c_stdcall_decoration" >&5
|
||||
echo "${ECHO_T}$ac_cv_c_stdcall_decoration" >&6
|
||||
if test "$ac_cv_c_stdcall_decoration" = "yes"
|
||||
then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define NEED_STDCALL_DECORATION 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether assembler accepts .string" >&5
|
||||
echo $ECHO_N "checking whether assembler accepts .string... $ECHO_C" >&6
|
||||
if test "${ac_cv_c_asm_string+set}" = set; then
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -735,18 +735,6 @@ else
|
|||
AC_DEFINE([__ASM_NAME(name)], [name])
|
||||
fi
|
||||
|
||||
dnl **** Check whether stdcall symbols need to be decorated ****
|
||||
|
||||
AC_CACHE_CHECK([whether stdcall symbols need to be decorated], ac_cv_c_stdcall_decoration,
|
||||
WINE_TRY_ASM_LINK(["\t.globl _ac_test@0\n_ac_test@0:\n\t.globl ac_test@0\nac_test@0:"],
|
||||
[extern void __attribute__((__stdcall__)) ac_test(void);],
|
||||
[ac_test()],
|
||||
ac_cv_c_stdcall_decoration="yes",ac_cv_c_stdcall_decoration="no"))
|
||||
if test "$ac_cv_c_stdcall_decoration" = "yes"
|
||||
then
|
||||
AC_DEFINE(NEED_STDCALL_DECORATION, 1, [Define if stdcall symbols need to be decorated])
|
||||
fi
|
||||
|
||||
dnl **** Check for .string in assembler ****
|
||||
|
||||
AC_CACHE_CHECK([whether assembler accepts .string], ac_cv_c_asm_string,
|
||||
|
|
|
@ -680,9 +680,6 @@
|
|||
/* Define if we have __va_copy */
|
||||
#undef HAVE___VA_COPY
|
||||
|
||||
/* Define if stdcall symbols need to be decorated */
|
||||
#undef NEED_STDCALL_DECORATION
|
||||
|
||||
/* Define to disable all debug messages. */
|
||||
#undef NO_DEBUG_MSGS
|
||||
|
||||
|
|
|
@ -181,6 +181,7 @@ extern int stack_size;
|
|||
extern int nb_debug_channels;
|
||||
extern int nb_lib_paths;
|
||||
extern int display_warnings;
|
||||
extern int kill_at;
|
||||
|
||||
extern char DLLName[80];
|
||||
extern char DLLFileName[80];
|
||||
|
|
|
@ -50,6 +50,7 @@ int nb_names = 0;
|
|||
int nb_debug_channels = 0;
|
||||
int nb_lib_paths = 0;
|
||||
int display_warnings = 0;
|
||||
int kill_at = 0;
|
||||
|
||||
/* we only support relay debugging on i386 */
|
||||
#if defined(__i386__) && !defined(NO_TRACE_MSGS)
|
||||
|
@ -126,6 +127,7 @@ static void do_define( const char *arg );
|
|||
static void do_include( const char *arg );
|
||||
static void do_k_flags( const char *arg );
|
||||
static void do_ignore( const char *arg );
|
||||
static void do_kill_at(void);
|
||||
static void do_exe_mode( const char *arg );
|
||||
static void do_module( const char *arg );
|
||||
static void do_heap( const char *arg );
|
||||
|
@ -154,6 +156,7 @@ static const struct option_descr option_table[] =
|
|||
{ "-I", 1, do_include, "-I dir Ignored for C flags compatibility" },
|
||||
{ "-K", 1, do_k_flags, "-K flags Compiler flags (only -KPIC is supported)" },
|
||||
{ "-i", 1, do_ignore, "-i sym[,sym] Ignore specified symbols when resolving imports" },
|
||||
{ "-k", 0, do_kill_at, "-k Kill stdcall decorations in generated .def files" },
|
||||
{ "-m", 1, do_exe_mode,"-m mode Set the executable mode (cui|gui|cuiw|guiw)" },
|
||||
{ "-M", 1, do_module, "-M module Set the name of the main (Win32) module for a Win16 dll" },
|
||||
{ "-L", 1, do_lib, "-L directory Look for imports libraries in 'directory'" },
|
||||
|
@ -243,6 +246,11 @@ static void do_ignore( const char *arg )
|
|||
free( str );
|
||||
}
|
||||
|
||||
static void do_kill_at(void)
|
||||
{
|
||||
kill_at = 1;
|
||||
}
|
||||
|
||||
static void do_heap( const char *arg )
|
||||
{
|
||||
if (!isdigit(arg[0]))
|
||||
|
|
|
@ -891,17 +891,13 @@ void BuildDef32File(FILE *outfile)
|
|||
break;
|
||||
case TYPE_STDCALL:
|
||||
{
|
||||
#ifdef NEED_STDCALL_DECORATION
|
||||
int at_param = strlen(odp->u.func.arg_types) * sizeof(int);
|
||||
fprintf(outfile, "@%d", at_param);
|
||||
#endif /* NEED_STDCALL_DECORATION */
|
||||
if (!kill_at) fprintf(outfile, "@%d", at_param);
|
||||
/* try to reduce output */
|
||||
if(strcmp(name, odp->link_name))
|
||||
{
|
||||
fprintf(outfile, "=%s", odp->link_name);
|
||||
#ifdef NEED_STDCALL_DECORATION
|
||||
fprintf(outfile, "@%d", at_param);
|
||||
#endif /* NEED_STDCALL_DECORATION */
|
||||
if (!kill_at) fprintf(outfile, "@%d", at_param);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -112,6 +112,10 @@ clears the whole list.
|
|||
.BI \-K\ flags
|
||||
Ignored for compatibility with the C compiler.
|
||||
.TP
|
||||
.BI \-k
|
||||
Remove the stdcall decorations from the symbol names in the
|
||||
generated .def file. Only meaningful in \fB--def\fR mode.
|
||||
.TP
|
||||
.BI \-L\ directory
|
||||
Append the specified directory to the list of directories that are
|
||||
searched for import libraries.
|
||||
|
|
Loading…
Reference in New Issue