Support for generation of .def files from .spec files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Changelog:
    Dmitry Timoshkov <dmitry@codeweavers.com>
    Support for generation of .def files from .spec files.

diff -u cvs/hq/wine/Make.rules.in wine/Make.rules.in
--- cvs/hq/wine/Make.rules.in	Thu Jan 24 20:32:42 2002
+++ wine/Make.rules.in	Sat Feb  2 11:05:26 2002
@@ -92,7 +92,7 @@
 conf_manext     = 5
 includedir      = @includedir@/wine
 CLEAN_FILES     = *.o *.a *.so *.ln \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \
-                  *.flc *.spec.c *.glue.c y.tab.c y.tab.h lex.yy.c core
+                  *.flc *.spec.c *.spec.def *.glue.c y.tab.c y.tab.h lex.yy.c core
 
 OBJS = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) \
        $(ASM_SRCS:.S=.o) $(GLUE:.c=.glue.o) $(EXTRA_OBJS)
@@ -101,7 +101,7 @@
 
 # Implicit rules
 
-.SUFFIXES: .mc .rc .mc.rc .res .spec .spec.c .glue.c .pl .ok
+.SUFFIXES: .mc .rc .mc.rc .res .spec .spec.c .spec.def .glue.c .pl .ok
 
 .c.o:
 	$(CC) -c $(ALLCFLAGS) -o $@ $<
@@ -121,6 +121,9 @@
 .spec.spec.c:
 	$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -L$(DLLDIR) -o $@ -spec $<
 
+.spec.spec.def:
+	$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -L$(DLLDIR) -def $(MODULE).spec.def -o /dev/null -spec $<
+
 .c.glue.c:
 	$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -o $@ -glue $<
 
@@ -253,6 +256,8 @@
 # Misc. rules
 
 $(SPEC_SRCS:.spec=.spec.c): $(WINEBUILD)
+
+$(SPEC_SRCS:.spec=.spec.def): $(WINEBUILD)
 
 $(GLUE:.c=.glue.c): $(WINEBUILD)
 
diff -u cvs/hq/wine/configure wine/configure
--- cvs/hq/wine/configure	Thu Jan 31 12:32:12 2002
+++ wine/configure	Sat Feb  2 11:52:39 2002
@@ -5174,8 +5174,58 @@
 fi
 
 
+echo $ac_n "checking whether stdcall symbols need to be decorated""... $ac_c" 1>&6
+echo "configure:5179: checking whether stdcall symbols need to be decorated" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stdcall_decoration'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  saved_libs=$LIBS
+LIBS="conftest_asm.s $LIBS"
+if test "$ac_cv_c_extern_prefix" = "yes"
+then
+cat > conftest_asm.s <<EOF
+	.globl _ac_test@0
+_ac_test@0:
+EOF
+else
+cat > conftest_asm.s <<EOF
+	.globl ac_test@0
+ac_test@0:
+EOF
+fi
+cat > conftest.$ac_ext <<EOF
+#line 5198 "configure"
+#include "confdefs.h"
+extern void __attribute__((__stdcall__)) ac_test(void);
+int main() {
+ac_test(); return 0
+; return 0; }
+EOF
+if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_c_stdcall_decoration="yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_stdcall_decoration="no"
+fi
+rm -f conftest*
+LIBS=$saved_libs
+fi
+
+echo "$ac_t""$ac_cv_c_stdcall_decoration" 1>&6
+if test "$ac_cv_c_stdcall_decoration" = "yes"
+then
+  cat >> confdefs.h <<\EOF
+#define NEED_STDCALL_DECORATION 1
+EOF
+
+fi
+
+
 echo $ac_n "checking whether assembler accepts .string""... $ac_c" 1>&6
-echo "configure:5179: checking whether assembler accepts .string" >&5
+echo "configure:5229: checking whether assembler accepts .string" >&5
 if eval "test \"`echo '$''{'ac_cv_c_asm_string'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5185,14 +5235,14 @@
 	.string "test"
 EOF
 cat > conftest.$ac_ext <<EOF
-#line 5189 "configure"
+#line 5239 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_c_asm_string="yes"
 else
@@ -5220,21 +5270,21 @@
 if test "$LIBEXT" = "so"
 then
   echo $ac_n "checking whether we can build a GNU style ELF dll""... $ac_c" 1>&6
-echo "configure:5224: checking whether we can build a GNU style ELF dll" >&5
+echo "configure:5274: checking whether we can build a GNU style ELF dll" >&5
 if eval "test \"`echo '$''{'ac_cv_c_dll_gnuelf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   saved_cflags=$CFLAGS
   CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
   cat > conftest.$ac_ext <<EOF
-#line 5231 "configure"
+#line 5281 "configure"
 #include "confdefs.h"
 
 int main() {
 return 1
 ; return 0; }
 EOF
-if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_c_dll_gnuelf="yes"
 else
@@ -5255,21 +5305,21 @@
     LDDLLFLAGS="-Wl,-Bsymbolic"
   else
     echo $ac_n "checking whether we can build a UnixWare (Solaris) dll""... $ac_c" 1>&6
-echo "configure:5259: checking whether we can build a UnixWare (Solaris) dll" >&5
+echo "configure:5309: checking whether we can build a UnixWare (Solaris) dll" >&5
 if eval "test \"`echo '$''{'ac_cv_c_dll_unixware'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   saved_cflags=$CFLAGS
     CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
     cat > conftest.$ac_ext <<EOF
-#line 5266 "configure"
+#line 5316 "configure"
 #include "confdefs.h"
 
 int main() {
 return 1
 ; return 0; }
 EOF
-if { (eval echo configure:5273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_c_dll_unixware="yes"
 else
@@ -5333,7 +5383,7 @@
 wine_cv_libc_reentrant=no 
 
   echo $ac_n "checking for reentrant libc: __errno_location""... $ac_c" 1>&6
-echo "configure:5337: checking for reentrant libc: __errno_location" >&5
+echo "configure:5387: checking for reentrant libc: __errno_location" >&5
 if eval "test \"`echo '$''{'wine_cv_libc_r___errno_location'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5341,14 +5391,14 @@
   wine_cv_libc_r___errno_location=yes 
 else
   cat > conftest.$ac_ext <<EOF
-#line 5345 "configure"
+#line 5395 "configure"
 #include "confdefs.h"
 int myerrno = 0;
 char buf[256];
 int *__errno_location(){return &myerrno;}
 main(){connect(0,buf,255); exit(!myerrno);}
 EOF
-if { (eval echo configure:5352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   wine_cv_libc_r___errno_location=yes
 else
@@ -5371,7 +5421,7 @@
 
 
   echo $ac_n "checking for reentrant libc: __error""... $ac_c" 1>&6
-echo "configure:5375: checking for reentrant libc: __error" >&5
+echo "configure:5425: checking for reentrant libc: __error" >&5
 if eval "test \"`echo '$''{'wine_cv_libc_r___error'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5379,14 +5429,14 @@
   wine_cv_libc_r___error=yes 
 else
   cat > conftest.$ac_ext <<EOF
-#line 5383 "configure"
+#line 5433 "configure"
 #include "confdefs.h"
 int myerrno = 0;
 char buf[256];
 int *__error(){return &myerrno;}
 main(){connect(0,buf,255); exit(!myerrno);}
 EOF
-if { (eval echo configure:5390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   wine_cv_libc_r___error=yes
 else
@@ -5409,7 +5459,7 @@
 
 
   echo $ac_n "checking for reentrant libc: ___errno""... $ac_c" 1>&6
-echo "configure:5413: checking for reentrant libc: ___errno" >&5
+echo "configure:5463: checking for reentrant libc: ___errno" >&5
 if eval "test \"`echo '$''{'wine_cv_libc_r____errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5417,14 +5467,14 @@
   wine_cv_libc_r____errno=yes 
 else
   cat > conftest.$ac_ext <<EOF
-#line 5421 "configure"
+#line 5471 "configure"
 #include "confdefs.h"
 int myerrno = 0;
 char buf[256];
 int *___errno(){return &myerrno;}
 main(){connect(0,buf,255); exit(!myerrno);}
 EOF
-if { (eval echo configure:5428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   wine_cv_libc_r____errno=yes
 else
@@ -5447,7 +5497,7 @@
 
 
   echo $ac_n "checking for reentrant libc: __thr_errno""... $ac_c" 1>&6
-echo "configure:5451: checking for reentrant libc: __thr_errno" >&5
+echo "configure:5501: checking for reentrant libc: __thr_errno" >&5
 if eval "test \"`echo '$''{'wine_cv_libc_r___thr_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5455,14 +5505,14 @@
   wine_cv_libc_r___thr_errno=yes 
 else
   cat > conftest.$ac_ext <<EOF
-#line 5459 "configure"
+#line 5509 "configure"
 #include "confdefs.h"
 int myerrno = 0;
 char buf[256];
 int *__thr_errno(){return &myerrno;}
 main(){connect(0,buf,255); exit(!myerrno);}
 EOF
-if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   wine_cv_libc_r___thr_errno=yes
 else
@@ -5485,7 +5535,7 @@
 
 
   echo $ac_n "checking for reentrant libc: __errno""... $ac_c" 1>&6
-echo "configure:5489: checking for reentrant libc: __errno" >&5
+echo "configure:5539: checking for reentrant libc: __errno" >&5
 if eval "test \"`echo '$''{'wine_cv_libc_r___errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5493,14 +5543,14 @@
   wine_cv_libc_r___errno=yes 
 else
   cat > conftest.$ac_ext <<EOF
-#line 5497 "configure"
+#line 5547 "configure"
 #include "confdefs.h"
 int myerrno = 0;
 char buf[256];
 int *__errno(){return &myerrno;}
 main(){connect(0,buf,255); exit(!myerrno);}
 EOF
-if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   wine_cv_libc_r___errno=yes
 else
@@ -5534,7 +5584,7 @@
 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
 then
 echo $ac_n "checking for reentrant X libraries""... $ac_c" 1>&6
-echo "configure:5538: checking for reentrant X libraries" >&5
+echo "configure:5588: checking for reentrant X libraries" >&5
 if eval "test \"`echo '$''{'wine_cv_x_reentrant'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5583,19 +5633,19 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:5587: checking for working alloca.h" >&5
+echo "configure:5637: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5592 "configure"
+#line 5642 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:5599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -5616,12 +5666,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5620: checking for alloca" >&5
+echo "configure:5670: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5625 "configure"
+#line 5675 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -5649,7 +5699,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:5653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -5681,12 +5731,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5685: checking whether alloca needs Cray hooks" >&5
+echo "configure:5735: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5690 "configure"
+#line 5740 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -5711,12 +5761,12 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5715: checking for $ac_func" >&5
+echo "configure:5765: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5720 "configure"
+#line 5770 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5739,7 +5789,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5766,7 +5816,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5770: checking stack direction for C alloca" >&5
+echo "configure:5820: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5774,7 +5824,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 5778 "configure"
+#line 5828 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -5793,7 +5843,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:5797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -5855,12 +5905,12 @@
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5859: checking for $ac_func" >&5
+echo "configure:5909: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5864 "configure"
+#line 5914 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5883,7 +5933,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5967,17 +6017,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5971: checking for $ac_hdr" >&5
+echo "configure:6021: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5976 "configure"
+#line 6026 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6004,12 +6054,12 @@
 done
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:6008: checking whether stat file-mode macros are broken" >&5
+echo "configure:6058: checking whether stat file-mode macros are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6013 "configure"
+#line 6063 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -6062,12 +6112,12 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:6066: checking for working const" >&5
+echo "configure:6116: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6071 "configure"
+#line 6121 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -6116,7 +6166,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -6137,21 +6187,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:6141: checking for inline" >&5
+echo "configure:6191: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 6148 "configure"
+#line 6198 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:6155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -6177,12 +6227,12 @@
 esac
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:6181: checking for ANSI C header files" >&5
+echo "configure:6231: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6186 "configure"
+#line 6236 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -6190,7 +6240,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6207,7 +6257,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 6211 "configure"
+#line 6261 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -6225,7 +6275,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 6229 "configure"
+#line 6279 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -6246,7 +6296,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 6250 "configure"
+#line 6300 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -6257,7 +6307,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:6261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -6281,12 +6331,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:6285: checking for size_t" >&5
+echo "configure:6335: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6290 "configure"
+#line 6340 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6314,7 +6364,7 @@
 fi
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:6318: checking size of long long" >&5
+echo "configure:6368: checking size of long long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6322,10 +6372,9 @@
   ac_cv_sizeof_long_long=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 6326 "configure"
+#line 6376 "configure"
 #include "confdefs.h"
 #include <stdio.h>
-#include <sys/types.h>
 main()
 {
   FILE *f=fopen("conftestval", "w");
@@ -6334,7 +6383,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -6355,12 +6404,12 @@
 
 
 echo $ac_n "checking whether linux/input.h is for real""... $ac_c" 1>&6
-echo "configure:6359: checking whether linux/input.h is for real" >&5
+echo "configure:6408: checking whether linux/input.h is for real" >&5
 if eval "test \"`echo '$''{'wine_cv_linux_input_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6364 "configure"
+#line 6413 "configure"
 #include "confdefs.h"
 
 	    #include <linux/input.h>
@@ -6373,7 +6422,7 @@
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   wine_cv_linux_input_h=yes
 else
@@ -6397,12 +6446,12 @@
 
    
 echo $ac_n "checking whether we can use re-entrant gethostbyname_r Linux style""... $ac_c" 1>&6
-echo "configure:6401: checking whether we can use re-entrant gethostbyname_r Linux style" >&5
+echo "configure:6450: checking whether we can use re-entrant gethostbyname_r Linux style" >&5
 if eval "test \"`echo '$''{'wine_cv_linux_gethostbyname_r_6'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6406 "configure"
+#line 6455 "configure"
 #include "confdefs.h"
 
 #include <netdb.h>
@@ -6423,7 +6472,7 @@
     
 ; return 0; }
 EOF
-if { (eval echo configure:6427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   wine_cv_linux_gethostbyname_r_6=yes
 else
@@ -6449,12 +6498,12 @@
 if test "$ac_cv_header_linux_joystick_h" = "yes"
 then
    echo $ac_n "checking whether linux/joystick.h uses the Linux 2.2+ API""... $ac_c" 1>&6
-echo "configure:6453: checking whether linux/joystick.h uses the Linux 2.2+ API" >&5
+echo "configure:6502: checking whether linux/joystick.h uses the Linux 2.2+ API" >&5
 if eval "test \"`echo '$''{'wine_cv_linux_joystick_22_api'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6458 "configure"
+#line 6507 "configure"
 #include "confdefs.h"
 
 	#include <sys/ioctl.h>
@@ -6469,7 +6518,7 @@
 /*empty*/
 ; return 0; }
 EOF
-if { (eval echo configure:6473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   wine_cv_linux_joystick_22_api=yes
 else
@@ -6496,12 +6545,12 @@
 if test "$ac_cv_header_sys_vfs_h" = "yes"
 then
     echo $ac_n "checking whether sys/vfs.h defines statfs""... $ac_c" 1>&6
-echo "configure:6500: checking whether sys/vfs.h defines statfs" >&5
+echo "configure:6549: checking whether sys/vfs.h defines statfs" >&5
 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6505 "configure"
+#line 6554 "configure"
 #include "confdefs.h"
 
 	#include <sys/types.h>
@@ -6518,7 +6567,7 @@
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   wine_cv_sys_vfs_has_statfs=yes
 else
@@ -6545,12 +6594,12 @@
 if test "$ac_cv_header_sys_statfs_h" = "yes"
 then
     echo $ac_n "checking whether sys/statfs.h defines statfs""... $ac_c" 1>&6
-echo "configure:6549: checking whether sys/statfs.h defines statfs" >&5
+echo "configure:6598: checking whether sys/statfs.h defines statfs" >&5
 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6554 "configure"
+#line 6603 "configure"
 #include "confdefs.h"
 
 	#include <sys/types.h>
@@ -6565,7 +6614,7 @@
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   wine_cv_sys_statfs_has_statfs=yes
 else
@@ -6592,12 +6641,12 @@
 if test "$ac_cv_header_sys_mount_h" = "yes"
 then
     echo $ac_n "checking whether sys/mount.h defines statfs""... $ac_c" 1>&6
-echo "configure:6596: checking whether sys/mount.h defines statfs" >&5
+echo "configure:6645: checking whether sys/mount.h defines statfs" >&5
 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6601 "configure"
+#line 6650 "configure"
 #include "confdefs.h"
 
 	#include <sys/types.h>
@@ -6612,7 +6661,7 @@
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   wine_cv_sys_mount_has_statfs=yes
 else
@@ -6638,7 +6687,7 @@
 
 
 echo $ac_n "checking for statfs.f_bfree""... $ac_c" 1>&6
-echo "configure:6642: checking for statfs.f_bfree" >&5
+echo "configure:6691: checking for statfs.f_bfree" >&5
 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6647,7 +6696,7 @@
         wine_cv_statfs_bfree=no
     else
     	cat > conftest.$ac_ext <<EOF
-#line 6651 "configure"
+#line 6700 "configure"
 #include "confdefs.h"
 
 	#include <sys/types.h>
@@ -6674,7 +6723,7 @@
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   wine_cv_statfs_bfree=yes
 else
@@ -6698,7 +6747,7 @@
 fi
 
 echo $ac_n "checking for statfs.f_bavail""... $ac_c" 1>&6
-echo "configure:6702: checking for statfs.f_bavail" >&5
+echo "configure:6751: checking for statfs.f_bavail" >&5
 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6707,7 +6756,7 @@
         wine_cv_statfs_bavail=no
     else
     	cat > conftest.$ac_ext <<EOF
-#line 6711 "configure"
+#line 6760 "configure"
 #include "confdefs.h"
 
 	#include <sys/types.h>
@@ -6734,7 +6783,7 @@
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   wine_cv_statfs_bavail=yes
 else
@@ -6759,12 +6808,12 @@
 
 
 echo $ac_n "checking for msg_accrights in struct msghdr""... $ac_c" 1>&6
-echo "configure:6763: checking for msg_accrights in struct msghdr" >&5
+echo "configure:6812: checking for msg_accrights in struct msghdr" >&5
 if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6768 "configure"
+#line 6817 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -6772,7 +6821,7 @@
 struct msghdr hdr; hdr.msg_accrights=0
 ; return 0; }
 EOF
-if { (eval echo configure:6776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_msg_accrights="yes"
 else
@@ -6795,12 +6844,12 @@
 
 
 echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6
-echo "configure:6799: checking for sa_len in struct sockaddr" >&5
+echo "configure:6848: checking for sa_len in struct sockaddr" >&5
 if eval "test \"`echo '$''{'ac_cv_c_sockaddr_sa_len'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6804 "configure"
+#line 6853 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -6809,7 +6858,7 @@
 static struct sockaddr addr; addr.sa_len = 1
 ; return 0; }
 EOF
-if { (eval echo configure:6813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_sockaddr_sa_len="yes"
 else
@@ -6832,12 +6881,12 @@
 
 
 echo $ac_n "checking for sun_len in struct sockaddr_un""... $ac_c" 1>&6
-echo "configure:6836: checking for sun_len in struct sockaddr_un" >&5
+echo "configure:6885: checking for sun_len in struct sockaddr_un" >&5
 if eval "test \"`echo '$''{'ac_cv_c_sockaddr_sun_len'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6841 "configure"
+#line 6890 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -6846,7 +6895,7 @@
 static struct sockaddr_un addr; addr.sun_len = 1
 ; return 0; }
 EOF
-if { (eval echo configure:6850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_sockaddr_sun_len="yes"
 else
@@ -6869,12 +6918,12 @@
 
 
 echo $ac_n "checking whether we need to define __i386__""... $ac_c" 1>&6
-echo "configure:6873: checking whether we need to define __i386__" >&5
+echo "configure:6922: checking whether we need to define __i386__" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6878 "configure"
+#line 6927 "configure"
 #include "confdefs.h"
 #if (defined(i386) || defined(__i386)) && !defined(__i386__)
 yes
diff -u cvs/hq/wine/configure.in wine/configure.in
--- cvs/hq/wine/configure.in	Thu Jan 31 12:32:12 2002
+++ wine/configure.in	Sat Feb  2 11:44:16 2002
@@ -652,6 +652,34 @@
             [Define if symbols declared in assembly code need an underscore prefix])
 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,
+[saved_libs=$LIBS
+LIBS="conftest_asm.s $LIBS"
+if test "$ac_cv_c_extern_prefix" = "yes"
+then
+cat > conftest_asm.s <<EOF
+	.globl _ac_test@0
+_ac_test@0:
+EOF
+else
+cat > conftest_asm.s <<EOF
+	.globl ac_test@0
+ac_test@0:
+EOF
+fi
+AC_TRY_LINK([extern void __attribute__((__stdcall__)) ac_test(void);],
+            [ac_test(); return 0],
+            ac_cv_c_stdcall_decoration="yes",ac_cv_c_stdcall_decoration="no")
+LIBS=$saved_libs])
+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],
diff -u cvs/hq/wine/include/config.h.in wine/include/config.h.in
--- cvs/hq/wine/include/config.h.in	Thu Jan 31 12:32:40 2002
+++ wine/include/config.h.in	Sat Feb  2 11:44:57 2002
@@ -1,4 +1,4 @@
-/* include/config.h.in.  Generated automatically from configure.in by autoheader 2.13.  */
+/* include/config.h.in.  Generated automatically from configure.in by autoheader.  */
 
 /* Define if using alloca.c.  */
 #undef C_ALLOCA
@@ -501,6 +501,9 @@
 
 /* Define if symbols declared in assembly code need an underscore prefix */
 #undef NEED_UNDERSCORE_PREFIX
+
+/* Define if stdcall symbols need to be decorated */
+#undef NEED_STDCALL_DECORATION
 
 /* Define to use .string instead of .ascii */
 #undef HAVE_ASM_STRING
diff -u cvs/hq/wine/tools/winebuild/build.h wine/tools/winebuild/build.h
--- cvs/hq/wine/tools/winebuild/build.h	Mon Dec 24 13:30:27 2001
+++ wine/tools/winebuild/build.h	Sat Feb  2 11:06:35 2002
@@ -153,6 +153,7 @@
 extern void BuildRelays32( FILE *outfile );
 extern void BuildSpec16File( FILE *outfile );
 extern void BuildSpec32File( FILE *outfile );
+extern void BuildDef32File( FILE *outfile );
 extern SPEC_TYPE ParseTopLevel( FILE *file );
 
 /* global variables */
diff -u cvs/hq/wine/tools/winebuild/main.c wine/tools/winebuild/main.c
--- cvs/hq/wine/tools/winebuild/main.c	Fri Dec 14 15:16:11 2001
+++ wine/tools/winebuild/main.c	Sat Feb  2 11:34:37 2002
@@ -28,6 +28,7 @@
 int Limit = 0;
 int DLLHeapSize = 0;
 int UsePIC = 0;
+int DoDEF = 0;
 int stack_size = 0;
 int nb_entry_points = 0;
 int nb_names = 0;
@@ -50,9 +51,11 @@
 
 const char *input_file_name;
 const char *output_file_name;
+const char *output_def_file_name;
 
 static FILE *input_file;
 static FILE *output_file;
+static FILE *output_def_file;
 
 /* execution mode */
 static enum { MODE_NONE, MODE_SPEC, MODE_GLUE, MODE_RELAY16, MODE_RELAY32 } exec_mode = MODE_NONE;
@@ -72,6 +75,7 @@
 static void cleanup(void)
 {
     if (output_file_name) unlink( output_file_name );
+    if (output_def_file_name) unlink( output_def_file_name );
 }
 
 
@@ -87,6 +91,7 @@
     const char *usage;
 };
 
+static void do_def(const char *arg);
 static void do_pic(void);
 static void do_output( const char *arg );
 static void do_usage(void);
@@ -105,12 +110,26 @@
     { "-o",       1, do_output,  "-o name          Set the output file name (default: stdout)" },
     { "-sym",     1, do_sym,     "-sym file.o      Read the list of undefined symbols from 'file.o'" },
     { "-spec",    1, do_spec,    "-spec file.spec  Build a .c file from a spec file" },
+    { "-def",     1, do_def,     "-def file.def    Build a .def file from a spec file" },
     { "-glue",    1, do_glue,    "-glue file.c     Build the 16-bit glue for a .c file" },
     { "-relay16", 0, do_relay16, "-relay16         Build the 16-bit relay assembly routines" },
     { "-relay32", 0, do_relay32, "-relay32         Build the 32-bit relay assembly routines" },
     { NULL,       0, NULL,      NULL }
 };
 
+static void do_def(const char *arg)
+{
+    DoDEF = 1;
+
+    if (!(output_def_file = fopen( arg, "w" )))
+    {
+        fprintf( stderr, "Unable to create output file '%s'\n", arg );
+        exit(1);
+    }
+    output_def_file_name = arg;
+    atexit( cleanup );  /* make sure we remove the output file on exit */
+}
+
 static void do_pic(void)
 {
     UsePIC = 1;
@@ -118,11 +137,6 @@
 
 static void do_output( const char *arg )
 {
-    if ( ( unlink ( arg ) ) == -1 && ( errno != ENOENT ) ) 
-    {
-        fprintf ( stderr, "Unable to create output file '%s'\n", arg );
-        exit (1);
-    }
     if (!(output_file = fopen( arg, "w" )))
     {
         fprintf( stderr, "Unable to create output file '%s'\n", arg );
@@ -240,6 +254,8 @@
                 break;
             case SPEC_WIN32:
                 BuildSpec32File( output_file );
+                if (DoDEF)
+                    BuildDef32File( output_def_file );
                 break;
             default: assert(0);
         }
@@ -261,6 +277,11 @@
     {
         fclose( output_file );
         output_file_name = NULL;
+    }
+    if (output_def_file_name)
+    {
+	fclose( output_def_file );
+	output_def_file_name = NULL;
     }
     return 0;
 }
diff -u cvs/hq/wine/tools/winebuild/parser.c wine/tools/winebuild/parser.c
--- cvs/hq/wine/tools/winebuild/parser.c	Mon Dec 24 13:30:27 2001
+++ wine/tools/winebuild/parser.c	Sat Feb  2 11:14:59 2002
@@ -510,7 +510,6 @@
 	else if (strcmp(token, "file") == 0)
 	{
 	    strcpy(DLLFileName, GetToken(0));
-	    strupper(DLLFileName);
 	}
         else if (strcmp(token, "type") == 0)
         {
@@ -612,7 +611,12 @@
     if (!DLLFileName[0])
     {
         if (SpecMode == SPEC_MODE_DLL)
-            sprintf( DLLFileName, "%s.dll", DLLName );
+	{
+	    strcpy( DLLFileName, DLLName );
+	    /* Append .dll to name if no extension present */
+	    if (!strrchr( DLLFileName, '.'))
+		strcat( DLLFileName, ".dll" );
+	}
         else
             sprintf( DLLFileName, "%s.exe", DLLName );
     }
diff -u cvs/hq/wine/tools/winebuild/spec32.c wine/tools/winebuild/spec32.c
--- cvs/hq/wine/tools/winebuild/spec32.c	Mon Dec 24 13:30:27 2001
+++ wine/tools/winebuild/spec32.c	Sat Feb  2 11:46:29 2002
@@ -759,3 +759,76 @@
                  "}\n", DLLName );
     }
 }
+
+static void DEF32_output_exports(FILE *outfile)
+{
+    int i;
+
+    for(i = 0; i < nb_entry_points; i++)
+    {
+	ORDDEF *odp = EntryPoints[i];
+	if(!odp || !*odp->name || (odp->flags & FLAG_NOIMPORT)) continue;
+
+	fprintf(outfile, "\t%s", odp->name);
+
+	switch(odp->type)
+	{
+	case TYPE_EXTERN:
+	case TYPE_VARARGS:
+	case TYPE_CDECL:
+	case TYPE_VARIABLE:
+	    /* try to reduce output */
+	    if(strcmp(odp->name, odp->link_name))
+		fprintf(outfile, "=%s", odp->link_name);
+	    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 */
+	    /* try to reduce output */
+	    if(strcmp(odp->name, odp->link_name))
+	    {
+		fprintf(outfile, "=%s", odp->link_name);
+#ifdef NEED_STDCALL_DECORATION
+		fprintf(outfile, "@%d", at_param);
+#endif /* NEED_STDCALL_DECORATION */
+	    }
+	    break;
+	}
+	case TYPE_STUB:
+	    fprintf(outfile, "=%s", make_internal_name( odp, "stub" ));
+	    break;
+	case TYPE_FORWARD:
+	    fprintf(outfile, "=lib%s", odp->link_name);
+	    break;
+	default:
+	    assert(0);
+	}
+	fprintf(outfile, " @%d\n", odp->ordinal);
+    }
+
+    for(i = 0; i < nb_debug_channels; i++)
+        fprintf(outfile, "\t__wine_dbch_%s\n", debug_channels[i]);
+}
+
+/*******************************************************************
+ *         BuildDef32File
+ *
+ * Build a Win32 def file from a spec file.
+ */
+void BuildDef32File(FILE *outfile)
+{
+    AssignOrdinals();
+
+    fprintf(outfile, "; File generated automatically from %s; do not edit!\n\n",
+	    input_file_name );
+
+    fprintf(outfile, "LIBRARY lib%s\n\n", DLLFileName);
+
+    fprintf(outfile, "EXPORTS\n");
+
+    /* Output the exports and relay entry points */
+    DEF32_output_exports(outfile);
+}







[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux